Skip to content

feat: make makemysqluser use polkit - #214

Open
Quasar0147 wants to merge 4 commits into
ocf:masterfrom
Quasar0147:feature/pk-makemysqluser
Open

Quasar0147 wants to merge 4 commits into
ocf:masterfrom
Quasar0147:feature/pk-makemysqluser

Conversation

@Quasar0147

Copy link
Copy Markdown

update the script to use the polkit env var, swap the shell wrapper

Violet Bloom added 2 commits November 2, 2026 23:56
global quiet
try:
username = os.environ.get('SUDO_USER')
username = pwd.getpwuid(int(os.environ["PKEXEC_UID"])).pw_name

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want users be able to set this manually if /etc/sudoers still has the old content.
Can we abort if run with sudo, e.g. by checking if $SUDO_USER is set?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants