Skip to content

Fix IPA passkey feature detection#245

Open
ikerexxe wants to merge 1 commit intoSSSD:masterfrom
ikerexxe:fix-passkey-detection
Open

Fix IPA passkey feature detection#245
ikerexxe wants to merge 1 commit intoSSSD:masterfrom
ikerexxe:fix-passkey-detection

Conversation

@ikerexxe
Copy link
Copy Markdown
Contributor

@ikerexxe ikerexxe commented May 7, 2026

Replace ipa help user | grep user-add-passkey with direct command test ipa user-add-passkey --help to avoid terminal environment issues when running in SSH sessions without proper TTY allocation.

Replace `ipa help user | grep user-add-passkey` with direct command test
`ipa user-add-passkey --help` to avoid terminal environment issues when
running in SSH sessions without proper TTY allocation.

Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the feature detection logic in sssd_test_framework/hosts/ipa.py by replacing a piped grep command with a direct help check for ipa user-add-passkey. This change simplifies the command and ensures both standard output and error are suppressed. I have no feedback to provide as there are no review comments.

@alexey-tikhonov
Copy link
Copy Markdown
Member

There is a lot of other places where grep is used:

sssd_test_framework/hosts/ldap.py:60:            grep -r "passkey" /etc/dirsrv/ &> /dev/null && echo "passkey" || :
sssd_test_framework/hosts/client.py:57:            systemctl cat sssd.service | grep -q "If service configured to be run under" && echo "non-privileged" || :
sssd_test_framework/hosts/client.py:58:            strings /usr/lib64/sssd/libsss_ldap_common.so | grep ldap_use_ppolicy && echo "ldap_use_ppolicy" || :
sssd_test_framework/hosts/client.py:60:            MANWIDTH=10000 man sssd.conf | grep -q "id_provider = ldap or id_provider = proxy" && \
sssd_test_framework/hosts/samba.py:77:            timeout 60s bash -c 'until netstat -ltp 2> /dev/null | grep :ldap &> /dev/null; do :; done'
sssd_test_framework/hosts/samba.py:78:            timeout 60s bash -c 'until netstat -ltp 2> /dev/null | grep :kerberos &> /dev/null; do :; done'
sssd_test_framework/utils/automount.py:108:        mount | grep "{export.hostname}:{export.fullpath} on {path}"
sssd_test_framework/utils/authentication.py:498:                env | grep ^UMOCKDEV_ >> /usr/libexec/sssd/passkey_child

Aren't those affected by the same issue?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants