aboutsummaryrefslogtreecommitdiff
path: root/loginutils/passwd.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* passwd: do not complain about /etc/shadow needlesslyDenys Vlasenko2010-01-091-4/+12
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: use "can't" instead of "cannot"Denys Vlasenko2009-11-131-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* passwd: do not complain if /etc/shadow is missingDenys Vlasenko2009-11-021-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: unify concurrent-safe update of /etc/{passwd,group,[g]shadow}Denis Vlasenko2009-04-141-3/+2
| | | | | | | | | | | | | | | | | | | | | | | by Tito (farmatito AT tiscali.it) function old new delta update_passwd 743 1171 +428 bb_perror_nomsg - 9 +9 find_main 436 444 +8 passwd_main 1023 1027 +4 nameval 202 206 +4 chpasswd_main 315 319 +4 bb__parsespent 119 117 -2 adduser_main 654 650 -4 addgroup_main 345 341 -4 sv_main 1228 1222 -6 deluser_main 173 160 -13 bb_internal_putpwent 69 - -69 add_user_to_group 231 - -231 del_line_matching 460 31 -429 ------------------------------------------------------------------------------ (add/remove: 1/2 grow/shrink: 5/6 up/down: 457/-758) Total: -301 bytes
* *: remove LOG_NOWAITDenis Vlasenko2009-03-111-1/+1
|
* libbb: introduce and use xgetpwnam. ~ -150 bytes.Denis Vlasenko2008-12-031-3/+1
|
* - add new applet mkpasswd(1)Bernhard Reutner-Fischer2008-12-031-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta bb_ask - 355 +355 mkpasswd_main - 296 +296 .rodata 121746 121847 +101 packed_usage 24632 24689 +57 static.methods - 21 +21 gmatch 229 248 +19 bb_ask_stdin - 11 +11 applet_names 1949 1958 +9 applet_main 1172 1176 +4 sulogin_main 503 505 +2 applet_nameofs 586 588 +2 sha256_hash 329 327 -2 correct_password 208 206 -2 parse_command 1442 1439 -3 get_cred_or_die 145 141 -4 passwd_main 1054 1044 -10 bb_askpass 348 - -348 ------------------------------------------------------------------------------ (add/remove: 4/1 grow/shrink: 7/5 up/down: 877/-369) Total: 508 bytes
* libbb: password/group function helpers rewritten by Tito:Denis Vlasenko2008-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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
* - first pass to unify/cleanup uid handling (-236b)Bernhard Reutner-Fischer2008-07-211-2/+3
| | | | This needs further love, alot of love.. Tito?
* *: rename ATTRIBUTE_XXX to just XXX.Denis Vlasenko2008-07-051-1/+1
|
* make pw_encrypt() return malloc'ed string.Denis Vlasenko2008-06-121-6/+7
| | | | | | | text data bss dec hex filename 759802 604 6684 767090 bb472 busybox_old 759804 604 6676 767084 bb46c busybox_unstripped
* uclibc insists on having 70k static buffer for crypt.Denis Vlasenko2008-06-121-2/+2
| | | | | | | | | | | | For bbox it's not acceptable. Roll our own des and md5 crypt implementation. Against older uclibc: text data bss dec hex filename 759945 604 6684 767233 bb501 busybox_old 759766 604 6684 767054 bb44e busybox_unstripped so, we still save on code size.
* *: 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
* libbb: introduce bb_signals and bb_signals_recursive,Denis Vlasenko2008-02-161-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | which sets same handler for many signals. sig_catch is nuked (bb_signals_recursive is more descriptive name). *: use them as appropriate. function old new delta bb_signals_recursive - 95 +95 bb_signals - 52 +52 run_command 258 273 +15 svlogd_main 1368 1377 +9 runsv_main 1746 1752 +6 runsvdir_main 1643 1646 +3 UNSPEC_print 64 66 +2 time_main 1128 1127 -1 ... resize_main 246 210 -36 sig_catch 63 - -63 set_fatal_sighandler 85 14 -71 ------------------------------------------------------------------------------ (add/remove: 2/1 grow/shrink: 5/24 up/down: 182/-548) Total: -366 bytes
* - fix conflicting decls of syslog related facilitynames and prioritynames tablesBernhard Reutner-Fischer2008-01-271-1/+0
|
* appletlib.c: make it actally follow _BB_SUID_ALWAYS rulesDenis Vlasenko2007-10-291-13/+14
| | | | | | | | | | adduser: implement -S and code shrink / fix uid selection *: sanitize getspnam_r use text data bss dec hex filename 777042 974 9676 787692 c04ec busybox_old 776883 974 9676 787533 c044d 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
* 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
* passwd: fix bug: we are trying to update shadow even if user's record is in ↵Denis Vlasenko2007-07-271-5/+15
| | | | | | | passwd! getspnam is guilty, it lies that user record exists in shadow.
* bb_getpwuid, bb_getgrgid: change order of arguments to more intuitive one;Denis Vlasenko2007-07-271-10/+15
| | | | | comment thoroughly when they die and when they dont.
* chpasswd: new applet by Alexander Shishkin <virtuoso@slind.org>Denis Vlasenko2007-07-201-115/+6
|
* usage.c: remove reference to busybox.hDenis Vlasenko2007-05-261-1/+1
| | | | | *: s/include "busybox.h"/include "libbb.h"
* cryptpw: new applet (a bit less than 3k added)Denis Vlasenko2007-05-081-50/+0
| | | | | (by Thomas Lundquist <lists@zelow.no>)
* Do not fail password check if shadow password does not exist -Denis Vlasenko2007-03-131-11/+15
| | | | | | | | | | | | | | | | | | | | | | fall back to ordinary one Reduced usage of functions returning datain static buffers. (mostly passwd/group/shadow related): function old new delta correct_password 143 193 +50 sulogin_main 490 533 +43 adduser_main 732 774 +42 passwd_main 1875 1915 +40 addgroup_main 330 365 +35 bb_internal_getspnam 38 - -38 bb_internal_fgetpwent 38 - -38 bb_internal_fgetgrent 38 - -38 static.resultbuf 168 88 -80 static.buffer 1872 1104 -768 ------------------------------------------------------------------------------ (add/remove: 0/3 grow/shrink: 5/2 up/down: 210/-962) Total: -752 bytes
* suppress warnings about easch <applet>_main() havingDenis Vlasenko2007-02-031-0/+1
| | | | no preceding prototype
* preparatory patch for -Wwrite-strings #3Denis Vlasenko2007-01-291-2/+2
|
* fix for uclibc-without-shadow.h compilationDenis Vlasenko2006-12-301-1/+3
|
* passwd: add option to check passwords for weaknessDenis Vlasenko2006-12-191-1/+2
|
* passwd: fix indentationDenis Vlasenko2006-12-121-3/+2
|
* passwd: added commentDenis Vlasenko2006-12-121-1/+6
|
* passwd: shrink by ~10 bytes, use PRNG instead of usleep.Denis Vlasenko2006-12-121-17/+10
|
* passwd: made smaller by ~130 bytes. size can go negativeDenis Vlasenko2006-12-011-56/+50
| | | | if current trend will continue ;)
* passwd: micro-optimizationDenis Vlasenko2006-11-301-4/+4
|
* passwd: small size optimization. salt generation improvedDenis Vlasenko2006-11-301-22/+28
| | | | (really generated different salts even if called back-to-back).
* passwd: rework:Denis Vlasenko2006-11-301-283/+249
| | | | | | | | | * do not make backup copy by copying (just retain old file) * correctly fall back to /etc/passwd if user is not in shadow * fix bug with overlong passwd entries * be permissive on some kinds of failures * reduce stack usage * code size: -500 bytes
* style cleanup: return(a) -> return a, part 2Denis Vlasenko2006-11-271-3/+3
|
* 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.
* several fixes from openWRT projectDenis Vlasenko2006-09-261-1/+1
|
* passwd: getopt_ulflags'isationDenis Vlasenko2006-09-231-61/+52
|
* removed a lot of trailing \n in bb_msg() calls. It is addedDenis Vlasenko2006-09-061-5/+5
| | | | | automatically by function itself.
* Remove bb_ prefixes from xfuncs.c (and a few other places), consolidateRob Landley2006-08-031-14/+2
| | | | | | | | | | things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only had one user), clean up lots of #includes... General cleanup pass. What I've been doing for the last couple days. And it conflicts! I've removed httpd.c from this checkin due to somebody else touching that file. It builds for me. I have to catch a bus. (Now you know why I'm looking forward to Mercurial.)
* Convert setuid/setgid users to xsetuid/xsetgid.Rob Landley2006-07-161-4/+1
|
* Add one-line GPL boilerplate to numerous (but not all yet) source files."Robert P. J. Day"2006-07-121-0/+4
|
* Patch from Tito to remove pwd_to_spwd (which we don't actually need), withRob Landley2006-07-111-14/+7
| | | | some #ifdef removal from me.
* - passwd doesnt use salt with md5 passwords; bug #604 thanks tavisoNed Ludd2006-04-211-3/+11
|
* Robert P. Day removed 8 gazillion occurrences of "extern" on functionRob Landley2006-03-061-1/+1
| | | | definitions. (That should only be on prototypes.)
* - bzero -> memsetBernhard Reutner-Fischer2006-01-311-16/+17
| | | | | | | | | | | | | | | text data bss dec hex filename 1652855 14444 1215616 2882915 2bfd63 busybox.oorig.gcc-3.3 1652823 14444 1215616 2882883 2bfd43 busybox.gcc-3.3 1603655 14412 1215552 2833619 2b3cd3 busybox.oorig.gcc-3.4 1603655 14412 1215552 2833619 2b3cd3 busybox.gcc-3.4 1609755 14508 1215744 2840007 2b55c7 busybox.oorig.gcc-4.0 1609755 14508 1215744 2840007 2b55c7 busybox.gcc-4.0 1590495 13516 1215392 2819403 2b054b busybox.oorig.gcc-4.1-HEAD 1590495 13516 1215392 2819403 2b054b busybox.gcc-4.1-HEAD 1589079 13036 1213248 2815363 2af583 busybox.oorig.gcc-4.2-HEAD 1589079 13036 1213248 2815363 2af583 busybox.gcc-4.2-HEAD
* declare const for funMike Frysinger2006-01-081-1/+1
|
* patch from tito: consolidate delay functions as bb_do_delay()Rob Landley2006-01-061-7/+1
|
* - rename libbb's password helpers as suggested in libbb.hBernhard Reutner-Fischer2005-09-201-1/+1
| | | | | | | | 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