diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-04-19 10:58:30 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-04-19 10:58:30 +0200 |
commit | fa1a46a01cab1e6c0c594ced17dedf68b0cd39a7 (patch) | |
tree | e183a7b1ce0228b81bef2eceb9a201353dc6bdc0 | |
parent | b80e6b27c78d5cf4177f8e30b4a3285598d93d59 (diff) | |
download | nixlib-fa1a46a01cab1e6c0c594ced17dedf68b0cd39a7.tar nixlib-fa1a46a01cab1e6c0c594ced17dedf68b0cd39a7.tar.gz nixlib-fa1a46a01cab1e6c0c594ced17dedf68b0cd39a7.tar.bz2 nixlib-fa1a46a01cab1e6c0c594ced17dedf68b0cd39a7.tar.lz nixlib-fa1a46a01cab1e6c0c594ced17dedf68b0cd39a7.tar.xz nixlib-fa1a46a01cab1e6c0c594ced17dedf68b0cd39a7.tar.zst nixlib-fa1a46a01cab1e6c0c594ced17dedf68b0cd39a7.zip |
setuid-wrapper: Fix broken string comparison
-rw-r--r-- | nixos/modules/security/setuid-wrapper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/security/setuid-wrapper.c b/nixos/modules/security/setuid-wrapper.c index dd1ef51019f3..ffd0b65b7629 100644 --- a/nixos/modules/security/setuid-wrapper.c +++ b/nixos/modules/security/setuid-wrapper.c @@ -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', |