Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/bouyer-quota2]: src/usr.sbin/edquota Avoid core dump when a filesystem i...
details: https://anonhg.NetBSD.org/src/rev/861aeb5f5852
branches: bouyer-quota2
changeset: 761106:861aeb5f5852
user: bouyer <bouyer%NetBSD.org@localhost>
date: Thu Feb 03 15:53:25 2011 +0000
description:
Avoid core dump when a filesystem is specified and not found in
mounted filesystems.
diffstat:
usr.sbin/edquota/edquota.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (33 lines):
diff -r 967c0657b7c8 -r 861aeb5f5852 usr.sbin/edquota/edquota.c
--- a/usr.sbin/edquota/edquota.c Wed Feb 02 21:01:08 2011 +0000
+++ b/usr.sbin/edquota/edquota.c Thu Feb 03 15:53:25 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: edquota.c,v 1.29.16.6 2011/01/31 15:26:31 bouyer Exp $ */
+/* $NetBSD: edquota.c,v 1.29.16.7 2011/02/03 15:53:25 bouyer Exp $ */
/*
* Copyright (c) 1980, 1990, 1993
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "from: @(#)edquota.c 8.3 (Berkeley) 4/27/95";
#else
-__RCSID("$NetBSD: edquota.c,v 1.29.16.6 2011/01/31 15:26:31 bouyer Exp $");
+__RCSID("$NetBSD: edquota.c,v 1.29.16.7 2011/02/03 15:53:25 bouyer Exp $");
#endif
#endif /* not lint */
@@ -401,11 +401,13 @@
qup->next = 0;
}
- if (filesys) {
+ if (filesys && quphead == NULL) {
if (defaultq)
errx(1, "no default quota for version 1");
/* if we get there, filesys is not mounted. try the old way */
qup = getprivs1(id, quotatype, filesys);
+ if (qup == NULL)
+ return NULL;
if (quphead == NULL)
quphead = qup;
else
Home |
Main Index |
Thread Index |
Old Index