Skip to content

Commit bc51403

Browse files
lpincadanielleadams
authored andcommittedJan 3, 2023
os: convert uid and gid to 32-bit signed integers
Make `os.userInfo()` convert the `uid` and `gid` fields to 32-bit signed integers on Windows. PR-URL: #42340 Refs: libuv/libuv@f3e0bffcb14 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 8616e9b commit bc51403

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎lib/os.js

+5
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,11 @@ function userInfo(options) {
354354
if (user === undefined)
355355
throw new ERR_SYSTEM_ERROR(ctx);
356356

357+
if (isWindows) {
358+
user.uid |= 0;
359+
user.gid |= 0;
360+
}
361+
357362
return user;
358363
}
359364

0 commit comments

Comments
 (0)
Please sign in to comment.