Skip to content

[rootlesskit:parent] error: failed to setup UID/GID map [...] failed: newuidmap: write to uid_map failed: Invalid argument (when /etc/subuid has multiple lines for the user) #476

Open
@pianotako

Description

@pianotako

I've attempted to run rootlesskit bash, but I encountered the following error message:

[rootlesskit:parent] error: failed to setup UID/GID map: newuidmap 41685 [0 1001 1 1 1001 1 2 165536 65536] failed: newuidmap: write to uid_map failed: Invalid argument

Here is the content of my /etc/subuid:

$ cat /etc/subuid
dog:1001:1
dog:165536:65536

I found that if I remove the first line of my /etc/subuid (dog:1001:1), the error does not occur.
I am curious if there is any way to keep my current configuration without causing rootlesskit bash to crash?
Any help or suggestions would be greatly appreciated.

Here it the debug message of it:

rootlesskit --debug bash
DEBU[0000] [rootlesskit:parent] Sending &{Name:ParentHello U:{ParentHello:0xc9c9c0 ChildHello:<nil> ParentInitIdmapCompleted:<nil> ChildInitUserNSCompleted:<nil> ParentInitNetworkDriverCompleted:<nil> ParentInitPortDriverCompleted:<nil>}}
DEBU[0000] [rootlesskit:child ] reaper: auto chosen value: false
DEBU[0000] [rootlesskit:child ] pipeFD=3, pipe2FD=4
DEBU[0000] [rootlesskit:child ] Capabilities: {Effective:0 Permitted:0 Inheritable:0}
DEBU[0000] [rootlesskit:child ] Received {Name:ParentHello U:{ParentHello:<nil> ChildHello:<nil> ParentInitIdmapCompleted:<nil> ChildInitUserNSCompleted:<nil> ParentInitNetworkDriverCompleted:<nil> ParentInitPortDriverCompleted:<nil>}}
DEBU[0000] [rootlesskit:child ] Sending &{Name:ChildHello U:{ParentHello:<nil> ChildHello:0xc9c9c0 ParentInitIdmapCompleted:<nil> ChildInitUserNSCompleted:<nil> ParentInitNetworkDriverCompleted:<nil> ParentInitPortDriverCompleted:<nil>}}
DEBU[0000] [rootlesskit:parent] Received {Name:ChildHello U:{ParentHello:<nil> ChildHello:<nil> ParentInitIdmapCompleted:<nil> ChildInitUserNSCompleted:<nil> ParentInitNetworkDriverCompleted:<nil> ParentInitPortDriverCompleted:<nil>}}
DEBU[0000] [rootlesskit:parent] subid-source: using the dynamic source
DEBU[0000] [rootlesskit:parent] Executing [/usr/bin/getsubids dog]
DEBU[0000] [rootlesskit:parent] Executing [/usr/bin/getsubids 1001]
DEBU[0000] [rootlesskit:parent] subid-source:dynamic: failed to get subuids by the UID 1001  error="failed to exec [/usr/bin/getsubids 1001]: exit status 1 (stdout=\"\", stderr=\"Error fetching ranges\\n\")"
DEBU[0000] [rootlesskit:parent] Executing [/usr/bin/getsubids -g dog]
DEBU[0000] [rootlesskit:parent] Executing [/usr/bin/getsubids -g 1001]
DEBU[0000] [rootlesskit:parent] subid-source:dynamic: failed to get subgids by the UID 1001  error="failed to exec [/usr/bin/getsubids -g 1001]: exit status 1 (stdout=\"\", stderr=\"Error fetching ranges\\n\")"
DEBU[0000] [rootlesskit:parent] subuid ranges=[{1001 1} {165536 65536}]
DEBU[0000] [rootlesskit:parent] subgid ranges=[{984 1} {165536 65536}]
[rootlesskit:parent] error: failed to setup UID/GID map: newuidmap 35746 [0 1001 1 1 1001 1 2 165536 65536] failed: newuidmap: write to uid_map failed: Invalid argument
: exit status 1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions