s3:passdb: Do not return OK if we don't have pinfo set up
authorAndreas Schneider <asn@samba.org>
Tue, 17 Apr 2018 06:55:23 +0000 (08:55 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 18 Apr 2018 22:32:22 +0000 (00:32 +0200)
This prevents a crash in fill_mem_keytab_from_secrets()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13376

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Apr 19 00:32:22 CEST 2018 on sn-devel-144

source3/passdb/machine_account_secrets.c

index 40511f96a8b0ea941be10c2d1b39cc6a770a5520..94a7e21c8098963ffaadcaf3cb7ea070b3abd644 100644 (file)
@@ -1317,7 +1317,7 @@ NTSTATUS secrets_fetch_or_upgrade_domain_info(const char *domain,
 
        last_set_time = secrets_fetch_pass_last_set_time(domain);
        if (last_set_time == 0) {
-               return NT_STATUS_OK;
+               return NT_STATUS_CANT_ACCESS_DOMAIN_INFO;
        }
        unix_to_nt_time(&last_set_nt, last_set_time);