summaryrefslogtreecommitdiff
path: root/src/id.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/id.c')
-rw-r--r--src/id.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/id.c b/src/id.c
index 937b7234d..c91dbcdbc 100644
--- a/src/id.c
+++ b/src/id.c
@@ -210,7 +210,8 @@ main (int argc, char **argv)
if (selinux_enabled && getcon (&context) && just_context)
error (EXIT_FAILURE, 0, _("can't get process context"));
#ifdef HAVE_SMACK
- else if (smack_enabled && smack_new_label_from_self ((char **) &context))
+ else if (smack_enabled
+ && smack_new_label_from_self ((char **) &context) < 0)
error (EXIT_FAILURE, 0, _("can't get process context"));
#endif
}