diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-10-28 16:49:30 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-11-02 16:36:52 +1100 |
commit | 609b831462d95bcb24b93453d62481d11e0ff53b (patch) | |
tree | 7742e63a7d7cc7c6b26ec2b3bedb6225f33ade3f | |
parent | 071275010ee6a6d39351ab68e2c6770fedfc4328 (diff) | |
download | samba-609b831462d95bcb24b93453d62481d11e0ff53b.tar.gz |
s4:credentials Put the 'secrets.keytab' in the same directory as secrets.ldb
This avoids trouble when the secrets.ldb is updated with ldbedit but
an smb.conf is not specified.
Andrew Bartlett
-rw-r--r-- | source4/auth/credentials/credentials_files.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/auth/credentials/credentials_files.c b/source4/auth/credentials/credentials_files.c index 42e8ea082ad..8036e48193e 100644 --- a/source4/auth/credentials/credentials_files.c +++ b/source4/auth/credentials/credentials_files.c @@ -33,6 +33,8 @@ #include "auth/credentials/credentials_proto.h" #include "param/param.h" #include "lib/events/events.h" +#include "dsdb/samdb/samdb.h" + /** * Read a file descriptor, and parse it for a password (eg from a file or stdin) @@ -323,7 +325,7 @@ _PUBLIC_ NTSTATUS cli_credentials_set_secrets(struct cli_credentials *cred, } else { keytab = ldb_msg_find_attr_as_string(msgs[0], "privateKeytab", NULL); if (keytab) { - keytab = talloc_asprintf(mem_ctx, "FILE:%s", private_path(mem_ctx, lp_ctx, keytab)); + keytab = talloc_asprintf(mem_ctx, "FILE:%s", samdb_relative_path(ldb, mem_ctx, keytab)); if (keytab) { cli_credentials_set_keytab_name(cred, event_ctx, lp_ctx, keytab, CRED_SPECIFIED); } |