File tree 1 file changed +4
-5
lines changed 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 10
10
11
11
#if !defined(_MSC_VER)
12
12
#include < unistd.h> // setuid, getuid
13
- #include < linux/capability.h>
14
- #include < sys/syscall.h>
13
+ #include < sys/capability.h>
15
14
#endif
16
15
17
16
namespace node {
@@ -45,7 +44,7 @@ bool HasCapability(int capability) {
45
44
};
46
45
struct __user_cap_data_struct cap_data;
47
46
48
- if (syscall (SYS_capget, &cap_header_data, &cap_data) == -1 ) {
47
+ if (capget ( &cap_header_data, &cap_data) == -1 ) {
49
48
return false ;
50
49
}
51
50
@@ -59,8 +58,8 @@ bool HasCapability(int capability) {
59
58
// then lookup will not be allowed.
60
59
bool SafeGetenv (const char * key, std::string* text, Environment* env) {
61
60
#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 ())
64
63
goto fail;
65
64
#endif
66
65
You can’t perform that action at this time.
0 commit comments