summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjkar8572 <jkar8572>2005-03-17 09:55:34 +0000
committerjkar8572 <jkar8572>2005-03-17 09:55:34 +0000
commitd9b0d03470bd6a47d375f664aee03a454e577951 (patch)
tree43a6ecffa4f1aaca97862d600bb8d0e693e2173c
parent0e56cfc7e38ee2304257ff0afb631fee6e953bf7 (diff)
Added sanity check to quota reporting (Jan Kara)
Added NFSv4 quota type (Jan Kara) Added forgotten file quotagrpadmins to CVS (Jan Kara)
-rw-r--r--Changelog2
-rw-r--r--mntopt.h1
-rw-r--r--quotagrpadmins8
-rw-r--r--quotaio_v2.c2
-rw-r--r--quotasys.c3
5 files changed, 15 insertions, 1 deletions
diff --git a/Changelog b/Changelog
index 108ee67..9d75379 100644
--- a/Changelog
+++ b/Changelog
@@ -1,4 +1,6 @@
Changes in quota-tools from 3.12 to 3.13
+* added sanity check to quota reporting (Jan Kara)
+* added NFSv4 to the list of supported fs types (Jan Kara)
* added printing of directories to quotacheck (Jan Kara, Jan Engelhardt)
* added dynamic mountpoint array allocation (Jan Kara)
* made quotacheck(8) more friendly for journaled quota (Jan Kara)
diff --git a/mntopt.h b/mntopt.h
index af25e2b..dc377b1 100644
--- a/mntopt.h
+++ b/mntopt.h
@@ -13,6 +13,7 @@
#define MNTTYPE_XFS "xfs" /* SGI XFS file system */
#define MNTTYPE_AUTOFS "autofs" /* Automount mountpoint */
#define MNTTYPE_JFS "jfs" /* JFS file system */
+#define MNTTYPE_NFS4 "nfs4" /* NFSv4 filesystem */
/* mount options */
#define MNTOPT_NOQUOTA "noquota" /* don't enforce quota */
diff --git a/quotagrpadmins b/quotagrpadmins
new file mode 100644
index 0000000..a1f2f46
--- /dev/null
+++ b/quotagrpadmins
@@ -0,0 +1,8 @@
+#
+# This is a sample groupadmins file (/etc/quotagrpadmins)
+#
+# Comments begin with hash in the beginning of the line
+
+# In this file you specify users responsible for space used by the group
+users: root
+mygroup: chief
diff --git a/quotaio_v2.c b/quotaio_v2.c
index 47e0cdc..6ba7225 100644
--- a/quotaio_v2.c
+++ b/quotaio_v2.c
@@ -759,6 +759,8 @@ static int report_tree(struct dquot *dquot, uint blk, int depth, char *bitmap,
if (depth == V2_DQTREEDEPTH - 1) {
for (i = 0; i < V2_DQBLKSIZE >> 2; i++) {
blk = __le32_to_cpu(ref[i]);
+ if (blk >= dquot->dq_h->qh_info.u.v2_mdqi.dqi_blocks)
+ die(2, _("Illegal reference in %s quota file on %s. Quota file is probably corrupted.\nPlease run quotacheck(8) and try again.\n"), type2name(dquot->dq_h->qh_type), dquot->dq_h->qh_quotadev);
if (blk && !get_bit(bitmap, blk))
entries += report_block(dquot, blk, bitmap, process_dquot);
}
diff --git a/quotasys.c b/quotasys.c
index c6a6bb6..258edf4 100644
--- a/quotasys.c
+++ b/quotasys.c
@@ -59,7 +59,8 @@ static int correct_fstype(char *type)
!strcmp(type, MNTTYPE_UDF) ||
!strcmp(type, MNTTYPE_REISER) ||
!strcmp(type, MNTTYPE_XFS) ||
- !strcmp(type, MNTTYPE_NFS)) {
+ !strcmp(type, MNTTYPE_NFS) ||
+ !strcmp(type, MNTTYPE_NFS4)) {
free(mtype);
return 1;
}