Added "rootfs" feature.
This commit is contained in:
@@ -39,6 +39,7 @@ nxt_capability_set(nxt_task_t *task, nxt_capabilities_t *cap)
|
||||
|
||||
if (geteuid() == 0) {
|
||||
cap->setid = 1;
|
||||
cap->chroot = 1;
|
||||
return NXT_OK;
|
||||
}
|
||||
|
||||
@@ -91,6 +92,10 @@ nxt_capability_specific_set(nxt_task_t *task, nxt_capabilities_t *cap)
|
||||
return NXT_ERROR;
|
||||
}
|
||||
|
||||
if ((val->effective & (1 << CAP_SYS_CHROOT)) != 0) {
|
||||
cap->chroot = 1;
|
||||
}
|
||||
|
||||
if ((val->effective & (1 << CAP_SETUID)) == 0) {
|
||||
return NXT_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user