mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-23 06:26:15 +02:00
* Sanity check.
This commit is contained in:
parent
6a8e60913a
commit
813a7c65c9
1 changed files with 7 additions and 1 deletions
|
@ -421,6 +421,12 @@ void UserLock::acquire()
|
|||
fdUserLock = fd.borrow();
|
||||
lockedPaths.insert(fnUserLock);
|
||||
uid = pw->pw_uid;
|
||||
|
||||
/* Sanity check... */
|
||||
if (uid == getuid() || uid == geteuid())
|
||||
throw Error(format("the Nix user should not be a member of `%1%'")
|
||||
% buildUsersGroup);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue