The branch, v4-14-test has been updated
       via  3ae7ead5fd5 s3:libsmb: Fix errno for failed authentication in 
SMBC_server_internal()
      from  2a9a5185553 s4:auth: let authenticate_ldap_simple_bind() pass down 
the mapped nt4names

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-14-test


- Log -----------------------------------------------------------------
commit 3ae7ead5fd53e5ca590cb6bee82afc92b35264f6
Author: Elia Geretto <elia.f.gere...@gmail.com>
Date:   Fri Mar 11 19:32:30 2022 +0100

    s3:libsmb: Fix errno for failed authentication in SMBC_server_internal()
    
    In SMBC_server_internal(), when authentication fails, the errno value is
    currently hard-coded to EPERM, while it should be EACCES instead. Use the
    NT_STATUS map to set the appropriate value.
    
    This bug was found because it breaks listing printers protected by
    authentication in GNOME Control Panel.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14983
    
    Signed-off-by: Elia Geretto <elia.f.gere...@gmail.com>
    Reviewed-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Volker Lendecke <v...@samba.org>
    
    Autobuild-User(master): Jeremy Allison <j...@samba.org>
    Autobuild-Date(master): Wed Mar 16 19:44:18 UTC 2022 on sn-devel-184
    
    (cherry picked from commit 70b9977a46e5242174b4461a7f49d5f640c1db62)
    
    Autobuild-User(v4-14-test): Jule Anger <jan...@samba.org>
    Autobuild-Date(v4-14-test): Thu Mar 17 09:45:53 UTC 2022 on sn-devel-184

-----------------------------------------------------------------------

Summary of changes:
 source3/libsmb/libsmb_server.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c
index d5c9fac6f05..4163a29a77a 100644
--- a/source3/libsmb/libsmb_server.c
+++ b/source3/libsmb/libsmb_server.c
@@ -572,7 +572,7 @@ SMBC_server_internal(TALLOC_CTX *ctx,
                    !NT_STATUS_IS_OK(cli_session_setup_anon(c))) {
 
                         cli_shutdown(c);
-                        errno = EPERM;
+                       errno = map_errno_from_nt_status(status);
                         return NULL;
                 }
        }


-- 
Samba Shared Repository

Reply via email to