remove misguided action parameters
authorDavid Zeuthen <davidz@redhat.com>
Sun, 15 Apr 2007 23:41:00 +0000 (19:41 -0400)
committerDavid Zeuthen <davidz@redhat.com>
Sun, 15 Apr 2007 23:41:00 +0000 (19:41 -0400)
commit81401e166e69287f33f568ca06a959662b01d068
tree93a502583abbcfd7e70e371bc09ce9c57c148f3d
parent845b572bf8e4c6391256cc643446e4eeb24ad5b0
remove misguided action parameters

This feature was introduced with

 commit 02a4c5101ca4751963f76a0e016d3308389dc2a5
 http://gitweb.freedesktop.org/?p=PolicyKit.git;a=commit;h=02a4c5101ca4751963f76a0e016d3308389dc2a5

It makes things a lot harder for privilege granting if a feature like
action parameters are present. Thinking about it, they're not really
necessary; the parameters should just be encoded in the resource name;
e.g. with the example given in the commit

> This is useful for letting mechanisms convey information which may be
> useful in making a decision whether an action is OK. For example,
> NetworkManager could use this to provide the phone-number parameter
> with a hypothetical "nm-dialup" action. Then a site or vendor can
> provide insert
>
>  mandatory polkit-run-program.so \
>     program="/usr/lib/check-dialup-number.sh" privilege="nm-dialup"
>
> into /etc/PolicyKit/PolicyKit.conf and have said program check
>
>  $POLKIT_ACTION_PARAM_PHONE_NUMBER
>
> in that program.

is broken; the right thing here is for a hypothetical NetworkManager
to pass the dial up connection details as the resource

 resource.type = "NetworkManager"
 resource.id = "/org/freedesktop/NM/DialUpConnection/number=555-HOT-CHICKS"

in a well-defined format etc. etc.
doc/man/polkit-check-caller.1.in
doc/man/polkit-check-session.1.in
doc/man/polkit-module-run-program.8.in
libpolkit/libpolkit-action.c
libpolkit/libpolkit-action.h
modules/run-program/polkit-module-run-program.c
tools/polkit-check-caller.c
tools/polkit-check-session.c