LeagueToolkit / cslol-manager

GNU General Public License v3.0
429 stars 91 forks source link

fix: implement workaround for root privilege issues on macOS #73

Closed kernel-dev closed 1 year ago

kernel-dev commented 1 year ago

Before, users were expected to manually launch the binary contained inside of the app bundle with sudo.

This PR proposes an implementation, written in C, which explicitly asks for the user to input their password in order for the application to restart itself with root privileges. It manually overloads the CFBundleExecutable and CFBundleName identifiers inside of the bundle manifest to point to the compiled binary of this elevation fix.

Special thanks to @dhinakg for helping me debug a syntactical issue for osascript -e.