Denis Vlasenko
fad2b86c9e
use "glibc errno" trick not only for ash, but for entire busybox
...
(add/remove: 1/1 grow/shrink: 37/37 up/down: 139/-228) Total: -89 bytes
2007-05-31 22:16:38 +00:00
Denis Vlasenko
4b924f3a5c
whitespace fixes
2007-05-30 00:29:55 +00:00
Denis Vlasenko
b6adbf1be2
usage.c: remove reference to busybox.h
...
*: s/include "busybox.h"/include "libbb.h"
2007-05-26 19:00:18 +00:00
Denis Vlasenko
57bf668d11
cryptpw: size reduction
...
function old new delta
cryptpw_main 198 140 -58
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-58) Total: -58 bytes
2007-05-09 21:27:15 +00:00
Denis Vlasenko
a035e9f1a9
cryptpw: forgot svn add... how typical of me :(
2007-05-08 23:23:35 +00:00
Denis Vlasenko
7e84e539de
cryptpw: new applet (a bit less than 3k added)
...
(by Thomas Lundquist <lists@zelow.no>)
2007-05-08 17:52:17 +00:00
Denis Vlasenko
be1a9d4237
deluser: add optional support for removing users from groups
...
(by Tito <farmatito@tiscali.it>)
2007-04-15 08:43:23 +00:00
Denis Vlasenko
3211adc184
login: fixing my brainfart: xspawn(t_argv) <- was using argv!
2007-04-12 20:33:01 +00:00
Denis Vlasenko
0de3c55b42
login: remove setpgrp call (makes it work from shell prompt again).
...
login: sanitize stdio descriptors (we are suid, need to be careful!)
shrink login and set_environment by ~100 bytes.
2007-04-12 12:31:02 +00:00
Bernhard Reutner-Fischer
00c2c4868a
- clean up addgroup, fix adding users to existing groups and make it optional (Tito)
2007-04-05 13:16:39 +00:00
Denis Vlasenko
53091ecd20
Attempt to get more applets compile for NOMMU.
...
TODO_config_nommu documents what I managed to compile so far
(yay! msh works! cool). inetd, telnetd, httpd still do not compile. TODO
Also make fork(), daemon() produce warnings on compile stage
(in addition to erros on link stage).
2007-03-26 13:35:09 +00:00
Denis Vlasenko
cad04ef4f3
add NOMMU fixme's; move move_fd from runit_lib to libbb; nuke fd_copy
2007-03-25 23:21:05 +00:00
Denis Vlasenko
c0415a9833
login: nuke nonblock() - we have it in libbb; -400 bytes bss.
2007-03-24 17:04:07 +00:00
Denis Vlasenko
7695328575
adduser: don't bomb out if shadow password file doesn't exist
...
(from Tito <farmatito@tiscali.it>)
2007-03-24 16:06:46 +00:00
Denis Vlasenko
5df955fce2
Do not fail password check if shadow password does not exist -
...
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
2007-03-13 13:01:14 +00:00
Denis Vlasenko
8e858e2700
clean up accumulated whitespace damage
2007-03-07 09:35:43 +00:00
Denis Vlasenko
1d76f439da
EXEC_PREFER_APPLETS support by Gabriel L. Somlo <somlo@cmu.edu>
2007-02-06 01:20:12 +00:00
Denis Vlasenko
06af216528
suppress warnings about easch <applet>_main() having
...
no preceding prototype
2007-02-03 17:28:39 +00:00
Denis Vlasenko
06c0a71d23
preparatory patch for -Wwrite-strings #3
2007-01-29 22:51:44 +00:00
Denis Vlasenko
e06bed30cf
use bb_sanitize_stdio() where appropriate
2007-01-27 22:21:12 +00:00
Bernhard Reutner-Fischer
bb8c7c041c
- sed -i -e "/\$Id:/d;"
2007-01-22 17:04:53 +00:00
Denis Vlasenko
9af7c9d6b6
openvt,getty,vfork_daemon_rexec,mount: tighten up fd cleanup code
...
(will close all fd's > 2 on daemonization now)
getty: fix "getty -" support, and also do not try to chown/chmod "-"
telnetd: fix "lost ctty" bug
Yet another attempt on saner function names:
bb_sanitize_server_stdio(0/1) -> bb_sanitize_stdio() + bb_daemonize();
2007-01-19 21:19:35 +00:00
Denis Vlasenko
f7996f3b70
Trailing whitespace removal over entire tree
2007-01-11 17:20:00 +00:00
Denis Vlasenko
b5a122b6f9
fix for uclibc-without-shadow.h compilation
2006-12-30 14:46:51 +00:00
Denis Vlasenko
7fa0fcafca
fix build without shadow support
2006-12-28 21:33:30 +00:00
Denis Vlasenko
9a44c4f91c
bb_xget[pw/gr]nam were horribly misnamed - fixed.
...
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
2006-12-28 05:44:47 +00:00
Denis Vlasenko
3ef70d43ad
adduser: trivial code movement
2006-12-26 17:37:38 +00:00
Denis Vlasenko
bf0a201008
style fixes
...
last xcalloc replaced by xzalloc
2006-12-26 10:42:51 +00:00
Denis Vlasenko
e13a537795
su: fix typo: "argv -= optind" should be +=
2006-12-23 02:59:06 +00:00
Bernhard Reutner-Fischer
359d7ca0e7
- rename SU_SYSLOG to FEATURE_SU_SYSLOG
2006-12-19 08:55:38 +00:00
Denis Vlasenko
8eb3b391ad
passwd: add option to check passwords for weakness
2006-12-19 00:33:53 +00:00
Denis Vlasenko
15b213ef5a
su: make /etc/shells check configurable
...
ash: missing ';'
2006-12-19 00:20:20 +00:00
Denis Vlasenko
9f739445cd
inline strcmp(s, "-") [actually macro-ize it for now - gcc is too stupid]
2006-12-16 23:49:13 +00:00
Denis Vlasenko
16c2c700fd
passwd: fix indentation
2006-12-12 18:11:58 +00:00
Denis Vlasenko
db2b52425d
passwd: added comment
2006-12-12 17:14:56 +00:00
Denis Vlasenko
900406c359
passwd: shrink by ~10 bytes, use PRNG instead of usleep.
2006-12-12 14:38:03 +00:00
Denis Vlasenko
becd8c538c
passwd: made smaller by ~130 bytes. size can go negative
...
if current trend will continue ;)
2006-12-01 21:34:20 +00:00
Denis Vlasenko
4c87d4f242
passwd: micro-optimization
2006-11-30 23:13:59 +00:00
Denis Vlasenko
002526481e
passwd: small size optimization. salt generation improved
...
(really generated different salts even if called back-to-back).
2006-11-30 20:41:28 +00:00
Denis Vlasenko
ab24e18c7a
passwd: rework:
...
* 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
2006-11-30 16:41:15 +00:00
Bernhard Reutner-Fischer
b8bb27c7ea
- save 4 bytes
...
text data bss dec hex filename
764 0 80 844 34c vlock.o.oorig
760 0 80 840 348 vlock.o
2006-11-30 14:53:51 +00:00
Denis Vlasenko
d9e15f2068
style cleanup: return(a) -> return a, part 2
2006-11-27 16:49:55 +00:00
Denis Vlasenko
d686a045c8
safe_strtoXX interface proved to be a bit unconvenient.
...
Remove it, introduce saner bb_strtoXX.
Saved ~350 bytes.
2006-11-27 14:43:21 +00:00
Bernhard Reutner-Fischer
8a0a83d503
- minor shrinkage
...
text data bss dec hex filename
773 0 80 853 355 vlock.o.orig
766 0 80 846 34e vlock.o
2006-11-27 13:58:18 +00:00
Denis Vlasenko
a7b2c41e03
deluser: the same code, but a bit less obfuscated.
2006-11-27 01:04:23 +00:00
Denis Vlasenko
c9bb67787a
deluser: size reduction by 60 bytes.
...
patch from Tito <farmatito@tiscali.it>
2006-11-27 00:54:59 +00:00
Bernhard Reutner-Fischer
7627cc1454
- fix typo
2006-11-22 18:21:08 +00:00
Denis Vlasenko
4a5cf16a36
login: use %s - we know that string is not too long there
...
ping[6]: use getopt32: smaller (-50 bytes) and handles -c6 correctly
(was requiring '-c 6' with mandatory space)
2006-11-20 00:48:22 +00:00
Denis Vlasenko
89f0b3486d
rodata cleanup. "unable to" == "cannot". -300 bytes
2006-11-18 22:04:09 +00:00
Denis Vlasenko
6476cc1089
getty: remove ancient termio support (was using termois anyway)
2006-11-07 01:52:10 +00:00