summaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/install.c4
-rw-r--r--coreutils/libcoreutils/getopt_mk_fifo_nod.c5
-rw-r--r--coreutils/mkdir.c5
3 files changed, 3 insertions, 11 deletions
diff --git a/coreutils/install.c b/coreutils/install.c
index 1f65407..a58a23b 100644
--- a/coreutils/install.c
+++ b/coreutils/install.c
@@ -110,9 +110,7 @@ int install_main(int argc, char **argv)
}
if (flags & OPT_SET_SECURITY_CONTEXT) {
selinux_or_die();
- if (setfscreatecon(scontext) < 0) {
- bb_error_msg_and_die("setfscreatecon(%s)", scontext); // perror?
- }
+ setfscreatecon_or_die(scontext);
use_default_selinux_context = 0;
copy_flags |= FILEUTILS_SET_SECURITY_CONTEXT;
}
diff --git a/coreutils/libcoreutils/getopt_mk_fifo_nod.c b/coreutils/libcoreutils/getopt_mk_fifo_nod.c
index 2e0c274..32fa9be 100644
--- a/coreutils/libcoreutils/getopt_mk_fifo_nod.c
+++ b/coreutils/libcoreutils/getopt_mk_fifo_nod.c
@@ -43,10 +43,7 @@ mode_t getopt_mk_fifo_nod(int argc, char **argv)
#if ENABLE_SELINUX
if (opt & 2) {
selinux_or_die();
- if (setfscreatecon(scontext)) {
- bb_error_msg_and_die("cannot set default file creation context "
- "to %s", scontext);
- }
+ setfscreatecon_or_die(scontext);
}
#endif
diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c
index 93ded1d..690e4ab 100644
--- a/coreutils/mkdir.c
+++ b/coreutils/mkdir.c
@@ -62,10 +62,7 @@ int mkdir_main(int argc, char **argv)
#if ENABLE_SELINUX
if (opt & 4) {
selinux_or_die();
- if (setfscreatecon(scontext)) {
- bb_error_msg_and_die("cannot set default file creation context "
- "to %s", scontext);
- }
+ setfscreatecon_or_die(scontext);
}
#endif