[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    [Differential] [Request, 46 lines] D4376: Replace long-deprecated getpass(3) call
From:       "A. Wilcox" <noreply () phabricator ! kde ! org>
Date:       2017-01-31 18:30:54
Message-ID: differential-rev-PHID-DREV-lzboxtommyr3e3x5ec7d-req () phabricator ! kde ! org
[Download RAW message or body]

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


[Attachment #3 (text/html)]

<table><tr><td style="">awilcox created this revision.<br />awilcox set the \
repository for this revision to R133 KScreenLocker.<br />Restricted Application added \
a project: Plasma.<br />Restricted Application added a subscriber: plasma-devel. \
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: \
right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: \
#F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: \
inline-block; border: 1px solid rgba(71,87,120,.2);" \
href="https://phabricator.kde.org/D4376" rel="noreferrer">View \
Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>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.</p>

<p>I didn&#039;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&#039;t \
think this case was very likely so I did not author such a check.</p></div></div><br \
/><div><strong>TEST PLAN</strong><div><ul class="remarkup-list"> <li \
class="remarkup-list-item">Tested against shadow backend and PAM backend.</li> <li \
class="remarkup-list-item">Each backend was tested on x86_64, x86_32, and \
PowerPC.</li> <li class="remarkup-list-item">Both glibc and musl libc were tested.  \
FreeBSD testing is pending.</li> </ul></div></div><br \
/><div><strong>REPOSITORY</strong><div><div>R133 KScreenLocker</div></div></div><br \
/><div><strong>REVISION DETAIL</strong><div><a \
href="https://phabricator.kde.org/D4376" \
rel="noreferrer">https://phabricator.kde.org/D4376</a></div></div><br \
/><div><strong>AFFECTED \
FILES</strong><div><div>kscreenlocker-5.8.5/kcheckpass/kcheckpass.c</div></div></div><br \
/><div><strong>EMAIL PREFERENCES</strong><div><a \
href="https://phabricator.kde.org/settings/panel/emailpreferences/" \
rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br \
/><div><strong>To: </strong>awilcox<br /><strong>Cc: </strong>plasma-devel, \
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas<br /></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic