polkit-github-migration-bot / t4_polkit

Other
0 stars 0 forks source link

Documentation of org.freedesktop.PolicyKit1.Authority interface could provide more information #186

Open polkit-github-migration-bot opened 1 year ago

polkit-github-migration-bot commented 1 year ago

In gitlab.freedesktop.org by ivanhoe on Jan 5, 2023, 14:47

Link to the original issue: https://gitlab.freedesktop.org/polkit/polkit/-/issues/184 It would be nice if the documentation for the Subject structure could provide information about the start-time property for the unix-process subject kind. Does it expect a UNIX timestamp?

Additionally, it would be nice to know if there is a special value one could set for start-time in order to ignore the start time of the process. For example, when I tested the CheckAuthorization method, I used 0 as start-time which seemed to work fine. Is it intended to be used that way?

Edit 1: If I provide a timestamp for start-time it looks like the subject_details also require a uid property but this isn't even mentioned in the documentation I linked above. Is this maybe an outdated documentation I found there?

polkit-github-migration-bot commented 1 year ago

In gitlab.freedesktop.org by ivanhoe on Jan 5, 2023, 18:29

Does it expect a UNIX timestamp?

It looks like start-time is the time the process started after system boot in clock ticks. This can be found out by reading the stat file in /proc/PID/, see man page proc(5).