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

@ -28,3 +28,13 @@ error:
context_free(con);
return NULL;
}
void setfscreatecon_or_die(security_context_t scontext)
{
if (setfscreatecon(scontext) < 0) {
/* Can be NULL. All known printf implementations
* display "(null)", "<null>" etc */
bb_perror_msg_and_die("cannot set default "
"file creation context to %s", scontext);
}
}