diff options
-rw-r--r-- | Changelog | 2 | ||||
-rw-r--r-- | mntopt.h | 1 | ||||
-rw-r--r-- | quotagrpadmins | 8 | ||||
-rw-r--r-- | quotaio_v2.c | 2 | ||||
-rw-r--r-- | quotasys.c | 3 |
5 files changed, 15 insertions, 1 deletions
@@ -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) @@ -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); } @@ -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; } |