Skip to content

Commit

Permalink
print bb environment
Browse files Browse the repository at this point in the history
Step needs systemdCapab
  • Loading branch information
RazvanLiviuVarzaru committed Oct 22, 2024
1 parent dfee8fe commit a750b5b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions master-libvirt/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ def getPAMTestStep():
haltOnFailure=True,
description=["testing", "PAM"],
descriptionDone=["test", "PAM"],
env=envFromProperties(
[
"systemdCapability",
]
),
command=["./pam-test.sh"],
)

Expand Down
6 changes: 4 additions & 2 deletions scripts/pam-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ set -e
# shellcheck disable=SC1091
. ./bash_lib.sh

bb_print_env

if ! which mysql ; then
bb_log_err "This step assumes that MariaDB has already been installed"
exit 1
Expand Down Expand Up @@ -38,7 +40,7 @@ fi
sudo mysql -e "UNINSTALL SONAME 'auth_pam'"
if mysql -ubuildbot -ptest -e "SHOW GRANTS" > /dev/null 2>&1 ; then
res=1
bb_log_info "User authenticated via PAM v2 (pam_unix) could still connect after uninstalling plugin"
bb_log_err "User authenticated via PAM v2 (pam_unix) could still connect after uninstalling plugin"
fi

# PAM v1
Expand All @@ -61,7 +63,7 @@ fi
sudo mysql -e "UNINSTALL SONAME 'auth_pam_v1'"
if mysql -ubuildbot -ptest -e "SHOW GRANTS" > /dev/null 2>&1 ; then
res=1
bb_log_info "User authenticated via PAM v1 (pam_unix) could still connect after uninstalling plugin"
bb_log_err "User authenticated via PAM v1 (pam_unix) could still connect after uninstalling plugin"
fi

#----------------
Expand Down

0 comments on commit a750b5b

Please sign in to comment.