s3:libnetapi: Check return code of cli_credentials_guess()
authorAndreas Schneider <asn@samba.org>
Tue, 22 Jun 2021 07:34:39 +0000 (09:34 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 29 Jun 2021 02:19:35 +0000 (02:19 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/lib/netapi/netapi.c

index fb51bb343233a12b67245a7831523efe316d02ee..8dbb05307d2017affecda2774484532ace54a092 100644 (file)
@@ -129,7 +129,8 @@ NET_API_STATUS libnetapi_net_init(struct libnetapi_ctx **context)
 
        BlockSignals(True, SIGPIPE);
 
-       cli_credentials_guess(ctx->creds, lp_ctx);
+       /* Ignore return code, as we might not have a smb.conf */
+       (void)cli_credentials_guess(ctx->creds, lp_ctx);
 
        status = libnetapi_init_private_context(ctx);
        if (status != 0) {