diff options
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/quotas.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/source3/smbd/quotas.c b/source3/smbd/quotas.c index 0492130950..ddfcb8e0f8 100644 --- a/source3/smbd/quotas.c +++ b/source3/smbd/quotas.c @@ -238,7 +238,7 @@ BOOL disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB if (!found) return(False); - become_root_uid_only(); + become_root(); if (strcmp(mnt->mnt_type, "xfs")==0) { r=get_smb_linux_xfs_quota(mnt->mnt_fsname, euser_id, egrp_id, &D); @@ -251,7 +251,7 @@ BOOL disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB } } - unbecome_root_uid_only(); + unbecome_root(); /* Use softlimit to determine disk space, except when it has been exceeded */ *bsize = D.bsize; @@ -655,20 +655,20 @@ BOOL disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB if ( ! found ) return(False) ; - become_root_uid_only(); + become_root(); #if defined(SUNOS5) if ( strcmp( mnt.mnt_fstype, "nfs" ) == 0) { BOOL retval; DEBUG(5,("disk_quotas: looking for mountpath (NFS) \"%s\"\n", mnt.mnt_special)); retval = nfs_quotas(mnt.mnt_special, euser_id, bsize, dfree, dsize); - unbecome_root_uid_only(); + unbecome(); return retval; } DEBUG(5,("disk_quotas: looking for quotas file \"%s\"\n", name)); if((file=sys_open(name, O_RDONLY,0))<0) { - unbecome_root_uid_only(); + unbecome_root(); return(False); } command.op = Q_GETQUOTA; @@ -681,7 +681,7 @@ BOOL disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB ret = quotactl(Q_GETQUOTA, name, euser_id, &D); #endif - unbecome_root_uid_only(); + unbecome_root(); if (ret < 0) { DEBUG(5,("disk_quotas ioctl (Solaris) failed. Error = %s\n", strerror(errno) )); @@ -841,7 +841,7 @@ BOOL disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB } euser_id=geteuid(); - become_root_uid_only(); + become_root(); /* Use softlimit to determine disk space, except when it has been exceeded */ @@ -851,7 +851,7 @@ BOOL disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB { r=quotactl (Q_GETQUOTA, mnt->mnt_fsname, euser_id, (caddr_t) &D); - unbecome_root_uid_only(); + unbecome_root(); if (r==-1) return(False); @@ -882,7 +882,7 @@ BOOL disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB { r=quotactl (Q_XGETQUOTA, mnt->mnt_fsname, euser_id, (caddr_t) &F); - unbecome_root_uid_only(); + unbecome_root(); if (r==-1) { @@ -916,7 +916,7 @@ BOOL disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB } else { - unbecome_root_uid_only(); + unbecome_root(); return(False); } @@ -1184,13 +1184,13 @@ BOOL disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB return False; #endif - become_root_uid_only(); + become_root(); #if defined(__FreeBSD__) || defined(__DragonFly__) if (strcmp(mnts[i].f_fstypename,"nfs") == 0) { BOOL retval; retval = nfs_quotas(mnts[i].f_mntfromname,euser_id,bsize,dfree,dsize); - unbecome_root_uid_only(); + unbecome_root(); return retval; } #endif @@ -1204,7 +1204,7 @@ BOOL disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB r= quotactl(path,QCMD(Q_GETQUOTA,GRPQUOTA),egrp_id,(char *) &D); } - unbecome_root_uid_only(); + unbecome_root(); } #elif defined(AIX) /* AIX has both USER and GROUP quotas: @@ -1218,9 +1218,9 @@ BOOL disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB if(statbuf.f_vfstype == MNT_J2) { /* For some reason we need to be root for jfs2 */ - become_root_uid_only(); + become_root(); r = quotactl(path,QCMD(Q_J2GETQUOTA,USRQUOTA),euser_id,(char *) &user_quota); - unbecome_root_uid_only(); + unbecome_root(); /* Copy results to old struct to let the following code work as before */ D.dqb_curblocks = user_quota.bused; D.dqb_bsoftlimit = user_quota.bsoft; |