Age | Commit message (Collapse) | Author |
|
|
|
|
|
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.
|
|
Prefer the notation `STREQ (a, b)' over `strcmp (a, b) == 0'.
|
|
(main): Initialize exit_failure to EXIT_FAIL.
(main): Use EXIT_ENOENT and EXIT_CANNOT_INVOKE
rather than roll-your-own symbols or integers.
|
|
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.
|
|
Begin each WRITTEN_BY string with `Written by ' and end it with `.'.
Mark each WRITTEN_BY string as translatable.
|
|
Don't include closeout.h.
|
|
(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.
|
|
|
|
xrealloc, and xcalloc return values and of xrealloc's first argument.
|
|
`exit (1)' to `exit (EXIT_FAILURE)', and
`usage (1)' to `usage (EXIT_FAILURE)'.
|
|
|
|
execv fails, for consistency with POSIX commands like env and nice.
|
|
|
|
instead of hard-coding --help and --version descriptions.
Split --help output into smaller pieces.
Use fputs, not printf.
|
|
|
|
(base_name): Remove decl; now in dirname.h.
|
|
|
|
|
|
|
|
rather than if _POSIX_VERSION is defined. Remove declarations of
getpwuid, getgrgid, and getuid, now that they're in sys2.h.
|
|
(main): Call atexit with close_stdout.
|
|
to go along with corrected autoconf test: Reported by G Queri.
|
|
rather than just `#ifdef HAVE_SHADOW_H'.
|
|
|
|
|
|
Use an explicit exit(1) rather than doing that through error.
|
|
[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.
|
|
|
|
[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.
|
|
|
|
|
|
|
|
in place of `1', and `NULL' in place of pointer in initialization.
|
|
|
|
|
|
Patch from Dick Streefland.
|
|
|
|
|
|
|
|
(via system.h) so Cray's int-returning prototype doesn't conflict
with our char*-returning one.
|
|
|
|
Change a few #ifdef to #if.
Remove 3 spurious #ifdef that were guarding an #undef each.
|
|
If no tty name is found, use `none' in the log message.
Based on a patch from Galen Hazelwood.
|
|
|
|
|
|
*) 0' as last parameter in getopt_long call.
|
|
[_PATH_DEFPATH]: Use this to define DEFAULT_LOGIN_PATH.
[_PATH_DEFPATH_ROOT]: Use this to define DEFAULT_ROOT_LOGIN_PATH.
From Rik Faith.
|
|
|