Fix bug #7080 - Quota only shown when logged as root.
authorJeremy Allison <jra@samba.org>
Mon, 1 Feb 2010 23:55:55 +0000 (15:55 -0800)
committerJeremy Allison <jra@samba.org>
Mon, 1 Feb 2010 23:55:55 +0000 (15:55 -0800)
conn->server_info->utok.uid == 0

isn't the correct check to see if we're root anymore. As rpc_samr_nt.c does,
the correct check is :

geteuid() == sec_initial_uid()

Jeremy.

source3/smbd/fake_file.c

index 6898793d29ee966193cbcde7d024619a31b825d0..9917481351a6b1849af438402fa441dd49fbc6d0 100644 (file)
@@ -126,7 +126,7 @@ NTSTATUS open_fake_file(struct smb_request *req, connection_struct *conn,
        NTSTATUS status;
 
        /* access check */
-       if (conn->server_info->utok.uid != 0) {
+       if (geteuid() == sec_initial_uid()) {
                DEBUG(3, ("open_fake_file_shared: access_denied to "
                          "service[%s] file[%s] user[%s]\n",
                          lp_servicename(SNUM(conn)),