]> git.ipfire.org Git - thirdparty/util-linux.git/commit
(run_shell): Pass a new n_additional_args arg, so that
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 3 Aug 2004 22:23:25 +0000 (22:23 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 3 Aug 2004 22:23:25 +0000 (22:23 +0000)
commit0c606e84bb378db7da6f2bd690d3d0755d2c1f2f
tree738cfa667138f00eb52f5a753c24cc0712a2fb52
parent179a9823781870d9193e77558a2c6e843971fcae
(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.
login-utils/su.c