chilcote / outset

Automatically process packages, profiles, and scripts during boot, login, or on demand.
572 stars 58 forks source link

Use os.stat to get the current console user's uid #72

Closed lpglycerine closed 4 years ago

lpglycerine commented 4 years ago

console_uid was being set to 0 for all users, whereas in outset 2.0.6 this value was defined differently and was the unique UID for the current console user.

So I changed console_uid to be defined via a different method; os.stat('/dev/console').st_uid Tested compatibility on 10.8.5, 10.10.5, 10.11.6, 10.13.6, 10.14.5 and 10.15.2

This fixes issue71 in relation to login-privileged-once not working. Each user now gets a unique plist which determines if the once scripts have ran for that user or not.

chilcote commented 4 years ago

Thanks!