From 40432df9454dc00527ce3914545b96a918f75219 Mon Sep 17 00:00:00 2001 From: Steve Traylen Date: Tue, 23 Jan 2024 12:54:25 +0100 Subject: [PATCH] test without debug --- .github/workflows/pamtester.yml | 1 + .github/workflows/pamtester_debug.yml | 21 +++++++++++++++++++++ pamtester/krb5_cc_move | 2 +- pamtester/krb5_cc_move_debug | 2 ++ 4 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pamtester_debug.yml create mode 100644 pamtester/krb5_cc_move_debug diff --git a/.github/workflows/pamtester.yml b/.github/workflows/pamtester.yml index ec0171d..d67993d 100644 --- a/.github/workflows/pamtester.yml +++ b/.github/workflows/pamtester.yml @@ -18,3 +18,4 @@ jobs: - run: journalctl -n 50 - run: ls -l /tmp/destination - run: sudo -u testuser klist -f /tmp/destination + diff --git a/.github/workflows/pamtester_debug.yml b/.github/workflows/pamtester_debug.yml new file mode 100644 index 0000000..fb2f1cc --- /dev/null +++ b/.github/workflows/pamtester_debug.yml @@ -0,0 +1,21 @@ +--- +name: pamtester run of pam_krb5_cc_move +on: [push] +jobs: + pamtester: + runs-on: ubuntu-latest + steps: + - run: sudo apt install pamtester gcc make libpam-dev libkrb5-dev krb5-user krb5-k5tls + - uses: actions/checkout@v4 + - run: make + - run: sudo make install INSTALLDIR=/usr/lib/x86_64-linux-gnu/security + - run: sudo cp pamtester/krb5_cc_move_debug /etc/pam.d/krb5_cc_move + - run: cp pamtester/expired_kerberos_token /tmp/source + - run: klist -f /tmp/source + - run: sudo adduser testuser + - run: sudo chown testuser /tmp/source + - run: sudo pamtester -v krb5_cc_move testuser open_session + - run: journalctl -n 50 + - run: ls -l /tmp/destination + - run: sudo -u testuser klist -f /tmp/destination + diff --git a/pamtester/krb5_cc_move b/pamtester/krb5_cc_move index ce08ea0..4399b63 100644 --- a/pamtester/krb5_cc_move +++ b/pamtester/krb5_cc_move @@ -1,2 +1,2 @@ # Just use for testing -session optional pam_krb5_cc_move.so debug source=FILE:/tmp/source destination=FILE:/tmp/destination +session optional pam_krb5_cc_move.so source=FILE:/tmp/source destination=FILE:/tmp/destination diff --git a/pamtester/krb5_cc_move_debug b/pamtester/krb5_cc_move_debug new file mode 100644 index 0000000..ce08ea0 --- /dev/null +++ b/pamtester/krb5_cc_move_debug @@ -0,0 +1,2 @@ +# Just use for testing +session optional pam_krb5_cc_move.so debug source=FILE:/tmp/source destination=FILE:/tmp/destination