As mentioned in my previous blog post, the new user interface was functional on Windows. However, the application had to be run using root on Linux to be able to write an ISO image to a USB flash drive.
KAuth
The original user interface used KAuth to write the ISO image without having to run the entire application with root privileges. KAuth is a framework that allows to perform privilege elevation on restricted portions of code. In order to run an action with administrator privileges without having to run the entire application as an administrator, an additional binary (KAuth helper) which is included alongside the main application binary will perform the actions that require elevated privileges. This approach allows privileges escalation for specific portions of code without granting elevated privileges for code that does not need them. After integrating the existing KAuth helper into the new user interface, it was able to write ISO images by asking for authorisation when required.
Finalising The User Interface
In addition to implementing the KAuth back-end, I polished the user interface and I implemented additional features such as drag and drop support which allows the user to select an ISO image by simply dropping a file on the application window.
