- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
EXAMPLE
To specify what kind of authorization is needed to execute the program /usr/bin/pk-example-frobnicate as another user, simply write an action definition file like this
<?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>Examples for the PolicyKit Project</vendor>
<vendor_url>http://hal.freedesktop.org/docs/PolicyKit/</vendor_url>
<action id="org.freedesktop.policykit.example.pkexec.run-frobnicate">
<description>Run the PolicyKit example program Frobnicate</description>
<description xml:lang="da">Kør PolicyKit eksemplet Frobnicate</description>
<message>Authentication is required to run the PolicyKit example program Frobnicate (user=$(user), program=$(program), command_line=$(command_line))</message>
<message xml:lang="da">Autorisering er påkrævet for at afvikle PolicyKit eksemplet Frobnicate (user=$(user), program=$(program), command_line=$(command_line))</message>
<icon_name>audio-x-generic</icon_name>
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
<allow_active>auth_self_keep</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/pk-example-frobnicate</annotate>
</action>
</policyconfig>
Simply write an action definition file like this, they said...
bormand 17.12.2021 01:08 # 0
JloJle4Ka 17.12.2021 05:49 # +1
Ну видно же, что не сам делал. Пока ставлю за эту лабу 0 баллов, потом принесёте, покажете.
gEKA6PbCKuu_nemyx 17.12.2021 05:54 # +1
guest6 17.12.2021 10:25 # +3
bormand 17.12.2021 10:35 # +2
Rooster 17.12.2021 11:33 # +3
guest6 17.12.2021 11:37 # +2
Rooster 17.12.2021 11:51 # +1
guest6 18.12.2021 11:15 # +2
Броманд, давай в опенок?
Там нет ни судо, ни полкита
bormand 18.12.2021 13:03 # 0
И su только для членов партии.
JloJle4Ka 18.12.2021 13:12 # 0
bormand 18.12.2021 13:52 # +1
guest6 18.12.2021 13:55 # +1
и doas вместо sudo