Skip to content

macros: stop pam-auth-update reporting a conflict it resolves itself - #14985

Open
0intro wants to merge 1 commit into
ComplianceAsCode:masterfrom
0intro:pam-unix-conflict-message
Open

macros: stop pam-auth-update reporting a conflict it resolves itself#14985
0intro wants to merge 1 commit into
ComplianceAsCode:masterfrom
0intro:pam-unix-conflict-message

Conversation

@0intro

@0intro 0intro commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Description:

bash_pam_unix_enable copies the packaged unix pam-config to cac_unix, adds a Conflicts line naming unix, and runs pam-auth-update. The configuration that comes out is the right one, but getting there looks like a failure. pam-auth-update finds both profiles selected, drops unix to settle the conflict, and then reports what it just did as a debconf error. Nothing else in the copy changes, so both profiles still answer to the name "Unix authentication" and the error names the same profile twice. What a reader sees is a complaint about a conflict the remediation created and pam-auth-update already dealt with, with no hint that it exited 0 having written exactly what was asked of it.

So we do it explicitly. Enable cac_unix and disable unix in the same pam-auth-update call, leaving no conflict for pam-auth-update to report, and give the copy a name of its own so it can be told apart from the profile it replaces.

The disable option arrived in libpam-runtime 1.5, so Ubuntu 22.04 prints the message either way. There the rename is the whole of the improvement, which is not much, but it beats naming one profile twice.

The six no_empty_passwords and no_empty_passwords_unix scenarios that stand up a competing profile of their own hit the same message, so they disable unix too.

bash_pam_unix_enable copies the packaged unix pam-config to cac_unix, adds
a Conflicts line naming unix, and runs pam-auth-update. The configuration
that comes out is the right one, but getting there looks like a failure.
pam-auth-update finds both profiles selected, drops unix to settle the
conflict, and then reports what it just did as a debconf error. Nothing
else in the copy changes, so both profiles still answer to the name
"Unix authentication" and the error names the same profile twice. What a
reader sees is a complaint about a conflict the remediation created and
pam-auth-update already dealt with, with no hint that it exited 0 having
written exactly what was asked of it.

So we do it explicitly. Enable cac_unix and disable unix in the same
pam-auth-update call, leaving no conflict for pam-auth-update to report,
and give the copy a name of its own so it can be told apart from the
profile it replaces.

The disable option arrived in libpam-runtime 1.5, so Ubuntu 22.04 prints
the message either way. There the rename is the whole of the improvement,
which is not much, but it beats naming one profile twice.

The six no_empty_passwords and no_empty_passwords_unix scenarios that
stand up a competing profile of their own hit the same message, so they
disable unix too.
@openshift-ci openshift-ci Bot added the needs-ok-to-test Used by openshift-ci bot. label Aug 12, 2026
@openshift-ci

openshift-ci Bot commented Aug 12, 2026

Copy link
Copy Markdown

Hi @0intro. Thanks for your PR.

I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@Mab879 Mab879 self-assigned this Aug 14, 2026
@Mab879 Mab879 added this to the 0.1.82 milestone Aug 14, 2026

@Mab879 Mab879 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ComplianceAsCode/ubuntu-maintainers can you please take a look as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ok-to-test Used by openshift-ci bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants