Skip to content

Commit c2f3cd9

Browse files
committed
Check PAM
1 parent c36fdf4 commit c2f3cd9

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

scripts/check_pam.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/sh
2+
3+
USER=`whoami`
4+
5+
read -s -p "Password: " PWD
6+
echo ""
7+
if echo "#require \"simple_pam\";; Simple_pam.authenticate \"login\" \"$USER\" \"$PWD\";;" | utop -stdin; then
8+
echo "PAM is available"
9+
else
10+
echo "Error: you entered wrong password, or PAM is not available. Install pam-devel and reinstall simple_pam if the password is correct"
11+
exit 2
12+
fi
13+

scripts/make_release_pkg_linux.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#!/bin/sh
22

3+
set -e
4+
set -o pipefail
5+
6+
# check pam-devel is installed
7+
# echo "#include <security/pam_appl.h>" | gcc -E - &> /dev/null; echo $?
8+
./scripts/check_pam.sh
9+
310
ocamlbuild -clean
411
./scripts/build.sh src/lfs_config.native
512
./scripts/build.sh src/lfs_server.native

0 commit comments

Comments
 (0)