summaryrefslogtreecommitdiff
path: root/edquota.c
diff options
context:
space:
mode:
Diffstat (limited to 'edquota.c')
-rw-r--r--edquota.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/edquota.c b/edquota.c
index 399a7cb..64a3292 100644
--- a/edquota.c
+++ b/edquota.c
@@ -34,7 +34,7 @@
#ident "$Copyright: (c) 1980, 1990 Regents of the University of California. $"
#ident "$Copyright: All rights reserved. $"
-#ident "$Id: edquota.c,v 1.11 2002/11/21 21:15:26 jkar8572 Exp $"
+#ident "$Id: edquota.c,v 1.12 2003/02/14 18:50:16 jkar8572 Exp $"
/*
* Disk quota editor.
@@ -51,6 +51,7 @@
#include <unistd.h>
#include <paths.h>
#include <stdlib.h>
+#include <fcntl.h>
#include "pot.h"
#include "quotaops.h"
@@ -147,7 +148,7 @@ int main(int argc, char **argv)
usage();
init_kernel_interface();
- handles = create_handle_list(0, dirname ? &dirname : NULL, quotatype, fmt, rflag ? 0 : IOI_LOCALONLY);
+ handles = create_handle_list(0, dirname ? &dirname : NULL, quotatype, fmt, rflag ? 0 : IOI_LOCALONLY, 0);
if (!handles[0]) {
dispose_handle_list(handles);
fputs(_("No filesystems with quota detected.\n"), stderr);
@@ -240,6 +241,9 @@ int main(int argc, char **argv)
errstr(_("Error while editting quotas.\n"));
continue;
}
+ close(tmpfd);
+ if ((tmpfd = open(tmpfil, O_RDONLY)) < 0)
+ die(1, _("Can't reopen!"));
if (readprivs(curprivs, tmpfd) < 0) {
errstr(_("Can't read quotas from file.\n"));
continue;