mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-22 12:54:20 +08:00
Merge branch 'mggmuggins/userutils' into 'master'
Do setuid in the userutils recipe See merge request redox-os/cookbook!169
This commit is contained in:
commit
be89cd2df8
@ -1,7 +1,43 @@
|
||||
GIT=https://gitlab.redox-os.org/redox-os/userutils.git
|
||||
BINS=(
|
||||
id
|
||||
getty
|
||||
groupadd
|
||||
groupmod
|
||||
groupdel
|
||||
login
|
||||
passwd
|
||||
su
|
||||
sudo
|
||||
useradd
|
||||
usermod
|
||||
userdel
|
||||
)
|
||||
|
||||
function recipe_stage {
|
||||
cp -Rv res "$1/etc"
|
||||
# Reimplement the entire copy bc of suid
|
||||
if [ "$DEBUG" == 1 ]
|
||||
then
|
||||
build=debug
|
||||
else
|
||||
build=release
|
||||
fi
|
||||
|
||||
mkdir -p "$1/bin"
|
||||
|
||||
for bin in "${BINS[@]}"
|
||||
do
|
||||
cp -v "target/x86_64-unknown-redox/$build/$bin" "$1/bin"
|
||||
done
|
||||
|
||||
cp -Rv "res" "$1/etc"
|
||||
|
||||
ln -s id "$1/bin/whoami"
|
||||
chmod +s "$1/bin/passwd"
|
||||
chmod +s "$1/bin/sudo"
|
||||
chmod +s "$1/bin/su"
|
||||
|
||||
docgen ../source ../stage/ref
|
||||
|
||||
skip=1
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user