hush/libbb
Eric Andersen 2842659cc0 Patch from Michael Tokarev:
Scenario:

  touch x -- creates plain file name `x'
  mkdir x -- exits successefully

libbb/make_directory.c, bb_make_directory(), contains
the following code:

        if (mkdir(path, 0777) < 0) {
            /* If we failed for any other reason than the directory
             * already exists, output a diagnostic and return -1.*/
            if (errno != EEXIST) {
                fail_msg = "create";
                umask(mask);
                break;
            }
            /* Since the directory exists, don't attempt to change
             * permissions if it was the full target.  Note that
             * this is not an error conditon. */
            if (!c) {
                umask(mask);
                return 0;
            }
        }

The assumption that EEXIST error is due to that the *directory*
already exists is wrong: any file type with that name will cause
this error to be returned.  Proper way IMHO will be is to stat()
the path and check whenever this is really a directory.  Below
(attached) is a patch to fix this issue.
2004-10-08 07:21:58 +00:00
..
.cvsignore
ask_confirmation.c Major coreutils update. 2003-03-19 09:13:01 +00:00
bb_askpass.c Do not use getpass(3) 2004-05-01 01:27:30 +00:00
bb_asprintf.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
change_identity.c more crond+crontab integrating with loginutil libbb functions and deleted 2003-09-03 12:18:42 +00:00
chomp.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
compare_string_array.c Major coreutils update. 2003-03-19 09:13:01 +00:00
concat_path_file.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
concat_subpath_file.c Vodz, last_patch_86 2003-05-26 14:07:50 +00:00
copy_file.c Dont try and preserve hard links to directories. 2004-04-19 12:28:02 +00:00
copyfd.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
correct_password.c Remove this error message at Vodz request, it was misleading. 2004-09-24 02:36:44 +00:00
create_icmp6_socket.c Larry Doolittle writes: 2004-04-14 17:51:38 +00:00
create_icmp_socket.c Larry Doolittle writes: 2004-04-14 17:51:38 +00:00
default_error_retval.c Larry Doolittle writes: 2004-04-14 17:51:38 +00:00
device_open.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
dump.c Patch from Felipe Kellermann, "There is a call to printf using `*pr-cchar' 2004-07-23 01:35:41 +00:00
error_msg_and_die.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
error_msg.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
fclose_nonstdin.c Larry Doolittle writes: 2004-04-14 17:51:38 +00:00
fflush_stdout_and_exit.c Major coreutils update. 2003-03-19 09:13:01 +00:00
fgets_str.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
find_mount_point.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
find_pid_by_name.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
find_root_device.c Tito, farmatito at tiscali dot it writes: 2004-08-03 00:14:02 +00:00
full_read.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
full_write.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
get_console.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
get_last_path_component.c Major coreutils update. 2003-03-19 09:13:01 +00:00
get_line_from_file.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
get_terminal_width_height.c Brian Pomerantz writes: 2004-03-23 23:15:36 +00:00
get_ug_id.c Patch from Arthur Othieno to fix a compiler warning 2003-10-22 10:26:38 +00:00
getopt_ulflags.c Vladimir N. Oleynik writes: 2004-02-05 13:49:29 +00:00
hash_fd.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
herror_msg_and_die.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
herror_msg.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
human_readable.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
inet_common.c In spite of the feature freeze, check in a complete rework of route which 2004-03-10 07:42:38 +00:00
inode_hash.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
interface.c Felipe Kellermann writes: 2004-08-26 21:45:21 +00:00
isdirectory.c Larry Doolittle writes: 2004-04-14 17:51:38 +00:00
kernel_version.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
last_char_is.c Save 10 bytes or so, last_patch_70 from Vladimir N. Oleynik 2002-12-03 20:34:36 +00:00
llist_add_to.c Move add_to_list from libunarchive to libbb so it can be of more general use (eg ifupdown). Changed the name to llist_add_to as i plan on adding more llist_ functions as needed (e.g. llist_free). 2002-12-08 00:54:33 +00:00
login.c Geir Thomassen wrote, regarding networking/httpd.c line 1358 2003-06-26 09:05:32 +00:00
loop.c Use __kernel_old_dev_t for 2.6.x kernels 2004-08-16 08:36:28 +00:00
make_directory.c Patch from Michael Tokarev: 2004-10-08 07:21:58 +00:00
Makefile Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
Makefile.in Tito writes, 2004-09-15 03:04:08 +00:00
messages.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
mode_string.c Fix a bug reported by junkio@cox.net involving the mode_chars index. 2003-08-14 02:28:49 +00:00
module_syscalls.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
mtab_file.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
mtab.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
my_getgrgid.c Tito writes, 2004-09-15 03:04:08 +00:00
my_getgrnam.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
my_getpwnam.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
my_getpwuid.c Tito writes, 2004-09-15 03:04:08 +00:00
my_getug.c Tito writes, 2004-09-15 03:04:08 +00:00
obscure.c Patch from vodz to cleanup libbb/obscure.c:password_check() 2003-08-06 08:33:08 +00:00
parse_mode.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
parse_number.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
perror_msg_and_die.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
perror_msg.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
perror_nomsg_and_die.c Major coreutils update. 2003-03-19 09:13:01 +00:00
perror_nomsg.c Major coreutils update. 2003-03-19 09:13:01 +00:00
print_file.c Add missing include files 2004-03-27 11:26:32 +00:00
printf.c Larry Doolittle writes: 2004-04-14 17:51:38 +00:00
process_escape_sequence.c Clean up hex escape support. 2004-07-29 23:15:16 +00:00
procps.c Tito writes: 2004-08-26 22:18:59 +00:00
pw_encrypt.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
pwd2spwd.c Cleanup shadow.h stuff so it behaves as intended 2002-07-03 04:47:43 +00:00
qmodule.c rmmod -a removed modules recursively 2002-12-14 01:58:59 +00:00
read_package_field.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
README Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
recursive_action.c Vladimir N. Oleynik writes: 2004-04-07 17:59:04 +00:00
remove_file.c Vodz, last_patch_86 2003-05-26 14:07:50 +00:00
restricted_shell.c Port over the last of the tinylogin applets 2002-06-23 04:24:25 +00:00
run_parts.c Larry Doolittle writes: 2004-04-14 17:51:38 +00:00
run_shell.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
safe_read.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
safe_strncpy.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
safe_strtol.c Fix/eliminate use of atol 2004-03-06 22:11:45 +00:00
safe_write.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
setup_environment.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
simplify_path.c Major coreutils update. 2003-03-19 09:13:01 +00:00
skip_whitespace.c Major coreutils update. 2003-03-19 09:13:01 +00:00
speed_table.c Major coreutils update. 2003-03-19 09:13:01 +00:00
syscalls.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
syslog_msg_with_name.c Patch from Bastian Blank: 2004-06-22 10:07:17 +00:00
trim.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
u_signal_names.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
vdprintf.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
verror_msg.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
vfork_daemon_rexec.c Larry Doolittle writes: 2004-04-14 17:51:38 +00:00
vherror_msg.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
vperror_msg.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
warn_ignoring_args.c Larry Doolittle writes: 2004-04-14 17:51:38 +00:00
wfopen_input.c Major coreutils update. 2003-03-19 09:13:01 +00:00
wfopen.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
xconnect.c Larry Doolittle writes: 2004-04-14 17:51:38 +00:00
xfuncs.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
xgetcwd.c Vodz, last_patch_86 2003-05-26 14:07:50 +00:00
xgethostbyname2.c Major coreutils update. 2003-03-19 09:13:01 +00:00
xgethostbyname.c Major coreutils update. 2003-03-19 09:13:01 +00:00
xgetlarg.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
xgetularg.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
xreadlink.c Patch from Tito to fix memory leak upon error. 2004-08-11 03:50:30 +00:00
xregcomp.c Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00

Please see the LICENSE file for copyright information (GPLv2)

libbb is BusyBox's utility library.  All of this stuff used to be stuffed into
a single file named utility.c.  When I split utility.c to create libbb, some of
the very oldest stuff ended up without their original copyright and licensing
information (which is now lost in the mists of time).  If you see something
that you wrote that is mis-attributed, do let me know so we can fix that up.

	Erik Andersen
	<andersen@codepoet.org>