From dc4f0d68959b44ce902c0286c0e6338205b48ad4 Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Mon, 15 Jun 2026 11:04:30 +0200 Subject: [PATCH] sssctl: add input for user-checks To be able to provide a password or a pin during authentication an optional input option is added. --- sssd_test_framework/utils/sssctl.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sssd_test_framework/utils/sssctl.py b/sssd_test_framework/utils/sssctl.py index f31af6b5..44b98099 100644 --- a/sssd_test_framework/utils/sssctl.py +++ b/sssd_test_framework/utils/sssctl.py @@ -245,7 +245,9 @@ def umockdev_passkey_register( return result.stdout_lines[-1].strip() - def user_checks(self, username: str, action: str = "acct", service: str = "system-auth") -> ProcessResult: + def user_checks( + self, username: str, action: str = "acct", service: str = "system-auth", auth_input: str | None = None + ) -> ProcessResult: """ Print information about a user and check authentication @@ -255,10 +257,12 @@ def user_checks(self, username: str, action: str = "acct", service: str = "syste :type action: str :param service: PAM service, defaults to "system-auth" :type service: str + :param auth_input: input during authentication (action "auth"), e.g. password or pin + :type auth_input: str | None, optional :return: Result of called command :rtype: ProcessResult """ - return self.host.conn.exec(["sssctl", "user-checks", username, "-a", action, "-s", service]) + return self.host.conn.exec(["sssctl", "user-checks", username, "-a", action, "-s", service], input=auth_input) def user_show(self, user: str | None = None, sid: str | None = None, uid: int | None = None) -> ProcessResult: """