summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2016-06-06 22:08:34 -0700
committerMichael Forney <mforney@mforney.org>2016-06-06 22:08:34 -0700
commitb22ceb964cd43ae94e229619866199d098c3e151 (patch)
tree6bbb63355546094c115a4bf28a622fd7fd2541db
parentff33a0af7916c7c9611d338f350cfd2b6be9bd25 (diff)
ubase: Make su setuid
-rw-r--r--core/ubase/gen.rc9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/ubase/gen.rc b/core/ubase/gen.rc
index 6e3abf74..edcdf828 100644
--- a/core/ubase/gen.rc
+++ b/core/ubase/gen.rc
@@ -28,10 +28,15 @@ lib libutil.a\
libutil/tty.c
fn x {
+ if(~ $1 -m) {
+ mode=$2
+ shift 2
+ }
+ if not mode=755
exe=$1
shift
exe $exe -d '$outdir'/config.h $exe.c libutil.a
- file bin/$exe '$outdir'/$exe 755
+ file bin/$exe '$outdir'/$exe $mode
if(~ $#* 1) file share/man/man$1/$exe.$1 '$srcdir'/$exe.$1 644
status=()
}
@@ -73,7 +78,7 @@ x readahead 8
x respawn 1
x rmmod 8
x stat 1
-x su 1
+x -m 4755 su 1
x swaplabel 8
x swapoff 8
x swapon 8