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

List:       kde-core-devel
Subject:    Re: Review Request: Fix hang in kcm_useraccount
From:       "Oswald Buddenhagen" <ossi () kde ! org>
Date:       2012-08-15 7:38:53
Message-ID: 20120815073853.21521.41121 () vidsolbach ! de
[Download RAW message or body]

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


heh - nasty: you put the dialog invocation into the backend class. to be consistent, \
you'd need to put the error message boxes into that class as well, and thus kill all \
core/gui separation entirely. ^^ but you hit the nail exactly on the head: the kdesu \
framework needs to be callback-based instead of requiring a password a-priori. i \
think the most qt way to do that would be the class emitting a \
needAuthentication(qstring prompt) signal and awaiting a returnAuthentication(qstring \
pw) slot invocation in return. the alternative would be handler classes with virtual \
functions (see kgreeter.h somewhere in workspace). do you feel like doing it right \
(and thus providing a prototype for the new kdesu) or want to take the shortcut?


- Oswald Buddenhagen


On Aug. 14, 2012, 12:33 p.m., Michael Palimaka wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105895/
> -----------------------------------------------------------
> 
> (Updated Aug. 14, 2012, 12:33 p.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.h c9f0700f51d0a749b43c75840c43b46ccadb538a 
> kdepasswd/kcm/chfnprocess.cpp 9f75d4aa75b41acec84e7798c789d4226ca3fab9 
> kdepasswd/kcm/main.cpp 5a5248e545cc75433024ae0464ac9f3e05b71900 
> 
> Diff: http://git.reviewboard.kde.org/r/105895/diff/
> 
> 
> Testing
> -------
> 
> Tested all combinations of password required and name change permitted, with \
> success. 
> 
> Thanks,
> 
> Michael Palimaka
> 
> 


[Attachment #3 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/105895/">http://git.reviewboard.kde.org/r/105895/</a>
  </td>
    </tr>
   </table>
   <br />





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">heh - nasty: you put the \
dialog invocation into the backend class. to be consistent, you&#39;d need to put the \
error message boxes into that class as well, and thus kill all core/gui separation \
entirely. ^^ but you hit the nail exactly on the head: the kdesu framework needs to \
be callback-based instead of requiring a password a-priori. i think the most qt way \
to do that would be the class emitting a needAuthentication(qstring prompt) signal \
and awaiting a returnAuthentication(qstring pw) slot invocation in return. the \
alternative would be handler classes with virtual functions (see kgreeter.h somewhere \
in workspace). do you feel like doing it right (and thus providing a prototype for \
the new kdesu) or want to take the shortcut? </pre>
 <br />







<p>- Oswald</p>


<br />
<p>On August 14th, 2012, 12:33 p.m., Michael Palimaka wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for KDE Base Apps.</div>
<div>By Michael Palimaka.</div>


<p style="color: grey;"><i>Updated Aug. 14, 2012, 12:33 p.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">When changing the user&#39;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.</pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Tested all combinations of password required and name change permitted, \
with success.</pre>  </td>
 </tr>
</table>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="http://bugs.kde.org/show_bug.cgi?id=156396">156396</a>


</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>kdepasswd/kcm/chfnprocess.h <span style="color: \
grey">(c9f0700f51d0a749b43c75840c43b46ccadb538a)</span></li>

 <li>kdepasswd/kcm/chfnprocess.cpp <span style="color: \
grey">(9f75d4aa75b41acec84e7798c789d4226ca3fab9)</span></li>

 <li>kdepasswd/kcm/main.cpp <span style="color: \
grey">(5a5248e545cc75433024ae0464ac9f3e05b71900)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/105895/diff/" style="margin-left: \
3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>



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

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