Commit Graph

4603 Commits

Author SHA1 Message Date
Mike Frysinger
a87bb60809 patch by Shaun Jackman to combine dup/close funcs into dup2 2005-06-30 03:43:14 +00:00
Mike Frysinger
8804c6a3b7 dont use f_frsize unless linux-2.6.0 or better 2005-06-29 01:07:04 +00:00
Mike Frysinger
fc379ba077 rip out all the non-linux code and ugly workarounds 2005-06-28 23:50:18 +00:00
Mike Frysinger
9e164578f2 tweak signed/unsigned char usage to avoid mismatches 2005-06-24 21:37:59 +00:00
Ned Ludd
778ee6da60 - remove extra/unneeded function call. testing svn 2005-06-24 03:47:57 +00:00
Eric Andersen
5043ea1986 Enabling runtime SUID/SGID configuration via /etc/busybox.conf
is not a very good default.  Better to default to having it off
and let people get the default behavior.  If they want to enable
/etc/busybox.conf they should explicitly ask for it.
2005-06-23 19:15:40 +00:00
Eric Andersen
576db48ef0 applets specified as _BB_SUID_ALWAYS in applets.h should also select
CONFIG_FEATURE_SUID to ensure proper behavior when installed.
2005-06-23 18:58:57 +00:00
Eric Andersen
3efa51d943 characters encoded as html should have a trailing semicolon
to be interpreted properly
2005-06-23 05:51:48 +00:00
Rob Landley
6eb1e41674 Rodney Radford submitted ipcs and ipcrm (system V IPC stuff). They could use
some more work to shrink them down.
2005-06-20 04:30:36 +00:00
Mike Frysinger
df1eda82b9 Tito says: unify verbose/quiet flags 2005-06-17 02:13:57 +00:00
Mike Frysinger
d0615ae73a Tito says: strip unused program_name
Vladimir N. Oleynik says: uname() can be replaced with get_kernel_revision()
2005-06-17 01:35:52 +00:00
Mike Frysinger
d5826903c1 use xmalloc instead of malloc 2005-06-12 00:45:09 +00:00
Mike Frysinger
7fde8debc4 use malloc instead of xmalloc 2005-06-11 22:37:25 +00:00
Mike Frysinger
d1a9d57bd6 use xmalloc() instead of malloc() 2005-06-11 22:25:27 +00:00
Mike Frysinger
2401ce5343 use xmalloc() and bb_perror_msg_and_die() 2005-06-11 22:24:15 +00:00
Rob Landley
958fa2a9cc Note that memory allocaiton needs to be cleaned up too. 2005-06-11 22:10:42 +00:00
Mike Frysinger
0b3fc1a9ac remove com_err.h includes 2005-06-11 20:29:02 +00:00
Mike Frysinger
16bc6159f3 DOS only crap 2005-06-11 20:28:47 +00:00
Mike Frysinger
6447ac0ef4 import initial fat mke2fs 2005-06-11 05:29:40 +00:00
Mike Frysinger
174808cedb import tune2fs support 2005-06-11 01:14:09 +00:00
Mike Frysinger
a34f99930d fix signed/unsigned char pointers 2005-06-11 00:50:59 +00:00
Mike Frysinger
7ffce0c119 oops, we only want to affect local CFLAGS 2005-06-11 00:45:50 +00:00
Mike Frysinger
d5624dcc0d initial fat tune2fs/findfs/e2label source 2005-06-11 00:40:20 +00:00
Mike Frysinger
cae717e1f6 replace simple is_null func with a memcmp define 2005-06-11 00:36:04 +00:00
Mike Frysinger
f3d28845f8 force including of e2fsbb.h and move the HAVE_* defines to it 2005-06-11 00:27:50 +00:00
Mike Frysinger
e9903cfa0f move config.h requirement to the actual .depend target rather than the depend alias 2005-06-11 00:13:58 +00:00
Mike Frysinger
e037622641 make sure clean removes objects in subdirs 2005-06-11 00:12:12 +00:00
Mike Frysinger
f98f5e37cd need strings.h for ffs() 2005-06-11 00:11:46 +00:00
Mike Frysinger
0301ffab3d only define some variables if legacy EXT2FS_ENABLE_SWAPFS is enabled 2005-06-11 00:11:37 +00:00
Mike Frysinger
1f96c97984 replace simple functions with defines 2005-06-11 00:10:44 +00:00
Mike Frysinger
68497c0bd3 whitespace updates 2005-06-11 00:10:29 +00:00
Mike Frysinger
3968082df4 replace functions with defines 2005-06-11 00:09:46 +00:00
Mike Frysinger
a1c9c66ac0 whitespace updates 2005-06-11 00:09:39 +00:00
Mike Frysinger
e2c51a8dc6 whitespace updates 2005-06-11 00:09:24 +00:00
Mike Frysinger
85cffcc83d recode functions to shrink size 2005-06-11 00:08:50 +00:00
Mike Frysinger
942e137679 setup the HAVE_* defines 2005-06-11 00:03:13 +00:00
Eric Andersen
3d9256225f About time to just apply this and kill off the patches 2005-06-09 10:16:02 +00:00
Rob Landley
06813d066b Tito posted a devfsd error message fix. It's highly deprecated and will
presumably be removed eventually (use udev), but as long as it's in there.

Tito says:

The sense of this patch is to call:
read_config_file_err:
#ifdef CONFIG_DEVFSD_VERBOSE
    msg_logger(((optional ==  0 ) && (errno == ENOENT))? DIE : NO_DIE, LOG_ERR, "read config file: %s: %m\n", path);
#else
    if(optional ==  0  && errno == ENOENT)
        exit(EXIT_FAILURE);
#endif

just after the failure of the  call that set errno ( stat and fopen)
to avoid false error messages.
2005-06-07 03:47:00 +00:00
Rob Landley
16cd02e01e Clean up strings.c to use busybox's option processing. Bug 006, apparently. 2005-06-07 03:21:20 +00:00
Rob Landley
ed830e8693 Patch from Dmitry Zakharov:
Charlie Brady wrote:
> Here's another awk parsing problem - unary post increment - pre is fine:
>
>bash-2.05a$ echo 2,3 | gawk -F , '{ $2++ }'
>bash-2.05a$ echo 2,3 | /tmp/busybox/busybox awk -F , '{ $2++ }'
>awk: cmd. line:1: Unexpected token
>
Here's a fix for this. There is another problem with constructions like 
"print (A+B) ++C", I don't
know whether somebody uses such constructions (fixing both these 
problems would require very
serious change in awk code).
2005-06-07 02:43:52 +00:00
Rob Landley
f3133c4149 Thus spake Brenda J. Butler:
We were seeing some timeouts when getting files with the busybox tftp
client.

With tcpdump, we saw that the tftp client was receiving blocks and
ack'ing them, but the server was failing to receive the occasional
ack.

When that happened, the server would send the last block over again,
but the tftp client was expecting the next block.

This patch allows the client to recover from this situation
(it sends an ack for the repeat block but does not write it
to the local file).

I hope it meets your approval, please don't hesitate to send
me comments for improvement.

The patch is against "head" in svn, I tested it on an older version
of busybox in our environment.  It applied cleanly to the older
version.

Credit for this goes to my co-worker John McCarthy for finding
it and me for fixing it (assuming it works for everyone else too).

cheerio,
bjb
2005-06-07 02:40:39 +00:00
Rob Landley
f7662da2af Shaun Jackman submitted a patch converting an allocation to use
CONFIG_RESERVE_BUFFER.  (Rob Landley removed an #ifdef, per discussion on
the list.)
2005-05-28 23:55:26 +00:00
Rob Landley
47bc802e9e Patch from Shaun Jackman to save a few bytes. 2005-05-28 23:36:38 +00:00
Rob Landley
0b1ff5a606 Tobias Krawutschke found a bug where the DHCP client would accept packets
with the wrong ARP address, meaning we could easily get somebody else's IP.
That is a bad thing, and this is the minimal two-line fix.
2005-05-26 05:25:12 +00:00
Paul Mundt
8b2d02ed34 Add readprofile applet support. 2005-05-20 17:22:18 +00:00
Rob Landley
93850a56b2 Patch from Colin Watson (mangled slightly by Rob Landley):
This patch implements the 'T' command in sed. This is a GNU extension,
but one of the udev hotplug scripts uses it, so I need it in busybox
anyway.

Includes a test; 'svn add testsuite/sed/sed-branch-conditional-inverted'
after applying.
2005-05-18 06:34:37 +00:00
Rob Landley
5797c7f0ef Doug Swarin pointed out a security bug in the -i option of sed.
While the permissions on the temp file are correct to prevent it from being 
maliciously mangled by passing strangers, (created with 600, opened O_EXCL, 
etc), the permissions on the _directory_ might not be, and we re-open the 
file to convert the filehandle to a FILE * (and automatically get an error 
message and exit if the directory's read-only or out of space or some such).

This opens a potential race condition if somebody's using dnotify on the 
directory, deletes/renames the tempfile, and drops a symlink or something 
there.  Somebody running sed -i as root in a world writeable directory could 
do damage.

I dug up notes on an earlier discussion where we looked at the security 
implications of this (unfortunately on the #uclibc channel rather than email; 
I don't have a transcript, just notes-to-self) which pointed out that if the 
permissions on the directory allow other people's files to be deleted/renamed 
then the original file is vulnerable to sabotage anyway.  However, there are 
two cases that discussion apparently didn't take into account:

1) Using another user's permissions to damage files in other directories you 
can't access (standard symlink attack).

2) Reading data another user couldn't otherwise access by having the new file 
belong to that other user.

This patch uses fdopen to convert the filehandle into a FILE *, rather than
reopening the file.
2005-05-18 05:56:16 +00:00
Mike Frysinger
1fb7961e08 use more busybox functions and remove redundant code 2005-05-16 22:35:59 +00:00
Mike Frysinger
b2312e9901 make sure we add the local dir to the include path 2005-05-16 22:05:07 +00:00
Rob Landley
4079b00119 Tito pointed out I'd broken -t (argv[optind] can't be before getulflags),
and replaced the use of system() (and resulting security implications).
2005-05-15 01:32:47 +00:00