mirror of
https://github.com/clearlinux/dockerfiles.git
synced 2026-09-01 19:21:28 +00:00
Make clr user wheelnopw
This commit removes the restriction of root nopw access to only the mixer and swupd binaries. The 'clr' user is now part of the wheelnopw group. Signed-off-by: Kevin C. Wells <kevin.c.wells@intel.com>
This commit is contained in:
+1
-3
@@ -4,13 +4,11 @@ MAINTAINER kevin.c.wells@intel.com
|
||||
ARG swupd_args
|
||||
|
||||
COPY setup.py /usr/bin/setup.py
|
||||
COPY clruser /usr/share/defaults/sudo/sudoers.d/
|
||||
|
||||
# Update and add bundles
|
||||
RUN swupd update $swupd_args && \
|
||||
swupd bundle-add os-clr-on-clr $swupd_args && \
|
||||
chmod 755 /usr/bin/setup.py && \
|
||||
chmod 440 /usr/share/defaults/sudo/sudoers.d/clruser
|
||||
chmod 755 /usr/bin/setup.py
|
||||
|
||||
ENTRYPOINT ["/usr/bin/setup.py"]
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
clr ALL=NOPASSWD:SETENV: /usr/bin/mixer, /usr/bin/swupd
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ try:
|
||||
cmd = "groupadd -o -g {} {}".format(gid,user)
|
||||
subprocess.run(cmd.split(),stdout=subprocess.PIPE,stderr=subprocess.STDOUT,check=True)
|
||||
# Note: adding user to mock group for access to running mock
|
||||
cmd = "useradd -Nmo -g {} -G mock -u {} {}".format(gid,uid,user)
|
||||
cmd = "useradd -Nmo -g {} -G mock,wheelnopw -u {} {}".format(gid,uid,user)
|
||||
subprocess.run(cmd.split(),stdout=subprocess.PIPE,stderr=subprocess.STDOUT,check=True)
|
||||
os.chown("/home/{}".format(user),uid,gid)
|
||||
except subprocess.SubprocessError:
|
||||
|
||||
Reference in New Issue
Block a user