File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1010
1111#if !defined(_MSC_VER)
1212#include < unistd.h> // setuid, getuid
13- #include < linux/capability.h>
14- #include < sys/syscall.h>
13+ #include < sys/capability.h>
1514#endif
1615
1716namespace node {
@@ -45,7 +44,7 @@ bool HasCapability(int capability) {
4544 };
4645 struct __user_cap_data_struct cap_data;
4746
48- if (syscall (SYS_capget, &cap_header_data, &cap_data) == -1 ) {
47+ if (capget ( &cap_header_data, &cap_data) == -1 ) {
4948 return false ;
5049 }
5150
@@ -59,8 +58,8 @@ bool HasCapability(int capability) {
5958// then lookup will not be allowed.
6059bool SafeGetenv (const char * key, std::string* text, Environment* env) {
6160#if !defined(__CloudABI__) && !defined(_WIN32)
62- if (!HasCapability (CAP_NET_BIND_SERVICE) && ( per_process::linux_at_secure ||
63- getuid () != geteuid () || getgid () != getegid ()))
61+ if (!HasCapability (CAP_NET_BIND_SERVICE) && per_process::linux_at_secure ||
62+ getuid () != geteuid () || getgid () != getegid ())
6463 goto fail;
6564#endif
6665
You can’t perform that action at this time.
0 commit comments