Skip to content

Commit

Permalink
fixup! pam: Move generation to a standalone scrip
Browse files Browse the repository at this point in the history
  • Loading branch information
3v1n0 committed Dec 13, 2023
1 parent cbe5bc5 commit 191b35f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pam/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

set -euo pipefail

PROEJECT_ROOT=$PWD/..
PROJECT_ROOT=$PWD/..
module_libname=pam_authd.so
loader_libname=pam_go_loader.so

if [ -d "$PROEJECT_ROOT"/vendor ]; then
if [ -d "$PROJECT_ROOT"/vendor ]; then
echo Vendored dependencies detected, not re-generating pam_module.go
else
go run github.com/msteinert/pam/v2/cmd/pam-moduler \
Expand All @@ -20,8 +20,8 @@ if [ -v AUTHD_PAM_MODULES_PATH ]; then
fi

${CC:-cc} -o go-loader/"$loader_libname" \
go-loader/module.c -Wl,--as-needed -Wl,--allow-shlib-undefined \
go-loader/module.c ${CFLAGS:-} -Wl,--as-needed -Wl,--allow-shlib-undefined \
-shared -fPIC -Wl,--unresolved-symbols=report-all \
-Wl,-soname,"$loader_libname" -lpam "${cc_args[@]}"
-Wl,-soname,"$loader_libname" -lpam ${LDFLAGS:-} "${cc_args[@]}"

chmod 644 go-loader/"$loader_libname"

0 comments on commit 191b35f

Please sign in to comment.