aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/id.c
AgeCommit message (Collapse)Author
2018-12-04Clean up some --help formatting.Elliott Hughes
Be consistent about upper versus lower case. (Upper seems to have the majority, so I went with that, though I'm happy to provide the opposite patch as long as we're consistent!) Be consistent about using \t. (Though saving a few bytes seems like it might be better done in the code that generates help.h rather than directly in the source, since tabs make careful ASCII art layout hard enough that we regularly have things misaligned.) Remove trailing periods (most of which seem to have been added by me). Always use the US "human readable" rather than my British "human-readable", and be more consistent about declaring whether we're showing multiples of 1000 or 1024. Just say "verbose" rather than adding a useless "mode" or "output".
2017-10-17Fix groups(1) and id -G.Elliott Hughes
Both should only output the groups.
2016-07-23Usischev Yury pointed out that id shouldn't use exit() directly.Rob Landley
2015-08-02Mark command-local functions static.Rob Landley
2015-05-18Switch id over to new infrastructure, switch id to use FORCE_FLAGS, andRob Landley
make lib/lsm.h auto-include from toys.h.
2015-04-04To ensure that toybox can be installed alongside busybox withoutPaul Barker
confusing update-alternatives, the paths of the links installed by toybox should match those installed by busybox. This is accomplished by changing the flags of a few tools within toybox.
2015-01-16id.c #ifdefectomy. (ifdefs belong in headers, not in C code.)Rob Landley
2015-01-16This patch adds a TOYBOX_SELINUX configuration option to control bothElliott Hughes
the SELinux commands (such as chcon) and the SELinux-specific options to regular commands (such as ls -Z). This lets us #include <selinux/selinux.h> in portability.h. I've also fixed chcon to insist on being given the a context argument. This patch also adds -Z to id and fixes id's regular output (-G should be separated by spaces, non-G output should be separated by commas, and you don't want a double comma where the egid is omitted from the list of groups).
2014-12-31Redo option parsing infrastructure so #define FORCE_FLAGS can unzero flag ↵Rob Landley
macros for a disabled command (needed when multiple commands share infrastructure with a common set of flags). This means the flag space is no longer packed, but leaves gaps where the zeroes go. (Actual flag bit positions are the same for all configs.) Since the option parsing needs to know where the holes are, the OPTSTR values are now generated as part of flags.h with ascii 1 values for the disabled values. (So generated/oldflags.h went away.) This also means that the option string argument for OLDTOY() went away, it now uses the same arguments as the NEWTOY() it references.
2014-10-09Various bugfixes (mostly resource leaks) from Ashwini Sharma's static ↵Rob Landley
analysis, plus occasional tweak by me while reviewing them.
2014-09-27Untangle id/groups/logname so single.sh can build each one standalone.Rob Landley
2014-08-02Cosmetic tweak, slightly more conventional for loop.Rob Landley
2014-05-25logname and whoami are the same as id -un, so merge them.Isaac Dunham
Since the starting letters are greater than those for 'id' or 'groups', we cn just check if the first letter is greater than 'i'.
2013-11-28Add xgetpwnam() to lib/xwrap.c.Rob Landley
2013-11-28Move xgetpwuid() and xgetgrgid() into xwrap.cRob Landley
2013-05-18Make groups handle multiple usernames on command line.Ivo van Poorten
2013-05-14add groups implementation to id.cIvo van poorten
2013-01-31id: make "id -Gn root" print root's groups instead of current user (and ↵Rob Landley
without leading space), enforce max 1 argument and at most one of Ggu.
2012-11-13Reindent to two spaces per level. Remove vi: directives that haven't worked ↵Rob Landley
right in years (ubuntu broke its' vim implementation). Remove trailing spaces. Add/remove blank lines. Re-wordwrap in places. Update documentation with new coding style. The actual code should be the same afterward, this is just cosmetic refactoring.
2012-10-08New build infrastructure to generate FLAG_ macros and TT alias, #define ↵Rob Landley
FOR_commandname before #including toys.h to trigger it. Rename DEFINE_GLOBALS() to just GLOBALS() (because I could never remember if it was DECLARE_GLOBALS). Convert existing commands to use new infrastructure, and replace optflag constants with FLAG_ macros where appropriate.
2012-08-25Regularize command headers, update links to standards documents.Rob Landley
2012-08-25Move commands into "posix", "lsb", and "other" menus/directories.Rob Landley