Commit 9c0fad5
committed
nspawn: Simplify mkdir_userns() usage, and trickle that up
One of the things that mkdir_userns{,_p}() does is take an (optional) UID,
and chown the directory to that. So we need a uid_t argument, and a way of
telling if we should use that uid_t argument. Fortunately, that is built
in to the uid_t type by having UID_INVALID as a possible value.
However, currently mkdir_userns() also takes a MountSettingsMask and checks
a couple of bits in it to decide if it should perform the chown.
Drop the mask argument, and instead have the caller pass UID_INVALID if it
shouldn't chown.1 parent f07b548 commit 9c0fad5
1 file changed
+6
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
445 | | - | |
| 445 | + | |
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
| |||
451 | 451 | | |
452 | 452 | | |
453 | 453 | | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
| 454 | + | |
458 | 455 | | |
459 | 456 | | |
460 | 457 | | |
| |||
463 | 460 | | |
464 | 461 | | |
465 | 462 | | |
466 | | - | |
| 463 | + | |
467 | 464 | | |
468 | 465 | | |
469 | 466 | | |
| |||
490 | 487 | | |
491 | 488 | | |
492 | 489 | | |
493 | | - | |
| 490 | + | |
494 | 491 | | |
495 | 492 | | |
496 | 493 | | |
497 | 494 | | |
498 | | - | |
| 495 | + | |
499 | 496 | | |
500 | 497 | | |
501 | 498 | | |
| |||
634 | 631 | | |
635 | 632 | | |
636 | 633 | | |
637 | | - | |
| 634 | + | |
638 | 635 | | |
639 | 636 | | |
640 | 637 | | |
| |||
0 commit comments