mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
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
This commit is contained in:
parent
567f792377
commit
87e97d7723
@ -26,7 +26,11 @@ enum FAKE_FILE_TYPE {
|
||||
FAKE_FILE_TYPE_QUOTA
|
||||
};
|
||||
|
||||
/*
|
||||
we now get the unix name --metze
|
||||
#define FAKE_FILE_NAME_QUOTA "\\$Extend\\$Quota:$Q:$INDEX_ALLOCATION"
|
||||
*/
|
||||
#define FAKE_FILE_NAME_QUOTA "$Extend/$Quota:$Q:$INDEX_ALLOCATION"
|
||||
|
||||
typedef struct _FAKE_FILE_HANDLE {
|
||||
enum FAKE_FILE_TYPE type;
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user