KIO will get polkit support this summer

Hello world! For those who don’t know me, I am Chinmoy, a first year undergraduate student studying computer science at Dr. Ambedkar Institute of Technology, Bangalore, India. I am one of the 1,318 students selected for this years Google Summer of Code. I will be working with and Elvis Angelaccio (my mentors) on the KDE project “Polkit Support in KIO”.

So what’s this all about? Once in their life linux users find themselves in a situation where they need to do some sort of system level file tweaking to make their life easier. Now for the advanced user this might be matter of a simple command executed with sudo but for the average user this is a nightmare. Our friend Joe is that average-linux-user. Like any other linux user he also felt the need to make system level changes. Being a rookie in linux he dreads the terminal so he eventually googles how to make life easier without using terminal. And google directs him to start the whole the application, file manager in his case, as root. Since the solution is very straightforward our guy Joe gives it a go and suddenly he finds himself doing all sorts of godly linux hacks without having to use much of the terminal. Everything was going well but on one fine day he was on /etc trying to do the impossible. He creates a file, modifies two but accidentally deletes something. Ignorant of the facts he reboots his PC and BAM! he gets a black screen. His shiny customised GUI is gone. So our bewildered Joe boots up his dad’s windows laptop and then again there is a series of how to make life less sucking without using terminal searches. But sadly this time even our friend google could not provide any help. So our frustrated Joe bids adieu to his linux box and this is how linux lost one of its users.

So here we see that if anyone wants to do any sort of file management in a root owned location they will have two options first is the sudo command and second is starting the entire file manager as a privileged user. The former option is safe provided you know what you are doing however most linux user choose the latter one. Although if precautions are exercised nothing will go wrong but since it is in human nature to make mistakes, any kind of accidental alteration or deletion of files can render the whole system unusable.

Unfortunately file management in KDE technologies suffer from this problem as well. File management functions in KDE frameworks are provided through the KIO library. And KIO doesn’t have any notion of privileged file management. If the user tries to fiddle with any root owned file or location it will simply throw an error. This is where Polkit comes into picture. It provides an organised way for non-privileged processes to communicate with privileged ones. If used in KIO it will enable the user to perform privileged file management operations without having to start the whole application as root. And this is precisely the goal of my GSOC project, that is to integrate Polkit in KIO. In my proposal I have explained how I will carry out this task. I have prepared a small patch which demonstrates my approach. If anyone is interested please try out the patch and possibly give some feedback.

For those who are still reading, thank you very much for reading this far. I will (try) to blog about my progress every other week. Till then GOOD BYE!

comments powered by Disqus
<< Older