diff options
author | Leah Rowe <leah@libreboot.org> | 2025-09-25 02:24:05 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-09-25 02:26:48 +0100 |
commit | 0303167e25c2bb5856eb2fe15694d8081543623a (patch) | |
tree | e68f3bbd8c4eea280debed6aaa7fa183454a4694 /include/init.sh | |
parent | 1a74172a17656414357399f588192105c146a67b (diff) |
init.sh: create TMPDIR *after* suid check
otherwise, it may get created as the root user, disabling
further use of lbmk until manual user intervention.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/init.sh')
-rw-r--r-- | include/init.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/init.sh b/include/init.sh index 7e9fca30..0ce8fdf5 100644 --- a/include/init.sh +++ b/include/init.sh @@ -30,9 +30,6 @@ xbmk_init() exit 0 fi - export PWD="$xbmkpwd" - x_ mkdir -p "$basetmp" - id -u 1>/dev/null 2>/dev/null || \ err "suid check failed" "xbmk_init" "$@" @@ -40,6 +37,9 @@ xbmk_init() err "this command as root is not permitted" "xbmk_init" "$@" fi + export PWD="$xbmkpwd" + x_ mkdir -p "$basetmp" + for init_cmd in get_version set_env set_threads git_init child_exec; do if ! xbmk_$init_cmd "$@"; then break |