aboutsummaryrefslogtreecommitdiff
path: root/coreutils/ls.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Patch from David Daney to make the -i option work with -l.Glenn L McGrath2004-09-241-1/+1
|
* Tito writes:Eric Andersen2004-08-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* BusyBox has no business hard coding the number of major and minor bits for aEric Andersen2004-07-261-7/+3
| | | | | | | | | dev_t. This is especially important now that the user space concept of a dev_t and the kernel concept of a dev_t are divergant. The only bit of user space allowed to know the number of major and minor bits is include/sys/sysmacros.h (i.e. part of libc). When used with a current C library and a 2.6.x kernel, this fix should allow BusyBox to support wide device major/minor numbers. -Erik
* s/fileno\(stdin\)/STDIN_FILENO/gEric Andersen2004-03-271-4/+4
| | | | s/fileno\(stdout\)/STDOUT_FILENO/g
* Brian Pomerantz writes:Eric Andersen2004-03-231-1/+1
| | | | | | | | | | | | | | | | I've noticed a bug in the "autowidth" feature more, and is probably in others. The call to the function get_terminal_width_height() passes in a file descriptor but that file descriptor is never used, instead the ioctl() is called with 0. In more_main() the call to get_terminal_width_height() passes 0 as the file descriptor instead of fileno(cin). This isn't a problem when you more a file (e.g. "more /etc/passwd") but when you pipe a file to it (e.g. "cat /etc/passwd | more") the size of the terminal cannot be determined because file descriptor 0 is not a terminal. The fix is simple, I've attached a patch for more.c and get_terminal_width_height.c. BAPper
* Remove trailing whitespace. Update copyright to include 2004.Eric Andersen2004-03-151-2/+2
|
* Fix broken sort order flags.Manuel Novoa III2004-03-081-3/+2
|
* Patch from Matt Kraai to fix debian bug number 231994.Glenn L McGrath2004-03-061-4/+7
| | | | There was an extra blank line preceding the first directory.
* Vladimir N. Oleynik writes:Eric Andersen2004-02-051-2/+2
| | | | | | | | | | | Hi, Glenn. Current CVS "ls" applet have small problem: some options ignoring. Last patch attached ;-) --w vodz
* Fix a bug where `ls -le` would print the time twice.Glenn L McGrath2004-01-181-13/+13
|
* Use bb_getopt_ulflags, save 200-300 bytesGlenn L McGrath2004-01-181-89/+131
|
* Fix oversight with CONFIG_FEATURE_AUTOWIDTH handlingEric Andersen2003-11-041-0/+2
|
* Be entirely consistant when using ioctl(0, TIOCGWINSZ, &winsize)Eric Andersen2003-09-151-10/+5
| | | | | to ensure proper fallback behavior on, i.e. serial consoles. -Erik
* Michael Sternberg writes:Eric Andersen2003-07-141-0/+4
| | | | | | | Latest BusyBox from CVS (Jul 7 2003). File coreutils/ls.c "if" at line 970 should be enclosed in #ifdef CONFIG_FEATURE_LS_SORTFILES "if" at line 976 should be enclosed in #ifdef CONFIG_FEATURE_LS_TIMESTAMPS
* Patch from Russell Coker:Eric Andersen2003-07-031-13/+81
| | | | | 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-289/+268
|
* last_patch75_2 from vodz,Eric Andersen2003-01-141-2/+4
|
* Correct column width for tab completion and lsGlenn L McGrath2003-01-061-114/+82
|
* Change if(x)free(x); to free(x);Aaron Lehmann2002-11-281-2/+1
|
* Use printf instead of fprintf(stdoutGlenn L McGrath2002-11-281-7/+3
|
* Run through indent, fix BB_ defineGlenn L McGrath2002-08-221-355/+441
|
* Fix silly combinitorial oversightEric Andersen2002-04-271-5/+3
|
* ls could mis-color certain entries when previous commandsEric Andersen2002-04-171-0/+2
| | | | had failed. Explicitly 0 out errno to prevent that.
* Patch from J.W.Janssen <JanWillem.Janssen@lxtreme.nl> to provideEric Andersen2002-03-201-2/+63
| | | | | | color ls support, modifed by me to behave properly when not running output to a terminal (i.e. 'ls | more') -Erik
* list_single: Declare scratch iff CONFIG_FEATURE_LS_USERNAME is defined.Matt Kraai2002-03-081-0/+2
|
* * fileutils/ls.c (showfiles): Display multiple short names on a line.Matt Kraai2002-03-081-6/+1
|
* Remove `== TRUE' tests and convert `!= TRUE' and `== FALSE' tests to use !.Matt Kraai2001-12-201-1/+1
|
* Major rework of the directory structure and the entire build system.Eric Andersen2001-10-241-58/+58
| | | | -Erik
* Make formatting match GNU ls (we were including a spare ' ')Eric Andersen2001-07-311-1/+1
| | | | -Erik
* Some patches to make dietlibc work...Eric Andersen2001-07-221-0/+1
|
* Some adjustments, mostly from David McCullough <davidm@lineo.com> toEric Andersen2001-07-191-0/+2
| | | | | | | make busybox be more uClinux friendly. I also adjusted Config.h for uClinux so it will automagically disable apps the arn't going to work without fork() and such. -Erik
* Pad the human readable output for 'ls -sh' to 6 chars, since we willEric Andersen2001-06-301-1/+1
| | | | | have numbers printed as XXX.YU, so we need 6 digits not 4. -Erik
* ls -s was reporting bytes instead of blocks.Manuel Novoa III2001-06-301-1/+1
|
* Fix up some warnings that show up on ppcEric Andersen2001-06-251-1/+1
|
* I reworked make_human_readable_str so it now has a sane interface,Eric Andersen2001-06-131-6/+5
| | | | | | and then fixed up df, du, and ls to use the new interface. I also fixed up some formatting issues in ls while I was in there. -Erik
* Patch from larry to fix some grammar errors.Eric Andersen2001-05-231-1/+1
|
* Made new xreadlink function for libbb and changed applets to use it instead ofMark Whitley2001-04-301-6/+6
| | | | readlink(2).
* Simplify pathname building, in which a bug was noted by Larry Doolittle,Matt Kraai2001-04-231-9/+9
| | | | | a patch was provided by Vladimir Oleynik, and am improved patch commited by me.
* more FILE_OFFSET_BITS == 64 adjustments.Eric Andersen2001-04-051-1/+1
|
* A number of cleanups. Now compiles with libc5, glibc, and uClibc. Fix a fewEric Andersen2001-04-051-1/+1
| | | | | | shadowed variables. Move (almost) all syscalls to libbb/syscalls.c, so I can handle them sanely and all at once. -Erik
* Place a temporary bandaid on the ls/du/df human-readable issue. This method isEric Andersen2001-04-031-6/+9
| | | | | | | | | not going to scale up as well as I would like, and Matt Kraai and I have discussed a better long term solution. But for now this will at least make all the human-readable apps give correct answers. Please test the human readable/non-human readable options on your systems!!! -Erik
* Fix ls so it uses make_human_readable_str() the same way alreadyEric Andersen2001-03-281-1/+1
| | | | | used by 'du' and 'df'. Now we just need to fix make_human_readable_str so it behaves they way it used to before Matt fixed it.
* Applied patch from David Douthitt to fix problem where ls reports half theMark Whitley2001-03-271-2/+2
| | | | file size. Should close bug #1140.
* A cleanup patch from Jeff Garzik to static-ify a number ofEric Andersen2001-03-091-16/+16
| | | | namespace polluting things that really should be static.
* Some minor cleanups to df.c. Also, with Erik's blessing, changed name ofMark Whitley2001-03-071-2/+4
| | | | 'format' function to 'make_human_readable_str'.
* Fix up ls.c to ensure human readable works properly in all casesEric Andersen2001-03-071-5/+5
|
* I made these little simplifications a while back, bug forgot toEric Andersen2001-03-061-3/+1
| | | | | check this stuff in. -Erik
* Oops. Put time.h after busybox.h, so we can check for BB_FEATURE_LS_TIMESTAMPSEric Andersen2001-02-201-4/+4
| | | | -Erik
* It turns out that DODMALLOC was broken when I reorganized busybox.hEric Andersen2001-02-201-1/+1
| | | | | | header file usage before the 0.49 release. To fix it, I had to move the '#include "busybox.h"' to the end of the list of #include files. -Erik
* Fixed 'ls -s' so it actually displays block sizes again.Eric Andersen2001-02-151-3/+3
| | | | -Erik