summaryrefslogtreecommitdiffstats
path: root/src/util/pty/update_utmp.c
Commit message (Collapse)AuthorAgeFilesLines
* Move pty library from util/pty to appl/libpty; update Makefile.in andKen Raeburn2006-04-111-706/+0
| | | | | | configure.in files accordingly. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17887 dc483132-0cff-0310-8789-dd5450dbe970
* Include "com_err.h" instead of <com_err.h>Ken Raeburn2002-06-131-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14503 dc483132-0cff-0310-8789-dd5450dbe970
* * update_utmp.c (PTY_GETUTXENT): Fix typo. Thanks to ShawnTom Yu2001-12-081-2/+5
| | | | | | | Stepper. [fixes krb5-build/1020] [pullup from 1.2.3] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14057 dc483132-0cff-0310-8789-dd5450dbe970
* * update_utmp.c (pty_update_utmp): Remember to chop off leadingTom Yu2001-07-021-7/+14
| | | | | | | | | "/dev/" for the non-sysV case. Handle lseek() returning non-zero yet non-negative values (it usually does... :-), so that we can actually write somewhere not at the beginning of the utmp file if necessary. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13548 dc483132-0cff-0310-8789-dd5450dbe970
* * update_utmp.c (pty_update_utmp): Don't copy host if it's a null pointerKen Raeburn2001-06-281-1/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13524 dc483132-0cff-0310-8789-dd5450dbe970
* * logwtmp.c: Delete code under "#if 0". Fix reversed test forTom Yu2001-05-091-7/+6
| | | | | | | | | | | loggingin. Don't forget to set the ut_tv or ut_time for the entry. * update_utmp.c: Update rant about Tru64; remove fetching of ut_user from old entry. The existence of the old ut_user in the logout entry in wtmp was confusing last. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13237 dc483132-0cff-0310-8789-dd5450dbe970
* * cleanup.c: Call update_utmp() with the correct pid to assist inTom Yu2001-05-081-102/+179
| | | | | | | | | | | | | | | | | | | finding the old utmp entry. * open_ctty.c: Reformat somewhat and revise comment. * open_slave.c: Rework significantly. Primarily, keep a fd open to the slave if we need to reopen the slave device following vhangup() or revoke(), to accommodate various OS quirks. * update_utmp.c: Revise history section somewhat to document more HP-UX brokenness. Search via ut_pid before searching via ut_line. Copy stuff around because entuxent() will clobber some things. * void_assoc.c: Revise comment and reformat somewhat. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13234 dc483132-0cff-0310-8789-dd5450dbe970
* * update_utmp.c (pty_update_utmp): Fix typo (OWRONLY -> O_WRONLY)Ken Raeburn2001-05-021-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13226 dc483132-0cff-0310-8789-dd5450dbe970
* * configure.in: Many changes to support the rewriting of the utmpTom Yu2001-04-281-140/+551
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pieces of libpty. Do a large amount of checking for consistency of various utmp and utmpx APIs as currently understood. See rant in update_utmp.c. * dump-utmp.c: Rewrite; now has capability to use utmp{,x}name() to extract entries from utmp and utmpx files. Adjusts field widths when printing as appropriate. * libpty.h: Update call signature for update_utmp() and logwtmp(); make prototypes unconditional. * logwtmp.c: Rewrite. Use pututline() or pututxline() API whenever possible. * pty-int.h: Update call signatures for update_wtmp{,x}(); make prototypes unconditional. * sane_hostname.c: Use the autoconf-correct macro names. * update_utmp.c: Rewrite. Basically, use functions from the pututline() or pututxline() API whenever possible, to avoid lossage. Inserted large rant about the conjectured history of BSD utmp, sysV utmp, and utmpx, as well as documentation about some known quirks. * update_wtmp.c: Rewrite. Add new function ptyint_logwtmpx() that takes a utmpx rather than a utmp, so it can fail to lose data converting to and from utmp. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13218 dc483132-0cff-0310-8789-dd5450dbe970
* * libpty.h: If SOCK_DGRAM is not defined, provide a definition forEzra Peisach2000-06-261-2/+1
| | | | | | | | | | | | | | struct sockaddr_in to satisfy prototype. (based on similar code in k5-int.h). * update_wtmp.c (ptyint_update_wtmp), update_utmp.c (pty_update_utmp), open_slave.c (pty_open_slave), getpty.c (pty_getpty): conditionalize definition of variables based on code paths that are included. Essentially, clean up many compiler warnings. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12438 dc483132-0cff-0310-8789-dd5450dbe970
* copyright notice updates from 1.1 branchKen Raeburn1999-09-241-1/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11853 dc483132-0cff-0310-8789-dd5450dbe970
* Update dump-utmp from KerbNet 1.2.Ken Raeburn1999-08-031-2/+6
| | | | | | | Add makefile rules for building dump-utmp on request. Fix line id for console on Solaris. (PR561) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11618 dc483132-0cff-0310-8789-dd5450dbe970
* * update_utmp.c (pty_update_utmp): utx.ut_pid is a pid_t, andTom Yu1999-04-241-1/+1
| | | | | | | | ent.ut_pid is sometimes a short; accordingly, use pid rather than ent.ut_pid, which might have gotten truncated. This fixes an Irix problem found by <rbasch@mit.edu>. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11394 dc483132-0cff-0310-8789-dd5450dbe970
* Preliminary fixes for AIX4.3:Sam Hartman1998-07-121-1/+1
| | | | | | | | | | | * Fix static libs on platforms using .a for shared libs * Fix utmp handling for non-hpux platforms with ut_exit different from utmpx. * Include librarymacros in ss configure.in * Remove declarations of h_errno git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10632 dc483132-0cff-0310-8789-dd5450dbe970
* * update_utmp.c (pty_update_utmp): Don't record LOGIN_PROCESSTom Yu1998-04-061-1/+5
| | | | | | entries, as they confuse last on some systems. [pty/569] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10520 dc483132-0cff-0310-8789-dd5450dbe970
* * update_utmp.c (pty_update_utmp): Fix bogus entry ofTom Yu1998-03-121-3/+6
| | | | | | PTY_LOGIN_PROCESS types on BSD-ish systems. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10499 dc483132-0cff-0310-8789-dd5450dbe970
* Merge V1_0_FREEZE_3 into the mainline. (Note this merge does *not*Theodore Tso1996-12-131-0/+6
| | | | | | include the doc subtree!!) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9632 dc483132-0cff-0310-8789-dd5450dbe970
* * update_utmp.c (pty_update_utmp): Handle case where utmp usesEzra Peisach1996-11-151-0/+4
| | | | | | | | | | | ut_exit.e_exit and utmpx uses ut_exit.ut_exit. * configure.in (UT_EXIT_STRUCTURE_DIFFER): If utmpx.h exists, and getutmpx does not exist then test if the ut_exit part of the utmp/utmpx structure is a structure and if their types differ. (e_exit vs. ut_exit). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9422 dc483132-0cff-0310-8789-dd5450dbe970
* update_utmp.c (pty_update_utmp): Add code which attempts to compensateTheodore Tso1996-11-081-0/+12
| | | | | | | | | for systems that don't have getutmpx() configure.in: Check for getutmpx(). Replace calls to AC_FUNC_CHECK with AC_HAVE_FUNCS(). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9349 dc483132-0cff-0310-8789-dd5450dbe970
* * dump-utmp.c: New file. Not automatically used by anything, but may be usefulKen Raeburn1996-04-171-34/+43
| | | | | | | | | | | | | | | | for examining utmp/wtmp files when comparing behavior against system software. * update_utmp.c (pty_update_utmp): Always use id "cons" for console. For HP-UX, omit "kl" prefix. Reindent for readability. * update_wtmp.c (ptyint_update_wtmp): For HP-UX, copy ut_id and ut_type from input utmp structure. Reindent for readability. Wed Mar 27 21:14:33 1996 Marc Horowitz <marc@mit.edu> * init_slave.c (pty_initialize_slave): Spurious signal stuff which did nothing deleted. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7819 dc483132-0cff-0310-8789-dd5450dbe970
* Mainline utmp and login cleanups from hartmans_pty_utmp:Sam Hartman1996-01-191-34/+56
| | | | | | | | * Fix utmp handling on Solaris for wtmpx records * Replace krlogin's SIGURG handler with a call to select squashing Solaris ctrl-c bug * Fix utmp on systems without pututline so ttyslot is only used when it works git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7338 dc483132-0cff-0310-8789-dd5450dbe970
* Deal with CVS not doing what I expected with a branch so the code compiles ↵Sam Hartman1996-01-161-1/+1
| | | | | | | | and works until I merge changes. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7324 dc483132-0cff-0310-8789-dd5450dbe970
* Incorperate utmpx patch to take advantage of longer utmpx host namesSam Hartman1995-10-211-1/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6979 dc483132-0cff-0310-8789-dd5450dbe970
* (gets it to actually build on sunos, and provides a fair guess forMark Eichin1995-09-291-0/+5
| | | | | | | | | | other systems) * update_utmp.c: ultimately fall back to /etc/utmp for UTMP_FILE, if it is still missing after all previous efforts. * update_wtmp.c: /usr/adm/wtmp for WTMP_FILE likewise. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6882 dc483132-0cff-0310-8789-dd5450dbe970
* * update_utmp.c (UTMP_FILE): _PATH_UTMP under NetBSD, notTom Yu1995-08-091-3/+3
| | | | | | | _UTMP_PATH; also fix typo (missing '&' on reference to ent) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6476 dc483132-0cff-0310-8789-dd5450dbe970
* * update_utmp.c (pty_update_utmp): change #ifdef NO_UT_PID toTom Yu1995-08-091-1/+1
| | | | | | #ifndef git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6473 dc483132-0cff-0310-8789-dd5450dbe970
* * update_utmp.c: flush preprocessor directive to left marginTom Yu1995-08-091-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6470 dc483132-0cff-0310-8789-dd5450dbe970
* Pass correct argument to getutmpx()Paul Park1995-08-081-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6469 dc483132-0cff-0310-8789-dd5450dbe970
* * Modify pty_update_utmp so it takes additional parameters instead ofSam Hartman1995-08-071-14/+36
| | | | | | | | | | | | | | struct utmp. * Move pty_update_wtmp to an internal function; pty_update_utmp and pty_logwtmp call it. * Don't include utmp.h or utmpx.h in libpty.h; they don't need it any more. * Don't use pid_t in libpty.h or any interfaces it defines\. We'll have to settle for int. * Add logic so that UTMP_FILE and WTMP_FILE get defined on NetBSD (Actually fairly clean). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6453 dc483132-0cff-0310-8789-dd5450dbe970
* Fix up Copyright notice to have correct year (1995 instead of 1990)Theodore Tso1995-08-041-14/+12
| | | | | | | Remove #include of mit-copyright.h, since we don't include it and its legal value is pretty dubious anyway. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6409 dc483132-0cff-0310-8789-dd5450dbe970
* Check in first version of libptySam Hartman1995-07-311-0/+114
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6370 dc483132-0cff-0310-8789-dd5450dbe970