D9966: [KIO] Fix issues with sharing of file descriptor

Fabian Vogt noreply at phabricator.kde.org
Sat Jan 27 10:39:44 UTC 2018


fvogt requested changes to this revision.
fvogt added a comment.
This revision now requires changes to proceed.


  Almost done!
  
  I just noticed some small issues with reading errno after calling `execWithElevatedPrivileges(...)` (I only left a single comment, the other places are basically identical)

INLINE COMMENTS

> file.cpp:239
>              if (!err.wasCanceled()) {
>                  switch (errno) {
>                  case EPERM:

`errno` might not be the expected value anymore.

> chinmoyr wrote in sharefd_p.h:66
> I think this is not needed. It's already there in FdReceiver.

Fair enough.

> chinmoyr wrote in sharefd_p.h:47
> @fvogt Is +1 for null byte required here?

Not on most platforms, but `man unix` says for portability:

  offsetof(struct sockaddr_un, sun_path)+strlen(addr.sun_path)+1```.

REPOSITORY
  R241 KIO

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

To: chinmoyr, #frameworks, thiago, fvogt
Cc: ngraham, fvogt, lbeltrame, dfaure, michaelh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180127/e796784e/attachment.html>


More information about the Kde-frameworks-devel mailing list