aboutsummaryrefslogtreecommitdiff
path: root/coreutils/id.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* *: use "can't" instead of "cannot"Denys Vlasenko2009-11-131-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: mass renaming of USE_XXXX to IF_XXXXDenis Vlasenko2009-04-211-2/+2
| | | | | | and SKIP_XXXX to IF_NOT_XXXX - the second one was especially badly named. It was not skipping anything!
* libbb: introduce and use xgetpwnam. ~ -150 bytes.Denis Vlasenko2008-12-031-3/+1
|
* libbb: password/group function helpers rewritten by Tito:Denis Vlasenko2008-12-021-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta xgetpwuid - 27 +27 uid2uname_utoa - 22 +22 gid2group_utoa - 22 +22 uid2uname - 18 +18 gid2group - 18 +18 buffer_fill_and_print 179 196 +17 print_user 12 24 +12 print_group 12 24 +12 get_cached 89 99 +10 ... print_common 134 120 -14 vlock_main 415 396 -19 logger_main 410 387 -23 crontab_main 642 609 -33 bb_getpwuid 42 - -42 bb_getgrgid 42 - -42 bb_getug 80 - -80 ------------------------------------------------------------------------------ (add/remove: 6/3 grow/shrink: 9/11 up/down: 187/-296) Total: -109 bytes
* id: do not abort build if we use internal password/group functions.Denis Vlasenko2008-11-171-0/+2
|
* id: abort the build of uclibc is less than 0.9.30Denis Vlasenko2008-11-161-0/+6
|
* - commentary typo fix (tito)Bernhard Reutner-Fischer2008-11-051-1/+1
|
* - fix typo in print_user() (tito)Bernhard Reutner-Fischer2008-11-051-1/+1
|
* id: better wording in comments, no code changesDenis Vlasenko2008-10-291-6/+6
|
* id: coreutils compat by Tito + test scriptDenis Vlasenko2008-10-291-128/+162
|
* id: fix "id <user>" case. Requires getgrouplist().Denis Vlasenko2008-09-181-10/+40
| | | | | | | | | | | | function old new delta getgrouplist_internal - 200 +200 id_main 462 539 +77 bb_internal_getgrouplist - 67 +67 bb__parsespent 119 117 -2 bb_internal_initgroups 213 58 -155 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 1/2 up/down: 344/-157) Total: 187 bytes
* id: unsigned long is excessive for option bitmaskDenis Vlasenko2008-09-141-14/+8
|
* id: code shrinkDenis Vlasenko2008-09-131-18/+19
| | | | | | function old new delta id_main 494 462 -32
* - implement id -G (Tito Ragusa)Bernhard Reutner-Fischer2008-09-121-10/+37
|
* *: rename ATTRIBUTE_XXX to just XXX.Denis Vlasenko2008-07-051-1/+1
|
* *: add -Wunused-parameter; fix resulting breakageDenis Vlasenko2008-03-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta procps_scan 1265 1298 +33 aliascmd 278 283 +5 parse_file_cmd 116 120 +4 dname_enc 373 377 +4 setcmd 90 93 +3 execcmd 57 60 +3 count_lines 72 74 +2 process_command_subs 340 339 -1 test_main 409 407 -2 mknod_main 179 177 -2 handle_incoming_and_exit 2653 2651 -2 argstr 1312 1310 -2 shiftcmd 131 128 -3 exitcmd 46 43 -3 dotcmd 297 294 -3 breakcmd 86 83 -3 evalpipe 353 349 -4 evalcommand 1180 1176 -4 evalcmd 109 105 -4 send_tree 374 369 -5 mkfifo_main 82 77 -5 evalsubshell 152 147 -5 typecmd 75 69 -6 letcmd 61 55 -6 add_cmd 1190 1183 -7 main 891 883 -8 ash_main 1415 1407 -8 parse_stream 1377 1367 -10 alloc_procps_scan 55 - -55 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 7/21 up/down: 54/-148) Total: -94 bytes text data bss dec hex filename 797195 658 7428 805281 c49a1 busybox_old 797101 658 7428 805187 c4943 busybox_unstripped
* add -fvisibility=hidden to CC flags, mark XXX_main functionsDenis Vlasenko2007-10-111-1/+1
| | | | | EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
* printf("%s\n") -> puts()Denis Vlasenko2007-10-011-1/+1
|
* introduce bb_putchar(). saves ~1800 on uclibc (less on glibc).Denis Vlasenko2007-09-271-2/+2
|
* don't pass argc in getopt32, it's superfluousDenis Vlasenko2007-08-181-1/+1
| | | | | | | | (add/remove: 0/0 grow/shrink: 12/131 up/down: 91/-727) Total: -636 bytes text data bss dec hex filename 773469 1058 11092 785619 bfcd3 busybox_old 772644 1058 11092 784794 bf99a busybox_unstripped
* bb_getpwuid, bb_getgrgid: change order of arguments to more intuitive one;Denis Vlasenko2007-07-271-9/+8
| | | | | comment thoroughly when they die and when they dont.
* libbb: nuke BB_GETOPT_ERROR, always die if there are mutually exclusive optionsDenis Vlasenko2007-07-211-1/+1
| | | | | | | | | | | | | | | | | | | | find_pair 164 180 +16 passwd_main 1222 1230 +8 display_speed 91 96 +5 msh_main 1335 1339 +4 qrealloc 38 36 -2 refresh 1190 1182 -8 cut_main 543 532 -11 sendCgi 1807 1794 -13 getopt32 1063 1045 -18 arith 2077 2030 -47 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/6 up/down: 33/-99) Total: -66 bytes text data bss dec hex filename 781548 1168 11900 794616 c1ff8 busybox_old 781452 1168 11900 794520 c1f98 busybox_unstripped
* delete tons of extra #includesDenis Vlasenko2007-05-311-3/+0
|
* usage.c: remove reference to busybox.hDenis Vlasenko2007-05-261-1/+1
| | | | | *: s/include "busybox.h"/include "libbb.h"
* fix accumulated whitespace and indentation damageDenis Vlasenko2007-03-201-19/+19
|
* next portion of selinux updates: chcon, runcon. FromDenis Vlasenko2007-03-111-1/+1
| | | | | Yuichi Nakamura <himainu-ynakam@miomio.jp> KaiGai Kohei <busybox@kaigai.gr.jp>
* selinux support by Yuichi Nakamura <ynakam@hitachisoft.jp> (HitachiSoft)Denis Vlasenko2007-03-101-11/+32
|
* suppress warnings about easch <applet>_main() havingDenis Vlasenko2007-02-031-0/+1
| | | | no preceding prototype
* fix build without shadow supportDenis Vlasenko2006-12-281-12/+9
|
* bb_xget[pw/gr]nam were horribly misnamed - fixed.Denis Vlasenko2006-12-281-2/+2
| | | | | | | uidgid_get -> get_uidgid, add additional param (numeric_ok). Make chown use it. chown: fix "chown user: ...." install: fix incorrect use of bb_xget[pw/gr]nam
* remove bb_printf and the likeDenis Vlasenko2006-10-261-9/+9
|
* httpd: add -u user[:grp] supportDenis Vlasenko2006-10-051-13/+13
|
* build system overhaulDenis Vlasenko2006-10-051-1/+0
|
* getopt_ulflags -> getopt32.Denis Vlasenko2006-10-031-2/+2
| | | | | | | | It is impossible to formulate sane ABI based on size of ulong because it can be 32-bit or 64-bit. Basically it means that you cannot portably use more that 32 option chars in one call anyway... Make it explicit.
* - remove emacs layout block as suggested by Robert P.J. DayBernhard Reutner-Fischer2006-05-191-24/+1
| | | | - use shorter boilerplate while at it
* Robert P. Day removed 8 gazillion occurrences of "extern" on functionRob Landley2006-03-061-1/+1
| | | | definitions. (That should only be on prototypes.)
* - new bb_opt_complementally syntax, use [-:?] only - 'free' chars"Vladimir N. Oleynik"2005-10-141-5/+2
| | | | | - new bb_getopt_ulflags features: check max and min args, convert first argv to options special for ar and tar applets - use bb_default_error_retval for env applet
* - use complementally '!' to '?' - 'ask' is best 'free' char for this."Vladimir N. Oleynik"2005-10-111-11/+10
| | | | | - more long opt compatibility, can set flag for long opt struct now - more logic: check opt-depend requires and global requires, special for 'id' and 'start-stop-daemon' applets.
* - rename libbb's password helpers as suggested in libbb.hBernhard Reutner-Fischer2005-09-201-8/+8
| | | | | | | | my_getpwnam -> bb_xgetpwnam /* dies on error */ my_getgrnam -> bb_xgetgrnam /* dies on error */ my_getgrgid -> bb_getgrgid my_getpwuid -> bb_getpwuid my_getug -> bb_getug
* 1) bb_opt_complementaly -> bb_opt_complementally"Vladimir N. Oleynik"2005-09-051-3/+2
| | | | | 2) better support long options 3) new flag '!' for bb_opt_complementally: produce bb_show_usage() if BB_GETOPT_ERROR internally
* change the hardcoded error constant (0x80000000UL) to a nice flexible define ↵Mike Frysinger2005-05-111-1/+1
| | | | (BB_GETOPT_ERROR)
* A patch from Takeharu KATO to update/fix SE-Linux support.Rob Landley2005-05-031-12/+17
|
* Tito writes,Glenn L McGrath2004-09-151-41/+35
| | | | | "This patch fixes all the bugs in id previously spotted by vodz and me. The binary size increased a bit, but now it should work as expected."
* Tito writes:Eric Andersen2004-09-021-56/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hi Erik, Hi to all, This is part five of the my_get*id story. I've tweaked a bit this two functions to make them more flexible, but this changes will not affect existing code. Now they work so: 1) my_getpwuid( char *user, uid_t uid, int bufsize) if bufsize is > 0 char *user cannot be set to NULL on success username is written on static allocated buffer on failure uid as string is written to buffer and NULL is returned if bufsize is = 0 char *user can be set to NULL on success username is returned on failure NULL is returned if bufsize is < 0 char *user can be set to NULL on success username is returned on failure an error message is printed and the program exits 2) 1) my_getgrgid( char *group, uid_t uid, int bufsize) if bufsize is > 0 char *group cannot be set to NULL on success groupname is written on static allocated buffer on failure gid as string is written to buffer and NULL is returned if bufsize is = 0 char *group can be set to NULL on success groupname is returned on failure NULL is returned if bufsize is < 0 char *group can be set to nULL on success groupname is returned on failure an error message is printed and the program exits This changes were needed mainly for my new id applet. It is somewhat bigger then the previous but matches the behaviour of GNU id and is capable to handle usernames of whatever length. BTW: at a first look it seems to me that it will integrate well (with just a few changes) with the pending patch in patches/id_groups_alias.patch. The increase in size is balanced by the removal of my_getpwnamegid.c from libbb as this was used only in previous id applet and by size optimizations made possible in whoami.c and in passwd.c. I know that we are in feature freeze but I think that i've tested it enough (at least I hope so.......).
* Tito writes:Eric Andersen2004-08-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hi, I've spent the half night staring at the devilish my_getpwuid and my_getgrgid functions trying to find out a way to avoid actual and future potential buffer overflow problems without breaking existing code. Finally I've found a not intrusive way to do this that surely doesn't break existing code and fixes a couple of problems too. The attached patch: 1) changes the behaviour of my_getpwuid and my_getgrgid to avoid potetntial buffer overflows 2) fixes all occurences of this function calls in tar.c , id.c , ls.c, whoami.c, logger.c, libbb.h. 3) The behaviour of tar, ls and logger is unchanged. 4) The behavior of ps with somewhat longer usernames messing up output is fixed. 5) The only bigger change was the increasing of size of the buffers in id.c to avoid false negatives (unknown user: xxxxxx) with usernames longer than 8 chars. The value i used ( 32 chars ) was taken from the tar header ( see gname and uname). Maybe this buffers can be reduced a bit ( to 16 or whatever ), this is up to you. 6) The increase of size of the binary is not so dramatic: size busybox text data bss dec hex filename 239568 2300 36816 278684 4409c busybox size busybox_fixed text data bss dec hex filename 239616 2300 36816 278732 440cc busybox 7) The behaviour of whoami changed: actually it prints out an username cut down to the size of the buffer. This could be fixed by increasing the size of the buffer as in id.c or avoid the use of my_getpwuid and use getpwuid directly instead. Maybe this colud be also remain unchanged...... Please apply if you think it is ok to do so. The diff applies on today's cvs tarball (2004-08-25). Thanks in advance, Ciao, Tito
* Remove trailing whitespace. Update copyright to include 2004.Eric Andersen2004-03-151-1/+1
|
* Patch from Russell Coker:Eric Andersen2003-07-031-5/+29
| | | | | I've attached my latest SE Linux patch for busybox against the latest CVS version of busybox.
* Major coreutils update.Manuel Novoa III2003-03-191-43/+33
|
* Vodz' last_patch57:Eric Andersen2002-09-301-4/+3
| | | | | | | | | | | | | | | Hi, Erik. my_getpw(uid/gid) and applets used it have problem: if username for uid not found, applets can`t detect it (but code pessent). Also "%8ld " format is bad: spaces not required (applets have self format or spec format (tar applet) and overflow for "id" applet...) This problem also pressent in stable version. Patch for unstable in attach. --w vodz
* Change 'printf("%s\n", ...)' into 'puts(...)'. Noted and patched in hostname.cMatt Kraai2001-05-161-2/+2
| | | | by Larry Doolittle.