From f6a46f3329683217ec5c71b8a5bf9b8322df023f Mon Sep 17 00:00:00 2001 From: Lars Müller Date: Mon, 5 Dec 2005 16:51:19 +0000 Subject: 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) --- source3/smbd/quotas.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/smbd/quotas.c b/source3/smbd/quotas.c index 8cb94bca3d..de31376d6c 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))) { -- cgit