summaryrefslogtreecommitdiff
path: root/include/lib.sh
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-06-05 11:26:08 +0100
committerLeah Rowe <leah@libreboot.org>2024-06-05 11:26:08 +0100
commit6e1b8087c5133b4f9a384df6ea7de3250ea8e573 (patch)
tree8f81f3420bd8b83fc5e2160bf967dbf28fe81abb /include/lib.sh
parent62c25ac7ab2b7be8e2f3a2321e44dcf93dc9c635 (diff)
move id check to lib.sh too
doesn't really matter, it's just an extra layer to ensure reliability, but "id" is pretty standard Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/lib.sh')
-rwxr-xr-xinclude/lib.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/lib.sh b/include/lib.sh
index 23dfe81a..6a4be7ee 100755
--- a/include/lib.sh
+++ b/include/lib.sh
@@ -61,6 +61,7 @@ install_packages()
}
[ $# -gt 0 ] && [ "$1" = "dependencies" ] && install_packages $@ && return 0
+id -u 1>/dev/null 2>/dev/null || $err "suid check failed (id -u)"
[ "$(id -u)" != "0" ] || $err "this command as root is not permitted"
# if "y": a coreboot target won't be built if target.cfg says release="n"