From 3696e1dfe18fa89dcc6f5ad329a75536ceed48c9 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Wed, 24 May 2023 22:58:32 +0400 Subject: [PATCH] Also, gen-salt demands to be runned under root, so let's check for it and fail if it doesn't. --- tools/gen-salt.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/gen-salt.sh b/tools/gen-salt.sh index 817f0bb..733b2c1 100755 --- a/tools/gen-salt.sh +++ b/tools/gen-salt.sh @@ -1,5 +1,10 @@ #!/usr/bin/sh +if [[ $EUID -ne 0 ]]; then + echo "Must run as root!" >&2; + exit 1 +fi + if [[ $1 ]]; then char_num=$1; else