Bug 1736483

Summary: Sudo prompt for smart card authentication is missing the trailing colon
Product: Red Hat Enterprise Linux 8 Reporter: Jakub Hrozek <jhrozek>
Component: sssdAssignee: SSSD Maintainers <sssd-maint>
Status: CLOSED ERRATA QA Contact: Scott Poore <spoore>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.0CC: grajaiya, jhrozek, lslebodn, mzidek, pbrezina, sbose, sgoveas, spoore, tscherf
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: sssd-2.2.0-10.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-05 22:34:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jakub Hrozek 2019-08-01 18:09:32 UTC
This bug is created as a clone of upstream ticket:
https://pagure.io/SSSD/sssd/issue/4049

I configured sudo to authenticate using smart card. The prompt looks like this:
```
[jjelen@t470s ~]$ sudo true
PIN for jjelen
```
I think the prompt should end with the colon (mostly because the checks in sudo function use_pam_prompt() [1]) to explicitly mark prompt waiting for user input, as it looks like when `sudo` asks for password. The format string is defined in [2].

I can propose the trivial pull request, but first of all I wanted to discuss this whether there is not some other reason behind this, that I am missing.

[1] https://www.sudo.ws/repos/sudo/file/tip/plugins/sudoers/auth/pam.c
[2] https://pagure.io/SSSD/sssd/blob/master/f/src/sss_client/pam_sss.c#_1612

Comment 2 Sumit Bose 2019-08-07 16:35:15 UTC
Master:
 * db46cd0890057be1f72173a2ca2ae040bcf46c9a

Comment 4 Scott Poore 2019-08-19 13:56:35 UTC
Verified.

Version ::

sssd-2.2.0-11.el8.x86_64

Results ::

With IPA Smart Card authentication setup on client:

[root@rhel8-2 ~]# su - ipauser1
Last login: Mon Aug 19 08:54:07 CDT 2019 on pts/0

[ipauser1@rhel8-2 ~]$ sudo id
PIN for sctest (MyEID): 
uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

[ipauser1@rhel8-2 ~]$ su - ipauser1 -c id
PIN for sctest (MyEID): 
uid=1778400201(ipauser1) gid=1778400201(ipauser1) groups=1778400201(ipauser1) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

Comment 6 errata-xmlrpc 2019-11-05 22:34:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:3651