Skip to content

Commit

Permalink
raw-runtime-config: fix the default rootless ID mapping
Browse files Browse the repository at this point in the history
d829321 modified the idtools package and therefore default mapping
used by unpack, but raw-runtime-config still used the previous format.

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
  • Loading branch information
flx42 committed Apr 25, 2018
1 parent 50b639d commit 16e1bcb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/umoci/raw-runtime-config.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ func rawConfig(ctx *cli.Context) error {
meta.MapOptions.Rootless = ctx.Bool("rootless")
if meta.MapOptions.Rootless {
if !ctx.IsSet("uid-map") {
ctx.Set("uid-map", fmt.Sprintf("%d:0:1", os.Geteuid()))
ctx.Set("uid-map", fmt.Sprintf("0:%d:1", os.Geteuid()))
}
if !ctx.IsSet("gid-map") {
ctx.Set("gid-map", fmt.Sprintf("%d:0:1", os.Getegid()))
ctx.Set("gid-map", fmt.Sprintf("0:%d:1", os.Getegid()))
}
}
// Parse and set up the mapping options.
Expand Down

0 comments on commit 16e1bcb

Please sign in to comment.