summaryrefslogtreecommitdiff
path: root/system/adelie-base/adduser
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2019-05-30 05:21:39 -0400
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-06-01 05:25:29 +0000
commit5ab32da26eab7805e9c718e390e6227fd910a9b8 (patch)
tree3197e4478bd9ace2fd6119bd69a5950d0b27dfe5 /system/adelie-base/adduser
parentd448f4e0c6a17170cad364b25d7208c29ac7604e (diff)
downloadpackages-5ab32da26eab7805e9c718e390e6227fd910a9b8.tar.gz
packages-5ab32da26eab7805e9c718e390e6227fd910a9b8.tar.bz2
packages-5ab32da26eab7805e9c718e390e6227fd910a9b8.tar.xz
packages-5ab32da26eab7805e9c718e390e6227fd910a9b8.zip
system/adelie-base: reset PATH in addgroup, adduser
Since addgroup and adduser can potentially be called by any user in the "abuild" group with an arbitrary PATH via the setuid binary abuild-sudo (by way of the abuild-adduser and abuild-addgroup symlinks, used in the "mkusers" step of abuild), PATH should be reset before execing groupadd and useradd.
Diffstat (limited to 'system/adelie-base/adduser')
-rwxr-xr-xsystem/adelie-base/adduser1
1 files changed, 1 insertions, 0 deletions
diff --git a/system/adelie-base/adduser b/system/adelie-base/adduser
index 5c458045d..a3c1b9fbe 100755
--- a/system/adelie-base/adduser
+++ b/system/adelie-base/adduser
@@ -5,6 +5,7 @@
# Copyright © 2017 A. Wilcox. All rights reserved.
# Licensed under the terms of the NCSA Open Source license.
#
+export PATH=/bin:/usr/bin:/sbin:/usr/sbin
# The GECOS for the new user.
GECOS="Linux User,,,"