Check for sec_initial_uid() instead of uid==0 in dfs management
authorVolker Lendecke <vl@samba.org>
Sun, 22 Jun 2008 18:27:20 +0000 (20:27 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 22 Jun 2008 18:45:53 +0000 (20:45 +0200)
source/rpc_server/srv_dfs_nt.c

index 29538a304f63d4f4921fd3c4cec9a835cef8dc17..974523dded8dae099492238185ef32d606e4b1fb 100644 (file)
@@ -49,7 +49,7 @@ WERROR _dfs_Add(pipes_struct *p, struct dfs_Add *r)
        NTSTATUS status;
        TALLOC_CTX *ctx = talloc_tos();
 
-       if (p->pipe_user.ut.uid != 0) {
+       if (p->pipe_user.ut.uid != sec_initial_uid()) {
                DEBUG(10,("_dfs_add: uid != 0. Access denied.\n"));
                return WERR_ACCESS_DENIED;
        }
@@ -119,7 +119,7 @@ WERROR _dfs_Remove(pipes_struct *p, struct dfs_Remove *r)
        TALLOC_CTX *ctx = talloc_tos();
        char *altpath = NULL;
 
-       if (p->pipe_user.ut.uid != 0) {
+       if (p->pipe_user.ut.uid != sec_initial_uid()) {
                DEBUG(10,("_dfs_remove: uid != 0. Access denied.\n"));
                return WERR_ACCESS_DENIED;
        }