Skip to content

Add listing joined group for current user

Latest
Compare
Choose a tag to compare
@rk0cc rk0cc released this 29 Jul 05:13
· 27 commits to main since this release
d60825a
  • Add user's joined group in local machine scope.
  • isSuperuser can returns true without superuser permission activated.
    • Windows: Uses NetUserGetLocalGroups to find current user is a member of Administrators.
    • UNIX: Determine user joined default sudo command enabled groups (admin in macOS, sudo in Linux).
  • Expand UNIX's error code to unsigned 32-bits length with two 16-bits segmentes:
    • Lower 16-bits reuses origin error numbers from libraries.
    • Upper 16-bits denotes error categories that causing error thrown.