diff options
author | jkar8572 <jkar8572> | 2003-06-16 18:45:38 +0000 |
---|---|---|
committer | jkar8572 <jkar8572> | 2003-06-16 18:45:38 +0000 |
commit | 827e29c99efc70354b8dd209d87587ee1e8f549a (patch) | |
tree | 1d44de90445beb85dfb1f34d0d4e6cbb4ec32c4c | |
parent | b91f26486e94785bc559922031a1d8926f2af686 (diff) |
Fixed a bug in quotacheck(8) parsing of v1 format files introduced by optimalization (Jan Kara)
-rw-r--r-- | quotacheck_v1.c | 4 | ||||
-rw-r--r-- | quotasys.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/quotacheck_v1.c b/quotacheck_v1.c index 1f583f7..320a5dc 100644 --- a/quotacheck_v1.c +++ b/quotacheck_v1.c @@ -37,8 +37,10 @@ static void load_dquots(char *filename, int fd, int type) if (ddqblk.dqb_bhardlimit == 0 && ddqblk.dqb_bsoftlimit == 0 && ddqblk.dqb_ihardlimit == 0 - && ddqblk.dqb_isoftlimit == 0) + && ddqblk.dqb_isoftlimit == 0) { + id++; continue; + } dquot = add_dquot(id, type); udq = &dquot->dq_dqb; udq->dqb_bhardlimit = ddqblk.dqb_bhardlimit; @@ -762,7 +762,7 @@ static int cache_mnt_table(int flags) if (flags & MS_NO_AUTOFS && !strcmp(mnt->mnt_type, MNTTYPE_AUTOFS)) { /* Autofs dir to remember? */ if (autofsdircnt == AUTOFS_DIR_MAX) die(3, "Too many autofs mountpoints. Please contact <jack@suse.cz>\n"); - sstrncpy(autofsdir[autofsdircnt++], mnt->mnt_dir, PATH_MAX); + snprintf(autofsdir[autofsdircnt++], PATH_MAX, "%s/", mnt->mnt_dir); free((char *)devname); continue; } |