mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
Extended comment on why we consider a partition relabel request of "0" to
be a no-op request, and why this might have to change if we want to allow leaving a partition someday. Obtained from: TrustedBSD Project MFC after: 3 days
This commit is contained in:
parent
6c6c03be2d
commit
048e2d5899
1 changed files with 7 additions and 1 deletions
|
|
@ -114,7 +114,13 @@ partition_cred_check_relabel(struct ucred *cred, struct label *newlabel)
|
|||
|
||||
error = 0;
|
||||
|
||||
/* Treat "0" as a no-op request. */
|
||||
/*
|
||||
* Treat "0" as a no-op request because it reflects an unset
|
||||
* partition label. If we ever want to support switching back to an
|
||||
* unpartitioned state for a process, we'll need to differentiate the
|
||||
* "not in a partition" and "no partition defined during internalize"
|
||||
* conditions.
|
||||
*/
|
||||
if (SLOT(newlabel) != 0) {
|
||||
/*
|
||||
* Require BSD privilege in order to change the partition.
|
||||
|
|
|
|||
Loading…
Reference in a new issue