summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-03-26 00:51:47 +0100
committerJim Meyering <meyering@redhat.com>2008-03-26 00:57:29 +0100
commit72d052896a9092b811961a8f3e6ca5d151a59be5 (patch)
tree167375f90c42facec9c79d62d2d3d0372ef256b5 /src
parentf7d1c59c224f81a8bab5fa2afcaf815988f50467 (diff)
downloadcoreutils-72d052896a9092b811961a8f3e6ca5d151a59be5.tar.xz
mkdir -Z x d: don't segfault when diagnosing invalid context "x" (tiny change)
* src/mkdir.c (main): Use "scontext", not NULL optarg in diagnostic. Reported by Cristian Cadar, Daniel Dunbar and Dawson Engler. * NEWS: Mention the bug fix.
Diffstat (limited to 'src')
-rw-r--r--src/mkdir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mkdir.c b/src/mkdir.c
index 395259413..d3d76ad48 100644
--- a/src/mkdir.c
+++ b/src/mkdir.c
@@ -192,7 +192,7 @@ main (int argc, char **argv)
if (scontext && setfscreatecon (scontext) < 0)
error (EXIT_FAILURE, errno,
_("failed to set default file creation context to %s"),
- quote (optarg));
+ quote (scontext));
if (options.make_ancestor_function || specified_mode)
{