<table><tr><td style="">chinmoyr created this revision.<br />Restricted Application added a project: Frameworks.
</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/D6709" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Some methods in file ioslave, <tt style="background: #ebebeb; font-size: 13px;">FileProtocol::copy</tt> and FileProtocol::put to be precise, use file descriptor of source and destination files. So performing any these operations as root user using kauth's helper requires the source or destination file to be opened inside the helper and sending the file descriptor back to ioslave using a suitable IPC mechanism.</p>

<p>My patch does the task using unix local domain socket. In principal dbus can also be used. The sequence would be, registering  service in ioslave, setting <tt style="background: #ebebeb; font-size: 13px;">euid</tt> of the helper process and sending the file descriptor over user's session bus. I tried it but the code turned out messy. In the end it was somewhat a personal preference.</p>

<p>There are certain things I would like to know regarding this patch,<br />
In this patch I used the abstract namespace. It will work with linux but I don't know about mac os or bsd. So what to use for them?<br />
In place of unix sockets, dbus can also be used. So shall i use it ? I am aware there are security issues with both the approaches but using which one of them is less riskier?</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R241 KIO</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D6709" rel="noreferrer">https://phabricator.kde.org/D6709</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/ioslaves/file/CMakeLists.txt<br />
src/ioslaves/file/sharefd.cpp<br />
src/ioslaves/file/sharefd.h</div></div></div><br /><div><strong>To: </strong>chinmoyr, thiago, Frameworks<br /><strong>Cc: </strong>elvisangelaccio, shortstheory<br /></div>