From fa6140f8f1986d6abd239c631388b881709787ea Mon Sep 17 00:00:00 2001 From: David Mulder Date: Thu, 2 Nov 2017 08:25:11 -0600 Subject: [PATCH] smbc_opendir should not return EEXIST with invalid login credentials BUG: https://bugzilla.samba.org/show_bug.cgi?id=13050 Signed-off-by: David Mulder Reviewed-by: Andreas Schneider Reviewed-by: Jim McDonough Autobuild-User(master): Jim McDonough Autobuild-Date(master): Thu Nov 9 01:49:06 CET 2017 on sn-devel-144 (cherry picked from commit 7470b9b18af282a742929d3fc90f4be5520428a1) --- source3/libsmb/libsmb_server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c index 2d41f2facf3..e6067be2013 100644 --- a/source3/libsmb/libsmb_server.c +++ b/source3/libsmb/libsmb_server.c @@ -360,8 +360,8 @@ SMBC_server_internal(TALLOC_CTX *ctx, "?????", *pp_password); if (!NT_STATUS_IS_OK(status)) { - errno = map_errno_from_nt_status(status); cli_shutdown(srv->cli); + errno = map_errno_from_nt_status(status); srv->cli = NULL; smbc_getFunctionRemoveCachedServer(context)(context, srv); @@ -571,8 +571,8 @@ SMBC_server_internal(TALLOC_CTX *ctx, status = cli_tree_connect_creds(c, share, "?????", creds); if (!NT_STATUS_IS_OK(status)) { - errno = map_errno_from_nt_status(status); cli_shutdown(c); + errno = map_errno_from_nt_status(status); return NULL; } -- 2.17.0.484.g0c8726318c-goog