summaryrefslogtreecommitdiffstats
path: root/src/util/pty/update_wtmp.c
Commit message (Collapse)AuthorAgeFilesLines
* Move pty library from util/pty to appl/libpty; update Makefile.in andKen Raeburn2006-04-111-127/+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
* * configure.in: Check for system provided getutmp() prototypeEzra Peisach2001-06-111-0/+4
| | | | | | * update_wtmp.c: Provide prototype for getutmp() if needed. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13325 dc483132-0cff-0310-8789-dd5450dbe970
* * update_wtmp.c (ptyint_update_wtmpx): Add missing semi-colon inEzra Peisach2001-05-011-1/+1
| | | | | | code path if PTY_UTMP_E_EXIT and PTY_UTMPX_E_EXIT exist. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13223 dc483132-0cff-0310-8789-dd5450dbe970
* * configure.in: Fix some quoting of shell variables when passingTom Yu2001-04-301-1/+4
| | | | | | | | | | | | | | to "test". Reorder some logic in consistency checks to validate cache variables against "yes" to account for possible empty or nonexistent values. * pty-int.h: Fix conditional prototype of update_wtmp(). * update_wtmp.c: Fix conditional compilation of update_wtmp() to cover the case where we have setutxent() but don't have updwtmpx() and WTMPX_FILE, as is the case on some Linux installations. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13222 dc483132-0cff-0310-8789-dd5450dbe970
* * configure.in: Many changes to support the rewriting of the utmpTom Yu2001-04-281-70/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-3/+6
| | | | | | | | | | | | | | 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_wtmp.c: Don't use updwtmpx() even if it exists for glibc 2.1,Theodore Tso1999-04-141-0/+7
| | | | | | | | since it's the same as updwtmp(), and glibc doesn't define PATH_WTMPX. updwtmpx() is not part of the XPG standard anyway. (Needed for RedHat 6.0.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11357 dc483132-0cff-0310-8789-dd5450dbe970
* * update_wtmp.c: Define WTMPX_FILE to be _PATH_WTMPX in case we'reTom Yu1999-03-281-0/+3
| | | | | | on a system that cleans up the namespace that way. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11323 dc483132-0cff-0310-8789-dd5450dbe970
* Merge V1_0_FREEZE_3 into the mainline. (Note this merge does *not*Theodore Tso1996-12-131-1/+3
| | | | | | include the doc subtree!!) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9632 dc483132-0cff-0310-8789-dd5450dbe970
* Fix bug pointed out by jhawk; we weren't looking for all ptysSam Hartman1996-06-241-3/+3
| | | | | | on SunOS or NetBSD. Also fix Hpux 10 bug with regard to utmpx. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8544 dc483132-0cff-0310-8789-dd5450dbe970
* * dump-utmp.c: New file. Not automatically used by anything, but may be usefulKen Raeburn1996-04-171-8/+16
| | | | | | | | | | | | | | | | 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
* Fix handling so that the username is only written out to wtmpx logout records;Sam Hartman1996-01-161-2/+5
| | | | | | | I know of no systems that write out usernames in DEAD_PROCESS records in wtmp, but can special case them in update_wtmp if they are found. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7323 dc483132-0cff-0310-8789-dd5450dbe970
* Merge in changes between 1.4 and 1.5 in RCS file; this delta is MarkSam Hartman1995-12-141-3/+6
| | | | | | | Eichin's patch to fall back to /usr/adm/wtmp. Somehow, this was lost in 1.6. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7232 dc483132-0cff-0310-8789-dd5450dbe970
* Fix typoSam Hartman1995-10-231-1/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6982 dc483132-0cff-0310-8789-dd5450dbe970
* Incorperate utmpx patch to take advantage of longer utmpx host namesSam Hartman1995-10-211-1/+8
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6979 dc483132-0cff-0310-8789-dd5450dbe970
* Add return statementSam Hartman1995-10-151-6/+8
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6969 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_wtmp.c (ptyint_update_wtmp): If EMPTY is not defined, then setTheodore Tso1995-08-221-0/+4
| | | | | | ut.ut_type to 0 instead. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6565 dc483132-0cff-0310-8789-dd5450dbe970
* * Modify pty_update_utmp so it takes additional parameters instead ofSam Hartman1995-08-071-2/+6
| | | | | | | | | | | | | | 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-13/+11
| | | | | | | 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/+68
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6370 dc483132-0cff-0310-8789-dd5450dbe970