Unix users are identified with a
UID
and a
GID
while Windows users are
identified with a SID
.
Consequently all methods based on
UID
or
GID
fail on Windows:
os.userInfo().uid|gid
return-1
.fs.stat()
'suid
andgid
return0
.- The
process
methodsgetuid()
,geteuid()
,getgid()
,getegid()
,setuid()
,seteuid()
,setgid()
,setegid()
,getgroups()
,setgroups()
andinitgroups()
throw an error. fs.chown()
does not do anything.child_process
'suid
andgid
options throw an error.
The privileged user is root
on Unix and Administrator
on Windows. Those are
triggered with different mechanisms.
One can use is-elevated
(and
the related is-admin
and
is-root
) to check it on any OS.
The --secure-heap
CLI
flag does not do anything on Windows.