Commit f595d37
committed
generate: Add --user and consolidate user-namespace handling
Put this in setupNamespaces with the other namespaces. This commit
allows users to:
* Join an existing user namespace with --user=path/to/ns.
* Create a new user namespace without mapping IDs (although this is
likely not very useful).
* Clear a templated user namespace with --user=host (although without
being able to clear the ID mappings, this may not be very useful).
I haven't checked for likely-invalid configuration like:
--uidmappings=1000:0:1 --user=path/to/ns
We can add that in a follow-up commit if we want.
Signed-off-by: W. Trevor King <[email protected]>1 parent 5a20d1d commit f595d37
2 files changed
Lines changed: 15 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
463 | 464 | | |
464 | 465 | | |
465 | 466 | | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | 467 | | |
471 | 468 | | |
472 | 469 | | |
| |||
660 | 657 | | |
661 | 658 | | |
662 | 659 | | |
663 | | - | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
664 | 666 | | |
665 | | - | |
| 667 | + | |
666 | 668 | | |
667 | 669 | | |
668 | 670 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
195 | 200 | | |
196 | 201 | | |
197 | 202 | | |
| |||
0 commit comments