summaryrefslogtreecommitdiff
path: root/utils/login.c
AgeCommit message (Collapse)Author
2014-12-10Replace `bzero' with `memset'Justus Winter
For reference, this patch was created using the following semantic patch, and then manually applying the change in all functions containing nested functions, as those are not supported by Coccinelle. @@ expression A, B; @@ - bzero (A, B) + memset (A, 0, B) * auth/auth.c: Replace `bzero' with `memset'. * boot/boot.c: Likewise. * defpager/defpager.c: Likewise. * exec/exec.c: Likewise. Also, drop `safe_bzero' and just use `hurd_safe_memset' directly. * ext2fs/ext2fs.c: Likewise. * ext2fs/getblk.c: Likewise. * ext2fs/pager.c: Likewise. * fatfs/pager.c: Likewise. * ftpfs/dir.c: Likewise. * ftpfs/netfs.c: Likewise. * isofs/inode.c: Likewise. * isofs/pager.c: Likewise. * libdiskfs/file-getfh.c: Likewise. * libdiskfs/file-statfs.c: Likewise. * libfshelp/fetch-root.c: Likewise. * libfshelp/start-translator.c: Likewise. * libftpconn/create.c: Likewise. * libftpconn/open.c: Likewise. * libftpconn/unix.c: Likewise. * libpipe/pipe.c: Likewise. * libps/procstat.c: Likewise. * libps/spec.c: Likewise. * libshouldbeinlibc/cacheq.c: Likewise. * libshouldbeinlibc/idvec.c: Likewise. * libshouldbeinlibc/ugids.c: Likewise. * libstore/argp.c: Likewise. * libstore/enc.c: Likewise. * libstore/kids.c: Likewise. * libthreads/alpha/thread.c: Likewise. * libtreefs/fsys.c: Likewise. * libtrivfs/file-statfs.c: Likewise. * mach-defpager/default_pager.c: Likewise. * pfinet/glue-include/asm/uaccess.h: Likewise. * pfinet/io-ops.c: Likewise. * pfinet/options.c: Likewise. * pfinet/socket.c: Likewise. * pfinet/timer-emul.c: Likewise. * pflocal/io.c: Likewise. * startup/startup.c: Likewise. * storeio/storeio.c: Likewise. * sutils/fstab.c: Likewise. * usermux/usermux.c: Likewise. * utils/fakeauth.c: Likewise. * utils/frobauth.c: Likewise. * utils/login.c: Likewise. * utils/x.c: Likewise.
2014-11-02Fix proc_getprocinfo callsSamuel Thibault
The deallocation also needs to be fixed. Also, fetch_procinfo already took care of the conversion. * exec/elfcore.c (dump_core): Fix procinfoCnt taken from proc_getprocinfo. * utils/login.c (check_owned): Likewise. * libps/procstat.c (merge_procinfo): Remove conversion between bytes and int, already handled by fetch_procinfo.
2014-11-02Fix proc_getprocinfo callsSamuel Thibault
The procinfoCnt argument is the number of elements of the procinfo_t array, not its size in bytes. * exec/elfcore.c (dump_core): Fix procinfoCnt given to proc_getprocinfo. * libps/procstat.c (merge_procinfo): Likewise. * utils/login.c (check_owned): Likewise.
2011-08-20fix common misspellingsJonathan Neuschäfer
* Fix spelling with codespell[1] and manually review it. [1] http://git.profusion.mobi/cgit.cgi/lucas/codespell/
2011-01-16Fix child lookups relative to new homedirSamuel Thibault
* utils/login.c (main): Update `ports[INIT_PORT_CWDIR]' as soon as new cwd is determined according to HOME, since child lookups need to be relative to new homedir (e.g. for .hushlogin).
2011-01-16Fix comment typoSamuel Thibault
* utils/login.c (main): Fix comment typo.
2004-03-182004-03-09 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann
* login.c (main): Remove extern declaration and invocation of _argp_unlock_xxx.
2002-05-282002-05-28 Roland McGrath <roland@frob.com>Roland McGrath
* pids.c (add_fn_pids): unsigned -> size_t * w.c (add_utmp_procs): Likewise. * login.c (add_canonical_host): Likewise. * ps.c (main): Likewise. * login.c (add_entry, main): Likewise. * settrans.c (main): int -> size_t * showtrans.c (main): Likewise. * fsysopts.c (main): Likewise. * vmstat.c (main): Use int for FWIDTHS. * ping.c (main): size_t -> socklen_t * fakeauth.c (S_auth_getids, S_auth_makeauth, S_auth_server_authenticate): u_int -> size_t * showtrans.c (main): Cast field width/precision args to int.
1999-09-221999-09-23 Mark Kettenis <kettenis@gnu.org>Roland McGrath
* login.c (main): Pass controlling terminal ID port to the child.
1999-07-111999-07-10 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath
* pids.c: Add #include <sys/mman.h> for munmap decl. * showtrans.c: Likewise. * login.c: Likewise. * storeread.c: Likewise. * msgport.c: Likewise.
1999-07-031999-07-03 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell
* login.c (cat): Use munmap instead of vm_deallocate. (check_owned): Likewise. (kill_login): Likewise. * storeread.c (main): Likewise. * showtrans.c (main): Likewise. * pids.c (add_fn_pids): Likewise. * msgport.c (cmd_getenv): Likewise.
1999-06-231999-06-21 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath
* login.c (main): For no-uids shell, default SH_ARG0 to informative value. Use asprintf to construct it.
1999-03-12Fri Mar 12 15:22:02 1999 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell
* login.c (add_utmp_entry): Properly call setutent and endutent around the getutline call.
1999-02-19Fri Feb 19 02:43:11 1999 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell
* login.c (main): Correctly implement -f instead of always acting as if it were set.
1999-02-19Fri Feb 19 02:43:11 1999 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell
* login.c (main): When transitioning from no UID's to having UID's create a new session like normal. Reported by Mark M. Kettenis <kettenis@wins.uva.nl>.
1999-02-101999-02-06 Mark Kettenis <kettenis@gnu.org>Thomas Bushnell
* login.c (main): If no effective uid, really use first auxiliary uid to use as password entry to get parameters from.
1998-07-201998-07-20 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath
* ps.c (main): Fix return type to int, and use return. * ids.c (main): Likewise. * w.c (main): Likewise. * login.c (main): Likewise. * settrans.c (main): Likewise. * showtrans.c (main): Likewise. * fsysopts.c (main): Likewise. * storeinfo.c (main): Likewise.
1997-09-29(main):Miles Bader
Use ugids_verify_make_auth instead of ugids_verify and ugids_make_auth.
1997-05-27(child_argps):Miles Bader
New variable. (main): Use ugids operations instead of doing [ug]id frobbing ourselves. (options): Remove uid/gid args. <ugids.h>: New include.
1997-05-15(main: verify_passwd):Miles Bader
Add user-in-group-0-can-use-his-own-password-to-su hack.
1997-04-16Wed Apr 16 15:59:41 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>Thomas Bushnell
* login.c (add_utmp_entry): Revert change of December 10, 1996.
1997-04-16Tue Dec 10 11:40:04 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>Thomas Bushnell
* login.c (add_utmp_entry): ut_addr has changed to be an array; stash the IP address in the first slot.
1997-02-20(argp_program_version): Make const.Miles Bader
1997-02-06(main):Miles Bader
Deal with crypt failing.
1997-02-06(main):Miles Bader
Look for NOBODY in ARGS_DEFS too, and use a last ditch default if we can't find it anywhere.
1996-09-25(main:verify_passwd):Miles Bader
Only declare reference to crypt weak if HAVE_CRYPT isn't defined.
1996-09-05*** empty log message ***Thomas Bushnell
1996-08-27(doc): Add program description.Miles Bader
1996-08-01(main/verify_passwd): Use #pragma weak instead of __attribute__ ((weak)).Miles Bader
(options): Change --inherit-environ to --preserve-environment. Change --no-environ to --no-environment-args. Change --environ to --envvar and --environ-default to --envvar-default.
1996-07-31*** empty log message ***Thomas Bushnell
1996-07-30*** empty log message ***Thomas Bushnell
1996-07-30*** empty log message ***Thomas Bushnell
1996-07-17(main): If chown fails, print error message using errno, not -1.Michael I. Bushnell
1996-07-13(dog):Miles Bader
Get rid of `Beware of dog' -- it can't ever happen. Rename watch_login calls to check_login; don't use return value. (check_login): Renamed from watch_login. Change type to void. Exit if there's no such process.
1996-07-12(main): Only start a watchdog timer if in a new login coll.Miles Bader
(watch_login): New function. (dog): Use watch_login. Get rid of wierd rules for root-gone-away.
1996-07-06(argp_program_version): New variable.Miles Bader
1996-07-06(add_utmp_entry): Pass the the basename of TTY to getutline.Miles Bader
1996-07-02(dog):Miles Bader
Include all args in the asprintf. Put the ARGV message in parens.
1996-07-01(kill_login): Don't kill dog.Miles Bader
(dog): Take new ARGV argument, and record status in it for ps. (main): Pass ARGV to dog. (add_utmp_entry): Always fill in UTMP.ut_line. Set UTMP.ut_type.
1996-06-20(main): No need for EXEC_NEWTASK or EXEC_SECURE.Michael I. Bushnell
1996-06-19(hurd_file_name_path_lookup): Declaration removed.Miles Bader
(main: child_lookup): Pass 0 for new LOOKUP arg to hurd_file_name_path_lookup. (get_utmp_host): Function removed. (add_utmp_entry): Get rid of TTY_FD parameter. Don't search for the tty unless we need it to get the old host, since login does it for us. Also use the `existing host' in the case that a new one isn't specified. (main): Update call to add_utmp_entry.
1996-06-11(dog): Don't print stupid message if login session is empty.Miles Bader
(add_utmp_entry): Use gettimeofday instead of time to get the time.
1996-05-28(check_owned): Return OWNED, not NOTOWNED.Miles Bader
1996-05-28(main): Fetch the parent uids before checking their number.Miles Bader
(dog): Don't kill session if the user logged in! Print newline before message.
1996-05-15(main): Fork login timeout watchdog before clearing the process owner.Miles Bader
1996-05-15(dog): Use error to print messages. Use pretty time fmting.Miles Bader
1996-05-14(main): Only allow real users to make new login collections.Miles Bader
1996-05-13(main):Miles Bader
Only add utmp entry for session leader. Clear process owner if no uids. Fork self-destruct timer when appropiate. (default_args): Add NOAUTH_TIMEOUT entry. (check_owned, kill_login, dog): New functions. (options, main): Remove -z/--no-utmp option.
1996-05-11(parse_opt): Use ARGP_ERR_UNKNOWN instead of EINVAL.Miles Bader
1996-05-10(main): Remove const cast from first arg to argz_create.Miles Bader
(main): Remove const from decl of USER & ARG. (fail): Remove const from decl of VIA.