[Differential] [Request, 46 lines] D4376: Replace long-deprecated getpass(3) call

A. Wilcox noreply at phabricator.kde.org
Tue Jan 31 18:30:54 UTC 2017


awilcox created this revision.
awilcox set the repository for this revision to R133 KScreenLocker.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.

REVISION SUMMARY
  This modernises the kcheckpass utility to stop using the getpass(3) call, which was deprecated in SUSv2, removed from POSIX.1-2001, and deprecated in glibc 2.19.  It replaces it with a fully standards compliant getdelim(3) call.  This also avoids the need to strdup the password buffer and temporarily have two copies.
  
  I didn't know how pedantic to make it; you could possibly want to check for password != NULL and memset-nul it out in the case of getdelim failure, since it could have read in a partial password but then received EOF before \n.  I didn't think this case was very likely so I did not author such a check.

TEST PLAN
  - Tested against shadow backend and PAM backend.
  - Each backend was tested on x86_64, x86_32, and PowerPC.
  - Both glibc and musl libc were tested.  FreeBSD testing is pending.

REPOSITORY
  R133 KScreenLocker

REVISION DETAIL
  https://phabricator.kde.org/D4376

AFFECTED FILES
  kscreenlocker-5.8.5/kcheckpass/kcheckpass.c

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: awilcox
Cc: plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170131/a80d8ad0/attachment.html>


More information about the Plasma-devel mailing list