s4-credentials: get all attributes in cli_credentials_set_secrets()
authorAndrew Tridgell <tridge@samba.org>
Wed, 28 Jul 2010 07:30:09 +0000 (17:30 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 11 Sep 2010 12:32:43 +0000 (22:32 +1000)
This ensures we get whenChanged, which is needed by the s3 winbind
code to ensure we don't repeatedly try to change the password

source4/auth/credentials/credentials_files.c

index e0fd052cbc07d15ad3ae18c6651d3900b086ce22..8ad395ddc84eb5d97347af52157fcbbdc5c49ac7 100644 (file)
@@ -185,22 +185,6 @@ _PUBLIC_ NTSTATUS cli_credentials_set_secrets(struct cli_credentials *cred,
        
        int ldb_ret;
        struct ldb_message *msg;
-       const char *attrs[] = {
-               "secret",
-               "priorSecret",
-               "samAccountName",
-               "flatname",
-               "realm",
-               "secureChannelType",
-               "unicodePwd",
-               "msDS-KeyVersionNumber",
-               "saltPrincipal",
-               "privateKeytab",
-               "krb5Keytab",
-               "servicePrincipalName",
-               "ldapBindDn",
-               NULL
-       };
        
        const char *machine_account;
        const char *password;
@@ -235,7 +219,7 @@ _PUBLIC_ NTSTATUS cli_credentials_set_secrets(struct cli_credentials *cred,
        ldb_ret = dsdb_search_one(ldb, ldb, &msg,
                                  ldb_dn_new(mem_ctx, ldb, base),
                                  LDB_SCOPE_SUBTREE,
-                                 attrs, 0, "%s", filter);
+                                 NULL, 0, "%s", filter);
 
        if (ldb_ret != LDB_SUCCESS) {
                *error_string = talloc_asprintf(cred, "Could not find entry to match filter: '%s' base: '%s': %s: %s\n",