Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usermode with PAM #1

Open
rapgro opened this issue Feb 4, 2015 · 4 comments
Open

usermode with PAM #1

rapgro opened this issue Feb 4, 2015 · 4 comments

Comments

@rapgro
Copy link

rapgro commented Feb 4, 2015

Please provide support for usermode and PAM, like QtParted did originally.

Explanation:
$ man consolehelper

@snshn
Copy link
Member

snshn commented Feb 14, 2015

Copied from a qtparted rpm.
Please let me know if it's enough.
Thanks.

snshn pushed a commit that referenced this issue Feb 14, 2015
@rapgro
Copy link
Author

rapgro commented Feb 22, 2015

There's the PAM file only. Please provide also consolehelper and policy. All three files should get installed to the right places:

mkdir -p %{buildroot}%{_sysconfdir}/pam.d %{buildroot}%{_sysconfdir}/security/console.apps
cp -p %{name}.pam %{buildroot}%{_sysconfdir}/pam.d/%{name}
cp -p %{name}.consoleapp %{buildroot}%{_sysconfdir}/security/console.apps/%{name}
mkdir -p %{buildroot}%{_datadir}/polkit-1/actions
cp -p %{name}.policy %{buildroot}%{_datadir}/polkit-1/actions

@rapgro
Copy link
Author

rapgro commented Feb 23, 2015

consoleapp:

USER=root
PROGRAM=/usr/sbin/qtparted
SESSION=yes

policy:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>

 <vendor>QParted</vendor>
 <vendor_url>https://github.com/ZZYZX/qparted</vendor_url>

 <action id="qparted.pkexec.run">
    <_description>Visual partition editor based on Qt framework</_description>
    <_message>Authentication is required to run QParted</_message>
    <icon_name>qparted</icon_name>
    <defaults>
     <allow_any>no</allow_any>
     <allow_inactive>no</allow_inactive>
     <allow_active>auth_admin_keep</allow_active>
    </defaults>
    <annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/qparted</annotate>
    <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
 </action>
</policyconfig>

@rapgro
Copy link
Author

rapgro commented Feb 23, 2015

Please note that qparted binary should go to /usr/sbin and not /usr/bin to enforce root access.

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

No branches or pull requests

2 participants