diff options
author | rodrigc <rodrigc@FreeBSD.org> | 2009-01-28 07:46:35 +0000 |
---|---|---|
committer | rodrigc <rodrigc@FreeBSD.org> | 2009-01-28 07:46:35 +0000 |
commit | 89c6c71f34fb4e759767d6f0d4a293a922f09bb5 (patch) | |
tree | 2319b97ed0f2b3ba9cbd9e4b51fa5e8c267385de /sbin | |
parent | c332936c10b8bc74ce794cf8b9705b27ed54d4fb (diff) | |
download | FreeBSD-src-89c6c71f34fb4e759767d6f0d4a293a922f09bb5.zip FreeBSD-src-89c6c71f34fb4e759767d6f0d4a293a922f09bb5.tar.gz |
Fix parsing of acregmin, acregmax, acdirmin and acdirmax NFS mount options
when passed as strings via nmount().
Submitted by: Jaakko Heinonen <jh saunalahti fi>
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/mount_nfs/mount_nfs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/mount_nfs/mount_nfs.c b/sbin/mount_nfs/mount_nfs.c index fdfecc4..4721943 100644 --- a/sbin/mount_nfs/mount_nfs.c +++ b/sbin/mount_nfs/mount_nfs.c @@ -584,25 +584,25 @@ fallback_mount(struct iovec *iov, int iovlen, int mntflags) } if (findopt(iov, iovlen, "acregmin", &opt, NULL) == 0) { ret = sscanf(opt, "%d", &args.acregmin); - if (ret != 1 || args.acregmin <= 0) { + if (ret != 1 || args.acregmin < 0) { errx(1, "illegal acregmin: %s", opt); } } if (findopt(iov, iovlen, "acregmax", &opt, NULL) == 0) { ret = sscanf(opt, "%d", &args.acregmax); - if (ret != 1 || args.acregmax <= 0) { + if (ret != 1 || args.acregmax < 0) { errx(1, "illegal acregmax: %s", opt); } } if (findopt(iov, iovlen, "acdirmin", &opt, NULL) == 0) { ret = sscanf(opt, "%d", &args.acdirmin); - if (ret != 1 || args.acdirmin <= 0) { + if (ret != 1 || args.acdirmin < 0) { errx(1, "illegal acdirmin: %s", opt); } } if (findopt(iov, iovlen, "acdirmax", &opt, NULL) == 0) { ret = sscanf(opt, "%d", &args.acdirmax); - if (ret != 1 || args.acdirmax <= 0) { + if (ret != 1 || args.acdirmax < 0) { errx(1, "illegal acdirmax: %s", opt); } } |