]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
21 years ago(run_shell): Pass a new n_additional_args arg, so that
Paul Eggert [Tue, 3 Aug 2004 22:23:25 +0000 (22:23 +0000)] 
(run_shell): Pass a new n_additional_args arg, so that
the callee doesn't have to count 'em.  All callers changed.
Don't allocate more space for the arg vector than we'll need.
Use memcpy to copy the args rather than rolling our own loop.
Use size_t for sizes.
(fast_startup, simulate_login, change_environment, log_su,
correct_password, restricted_shell, main): Use bool for booleans.
(longopts): Don't assume change_environment is an int.
Use NULL, not 0, for pointers.
(xsetenv): New function, replacing xputenv and concat.
All callers changed.
(elements): Remove; no longer needed.
(log_su, correct_passwd, main): Prefer !x to x==NULL.
(log_su): 2 -> STDERR_FILENO.
(modify_environment, main): Don't assume that getenv's returned value
has an indefinite lifetime.
(modify_environment): Allocate a larger environ.
(main): Remove an impossible 'case 0'; if it happens now, it'll
get diagnosed.  Don't assume getpwnam results outlive endpwent.
Check for null or empty pw_name, pw_dir and for null pw_passwd.

21 years ago(correct_password, restricted_shell, main):
Jim Meyering [Tue, 1 Jun 2004 13:04:02 +0000 (13:04 +0000)] 
(correct_password, restricted_shell, main):
Prefer the notation `STREQ (a, b)' over `strcmp (a, b) == 0'.

22 years ago(usage): Use EXIT_SUCCESS, not 0, for clarity.
Jim Meyering [Thu, 22 Jan 2004 21:00:25 +0000 (21:00 +0000)] 
(usage): Use EXIT_SUCCESS, not 0, for clarity.
(main): Initialize exit_failure to EXIT_FAIL.

(main): Use EXIT_ENOENT and EXIT_CANNOT_INVOKE
rather than roll-your-own symbols or integers.

22 years agoMost .c files (AUTHORS): Revert the WRITTEN_BY/AUTHORS change
Jim Meyering [Sat, 18 Oct 2003 10:05:47 +0000 (10:05 +0000)] 
Most .c files (AUTHORS): Revert the WRITTEN_BY/AUTHORS change
of 2003-09-19.  Now, AUTHORS is a comma-separated list of strings.
Update the call to parse_long_options so that `AUTHORS, NULL' are the
last parameters.

* src/true.c (main): Append NULL to version_etc argument list.
* src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.

22 years ago(WRITTEN_BY): Rename from AUTHORS.
Jim Meyering [Thu, 18 Sep 2003 22:19:03 +0000 (22:19 +0000)] 
(WRITTEN_BY): Rename from AUTHORS.
Begin each WRITTEN_BY string with `Written by ' and end it with `.'.
Mark each WRITTEN_BY string as translatable.

22 years agoDon't include headers already included by system.h:
Jim Meyering [Wed, 23 Jul 2003 07:29:54 +0000 (07:29 +0000)] 
Don't include headers already included by system.h:
Don't include closeout.h.

22 years ago(usage): Don't call close_stdout here.
Jim Meyering [Fri, 18 Jul 2003 08:38:43 +0000 (08:38 +0000)] 
(usage): Don't call close_stdout here.
(main): Use close_stdout via atexit.
Now `su --version > /dev/full' fails, as it should.
Somehow, the change of 2000-05-07 that purports to fix this
was not checked in.

22 years ago(main): Call initialize_main.
Jim Meyering [Tue, 17 Jun 2003 18:13:23 +0000 (18:13 +0000)] 
(main): Call initialize_main.

22 years agoRemove anachronistic casts of xmalloc,
Jim Meyering [Fri, 11 Apr 2003 10:51:56 +0000 (10:51 +0000)] 
Remove anachronistic casts of xmalloc,
xrealloc, and xcalloc return values and of xrealloc's first argument.

23 years agoChange `exit (0)' to `exit (EXIT_SUCCESS)',
Jim Meyering [Sat, 31 Aug 2002 08:52:10 +0000 (08:52 +0000)] 
Change `exit (0)' to `exit (EXIT_SUCCESS)',
`exit (1)' to `exit (EXIT_FAILURE)', and
`usage (1)' to `usage (EXIT_FAILURE)'.

23 years agoChange `error (1, ...' to `error (EXIT_FAILURE, ...'.
Jim Meyering [Fri, 30 Aug 2002 23:04:53 +0000 (23:04 +0000)] 
Change `error (1, ...' to `error (EXIT_FAILURE, ...'.

23 years ago(run_shell): Exit with status 126 or 127 when execvp or
Jim Meyering [Thu, 1 Aug 2002 09:19:24 +0000 (09:19 +0000)] 
(run_shell): Exit with status 126 or 127 when execvp or
execv fails, for consistency with POSIX commands like env and nice.

23 years ago(usage): Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it.
Jim Meyering [Tue, 2 Jul 2002 09:09:10 +0000 (09:09 +0000)] 
(usage): Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it.

24 years agoUse new macros, HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTION
Jim Meyering [Sat, 15 Dec 2001 20:46:30 +0000 (20:46 +0000)] 
Use new macros, HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTION
instead of hard-coding --help and --version descriptions.
Split --help output into smaller pieces.
Use fputs, not printf.

24 years ago(xputenv): Remove parameter's const qualifier.
Jim Meyering [Tue, 14 Aug 2001 07:18:34 +0000 (07:18 +0000)] 
(xputenv): Remove parameter's const qualifier.

24 years agoInclude "dirname.h".
Jim Meyering [Sat, 12 May 2001 16:05:51 +0000 (16:05 +0000)] 
Include "dirname.h".
(base_name): Remove decl; now in dirname.h.

25 years agoback out last, prematurely-committed, change
Jim Meyering [Sun, 7 Jan 2001 16:07:33 +0000 (16:07 +0000)] 
back out last, prematurely-committed, change

25 years agoCorrect the indentation of an `#endif'.
Jim Meyering [Sun, 7 Jan 2001 16:06:27 +0000 (16:06 +0000)] 
Correct the indentation of an `#endif'.

25 years ago(xputenv): Invoke xalloc_die instead of printing our own message.
Jim Meyering [Mon, 7 Aug 2000 16:50:11 +0000 (16:50 +0000)] 
(xputenv): Invoke xalloc_die instead of printing our own message.

25 years agoInclude <sys/param.h> if HAVE_SYS_PARAM_H is defined,
Jim Meyering [Sun, 23 Jul 2000 16:27:13 +0000 (16:27 +0000)] 
Include <sys/param.h> if HAVE_SYS_PARAM_H is defined,
rather than if _POSIX_VERSION is defined.  Remove declarations of
getpwuid, getgrgid, and getuid, now that they're in sys2.h.

25 years agoInclude "closeout.h".
Jim Meyering [Sun, 7 May 2000 14:48:25 +0000 (14:48 +0000)] 
Include "closeout.h".
(main): Call atexit with close_stdout.

26 years ago(correct_password): Correct HAVE_STRUCT_* name in #if guard
Jim Meyering [Wed, 9 Feb 2000 11:57:01 +0000 (11:57 +0000)] 
(correct_password): Correct HAVE_STRUCT_* name in #if guard
to go along with corrected autoconf test:  Reported by G Queri.

26 years ago(correct_password): Guard with `HAVE_GETSPNAM && HAVE_STRUCT_PASSWD_SP_PWDP',
Jim Meyering [Sun, 30 Jan 2000 22:23:58 +0000 (22:23 +0000)] 
(correct_password): Guard with `HAVE_GETSPNAM && HAVE_STRUCT_PASSWD_SP_PWDP',
rather than just `#ifdef HAVE_SHADOW_H'.

26 years agoRemove declaration of xstrdup.
Jim Meyering [Wed, 8 Sep 1999 08:39:49 +0000 (08:39 +0000)] 
Remove declaration of xstrdup.

26 years agosplit a long line.
Jim Meyering [Mon, 30 Aug 1999 14:39:05 +0000 (14:39 +0000)] 
split a long line.

26 years ago(run_shell): Declare with noreturn attribute.
Jim Meyering [Sun, 22 Aug 1999 10:53:13 +0000 (10:53 +0000)] 
(run_shell): Declare with noreturn attribute.
Use an explicit exit(1) rather than doing that through error.

26 years agoNo longer include long-options.h.
Jim Meyering [Wed, 31 Mar 1999 05:52:46 +0000 (05:52 +0000)] 
No longer include long-options.h.
[long_options]: Add entries for --help and --version.
Remove parse_long_options call.
(main) [getopt switch]: Add a case for each of --help and --version.

26 years ago(PROGRAM_NAME, AUTHORS): Define and use.
Jim Meyering [Wed, 31 Mar 1999 04:16:08 +0000 (04:16 +0000)] 
(PROGRAM_NAME, AUTHORS): Define and use.

26 years agoInclude long-options.h.
Jim Meyering [Sat, 6 Mar 1999 15:28:54 +0000 (15:28 +0000)] 
Include long-options.h.
[long_options]: Remove the "help" and "version" entries.
Remove declarations of show_help and show_version.
(main): Use parse_long_options, including author name(s).
Remove the show_version and show_help blocks.

27 years agoupdate copyright dates
Jim Meyering [Tue, 16 Feb 1999 04:17:15 +0000 (04:17 +0000)] 
update copyright dates

27 years ago(usage): Remove static attribute.
Jim Meyering [Mon, 25 Jan 1999 14:33:38 +0000 (14:33 +0000)] 
(usage): Remove static attribute.

27 years agoupdate bug-reporting address
Jim Meyering [Sat, 19 Sep 1998 17:32:35 +0000 (17:32 +0000)] 
update bug-reporting address

27 years ago(longopts): Use corresponding short-option character
Jim Meyering [Sun, 30 Aug 1998 03:12:22 +0000 (03:12 +0000)] 
(longopts): Use corresponding short-option character
in place of `1', and `NULL' in place of pointer in initialization.

28 years agoDon't include limits.h.
Jim Meyering [Sun, 21 Dec 1997 22:22:04 +0000 (22:22 +0000)] 
Don't include limits.h.

28 years agouse NULL, '\0' instead of zeroes
Jim Meyering [Wed, 10 Dec 1997 10:31:25 +0000 (10:31 +0000)] 
use NULL, '\0' instead of zeroes

28 years ago(main): Make sure pw->pw_shell is non-NULL before trying to strdup it.
Jim Meyering [Wed, 10 Dec 1997 10:25:46 +0000 (10:25 +0000)] 
(main): Make sure pw->pw_shell is non-NULL before trying to strdup it.
Patch from Dick Streefland.

28 years agoRemove old-style xmalloc and xrealloc decls.
Jim Meyering [Sat, 25 Oct 1997 22:03:20 +0000 (22:03 +0000)] 
Remove old-style xmalloc and xrealloc decls.

28 years agoupdate bug-reporting address
Jim Meyering [Tue, 7 Oct 1997 23:51:39 +0000 (23:51 +0000)] 
update bug-reporting address

28 years agoindent
Jim Meyering [Sun, 13 Jul 1997 03:10:15 +0000 (03:10 +0000)] 
indent

28 years agoRedefine/undef getusershell around inclusion of <unistd.h>
Jim Meyering [Sat, 5 Jul 1997 08:25:58 +0000 (08:25 +0000)] 
Redefine/undef getusershell around inclusion of <unistd.h>
(via system.h) so Cray's int-returning prototype doesn't conflict
with our char*-returning one.

28 years agoUse base_name, not basename.
Jim Meyering [Tue, 27 May 1997 13:55:23 +0000 (13:55 +0000)] 
Use base_name, not basename.

28 years agocpp-indent
Jim Meyering [Wed, 19 Mar 1997 02:56:54 +0000 (02:56 +0000)] 
cpp-indent
Change a few #ifdef to #if.
Remove 3 spurious #ifdef that were guarding an #undef each.

28 years ago(log_su): Resort to getpwuid if getlogin fails.
Jim Meyering [Tue, 18 Mar 1997 12:49:20 +0000 (12:49 +0000)] 
(log_su): Resort to getpwuid if getlogin fails.
If no tty name is found, use `none' in the log message.
Based on a patch from Galen Hazelwood.

29 years agoupdate copyrights for 1997
Jim Meyering [Sun, 9 Feb 1997 04:54:16 +0000 (04:54 +0000)] 
update copyrights for 1997

29 years agobracket bug address with <> and append a period
Jim Meyering [Sat, 1 Feb 1997 04:23:31 +0000 (04:23 +0000)] 
bracket bug address with <> and append a period

29 years agoCompare getopt_long return value against -1, not EOF. Use NULL, not '(int *) 0'...
Jim Meyering [Sat, 1 Feb 1997 03:05:36 +0000 (03:05 +0000)] 
Compare getopt_long return value against -1, not EOF.  Use NULL, not '(int *) 0' as last parameter in getopt_long call.

29 years ago[HAVE_PATHS_H]: Include <paths.h>.
Jim Meyering [Thu, 19 Dec 1996 04:20:53 +0000 (04:20 +0000)] 
[HAVE_PATHS_H]: Include <paths.h>.
[_PATH_DEFPATH]: Use this to define DEFAULT_LOGIN_PATH.
[_PATH_DEFPATH_ROOT]: Use this to define DEFAULT_ROOT_LOGIN_PATH.
From Rik Faith.

29 years agochange bug-reporting address
Jim Meyering [Sun, 3 Nov 1996 03:16:27 +0000 (03:16 +0000)] 
change bug-reporting address

29 years agochange bug-reporting address
Jim Meyering [Sat, 2 Nov 1996 20:44:15 +0000 (20:44 +0000)] 
change bug-reporting address

29 years ago(main): update --version output to conform to coding standard
Jim Meyering [Sat, 5 Oct 1996 16:37:57 +0000 (16:37 +0000)] 
(main): update --version output to conform to coding standard

29 years ago(usage): Tell where to report bugs.
Jim Meyering [Mon, 2 Sep 1996 15:52:45 +0000 (15:52 +0000)] 
(usage): Tell where to report bugs.

29 years agoupdate Copyright years for 1996
Jim Meyering [Wed, 24 Apr 1996 04:45:54 +0000 (04:45 +0000)] 
update Copyright years for 1996

29 years agoUpdate FSF's address.
Jim Meyering [Sun, 24 Mar 1996 18:33:12 +0000 (18:33 +0000)] 
Update FSF's address.

29 years agoProtoize and reorder functions.
Jim Meyering [Sun, 24 Mar 1996 17:43:41 +0000 (17:43 +0000)] 
Protoize and reorder functions.

29 years ago(main): Declare to be of type int, not void.
Jim Meyering [Thu, 21 Mar 1996 22:47:02 +0000 (22:47 +0000)] 
(main): Declare to be of type int, not void.

29 years agoDon't include version.h.
Jim Meyering [Sat, 16 Mar 1996 16:14:26 +0000 (16:14 +0000)] 
Don't include version.h.
(main): Use PACKAGE_VERSION instead of version_string.

29 years ago(main): Initialize for internationalized message support:
Jim Meyering [Tue, 12 Mar 1996 23:49:29 +0000 (23:49 +0000)] 
(main): Initialize for internationalized message support:
call setlocale, bindtextdomain, and textdomain.

30 years agoRemove NGROUPS_MAX junk. It wasn't being used.
Jim Meyering [Sat, 6 Jan 1996 06:10:08 +0000 (06:10 +0000)] 
Remove NGROUPS_MAX junk.  It wasn't being used.

30 years agos/non-zero/nonzero/g
Jim Meyering [Mon, 27 Nov 1995 05:34:31 +0000 (05:34 +0000)] 
s/non-zero/nonzero/g

30 years agoIndent cpp directives.
Jim Meyering [Sat, 18 Nov 1995 06:17:07 +0000 (06:17 +0000)] 
Indent cpp directives.

30 years agoAnnotate localizable strings with _(...). From Franc,ois.
Jim Meyering [Tue, 8 Aug 1995 04:37:34 +0000 (04:37 +0000)] 
Annotate localizable strings with _(...).  From Franc,ois.

30 years ago(usage): Add one- and two-line descriptions to --help output.
Jim Meyering [Mon, 15 May 1995 04:53:56 +0000 (04:53 +0000)] 
(usage): Add one- and two-line descriptions to --help output.
From Karl.

30 years agoadd 1995 to Copyright dates
Jim Meyering [Thu, 9 Mar 1995 22:33:05 +0000 (22:33 +0000)] 
add 1995 to Copyright dates

31 years ago(correct_password): Use memset instead of bzero.
Jim Meyering [Mon, 27 Feb 1995 14:09:10 +0000 (14:09 +0000)] 
(correct_password): Use memset instead of bzero.

31 years ago* src/*.c: Include "error.h" instead of simply declaring
Jim Meyering [Tue, 20 Dec 1994 05:26:44 +0000 (05:26 +0000)] 
* src/*.c: Include "error.h" instead of simply declaring
`void error ();'.

31 years ago.
Jim Meyering [Tue, 11 Oct 1994 01:56:53 +0000 (01:56 +0000)] 
.

31 years ago.
Jim Meyering [Sat, 1 Oct 1994 02:52:05 +0000 (02:52 +0000)] 
.

31 years agomerge with 1.10n2
Jim Meyering [Tue, 27 Sep 1994 22:02:00 +0000 (22:02 +0000)] 
merge with 1.10n2

31 years ago.
Jim Meyering [Sun, 25 Sep 1994 02:25:20 +0000 (02:25 +0000)] 
.

31 years ago.
Jim Meyering [Sun, 18 Sep 1994 00:28:34 +0000 (00:28 +0000)] 
.

31 years ago.
Jim Meyering [Wed, 3 Aug 1994 15:28:30 +0000 (15:28 +0000)] 
.

31 years ago.
Jim Meyering [Wed, 3 Aug 1994 15:21:03 +0000 (15:21 +0000)] 
.

31 years ago.
Jim Meyering [Tue, 26 Jul 1994 03:44:37 +0000 (03:44 +0000)] 
.

31 years ago.
Jim Meyering [Wed, 20 Apr 1994 00:23:45 +0000 (00:23 +0000)] 
.

32 years ago.
Jim Meyering [Tue, 1 Feb 1994 14:11:50 +0000 (14:11 +0000)] 
.

32 years agomerge with 1.9
Jim Meyering [Tue, 9 Nov 1993 13:21:32 +0000 (13:21 +0000)] 
merge with 1.9

32 years agomerge with 1.8.1i
Jim Meyering [Tue, 26 Oct 1993 00:11:14 +0000 (00:11 +0000)] 
merge with 1.8.1i

32 years agomerge with 1.8.1h
Jim Meyering [Sun, 24 Oct 1993 21:30:08 +0000 (21:30 +0000)] 
merge with 1.8.1h

32 years agomerge with 1.8.1g
Jim Meyering [Sun, 17 Oct 1993 03:57:04 +0000 (03:57 +0000)] 
merge with 1.8.1g

32 years agomerge with 1.8.1d
Jim Meyering [Tue, 12 Oct 1993 14:49:11 +0000 (14:49 +0000)] 
merge with 1.8.1d

32 years agomerge with 1.8.1b
Jim Meyering [Tue, 12 Oct 1993 01:52:24 +0000 (01:52 +0000)] 
merge with 1.8.1b

32 years agomerge with 1.8.1 + partial --version and --help
Jim Meyering [Wed, 8 Sep 1993 18:23:12 +0000 (18:23 +0000)] 
merge with 1.8.1 + partial --version and --help

33 years agoConvert static declarations of struct option to use new macros from
Jim Meyering [Wed, 2 Dec 1992 18:51:53 +0000 (18:51 +0000)] 
Convert static declarations of struct option to use new macros from
getopt.h: no_argument, required_argument, and optional_argument.

33 years agoall files: make most variables static and const when possible.
Jim Meyering [Thu, 12 Nov 1992 04:14:54 +0000 (04:14 +0000)] 
all files: make most variables static and const when possible.
declare lots of functions static.

33 years agoMake still more file-scope variables `static'.
Jim Meyering [Sun, 1 Nov 1992 07:01:40 +0000 (07:01 +0000)] 
Make still more file-scope variables `static'.

33 years agoInitial revision
Jim Meyering [Sun, 1 Nov 1992 05:44:29 +0000 (05:44 +0000)] 
Initial revision

33 years agoInitial revision
Jim Meyering [Sat, 31 Oct 1992 20:42:48 +0000 (20:42 +0000)] 
Initial revision