summaryrefslogtreecommitdiffstats
path: root/src/util/pty/sane_hostname.c
Commit message (Collapse)AuthorAgeFilesLines
* Move pty library from util/pty to appl/libpty; update Makefile.in andKen Raeburn2006-04-111-116/+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
* * sane_hostname.c (pty_make_sane_hostname): Always initialize "ai"Ken Raeburn2002-05-251-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14450 dc483132-0cff-0310-8789-dd5450dbe970
* Change approach for getaddrinfo support. Now, only fake-addrinfo.h isKen Raeburn2002-03-261-2/+1
| | | | | | | | | | | | included, no magic macros need to be defined, and no special care needs to be taken to identify a unique object file used in all builds of a library/program. All defined functions (if any) are static in each object file, and declared inline under gcc so they can be more easily eliminated. Simplifies maintenance, and worst case should add no more than a few KB to libraries and programs. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14291 dc483132-0cff-0310-8789-dd5450dbe970
* * sane_hostname.c (pty_make_sane_hostname): Do not declare addrbufEzra Peisach2001-10-181-1/+0
| | | | | | twice, shadowing the first declaration. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13819 dc483132-0cff-0310-8789-dd5450dbe970
* add commentKen Raeburn2001-08-311-0/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13705 dc483132-0cff-0310-8789-dd5450dbe970
* use fake-addrinfo, get rid of non-getnameinfo supportKen Raeburn2001-08-301-82/+17
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13694 dc483132-0cff-0310-8789-dd5450dbe970
* * sane_hostname.c (pty_make_sane_hostname): Preserve constEzra Peisach2001-05-031-1/+1
| | | | | | property of incomming parameter in casts. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13228 dc483132-0cff-0310-8789-dd5450dbe970
* * cleanup.c (pty_cleanup): Delcare local variable only ifEzra Peisach2001-05-031-1/+5
| | | | | | | | | | | | | | | VHANG_LAST defined. * logwtmp.c (pty_logwtmp): Only declare local variables if logwtmp() not available on system. * sane_hostname.c (sockaddrlen): Only define static function if HAVE_GETNAMEINFO defined. (pty_make_sane_hostname) Declare goto target only if code compiled in. gcc warning cleanups git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13227 dc483132-0cff-0310-8789-dd5450dbe970
* * configure.in: Many changes to support the rewriting of the utmpTom Yu2001-04-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* * sane_hostname.c: Switch off of KRB5_USE_INET6 instead ofTom Yu2001-01-131-2/+3
| | | | | | | AF_INET6, which may be defined without a corresponding struct sockaddr_in6. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12901 dc483132-0cff-0310-8789-dd5450dbe970
* Use const sockaddr pointer in interface.Ken Raeburn2000-12-061-14/+78
| | | | | | Use get{name,addr}info if available, to pick up IPv6 support. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12884 dc483132-0cff-0310-8789-dd5450dbe970
* make pty_make_sane_hostname take sockaddr* arg instead of sockaddr_in*Ken Raeburn2000-12-061-6/+13
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12883 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
* * sane_hostname.c (pty_make_sane_hostname): Remove unusedTom Yu1999-02-181-1/+0
| | | | | | "char *scratch". git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11178 dc483132-0cff-0310-8789-dd5450dbe970
* * sane_hostname.c: Re-order so that pty-int.h precedes libpty.h toTom Yu1999-02-171-2/+2
| | | | | | prevent conflicting definitions of struct sockaddr_in git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11174 dc483132-0cff-0310-8789-dd5450dbe970
* * sane_hostname.c: Force maxlen to be 16 if it's less than 16,Tom Yu1999-02-121-1/+2
| | | | | | since otherwise a numeric IP address won't fit. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11169 dc483132-0cff-0310-8789-dd5450dbe970
* * Makefile.in: Add sane_hostname.{o,c}Tom Yu1999-02-121-0/+99
* libpty.h: Add prototype for make_sane_hostname. * sane_hostname.c: New file; add function to "sanitize" hostname for logging purposes. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11165 dc483132-0cff-0310-8789-dd5450dbe970