make_server_info_guest() can need root for the ldapsam backend
authorAndrew Tridgell <tridge@samba.org>
Sun, 3 Nov 2002 13:33:00 +0000 (13:33 +0000)
committerAndrew Tridgell <tridge@samba.org>
Sun, 3 Nov 2002 13:33:00 +0000 (13:33 +0000)
(This used to be commit 918099f09618136c371e199803f5895f9cb702be)

source3/auth/auth_builtin.c

index d54a8660b35d5e827f33bc62b0987b767ca95134..09b9a36cdfa069d47b9b1811a9ed47d89e326ce7 100644 (file)
@@ -41,8 +41,11 @@ static NTSTATUS check_guest_security(const struct auth_context *auth_context,
        NTSTATUS nt_status = NT_STATUS_LOGON_FAILURE;
 
        if (!(user_info->internal_username.str 
-             && *user_info->internal_username.str)) 
+             && *user_info->internal_username.str)) {
+               become_root();
                nt_status = make_server_info_guest(server_info);
+               unbecome_root();
+       }
 
        return nt_status;
 }