summaryrefslogtreecommitdiff
path: root/source3/smbd/quotas.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/quotas.c')
-rw-r--r--source3/smbd/quotas.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/smbd/quotas.c b/source3/smbd/quotas.c
index 8810bcd909..562d8fd5db 100644
--- a/source3/smbd/quotas.c
+++ b/source3/smbd/quotas.c
@@ -473,6 +473,8 @@ BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize)
{
r=quotactl (Q_GETQUOTA, mnt->mnt_fsname, euser_id, (caddr_t) &D);
+ seteuid(euser_id); /* Restore the original uid status. */
+
if (r==-1)
return(False);
@@ -502,6 +504,8 @@ BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize)
{
r=quotactl (Q_XGETQUOTA, mnt->mnt_fsname, euser_id, (caddr_t) &F);
+ seteuid(euser_id); /* Restore the original uid status. */
+
if (r==-1)
return(False);
@@ -531,7 +535,10 @@ BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize)
}
else
+ {
+ seteuid(euser_id); /* Restore the original uid status. */
return(False);
+ }
return (True);