summaryrefslogtreecommitdiffstats
path: root/source/smbd
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-04-29 17:19:42 +0000
committerStefan Metzmacher <metze@samba.org>2004-04-29 17:19:42 +0000
commit2058a7efbc88bb7abe9d5e12507fab4dd995b3c8 (patch)
tree6c1b903f37ceee3d99a6bd4881962418478923a8 /source/smbd
parentde8808afe85f80a2f87d8b6e104c29e75ecb4f48 (diff)
downloadsamba-2058a7efbc88bb7abe9d5e12507fab4dd995b3c8.tar.gz
samba-2058a7efbc88bb7abe9d5e12507fab4dd995b3c8.tar.xz
samba-2058a7efbc88bb7abe9d5e12507fab4dd995b3c8.zip
r408: - replace (conn->admin_user != True) with (current_user.uid != 0)
because someone changed it in all other places too - fix quotas support from windows explorer we now got the unix file name of a fake_file metze
Diffstat (limited to 'source/smbd')
-rw-r--r--source/smbd/fake_file.c2
-rw-r--r--source/smbd/nttrans.c2
-rw-r--r--source/smbd/trans2.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/source/smbd/fake_file.c b/source/smbd/fake_file.c
index 5ccb548ba5b..d3660addf11 100644
--- a/source/smbd/fake_file.c
+++ b/source/smbd/fake_file.c
@@ -40,7 +40,7 @@ files_struct *open_fake_file_shared1(enum FAKE_FILE_TYPE fake_file_type, connect
}
/* access check */
- if (conn->admin_user != True) {
+ if (current_user.uid != 0) {
DEBUG(1,("access_denied to service[%s] file[%s] user[%s]\n",
lp_servicename(SNUM(conn)),fname,conn->user));
errno = EACCES;
diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c
index 6ba74d5d503..e4ffec339b7 100644
--- a/source/smbd/nttrans.c
+++ b/source/smbd/nttrans.c
@@ -2351,7 +2351,7 @@ static int call_nt_transact_set_user_quota(connection_struct *conn, char *inbuf,
ZERO_STRUCT(qt);
/* access check */
- if (conn->admin_user != True) {
+ if (current_user.uid != 0) {
DEBUG(1,("set_user_quota: access_denied service [%s] user [%s]\n",
lp_servicename(SNUM(conn)),conn->user));
return ERROR_DOS(ERRDOS,ERRnoaccess);
diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c
index a1d068e38f9..0d84c400653 100644
--- a/source/smbd/trans2.c
+++ b/source/smbd/trans2.c
@@ -2010,7 +2010,7 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned
fsp.fd = -1;
/* access check */
- if (conn->admin_user != True) {
+ if (current_user.uid != 0) {
DEBUG(0,("set_user_quota: access_denied service [%s] user [%s]\n",
lp_servicename(SNUM(conn)),conn->user));
return ERROR_DOS(ERRDOS,ERRnoaccess);
@@ -2108,7 +2108,7 @@ static int call_trans2setfsinfo(connection_struct *conn,
DEBUG(10,("call_trans2setfsinfo: SET_FS_QUOTA: for service [%s]\n",lp_servicename(SNUM(conn))));
/* access check */
- if ((conn->admin_user != True)||!CAN_WRITE(conn)) {
+ if ((current_user.uid != 0)||!CAN_WRITE(conn)) {
DEBUG(0,("set_user_quota: access_denied service [%s] user [%s]\n",
lp_servicename(SNUM(conn)),conn->user));
return ERROR_DOS(ERRSRV,ERRaccess);