summaryrefslogtreecommitdiffstats
path: root/source/smbd/quotas.c
diff options
context:
space:
mode:
authorLars Müller <lmuelle@samba.org>2005-12-05 16:51:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:05:43 -0500
commit519ed7ca0ecffbc341c7516758a678af59f98586 (patch)
tree5ccff2aaeeb69c91762d5aa5427873068c8998c3 /source/smbd/quotas.c
parent4d91f9501cd041ee42410eeace6a9acd9cc57d1c (diff)
downloadsamba-519ed7ca0ecffbc341c7516758a678af59f98586.tar.gz
samba-519ed7ca0ecffbc341c7516758a678af59f98586.tar.xz
samba-519ed7ca0ecffbc341c7516758a678af59f98586.zip
r12076: Ensure setmntent() returns with != NULL in the disk_quotas() Linux
version. The IRIX 6.2 version is still without this check as I'm not sure if setmntent() is implemented in the same way.
Diffstat (limited to 'source/smbd/quotas.c')
-rw-r--r--source/smbd/quotas.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/smbd/quotas.c b/source/smbd/quotas.c
index 8cb94bca3d8..de31376d6c6 100644
--- a/source/smbd/quotas.c
+++ b/source/smbd/quotas.c
@@ -216,7 +216,9 @@ BOOL disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB
devno = S.st_dev ;
- fp = setmntent(MOUNTED,"r");
+ if ((fp = setmntent(MOUNTED,"r")) == NULL)
+ return(False) ;
+
found = False ;
while ((mnt = getmntent(fp))) {