Commit 99eacc4
fs: fix handling of
`FChown` and `Chown` test that the `uid` and `gid` parameters
they receive are unsigned integers, but `Stat()` and `FStat()`
would return the corresponding fields of `uv_stat_t` as signed
integers. Applications which pass those these values directly
to `Chown` may fail
(e.g. for `nobody` on OS X, who has an `uid` of `-2`, see e.g.
nodejs/node-v0.x-archive#5890).
This patch changes the `Integer::New()` call for `uid` and `gid`
to `Integer::NewFromUnsigned()`.
All other fields are kept as they are, for performance, but
strictly speaking the respective sizes of those
fields aren’t specified, either.
Ref: npm/npm#13918
PR-URL: #8515
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: James M Snell <[email protected]>
undo accidental change to other fields of uv_fs_statuv_stat_t fields1 parent e3e56f5 commit 99eacc4
1 file changed
+20
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
361 | | - | |
| 361 | + | |
362 | 362 | | |
363 | 363 | | |
364 | | - | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
365 | 367 | | |
366 | | - | |
| 368 | + | |
367 | 369 | | |
368 | | - | |
| 370 | + | |
369 | 371 | | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | 372 | | |
374 | 373 | | |
375 | | - | |
376 | 374 | | |
377 | 375 | | |
378 | 376 | | |
379 | 377 | | |
380 | 378 | | |
381 | 379 | | |
382 | 380 | | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
383 | 393 | | |
384 | 394 | | |
385 | 395 | | |
386 | 396 | | |
387 | 397 | | |
388 | | - | |
| 398 | + | |
389 | 399 | | |
390 | 400 | | |
391 | 401 | | |
| |||
404 | 414 | | |
405 | 415 | | |
406 | 416 | | |
407 | | - | |
| 417 | + | |
408 | 418 | | |
409 | 419 | | |
410 | 420 | | |
| |||
0 commit comments