Commit Graph

1088 Commits

Author SHA1 Message Date
90ec4dc0c7 arping: stop using last gethostbyname2 in the tree
hostname: small optimization
2007-01-25 19:44:38 +00:00
b9a279ba94 Unify ping and ping6. ping has -4 and -6 which force
name resolution into IP or IPv6 only, otherwise
we take address family returned by host2sockaddr()
in lsa->sa.sa_family. IOW: "ping ::1" with do IPv6 ping,
"ping 127.0.0.1" will do IPv4 ping.
ping6 is aliased to "ping -6".
2007-01-24 23:53:22 +00:00
5de9e9ce0b clean up commented out old code 2007-01-22 22:46:04 +00:00
9adc6ced4f ping6: stop using xgethostbyname2, remove it from libbb. 2007-01-22 22:45:27 +00:00
448f0241e0 nslookup: full circle. Here we started IPv6 work. Use "new API"
and thus save a few bytes.
2007-01-22 22:43:05 +00:00
835f575b61 - the archivers expect mode to be a mode_t, so do not trip signed/unsigned conversion purposefully 2007-01-22 17:48:08 +00:00
703e20235a cleanups: unnecessary casts, unified const_1, eliminate cross-.c file
prototypes (heresy!), add spaces in places like "flags&NETSTAT_CONNECTED",
removed unused #defines, #ifdef -> #if, use uint32_t for ipv4 addrs.
2007-01-22 14:12:08 +00:00
85629f08bc comment out unused old networking API parts
sockaddr2dotted: return IPV6 addrs in [addr]:port form (was addr:port)
2007-01-22 09:36:41 +00:00
38f6319421 cmdedit is not a 'command' editing anymore, it's just editing (generic),
so rename stuff accordingly.
2007-01-22 09:03:07 +00:00
8e1c71529c Convert cmdedit into more generic line input facility
(make history and completion optional at runtime).
Use it for fdisk, as an example.
Some unrelated fixes in fdisk are also here.
2007-01-22 07:21:38 +00:00
12f96c1cec - make tty's pre SUSv3 option handling dependant on INCLUDE_SUSv2 2007-01-20 21:34:24 +00:00
af45760cca - get_terminal_width_height does not and should never write to fd. Cosmetic Precaution 2007-01-20 21:33:50 +00:00
a8e2e1872a - add C99 bool type for setups that support it. 2007-01-20 21:27:18 +00:00
316355524f fixing bugs revealed by randomconfig runs 2007-01-20 16:54:19 +00:00
2405ad659e ls: use get_cached_username/groupname 2007-01-19 21:24:17 +00:00
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
c966ba46a9 - move the smallint that is platform dependant to it's proper place 2007-01-18 10:32:09 +00:00
f8384fa50c Use char for smallint on CRIS as well. 2007-01-18 10:26:07 +00:00
cbbc043d1b smallint can be a char for amd64 too 2007-01-18 00:16:06 +00:00
d97c9244b1 Rename bb_sanitize_stdio -> bb_sanitize_server_stdio
(name is still bad - it doesn't hint that function
may do daemonization trick for you if asked to).
Small fixes to fakeidentd.
2007-01-14 13:12:06 +00:00
7a431b3715 By popular request reinstate fakeidentd's standalone mode.
Since this is also needed for other applets like telnetd,
introduce generic driver for such things.
It even supports inetd-wait ('linger') mode, when inetd
hands out listen socket to child and waits to it to die,
instead of handing out accepted socket and continuing
listening itself (nowait mode).
Code growth ~200 bytes.
NB: our inetd doesn't support wait mode yet (or mabe it is buggy).
2007-01-14 01:29:06 +00:00
150f402b36 whitespace fixes (leading spaces to tab) 2007-01-13 21:06:21 +00:00
3a34d0c08a random small size optimizations 2007-01-12 22:10:34 +00:00
5d68724d5b next part of ipv6-ization. mostly netcat. 2007-01-12 20:59:31 +00:00
6536a9b583 next part of ipv6-ization is here: wget & httpd 2007-01-12 10:35:23 +00:00
f8138d1f91 fakeinetd: attempted ipv6-ization (and it's done)
but entire applet can be orders of magnitude smaller
if written as an inetd service.
So did that (#ifdef'ed out entire old version).
inetd version is less than 10% of old one!
function                                             old     new   delta
packed_usage                                       22083   22105     +22
nobodystr                                              4       -      -4
bind_ip_address                                        4       -      -4
ident_substr                                          20       -     -20
chmatch                                               22       -     -22
movefd                                                25       -     -25
skipchars                                             49       -     -49
handlexitsigs                                         51       -     -51
replyError                                            70       -     -70
.rodata                                           158120  158024     -96
deleteConn                                           102       -    -102
G                                                    524     388    -136
conns                                                560       -    -560
fakeidentd_main                                     1457     143   -1314
------------------------------------------------------------------------------
(add/remove: 0/10 grow/shrink: 1/3 up/down: 22/-2453)       Total: -2431 bytes
2007-01-11 23:26:13 +00:00
f7996f3b70 Trailing whitespace removal over entire tree 2007-01-11 17:20:00 +00:00
8e9ccba371 ipv6-ization efforts continue. Few bugs are found,
unknown number likely introduced...
2007-01-11 16:50:23 +00:00
bbe514683a a bit more IPv6-ization work
syslogd: converted to use it (in -R host:port)
2007-01-10 20:19:56 +00:00
9de420c27c Improve generic ipv4+ipv6 support in libbb.
Convert telnet to it. Now this works:
telnetd -b [::1]:1234 - bind to IPv6 non-standard port
telnet [::1]:1234 - connect to IPv6 non-standard port
telnet ::1 1234 - same
This does not require ANY ipv6-specific code in applets
(no struct sockaddr_in6. In fact, no sockaddr_in, too).
2007-01-10 09:28:01 +00:00
886bb0df66 Fix typo in usage text by shortening it 2007-01-09 23:48:46 +00:00
5568b722d4 - a few minor tweaks 2007-01-07 15:53:18 +00:00
fa85b86f38 add arp applet - thanks to
"Eric Spakman" <E.Spakman@inter.nl.net>
2007-01-07 01:24:12 +00:00
cd42cb8df0 do not expose internal state of [g]zip unpacker.
fix memory leak in inflate_gunzip.
2007-01-05 23:56:53 +00:00
89d49a4236 - remove duplicate includes 2007-01-04 22:13:25 +00:00
a0e2a0a192 syslogd: start using bb_common_bufsiz1 instead of stack/malloc
logger: optimize, also use bb_common_bufsiz1 (~40 bytes)
tested to eat arbitrarily-sized input at high speed - ok
2007-01-04 21:22:11 +00:00
a9b60e93ee new libbb func: xmalloc_realpath (+ use it where makes sense)
syslogd, logread: add debugging code (disabled)
syslogs: drastically smaller bss; fix "-C n" behaviour
2007-01-04 17:59:59 +00:00
9b1381fd2f convert calloc to xzalloc
fix sleep-on-die option
2007-01-03 02:56:00 +00:00
bb3d0fab3b extern variable declaration in a .c file is heresy - fixing it 2007-01-03 01:57:25 +00:00
24cfe8fe0c introduce small[u]int
fsck_minix: use it for flag variables. 140 bytes saved
2007-01-03 00:39:15 +00:00
13463af29f remove commented out #includes etc
move get_hz to the only caller
2006-12-31 18:58:32 +00:00
98ee06d3d4 stop using __u32 etc. uint32_t is there for a reason 2006-12-31 18:57:37 +00:00
cb04ff5c68 fixdep.c: avoit doing memcmp in most cases
uidgid_get.c: add forgotten copyright notice
pwd/grp/shadow: avoid collisions with libc names
2006-12-30 21:11:57 +00:00
b5a122b6f9 fix for uclibc-without-shadow.h compilation 2006-12-30 14:46:51 +00:00
7fa0fcafca fix build without shadow support 2006-12-28 21:33:30 +00:00
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
666da5e2c6 merge post-1.3.0 fixes 2006-12-26 18:17:42 +00:00
270c17c0e6 properly export externs thru *.h files 2006-12-26 17:40:33 +00:00
bf0a201008 style fixes
last xcalloc replaced by xzalloc
2006-12-26 10:42:51 +00:00
5dd7ef0f37 chattr: bugfixes and size reduction 2006-12-26 03:36:28 +00:00