mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-15 05:59:17 +03:00
setuid-wrapper: Fix broken string comparison
This commit is contained in:
parent
b80e6b27c7
commit
fa1a46a01c
1 changed files with 1 additions and 1 deletions
|
@ -30,7 +30,7 @@ int main(int argc, char * * argv)
|
|||
creating hard link `X' from some other location, along with a
|
||||
false `X.real' file, to allow arbitrary programs from being
|
||||
executed setuid. */
|
||||
assert ((strncmp(self, wrapperDir, sizeof(wrapperDir)) == 0) &&
|
||||
assert ((strncmp(self, wrapperDir, strlen(wrapperDir)) == 0) &&
|
||||
(self[strlen(wrapperDir)] == '/'));
|
||||
|
||||
/* Make *really* *really* sure that we were executed as `self',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue