Bug 1148794
Summary: | Running domainname in unprivileged container fails with "you must be root" | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Jan Pazdziora <jpazdziora> |
Component: | docker | Assignee: | Daniel Walsh <dwalsh> |
Status: | CLOSED NOTABUG | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.0 | CC: | jpazdziora |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-10-03 15:57:32 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jan Pazdziora
2014-10-02 11:36:30 UTC
Strace shows brk(0) = 0xd4b000 setdomainname("example.test", 12) = -1 EPERM (Operation not permitted) write(2, "domainname: ", 12domainname: ) = 12 write(2, "you must be root to change the d"..., 42you must be root to change the domain name) = 42 This is not a bug. You are not allowed to change the domainname or hostname from within a container. (In reply to Daniel Walsh from comment #3) > This is not a bug. You are not allowed to change the domainname or hostname > from within a container. Does it apply to the NIS/YP domain name as well? That's what domainname changes. It's not dealing with DNS hostname/domain name. Yes, you would need to set these domains outside of the container, in the docker command. Or run with the sys_admin or maybe net_admin capability. |