Review Request: Fix hang in kcm_useraccount

Oswald Buddenhagen ossi at kde.org
Sat Aug 11 19:23:53 BST 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105895/#review17253
-----------------------------------------------------------


now i took the time to have a deep look at this stuff ...
the kdesu code is sickening. it should be rewritten from scratch for KF5.

anyway, i think you are approaching things from the wrong end. while readLine is blocking, it should still exit if the child process terminated.
i hacked up something which appears to work: http://pastebin.ca/2179290
the whole code seemed rather arcane and fragile, so i simplified it "a bit" ...


- Oswald Buddenhagen


On Aug. 9, 2012, 7:50 a.m., Michael Palimaka wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105895/
> -----------------------------------------------------------
> 
> (Updated Aug. 9, 2012, 7:50 a.m.)
> 
> 
> Review request for KDE Base Apps.
> 
> 
> Description
> -------
> 
> When changing the user's full name, chfn may not necessarily produce any output. Since readLine blocks, the kcm may hang.
> 
> This change checks if chfn exited without output, and if so, use that exit status.
> 
> 
> This addresses bug 156396.
>     http://bugs.kde.org/show_bug.cgi?id=156396
> 
> 
> Diffs
> -----
> 
>   kdepasswd/kcm/chfnprocess.cpp 9f75d4aa75b41acec84e7798c789d4226ca3fab9 
> 
> Diff: http://git.reviewboard.kde.org/r/105895/diff/
> 
> 
> Testing
> -------
> 
> On a PAM-enabled system:
> * Full name changed successfully when permitted by login.defs
> * Error presented and no change processed with prohibited by login.defs
> 
> 
> Thanks,
> 
> Michael Palimaka
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20120811/e856b79e/attachment.htm>


More information about the kde-core-devel mailing list