Remove current_user_info reference from vfs_fake_perms.c
authorVolker Lendecke <vl@samba.org>
Thu, 19 Jun 2008 13:46:44 +0000 (15:46 +0200)
committerVolker Lendecke <vl@samba.org>
Thu, 19 Jun 2008 13:53:43 +0000 (15:53 +0200)
(This used to be commit a227181e8d2ed0824a323a3d4b4cfda5e438f8ce)

source3/modules/vfs_fake_perms.c

index ddad0008a7ef55d1a8a3763b5e9b19f3690dbac4..ef0a2c3d9e77740c8573e4889353e6ebc9b6625b 100644 (file)
@@ -23,8 +23,6 @@
 
 #include "includes.h"
 
-extern struct current_user current_user;
-
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_VFS
 
@@ -39,8 +37,8 @@ static int fake_perms_stat(vfs_handle_struct *handle, const char *fname, SMB_STR
                } else {
                        sbuf->st_mode = S_IRWXU;
                }
-               sbuf->st_uid = current_user.ut.uid;
-               sbuf->st_gid = current_user.ut.gid;
+               sbuf->st_uid = handle->conn->server_info->uid;
+               sbuf->st_gid = handle->conn->server_info->gid;
        }
 
        return ret;
@@ -57,8 +55,8 @@ static int fake_perms_fstat(vfs_handle_struct *handle, files_struct *fsp, SMB_ST
                } else {
                        sbuf->st_mode = S_IRWXU;
                }
-               sbuf->st_uid = current_user.ut.uid;
-               sbuf->st_gid = current_user.ut.gid;
+               sbuf->st_uid = handle->conn->server_info->uid;
+               sbuf->st_gid = handle->conn->server_info->gid;
        }
        return ret;
 }