diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c index b92477c88fef0eb191efe48448f8b046ebe04c6f..09d27868c0e0285fe470f53674d638b4f6b28ea3 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; } }