summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2000-07-12 02:20:16 +0000
committerrwatson <rwatson@FreeBSD.org>2000-07-12 02:20:16 +0000
commitc61df962207863e19ebd768fc8462cb6493094cf (patch)
tree44d052b31db34eb5c79af8a1009e0c9af59660f5
parentcada2988fae2178ba0c69eea547d78cce14951c4 (diff)
downloadFreeBSD-src-c61df962207863e19ebd768fc8462cb6493094cf.zip
FreeBSD-src-c61df962207863e19ebd768fc8462cb6493094cf.tar.gz
o Correct getopt() argument so that initattr -r and -w take an additional
argument via optarg. This corrects a segfault when initattr is invoked with either of these two arguments. Not sure how this got broken given that in the original patches it was fine -- presumably a merging mistake. Obtained from: TrustedBSD Project
-rw-r--r--usr.sbin/extattrctl/extattrctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/extattrctl/extattrctl.c b/usr.sbin/extattrctl/extattrctl.c
index 839e563..6b8c5d1 100644
--- a/usr.sbin/extattrctl/extattrctl.c
+++ b/usr.sbin/extattrctl/extattrctl.c
@@ -116,7 +116,7 @@ initattr(int argc, char *argv[])
int ch, i, error;
optind = 0;
- while ((ch = getopt(argc, argv, "p:rw")) != -1)
+ while ((ch = getopt(argc, argv, "p:r:w:")) != -1)
switch (ch) {
case 'p':
fs_path = strdup(optarg);
OpenPOWER on IntegriCloud