libpod: do not parse --hostuser in base 8

fix the parsing of --hostuser to treat the input in base 10.

Closes: https://github.com/containers/podman/issues/19800

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano
2023-08-31 10:46:01 +02:00
parent e73e585f5d
commit 702709a916
2 changed files with 13 additions and 2 deletions

View File

@@ -821,12 +821,12 @@ func lookupHostUser(name string) (*runcuser.ExecUser, error) {
if err != nil {
return &execUser, err
}
uid, err := strconv.ParseUint(u.Uid, 8, 32)
uid, err := strconv.ParseUint(u.Uid, 10, 32)
if err != nil {
return &execUser, err
}
gid, err := strconv.ParseUint(u.Gid, 8, 32)
gid, err := strconv.ParseUint(u.Gid, 10, 32)
if err != nil {
return &execUser, err
}