mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-22 03:04:34 +01:00
Log a warning if we cannot sandbox using capsicum, but only under debug level 1.
It would be too noisy to log it as a proper warning as CAPABILITIES are not compiled into GENERIC by default. MFC after: 3 days
This commit is contained in:
parent
e1ab183c5e
commit
133d75ed18
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=223584
@ -230,9 +230,13 @@ drop_privs(struct hast_resource *res)
|
||||
* ioctls and secondary uses ioctls to handle BIO_DELETE and BIO_FLUSH.
|
||||
* For now capsicum is only used to sandbox hastctl.
|
||||
*/
|
||||
if (res == NULL)
|
||||
if (res == NULL) {
|
||||
capsicum = (cap_enter() == 0);
|
||||
else
|
||||
if (!capsicum) {
|
||||
pjdlog_common(LOG_DEBUG, 1, errno,
|
||||
"Unable to sandbox using capsicum");
|
||||
}
|
||||
} else
|
||||
capsicum = false;
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user