summaryrefslogtreecommitdiff
path: root/usr.sbin/extattrctl
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2000-07-12 02:20:16 +0000
committerRobert Watson <rwatson@FreeBSD.org>2000-07-12 02:20:16 +0000
commit3b88d2796e3cbef1155f90827074a8156a9d0da9 (patch)
tree978c3411c3b115b6d0e626b6f8f0582d75faa638 /usr.sbin/extattrctl
parent9a47755d7c58c158430ecbff48b94c93bfc62c27 (diff)
downloadsrc-test-3b88d2796e3cbef1155f90827074a8156a9d0da9.tar.gz
src-test-3b88d2796e3cbef1155f90827074a8156a9d0da9.zip
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
Notes
Notes: svn path=/head/; revision=62995
Diffstat (limited to 'usr.sbin/extattrctl')
-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 839e563eac00d..6b8c5d164b1d9 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);