News for hackers. Stuff that matters.
Re:PolicyKit: Users with UID greater than INT_MAX can execut... by kijin on Wednesday December 05, 2018 @05:33AM (#18607098)
Was the special treatment of -1 intended by the developers, or did somebody mix up signed -1 with unsigned 65535?
Re:PolicyKit: Users with UID greater than INT_MAX can execut... by jabl on Wednesday December 05, 2018 @09:17AM (#18608329)
In POSIX, many functions return -1 to indicate errors. So I guess the value (uid_t) -1 was reserved to avoid confusion. Also some functions (chown()) allow specifying (uid_t) -1 or (gid_) -1 to mark an omitted argument.

See https://en.wikipedia.org/wiki/User_identifier#Special_values

Re:PolicyKit: Users with UID greater than INT_MAX can execut... by emmelaich on Wednesday December 05, 2018 @06:03AM (#18607247)
See above - it was -2 or 65534.

I think -2 is just easier to type and stands out more.

Re:PolicyKit: Users with UID greater than INT_MAX can execut... by JdeBP on Wednesday December 05, 2018 @09:57AM (#18608699)