introduce and use setfscreatecon_or_die

(patch by Yuichi Nakamura <ynakam@hitachisoft.jp>)
runcon: *yet another* fix for vda's brainfart :(
This commit is contained in:
Denis Vlasenko
2007-03-12 18:22:55 +00:00
parent b3f09f4a50
commit 39c651e909
7 changed files with 16 additions and 13 deletions

View File

@ -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;
}