summaryrefslogtreecommitdiff
path: root/src/mkdir.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mkdir.c')
-rw-r--r--src/mkdir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mkdir.c b/src/mkdir.c
index ccd923b1c..6b51292fa 100644
--- a/src/mkdir.c
+++ b/src/mkdir.c
@@ -123,7 +123,7 @@ make_ancestor (char const *dir, char const *component, void *options)
{
struct mkdir_options const *o = options;
- if (o->set_security_context && defaultcon (dir, S_IFDIR) < 0
+ if (o->set_security_context && defaultcon (component, S_IFDIR) < 0
&& ! ignorable_ctx_err (errno))
error (0, errno, _("failed to set default creation context for %s"),
quoteaf (dir));