credentials: Revert "credentials: Fix CID 1414796 Explicit null dereferenced"
authorVolker Lendecke <vl@samba.org>
Wed, 11 Apr 2018 06:21:23 +0000 (08:21 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 11 Apr 2018 17:07:24 +0000 (19:07 +0200)
This reverts commit 90c02ec64d0e3c860f8d6906cf849bdd2c7bcc54.

We have code to take care of password==NULL, this CID must be fixed in a
different way

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
auth/credentials/credentials_secrets.c

index 2ae384f..58a87ac 100644 (file)
@@ -106,11 +106,6 @@ static NTSTATUS cli_credentials_set_secrets_lct(struct cli_credentials *cred,
        }
 
        password = ldb_msg_find_attr_as_string(msg, "secret", NULL);
-       if (password == NULL) {
-               /* This attribute is mandatory */
-               talloc_free(mem_ctx);
-               return NT_STATUS_NOT_FOUND;
-       }
 
        whenChanged = ldb_msg_find_ldb_val(msg, "whenChanged");
        if (!whenChanged || ldb_val_to_time(whenChanged, &lct) != LDB_SUCCESS) {