mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
init.sh: make TMPDIR *after* calling xbmkpkg
otherwise, running ./mk dependencies as root will create xbmkwd/ (temporary directories) as root, which will then prevent non-root instances of lbmk from being able to make temporary files. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+2
-2
@@ -23,11 +23,11 @@ xbmk_init()
|
||||
xbmklock="$xbmkpwd/lock"
|
||||
basetmp="$xbmkpwd/xbmkwd"
|
||||
|
||||
[ $# -gt 0 ] && [ "$1" = "dependencies" ] && x_ xbmkpkg "$@" && exit 0
|
||||
|
||||
export PWD="$xbmkpwd"
|
||||
x_ mkdir -p "$basetmp"
|
||||
|
||||
[ $# -gt 0 ] && [ "$1" = "dependencies" ] && x_ xbmkpkg "$@" && exit 0
|
||||
|
||||
id -u 1>/dev/null 2>/dev/null || err "suid check failed" xbmk_init "$@"
|
||||
[ "$(id -u)" != "0" ] || \
|
||||
err "this command as root is not permitted" xbmk_init "$@"
|
||||
|
||||
Reference in New Issue
Block a user