Skip to content

Commit

Permalink
Check PAM
Browse files Browse the repository at this point in the history
  • Loading branch information
artemkin committed Feb 24, 2016
1 parent c36fdf4 commit c2f3cd9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
13 changes: 13 additions & 0 deletions scripts/check_pam.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

USER=`whoami`

read -s -p "Password: " PWD
echo ""
if echo "#require \"simple_pam\";; Simple_pam.authenticate \"login\" \"$USER\" \"$PWD\";;" | utop -stdin; then
echo "PAM is available"
else
echo "Error: you entered wrong password, or PAM is not available. Install pam-devel and reinstall simple_pam if the password is correct"
exit 2
fi

7 changes: 7 additions & 0 deletions scripts/make_release_pkg_linux.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#!/bin/sh

set -e
set -o pipefail

# check pam-devel is installed
# echo "#include <security/pam_appl.h>" | gcc -E - &> /dev/null; echo $?
./scripts/check_pam.sh

ocamlbuild -clean
./scripts/build.sh src/lfs_config.native
./scripts/build.sh src/lfs_server.native
Expand Down

0 comments on commit c2f3cd9

Please sign in to comment.