i ran it...
$ exec /usr/bin/pkexec --user ummelum /usr/bin/cu -l /dev/ttyS0 -s 115200
but alas...
according to /var/log/auth.log, the policy worked:
Dec 1 22:51:54 iugo polkitd(authority=local): Operator of unix-session:/org/freedesktop/ConsoleKit/Session1 successfully authenticated as unix-user:ummelum to gain ONE-SHOT authorization for action org.freedesktop.policykit.exec for unix-process:5798:3872562 [bash] (owned by unix-user:ummelum)
Dec 1 22:51:54 iugo pkexec: pam_unix(polkit-1:session): session opened for user root by ummelum(uid=1000)
Dec 1 22:51:54 iugo pkexec: pam_ck_connector(polkit-1:session): cannot determine display-device
Dec 1 22:51:54 iugo pkexec[6047]: ummelum: Executing command [USER=root] [TTY=/dev/pts/0] [CWD=/home/ummelum] [COMMAND=/usr/bin/cu -l /dev/ttyS0 -s 115200]
for what it's worth: to make sure this wasn't a polkit thing, i made an action definition for this, and dropped it in /etc/polkit- 1/actions:
<?xml version="1.0" encoding="UTF-8"?> //DTD PolicyKit Policy Configuration 1.0//EN""http:// www.freedesktop .org/standards/ PolicyKit/ 1.0/policyconfi g.dtd"> freedesktop. policykit. exec"> allow_active> yes</allow_ active> freedesktop. policykit. exec.path" >/usr/bin/ cu</annotate> freedesktop. policykit. exec.argv1" >-l /dev/ttyS0 -s 115200</annotate> freedesktop. policykit. imply >true</annotate> freedesktop. policykit. owner>unix- user:ummelum< /annotate>
<!DOCTYPE policyconfig PUBLIC "-//freedesktop
<policyconfig>
<action id="org.
<defaults>
<
</defaults>
<annotate key="org.
<annotate key="org.
<annotate key="org.
<annotate key="org.
</action>
</policyconfig>
i ran it...
$ exec /usr/bin/pkexec --user ummelum /usr/bin/cu -l /dev/ttyS0 -s 115200
but alas...
according to /var/log/auth.log, the policy worked: authority= local): Operator of unix-session: /org/freedeskto p/ConsoleKit/ Session1 successfully authenticated as unix-user:ummelum to gain ONE-SHOT authorization for action org.freedesktop .policykit. exec for unix-process: 5798:3872562 [bash] (owned by unix-user:ummelum) polkit- 1:session) : session opened for user root by ummelum(uid=1000) connector( polkit- 1:session) : cannot determine display-device /usr/bin/ cu -l /dev/ttyS0 -s 115200]
Dec 1 22:51:54 iugo polkitd(
Dec 1 22:51:54 iugo pkexec: pam_unix(
Dec 1 22:51:54 iugo pkexec: pam_ck_
Dec 1 22:51:54 iugo pkexec[6047]: ummelum: Executing command [USER=root] [TTY=/dev/pts/0] [CWD=/home/ummelum] [COMMAND=
so this isn't a polkit thing.