diff options
author | Justin Stephenson <jstephen@redhat.com> | 2018-12-17 14:57:59 -0500 |
---|---|---|
committer | Noel Power <npower@samba.org> | 2019-01-09 18:40:44 +0100 |
commit | ecbb2f78cec6d9e6f5180c8ba274a1da2152f098 (patch) | |
tree | 7f67564cbf46f4e2ebd846f89f0a1ea1bc5fced0 | |
parent | 499f051c9d527a14f9712365f8403a1ee0662c5b (diff) | |
download | samba-ecbb2f78cec6d9e6f5180c8ba274a1da2152f098.tar.gz |
s3:smbpasswd: Print debug message about Netbios
With a preceding patch, cli_connect_nb() will return
NT_STATUS_NOT_SUPPORTED when 'disable netbios' is set in smb.conf.
Print an informative error message to indicate Netbios is disabled
if this occurs.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13727
Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Noel Power <nopower@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r-- | source3/libsmb/passchange.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/source3/libsmb/passchange.c b/source3/libsmb/passchange.c index 48ffba8036f..f60e3079975 100644 --- a/source3/libsmb/passchange.c +++ b/source3/libsmb/passchange.c @@ -46,10 +46,18 @@ NTSTATUS remote_password_change(const char *remote_machine, result = cli_connect_nb(remote_machine, NULL, 0, 0x20, NULL, SMB_SIGNING_IPC_DEFAULT, 0, &cli); if (!NT_STATUS_IS_OK(result)) { - if (asprintf(err_str, "Unable to connect to SMB server on " - "machine %s. Error was : %s.\n", - remote_machine, nt_errstr(result))==-1) { - *err_str = NULL; + if (NT_STATUS_EQUAL(result, NT_STATUS_NOT_SUPPORTED)) { + if (asprintf(err_str, "Unable to connect to SMB server on " + "machine %s. NetBIOS support disabled\n", + remote_machine) == -1) { + *err_str = NULL; + } + } else { + if (asprintf(err_str, "Unable to connect to SMB server on " + "machine %s. Error was : %s.\n", + remote_machine, nt_errstr(result))==-1) { + *err_str = NULL; + } } return result; } |