diff options
author | Lars Müller <lmuelle@samba.org> | 2005-12-05 16:51:19 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:05:43 -0500 |
commit | f6a46f3329683217ec5c71b8a5bf9b8322df023f (patch) | |
tree | 6f52d038030e451305fb3dffbe65e29ca801f246 /source3/smbd/quotas.c | |
parent | efbbd89000604e8f75521954b94ebc4dd008cd52 (diff) | |
download | samba-f6a46f3329683217ec5c71b8a5bf9b8322df023f.tar.gz |
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.
(This used to be commit 519ed7ca0ecffbc341c7516758a678af59f98586)
Diffstat (limited to 'source3/smbd/quotas.c')
-rw-r--r-- | source3/smbd/quotas.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/smbd/quotas.c b/source3/smbd/quotas.c index 8cb94bca3d8..de31376d6c6 100644 --- a/source3/smbd/quotas.c +++ b/source3/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))) { |