D12702: Avoid giving an stderr to kwallet

Maximiliano Curia noreply at phabricator.kde.org
Tue May 8 07:21:52 UTC 2018


maximilianocuria added a comment.


  I'm not sure, but I think that pam could be called from a process that has the stdin/stdout/stderr redirected to pipes, so disconnecting those for a long lived process would avoid a possible broken pipe. Now, if that's so, why it's not clossing stdin and stdout, I don't know.
  
  Also, why hardcode the 64 instead of closing all the available fds (see https://github.com/openssh/openssh-portable/blob/master/openbsd-compat/bsd-closefrom.c as an example).
  
  I guess there is room for improvement, but the change here follows the same logic of the original behavior. The original code starts kwalled without an stderr, and so does this version.
  
  Happy hacking,

REPOSITORY
  R107 KWallet PAM Integration

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

To: maximilianocuria, #plasma, aacid
Cc: tsimonq2, asturmlechner, rdieter, davidedmundson, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180508/15f2ac23/attachment.html>


More information about the Plasma-devel mailing list