diff options
author | Simo Sorce <idra@samba.org> | 2006-08-13 08:00:36 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:15:31 -0500 |
commit | a23b63a8e54db7d0ec98ad95cdca11dd4d039e17 (patch) | |
tree | b5a38a7ca5dd1347097fe14b9f80df25fa3e4594 /source4/auth/credentials | |
parent | 8492a45f8a936943c9ddd0fd400871b78308a23d (diff) | |
download | samba-a23b63a8e54db7d0ec98ad95cdca11dd4d039e17.tar.gz samba-a23b63a8e54db7d0ec98ad95cdca11dd4d039e17.tar.bz2 samba-a23b63a8e54db7d0ec98ad95cdca11dd4d039e17.zip |
r17516: Change helper function names to make more clear what they are meant to do
(This used to be commit ad75cf869550af66119d0293503024d41d834e02)
Diffstat (limited to 'source4/auth/credentials')
-rw-r--r-- | source4/auth/credentials/credentials_files.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source4/auth/credentials/credentials_files.c b/source4/auth/credentials/credentials_files.c index a268fe369e..c61f8ccb5e 100644 --- a/source4/auth/credentials/credentials_files.c +++ b/source4/auth/credentials/credentials_files.c @@ -238,10 +238,10 @@ NTSTATUS cli_credentials_set_secrets(struct cli_credentials *cred, return NT_STATUS_CANT_ACCESS_DOMAIN_INFO; } - password = ldb_msg_find_string(msgs[0], "secret", NULL); - old_password = ldb_msg_find_string(msgs[0], "priorSecret", NULL); + password = ldb_msg_find_attr_as_string(msgs[0], "secret", NULL); + old_password = ldb_msg_find_attr_as_string(msgs[0], "priorSecret", NULL); - machine_account = ldb_msg_find_string(msgs[0], "samAccountName", NULL); + machine_account = ldb_msg_find_attr_as_string(msgs[0], "samAccountName", NULL); if (!machine_account) { DEBUG(1, ("Could not find 'samAccountName' in join record to domain: %s\n", @@ -252,10 +252,10 @@ NTSTATUS cli_credentials_set_secrets(struct cli_credentials *cred, return NT_STATUS_CANT_ACCESS_DOMAIN_INFO; } - salt_principal = ldb_msg_find_string(msgs[0], "saltPrincipal", NULL); + salt_principal = ldb_msg_find_attr_as_string(msgs[0], "saltPrincipal", NULL); cli_credentials_set_salt_principal(cred, salt_principal); - sct = ldb_msg_find_int(msgs[0], "secureChannelType", 0); + sct = ldb_msg_find_attr_as_int(msgs[0], "secureChannelType", 0); if (sct) { cli_credentials_set_secure_channel_type(cred, sct); } @@ -277,28 +277,28 @@ NTSTATUS cli_credentials_set_secrets(struct cli_credentials *cred, } - domain = ldb_msg_find_string(msgs[0], "flatname", NULL); + domain = ldb_msg_find_attr_as_string(msgs[0], "flatname", NULL); if (domain) { cli_credentials_set_domain(cred, domain, CRED_SPECIFIED); } - realm = ldb_msg_find_string(msgs[0], "realm", NULL); + realm = ldb_msg_find_attr_as_string(msgs[0], "realm", NULL); if (realm) { cli_credentials_set_realm(cred, realm, CRED_SPECIFIED); } cli_credentials_set_username(cred, machine_account, CRED_SPECIFIED); - cli_credentials_set_kvno(cred, ldb_msg_find_int(msgs[0], "msDS-KeyVersionNumber", 0)); + cli_credentials_set_kvno(cred, ldb_msg_find_attr_as_int(msgs[0], "msDS-KeyVersionNumber", 0)); /* If there was an external keytab specified by reference in * the LDB, then use this. Otherwise we will make one up * (chewing CPU time) from the password */ - keytab = ldb_msg_find_string(msgs[0], "krb5Keytab", NULL); + keytab = ldb_msg_find_attr_as_string(msgs[0], "krb5Keytab", NULL); if (keytab) { cli_credentials_set_keytab_name(cred, keytab, CRED_SPECIFIED); } else { - keytab = ldb_msg_find_string(msgs[0], "privateKeytab", NULL); + keytab = ldb_msg_find_attr_as_string(msgs[0], "privateKeytab", NULL); if (keytab) { keytab = talloc_asprintf(mem_ctx, "FILE:%s", private_path(mem_ctx, keytab)); if (keytab) { |