Skip to content

Commit

Permalink
Make sure the user is active, local and actually owner of the
Browse files Browse the repository at this point in the history
mount point.
  • Loading branch information
ajacoutot committed Jan 23, 2019
1 parent 846fb82 commit 77cb7de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion toad.pl
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ sub create_pkrule {
print PKRULE " if (action.id == \"org.freedesktop.policykit.exec\" &&\n";
print PKRULE " action.lookup(\"program\") == \"/sbin/umount\" &&\n";
print PKRULE " action.lookup(\"command_line\") == \"/sbin/umount $mountbase/$login/$devtype$devnum\") {\n";
print PKRULE " return polkit.Result.YES;\n";
print PKRULE " if (subject.local && subject.active && subject.user == \"$login\") {\n";
print PKRULE " return polkit.Result.YES;\n";
print PKRULE " }\n";
print PKRULE " }\n";
print PKRULE "});\n";

Expand Down

0 comments on commit 77cb7de

Please sign in to comment.