Commit 34771e19 authored by Elia Geretto's avatar Elia Geretto Committed by J A
Browse files

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.


Signed-off-by: Elia Geretto's avatarElia Geretto <>
Reviewed-by: Jeremy Allison's avatarJeremy Allison <>
Reviewed-by: VL's avatarVolker Lendecke <>

Autobuild-User(master): Jeremy Allison <>
Autobuild-Date(master): Wed Mar 16 19:44:18 UTC 2022 on sn-devel-184

(cherry picked from commit 70b9977a)
parent bf8f8c59
......@@ -572,7 +572,7 @@ SMBC_server_internal(TALLOC_CTX *ctx,
!NT_STATUS_IS_OK(cli_session_setup_anon(c))) {
errno = EPERM;
errno = map_errno_from_nt_status(status);
return NULL;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment