From: Michael Neumann Date: Wed, 31 Dec 2008 13:06:40 +0000 (+0000) Subject: Merge branches 'master' and 'suser_to_priv' X-Git-Tag: v2.3.0~172^2~5 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/8a27f1c965140ec72dd069582960c64ba9ecf534?hp=57962f80aecf03c023853992fea471246a0adc3a Merge branches 'master' and 'suser_to_priv' Conflicts: sys/netinet/ip_carp.c sys/platform/pc64/amd64/machdep.c --- diff --git a/Makefile.inc1 b/Makefile.inc1 index 0e35c04fab..a0bcd0b56c 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -124,6 +124,9 @@ DESTDIRBASE?= ${OBJTREE}${.CURDIR} # anyhow, and we need to be able to override it for stage installs .MAKEFLAGS:= ${.MAKEFLAGS:NDESTDIR=*} +# This sets the compiler we use to build the world/kernel with +WORLD_CCVER?= gcc41 + TARGET_ARCH?= ${MACHINE_ARCH} .if ${TARGET_ARCH} == ${MACHINE_ARCH} TARGET?= ${MACHINE} @@ -274,7 +277,9 @@ CROSSENV= MAKEOBJDIRPREFIX=${WORLDDEST} \ MACHINE_ARCH=${TARGET_ARCH} \ MACHINE=${TARGET} \ MACHINE_PLATFORM=${TARGET_PLATFORM} \ - OBJFORMAT_PATH=${CTOOLSDEST} + OBJFORMAT_PATH=${CTOOLSDEST} \ + HOST_CCVER=${HOST_CCVER} \ + CCVER=${WORLD_CCVER} WMAKEENV= ${CROSSENV} \ DESTDIR=${WORLDDEST} \ @@ -762,7 +767,7 @@ bootstrap-tools: usr.bin/cmp usr.bin/xargs usr.bin/id usr.bin/env usr.bin/dirname \ usr.bin/tail \ usr.sbin/chown usr.sbin/mtree usr.sbin/config \ - usr.sbin/btxld usr.sbin/pwd_mkdb usr.sbin/zic usr.sbin/makewhatis \ + usr.sbin/btxld usr.sbin/zic usr.sbin/makewhatis \ gnu/usr.bin/texinfo gnu/usr.bin/grep gnu/usr.bin/sort \ usr.bin/gzip usr.bin/bzip2 usr.bin/mkcsmapper usr.bin/mkesdb ${ECHODIR} "===> ${_tool} (bootstrap-tools)"; \ diff --git a/Makefile_upgrade.inc b/Makefile_upgrade.inc index 7a155cb1fe..e8f0d82b8e 100644 --- a/Makefile_upgrade.inc +++ b/Makefile_upgrade.inc @@ -995,3 +995,10 @@ TO_REMOVE+=/usr/share/examples/cvsup/DragonFly-release1_10-supfile TO_REMOVE+=/usr/share/examples/cvsup/DragonFly-release1_12-supfile TO_REMOVE+=/usr/share/examples/cvsup/DragonFly-release2_0-supfile TO_REMOVE+=/usr/share/examples/cvsup/DragonFly-src-supfile +TO_REMOVE+=/usr/include/pcap-bpf.h +TO_REMOVE+=/etc/rc.d/nfslocking +TO_REMOVE+=/usr/sbin/pmap_dump +TO_REMOVE+=/usr/sbin/pmap_set +TO_REMOVE+=/usr/sbin/portmap +TO_REMOVE+=/usr/share/man/cat8/portmap.8.gz +TO_REMOVE+=/usr/share/man/man8/portmap.8.gz diff --git a/bin/mv/mv.c b/bin/mv/mv.c index cd6d22d6d7..57dc6cd483 100644 --- a/bin/mv/mv.c +++ b/bin/mv/mv.c @@ -44,7 +44,9 @@ #include #include #include +#include #include +#include #include #include #include diff --git a/bin/ps/print.c b/bin/ps/print.c index 71510bd3c8..d5e582c404 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -51,6 +51,7 @@ #include #include #include +#include #include #include #include diff --git a/bin/rm/rm.c b/bin/rm/rm.c index 514b3f1d02..47529b5f2b 100644 --- a/bin/rm/rm.c +++ b/bin/rm/rm.c @@ -45,6 +45,8 @@ #include #include #include +#include +#include #include #include #include diff --git a/contrib/bind-9.3/lib/bind/include/isc/list.h b/contrib/bind-9.3/lib/bind/include/isc/list.h index 4e27eb19ba..f79617ae9e 100644 --- a/contrib/bind-9.3/lib/bind/include/isc/list.h +++ b/contrib/bind-9.3/lib/bind/include/isc/list.h @@ -17,7 +17,12 @@ #ifndef LIST_H #define LIST_H 1 +#ifdef _LIBC +#include +#define INSIST(cond) assert(cond) +#else #include +#endif #define LIST(type) struct { type *head, *tail; } #define INIT_LIST(list) \ diff --git a/contrib/bind-9.3/lib/bind/inet/inet_addr.c b/contrib/bind-9.3/lib/bind/inet/inet_addr.c index b967dc2203..82bbe7ef54 100644 --- a/contrib/bind-9.3/lib/bind/inet/inet_addr.c +++ b/contrib/bind-9.3/lib/bind/inet/inet_addr.c @@ -89,7 +89,7 @@ static const char rcsid[] = "$Id: inet_addr.c,v 1.2.206.2 2004/03/17 00:29:45 ma * Ascii internet address interpretation routine. * The value returned is in network order. */ -u_long +in_addr_t inet_addr(const char *cp) { struct in_addr val; @@ -204,3 +204,14 @@ inet_aton(const char *cp, struct in_addr *addr) { addr->s_addr = htonl(val); return (1); } + +#ifdef _LIBC +/* + * Weak aliases for applications that use certain private entry points, + * and fail to include . + */ +#undef inet_addr +__weak_reference(__inet_addr, inet_addr); +#undef inet_aton +__weak_reference(__inet_aton, inet_aton); +#endif diff --git a/contrib/bind-9.3/lib/bind/inet/inet_cidr_pton.c b/contrib/bind-9.3/lib/bind/inet/inet_cidr_pton.c index 5bfef71ba7..0341c388b2 100644 --- a/contrib/bind-9.3/lib/bind/inet/inet_cidr_pton.c +++ b/contrib/bind-9.3/lib/bind/inet/inet_cidr_pton.c @@ -27,7 +27,12 @@ static const char rcsid[] = "$Id: inet_cidr_pton.c,v 1.2.2.1.8.2 2004/03/17 00:2 #include #include +#ifdef _LIBC +#include +#define INSIST(x) assert(x) +#else #include +#endif #include #include #include diff --git a/contrib/bind-9.3/lib/bind/inet/inet_lnaof.c b/contrib/bind-9.3/lib/bind/inet/inet_lnaof.c index 97b80cffdb..5666be31f5 100644 --- a/contrib/bind-9.3/lib/bind/inet/inet_lnaof.c +++ b/contrib/bind-9.3/lib/bind/inet/inet_lnaof.c @@ -48,11 +48,11 @@ static const char sccsid[] = "@(#)inet_lnaof.c 8.1 (Berkeley) 6/4/93"; * internet address; handles class a/b/c network * number formats. */ -u_long +in_addr_t inet_lnaof(in) struct in_addr in; { - register u_long i = ntohl(in.s_addr); + in_addr_t i = ntohl(in.s_addr); if (IN_CLASSA(i)) return ((i)&IN_CLASSA_HOST); @@ -61,3 +61,12 @@ inet_lnaof(in) else return ((i)&IN_CLASSC_HOST); } + +#ifdef _LIBC +/* + * Weak aliases for applications that use certain private entry points, + * and fail to include . + */ +#undef inet_lnaof +__weak_reference(__inet_lnaof, inet_lnaof); +#endif diff --git a/contrib/bind-9.3/lib/bind/inet/inet_makeaddr.c b/contrib/bind-9.3/lib/bind/inet/inet_makeaddr.c index 6e4ecc37cc..1b013a85e8 100644 --- a/contrib/bind-9.3/lib/bind/inet/inet_makeaddr.c +++ b/contrib/bind-9.3/lib/bind/inet/inet_makeaddr.c @@ -49,7 +49,7 @@ static const char sccsid[] = "@(#)inet_makeaddr.c 8.1 (Berkeley) 6/4/93"; */ struct in_addr inet_makeaddr(net, host) - u_long net, host; + in_addr_t net, host; { struct in_addr a; @@ -64,3 +64,12 @@ inet_makeaddr(net, host) a.s_addr = htonl(a.s_addr); return (a); } + +#ifdef _LIBC +/* + * Weak aliases for applications that use certain private entry points, + * and fail to include . + */ +#undef inet_makeaddr +__weak_reference(__inet_makeaddr, inet_makeaddr); +#endif diff --git a/contrib/bind-9.3/lib/bind/inet/inet_net_pton.c b/contrib/bind-9.3/lib/bind/inet/inet_net_pton.c index abecfc79cd..06eb476ddf 100644 --- a/contrib/bind-9.3/lib/bind/inet/inet_net_pton.c +++ b/contrib/bind-9.3/lib/bind/inet/inet_net_pton.c @@ -27,7 +27,12 @@ static const char rcsid[] = "$Id: inet_net_pton.c,v 1.4.2.1.8.2 2004/03/17 00:29 #include #include +#ifdef _LIBC +#include +#define INSIST(cond) assert(cond) +#else #include +#endif #include #include #include @@ -403,3 +408,12 @@ inet_net_pton(int af, const char *src, void *dst, size_t size) { return (-1); } } + +#ifdef _LIBC +/* + * Weak aliases for applications that use certain private entry points, + * and fail to include . + */ +#undef inet_net_pton +__weak_reference(__inet_net_pton, inet_net_pton); +#endif diff --git a/contrib/bind-9.3/lib/bind/inet/inet_neta.c b/contrib/bind-9.3/lib/bind/inet/inet_neta.c index 325b7ce814..f394122299 100644 --- a/contrib/bind-9.3/lib/bind/inet/inet_neta.c +++ b/contrib/bind-9.3/lib/bind/inet/inet_neta.c @@ -41,7 +41,7 @@ static const char rcsid[] = "$Id: inet_neta.c,v 1.1.206.1 2004/03/09 08:33:33 ma /* * char * * inet_neta(src, dst, size) - * format a u_long network number into presentation format. + * format a in_addr_t network number into presentation format. * return: * pointer to dst, or NULL if an error occurred (check errno). * note: @@ -51,7 +51,7 @@ static const char rcsid[] = "$Id: inet_neta.c,v 1.1.206.1 2004/03/09 08:33:33 ma */ char * inet_neta(src, dst, size) - u_long src; + in_addr_t src; char *dst; size_t size; { @@ -85,3 +85,12 @@ inet_neta(src, dst, size) errno = EMSGSIZE; return (NULL); } + +#ifdef _LIBC +/* + * Weak aliases for applications that use certain private entry points, + * and fail to include . + */ +#undef inet_neta +__weak_reference(__inet_neta, inet_neta); +#endif diff --git a/contrib/bind-9.3/lib/bind/inet/inet_netof.c b/contrib/bind-9.3/lib/bind/inet/inet_netof.c index e887530088..faf4524e5c 100644 --- a/contrib/bind-9.3/lib/bind/inet/inet_netof.c +++ b/contrib/bind-9.3/lib/bind/inet/inet_netof.c @@ -47,11 +47,11 @@ static const char sccsid[] = "@(#)inet_netof.c 8.1 (Berkeley) 6/4/93"; * Return the network number from an internet * address; handles class a/b/c network #'s. */ -u_long +in_addr_t inet_netof(in) struct in_addr in; { - register u_long i = ntohl(in.s_addr); + in_addr_t i = ntohl(in.s_addr); if (IN_CLASSA(i)) return (((i)&IN_CLASSA_NET) >> IN_CLASSA_NSHIFT); @@ -60,3 +60,12 @@ inet_netof(in) else return (((i)&IN_CLASSC_NET) >> IN_CLASSC_NSHIFT); } + +#ifdef _LIBC +/* + * Weak aliases for applications that use certain private entry points, + * and fail to include . + */ +#undef inet_netof +__weak_reference(__inet_netof, inet_netof); +#endif diff --git a/contrib/bind-9.3/lib/bind/inet/inet_network.c b/contrib/bind-9.3/lib/bind/inet/inet_network.c index aaa50c8315..f10558c33a 100644 --- a/contrib/bind-9.3/lib/bind/inet/inet_network.c +++ b/contrib/bind-9.3/lib/bind/inet/inet_network.c @@ -49,14 +49,14 @@ static const char sccsid[] = "@(#)inet_network.c 8.1 (Berkeley) 6/4/93"; * The library routines call this routine to interpret * network numbers. */ -u_long +in_addr_t inet_network(cp) - register const char *cp; + const char *cp; { - register u_long val, base, n, i; - register char c; - u_long parts[4], *pp = parts; - int digit; + in_addr_t val, base, n; + char c; + in_addr_t parts[4], *pp = parts; + int i, digit; again: val = 0; base = 10; digit = 0; @@ -102,3 +102,12 @@ again: } return (val); } + +#ifdef _LIBC +/* + * Weak aliases for applications that use certain private entry points, + * and fail to include . + */ +#undef inet_network +__weak_reference(__inet_network, inet_network); +#endif diff --git a/contrib/bind-9.3/lib/bind/inet/inet_ntoa.c b/contrib/bind-9.3/lib/bind/inet/inet_ntoa.c index 7fad4b8902..31d32a546b 100644 --- a/contrib/bind-9.3/lib/bind/inet/inet_ntoa.c +++ b/contrib/bind-9.3/lib/bind/inet/inet_ntoa.c @@ -60,3 +60,21 @@ inet_ntoa(struct in_addr in) { (void) inet_ntop(AF_INET, &in, ret, sizeof ret); return (ret); } + +#ifdef _LIBC +char * +inet_ntoa_r(struct in_addr in, char *buf, socklen_t size) +{ + + inet_ntop(AF_INET, &in, buf, size); + return (buf); +} + +/* + * Weak aliases for applications that use certain private entry points, + * and fail to include . + */ +#undef inet_ntoa +__weak_reference(__inet_ntoa, inet_ntoa); +__weak_reference(__inet_ntoa_r, inet_ntoa_r); +#endif diff --git a/contrib/bind-9.3/lib/bind/inet/inet_ntop.c b/contrib/bind-9.3/lib/bind/inet/inet_ntop.c index cd502ab758..eefc5214be 100644 --- a/contrib/bind-9.3/lib/bind/inet/inet_ntop.c +++ b/contrib/bind-9.3/lib/bind/inet/inet_ntop.c @@ -35,19 +35,13 @@ static const char rcsid[] = "$Id: inet_ntop.c,v 1.1.2.1.8.2 2005/11/03 23:08:40 #include "port_after.h" -#ifdef SPRINTF_CHAR -# define SPRINTF(x) strlen(sprintf/**/x) -#else -# define SPRINTF(x) ((size_t)sprintf x) -#endif - /* * WARNING: Don't even consider trying to compile this on a system where * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX. */ -static const char *inet_ntop4 __P((const u_char *src, char *dst, size_t size)); -static const char *inet_ntop6 __P((const u_char *src, char *dst, size_t size)); +static const char *inet_ntop4 __P((const u_char *src, char *dst, socklen_t size)); +static const char *inet_ntop6 __P((const u_char *src, char *dst, socklen_t size)); /* char * * inet_ntop(af, src, dst, size) @@ -60,9 +54,9 @@ static const char *inet_ntop6 __P((const u_char *src, char *dst, size_t size)); const char * inet_ntop(af, src, dst, size) int af; - const void *src; - char *dst; - size_t size; + const void * __restrict src; + char * __restrict dst; + socklen_t size; { switch (af) { case AF_INET: @@ -91,16 +85,18 @@ static const char * inet_ntop4(src, dst, size) const u_char *src; char *dst; - size_t size; + socklen_t size; { static const char fmt[] = "%u.%u.%u.%u"; char tmp[sizeof "255.255.255.255"]; + int l; - if (SPRINTF((tmp, fmt, src[0], src[1], src[2], src[3])) >= size) { + l = snprintf(tmp, sizeof(tmp), fmt, src[0], src[1], src[2], src[3]); + if (l <= 0 || (socklen_t) l >= size) { errno = ENOSPC; return (NULL); } - strcpy(dst, tmp); + strlcpy(dst, tmp, size); return (dst); } @@ -114,7 +110,7 @@ static const char * inet_ntop6(src, dst, size) const u_char *src; char *dst; - size_t size; + socklen_t size; { /* * Note that int32_t and int16_t need only be "at least" large enough @@ -185,7 +181,7 @@ inet_ntop6(src, dst, size) tp += strlen(tp); break; } - tp += SPRINTF((tp, "%x", words[i])); + tp += sprintf(tp, "%x", words[i]); } /* Was it a trailing run of 0x00's? */ if (best.base != -1 && (best.base + best.len) == @@ -196,10 +192,19 @@ inet_ntop6(src, dst, size) /* * Check for overflow, copy, and we're done. */ - if ((size_t)(tp - tmp) > size) { + if ((socklen_t)(tp - tmp) > size) { errno = ENOSPC; return (NULL); } strcpy(dst, tmp); return (dst); } + +#ifdef _LIBC +/* + * Weak aliases for applications that use certain private entry points, + * and fail to include . + */ +#undef inet_net_ntop +__weak_reference(__inet_net_ntop, inet_net_ntop); +#endif diff --git a/contrib/bind-9.3/lib/bind/inet/inet_pton.c b/contrib/bind-9.3/lib/bind/inet/inet_pton.c index f18a7b64fd..c1aa9b2cd7 100644 --- a/contrib/bind-9.3/lib/bind/inet/inet_pton.c +++ b/contrib/bind-9.3/lib/bind/inet/inet_pton.c @@ -52,8 +52,8 @@ static int inet_pton6 __P((const char *src, u_char *dst)); int inet_pton(af, src, dst) int af; - const char *src; - void *dst; + const char * __restrict src; + void * __restrict dst; { switch (af) { case AF_INET: @@ -219,3 +219,12 @@ inet_pton6(src, dst) memcpy(dst, tmp, NS_IN6ADDRSZ); return (1); } + +#ifdef _LIBC +/* + * Weak aliases for applications that use certain private entry points, + * and fail to include . + */ +#undef inet_pton +__weak_reference(__inet_pton, inet_pton); +#endif diff --git a/contrib/bind-9.3/lib/bind/inet/nsap_addr.c b/contrib/bind-9.3/lib/bind/inet/nsap_addr.c index a4b98e7c4a..eacd733269 100644 --- a/contrib/bind-9.3/lib/bind/inet/nsap_addr.c +++ b/contrib/bind-9.3/lib/bind/inet/nsap_addr.c @@ -107,3 +107,14 @@ inet_nsap_ntoa(int binlen, const u_char *binary, char *ascii) { *ascii = '\0'; return (start); } + +#ifdef _LIBC +/* + * Weak aliases for applications that use certain private entry points, + * and fail to include . + */ +#undef inet_nsap_addr +__weak_reference(__inet_nsap_addr, inet_nsap_addr); +#undef inet_nsap_ntoa +__weak_reference(__inet_nsap_ntoa, inet_nsap_ntoa); +#endif diff --git a/contrib/bind-9.3/lib/bind/isc/ev_streams.c b/contrib/bind-9.3/lib/bind/isc/ev_streams.c index 64e88b0c00..fdac9b8979 100644 --- a/contrib/bind-9.3/lib/bind/isc/ev_streams.c +++ b/contrib/bind-9.3/lib/bind/isc/ev_streams.c @@ -24,24 +24,30 @@ static const char rcsid[] = "$Id: ev_streams.c,v 1.2.206.2 2004/03/17 00:29:51 m #endif #include "port_before.h" +#ifndef _LIBC #include "fd_setsize.h" +#endif #include #include #include -#include +#include "isc/eventlib.h" +#ifndef _LIBC #include +#endif #include "eventlib_p.h" #include "port_after.h" +#ifndef _LIBC static int copyvec(evStream *str, const struct iovec *iov, int iocnt); static void consume(evStream *str, size_t bytes); static void done(evContext opaqueCtx, evStream *str); static void writable(evContext opaqueCtx, void *uap, int fd, int evmask); static void readable(evContext opaqueCtx, void *uap, int fd, int evmask); +#endif struct iovec evConsIovec(void *buf, size_t cnt) { @@ -53,6 +59,7 @@ evConsIovec(void *buf, size_t cnt) { return (ret); } +#ifndef _LIBC int evWrite(evContext opaqueCtx, int fd, const struct iovec *iov, int iocnt, evStreamFunc func, void *uap, evStreamID *id) @@ -304,3 +311,4 @@ readable(evContext opaqueCtx, void *uap, int fd, int evmask) { if (str->ioDone <= 0 || str->ioDone == str->ioTotal) done(opaqueCtx, str); } +#endif /* !_LIBC */ diff --git a/contrib/bind-9.3/lib/bind/isc/ev_timers.c b/contrib/bind-9.3/lib/bind/isc/ev_timers.c index 11433fbffa..b6df4e3758 100644 --- a/contrib/bind-9.3/lib/bind/isc/ev_timers.c +++ b/contrib/bind-9.3/lib/bind/isc/ev_timers.c @@ -26,12 +26,16 @@ static const char rcsid[] = "$Id: ev_timers.c,v 1.2.2.1.4.5 2004/03/17 02:39:13 /* Import. */ #include "port_before.h" +#ifndef _LIBC #include "fd_setsize.h" +#endif #include +#ifndef _LIBC #include -#include +#endif +#include "isc/eventlib.h" #include "eventlib_p.h" #include "port_after.h" @@ -43,6 +47,9 @@ static const char rcsid[] = "$Id: ev_timers.c,v 1.2.2.1.4.5 2004/03/17 02:39:13 /* Forward. */ +#ifdef _LIBC +static int __evOptMonoTime; +#else static int due_sooner(void *, void *); static void set_index(void *, int); static void free_timer(void *, void *); @@ -58,7 +65,7 @@ typedef struct { struct timespec max_idle; evTimer * timer; } idle_timer; - +#endif /* Public. */ struct timespec @@ -138,12 +145,14 @@ evUTCTime() { return (evTimeSpec(now)); } +#ifndef _LIBC struct timespec evLastEventTime(evContext opaqueCtx) { evContext_p *ctx = opaqueCtx.opaque; return (ctx->lastEventTime); } +#endif struct timespec evTimeSpec(struct timeval tv) { @@ -154,6 +163,7 @@ evTimeSpec(struct timeval tv) { return (ts); } +#if !defined(USE_KQUEUE) || !defined(_LIBC) struct timeval evTimeVal(struct timespec ts) { struct timeval tv; @@ -162,7 +172,9 @@ evTimeVal(struct timespec ts) { tv.tv_usec = ts.tv_nsec / 1000; return (tv); } +#endif +#ifndef _LIBC int evSetTimer(evContext opaqueCtx, evTimerFunc func, @@ -495,3 +507,4 @@ idle_timeout(evContext opaqueCtx, this->timer->inter = evSubTime(this->max_idle, idle); } } +#endif /* !_LIBC */ diff --git a/contrib/bind-9.3/lib/bind/isc/eventlib_p.h b/contrib/bind-9.3/lib/bind/isc/eventlib_p.h index 5c45ab83f6..bf47784a6e 100644 --- a/contrib/bind-9.3/lib/bind/isc/eventlib_p.h +++ b/contrib/bind-9.3/lib/bind/isc/eventlib_p.h @@ -38,9 +38,11 @@ #include #include +#ifndef _LIBC #include #include #include +#endif #define EV_MASK_ALL (EV_READ | EV_WRITE | EV_EXCEPT) #define EV_ERR(e) return (errno = (e), -1) @@ -85,6 +87,7 @@ typedef struct evConn { struct evConn * next; } evConn; +#ifndef _LIBC typedef struct evAccept { int fd; union { @@ -174,6 +177,7 @@ typedef struct evEvent_p { struct { const void *placeholder; } null; } u; } evEvent_p; +#endif /* !_LIBC */ #ifdef USE_POLL typedef struct { @@ -209,6 +213,7 @@ extern void __fd_set(int fd, __evEmulMask *maskp); #endif /* USE_POLL */ +#ifndef _LIBC typedef struct { /* Global. */ const evEvent_p *cur; @@ -273,8 +278,11 @@ void evDestroyTimers(const evContext_p *); /* ev_waits.c */ #define evFreeWait __evFreeWait evWait *evFreeWait(evContext_p *ctx, evWait *old); +#endif /* !_LIBC */ /* Global options */ +#ifndef _LIBC extern int __evOptMonoTime; +#endif /* !_LIBC */ #endif /*_EVENTLIB_P_H*/ diff --git a/contrib/bind-9.3/lib/bind/nameser/ns_print.c b/contrib/bind-9.3/lib/bind/nameser/ns_print.c index cb61cb1add..0ee3a2d70e 100644 --- a/contrib/bind-9.3/lib/bind/nameser/ns_print.c +++ b/contrib/bind-9.3/lib/bind/nameser/ns_print.c @@ -30,8 +30,13 @@ static const char rcsid[] = "$Id: ns_print.c,v 1.3.2.1.4.7 2004/09/16 07:01:12 m #include #include +#ifdef _LIBC +#include +#define INSIST(cond) assert(cond) +#else #include #include +#endif #include #include #include @@ -457,7 +462,11 @@ ns_sprintrrf(const u_char *msg, size_t msglen, goto formerr; /* Key flags, Protocol, Algorithm. */ +#ifndef _LIBC key_id = dst_s_dns_key_id(rdata, edata-rdata); +#else + key_id = 0; +#endif keyflags = ns_get16(rdata); rdata += NS_INT16SZ; protocol = *rdata++; algorithm = *rdata++; diff --git a/contrib/bind-9.3/lib/bind/nameser/ns_samedomain.c b/contrib/bind-9.3/lib/bind/nameser/ns_samedomain.c index d4ca550a7a..a5d039eb2d 100644 --- a/contrib/bind-9.3/lib/bind/nameser/ns_samedomain.c +++ b/contrib/bind-9.3/lib/bind/nameser/ns_samedomain.c @@ -140,6 +140,7 @@ ns_samedomain(const char *a, const char *b) { return (strncasecmp(cp, b, lb) == 0); } +#ifndef _LIBC /* * int * ns_subdomain(a, b) @@ -149,6 +150,7 @@ int ns_subdomain(const char *a, const char *b) { return (ns_samename(a, b) != 1 && ns_samedomain(a, b)); } +#endif /* * int diff --git a/contrib/bind-9.3/lib/bind/resolv/herror.c b/contrib/bind-9.3/lib/bind/resolv/herror.c index 58807e9678..c5266b08cd 100644 --- a/contrib/bind-9.3/lib/bind/resolv/herror.c +++ b/contrib/bind-9.3/lib/bind/resolv/herror.c @@ -55,6 +55,10 @@ static const char rcsid[] = "$Id: herror.c,v 1.2.206.1 2004/03/09 08:33:54 marka #include "port_before.h" +#ifdef _LIBC +#include "namespace.h" +#endif + #include #include #include @@ -66,7 +70,11 @@ static const char rcsid[] = "$Id: herror.c,v 1.2.206.1 2004/03/09 08:33:54 marka #include #include #include +#ifndef _LIBC #include +#else +#include "un-namespace.h" +#endif #include "port_after.h" @@ -110,7 +118,11 @@ herror(const char *s) { DE_CONST("\n", t); v->iov_base = t; v->iov_len = 1; +#ifndef _LIBC writev(STDERR_FILENO, iov, (v - iov) + 1); +#else + _writev(STDERR_FILENO, iov, (v - iov) + 1); +#endif } /* diff --git a/contrib/bind-9.3/lib/bind/resolv/mtctxres.c b/contrib/bind-9.3/lib/bind/resolv/mtctxres.c index 635bbd4400..e9dd65d57a 100644 --- a/contrib/bind-9.3/lib/bind/resolv/mtctxres.c +++ b/contrib/bind-9.3/lib/bind/resolv/mtctxres.c @@ -1,13 +1,18 @@ #include #ifdef DO_PTHREADS #include +#ifdef _LIBC +#include +#endif #endif #include #include #include #include -#include +#include "resolv_mt.h" +#ifndef _LIBC #include +#endif #include #ifdef DO_PTHREADS @@ -40,6 +45,7 @@ _mtctxres_init(void) { } #endif +#ifndef _LIBC /* * To support binaries that used the private MT-safe interface in * Solaris 8, we still need to provide the __res_enable_mt() @@ -49,6 +55,7 @@ int __res_enable_mt(void) { return (-1); } +#endif int __res_disable_mt(void) { @@ -99,6 +106,11 @@ ___mtctxres(void) { #ifdef DO_PTHREADS mtctxres_t *mt; +#ifdef _LIBC + if (pthread_main_np() != 0) + return (&sharedctx); +#endif + /* * This if clause should only be executed if we are linking * statically. When linked dynamically _mtctxres_init() should diff --git a/contrib/bind-9.3/lib/bind/resolv/res_comp.c b/contrib/bind-9.3/lib/bind/resolv/res_comp.c index 8cc99a7628..9daed6f6e6 100644 --- a/contrib/bind-9.3/lib/bind/resolv/res_comp.c +++ b/contrib/bind-9.3/lib/bind/resolv/res_comp.c @@ -261,3 +261,14 @@ u_int32_t _getlong(const u_char *src) { return (ns_get32(src)); } u_int16_t _getshort(const u_char *src) { return (ns_get16(src)); } #endif /*__ultrix__*/ #endif /*BIND_4_COMPAT*/ + +#ifdef _LIBC +/* + * Weak aliases for applications that use certain private entry points, + * and fail to include . + */ +#undef dn_comp +__weak_reference(__dn_comp, dn_comp); +#undef dn_expand +__weak_reference(__dn_expand, dn_expand); +#endif diff --git a/contrib/bind-9.3/lib/bind/resolv/res_data.c b/contrib/bind-9.3/lib/bind/resolv/res_data.c index 204e03d685..1917dd0c0d 100644 --- a/contrib/bind-9.3/lib/bind/resolv/res_data.c +++ b/contrib/bind-9.3/lib/bind/resolv/res_data.c @@ -40,7 +40,9 @@ static const char rcsid[] = "$Id: res_data.c,v 1.1.206.2 2004/03/16 12:34:18 mar #include #include "port_after.h" +#ifndef _LIBC #undef _res +#endif const char *_res_opcodes[] = { "QUERY", @@ -71,11 +73,13 @@ const char *_res_sectioncodes[] = { #endif #ifndef __BIND_NOSTATIC +#ifndef _LIBC struct __res_state _res # if defined(__BIND_RES_TEXT) = { RES_TIMEOUT, } /* Motorola, et al. */ # endif ; +#endif /* !_LIBC */ /* Proto. */ @@ -107,7 +111,11 @@ res_init(void) { if (!_res.retrans) _res.retrans = RES_TIMEOUT; if (!_res.retry) +#ifndef _LIBC _res.retry = 4; +#else + _res.retry = RES_DFLRETRY; +#endif if (!(_res.options & RES_INIT)) _res.options = RES_DEFAULT; @@ -181,6 +189,7 @@ res_query(const char *name, /* domain name */ return (res_nquery(&_res, name, class, type, answer, anslen)); } +#ifndef _LIBC void res_send_setqhook(res_send_qhook hook) { _res.qhook = hook; @@ -190,6 +199,7 @@ void res_send_setrhook(res_send_rhook hook) { _res.rhook = hook; } +#endif int res_isourserver(const struct sockaddr_in *inp) { @@ -206,6 +216,7 @@ res_send(const u_char *buf, int buflen, u_char *ans, int anssiz) { return (res_nsend(&_res, buf, buflen, ans, anssiz)); } +#ifndef _LIBC int res_sendsigned(const u_char *buf, int buflen, ns_tsig_key *key, u_char *ans, int anssiz) @@ -217,6 +228,7 @@ res_sendsigned(const u_char *buf, int buflen, ns_tsig_key *key, return (res_nsendsigned(&_res, buf, buflen, key, ans, anssiz)); } +#endif void res_close(void) { @@ -264,6 +276,14 @@ res_querydomain(const char *name, answer, anslen)); } +#ifdef _LIBC +int +res_opt(int n0, u_char *buf, int buflen, int anslen) +{ + return (res_nopt(&_res, n0, buf, buflen, anslen)); +} +#endif + const char * hostalias(const char *name) { static char abuf[MAXDNAME]; @@ -288,4 +308,27 @@ local_hostname_length(const char *hostname) { } #endif /*ultrix*/ +#ifdef _LIBC +/* + * Weak aliases for applications that use certain private entry points, + * and fail to include . + */ +#undef res_init +__weak_reference(__res_init, res_init); +#undef p_query +__weak_reference(__p_query, p_query); +#undef res_mkquery +__weak_reference(__res_mkquery, res_mkquery); +#undef res_query +__weak_reference(__res_query, res_query); +#undef res_send +__weak_reference(__res_send, res_send); +#undef res_close +__weak_reference(__res_close, _res_close); +#undef res_search +__weak_reference(__res_search, res_search); +#undef res_querydomain +__weak_reference(__res_querydomain, res_querydomain); +#endif + #endif diff --git a/contrib/bind-9.3/lib/bind/resolv/res_debug.c b/contrib/bind-9.3/lib/bind/resolv/res_debug.c index 8dda12c5e8..eaae7a27d8 100644 --- a/contrib/bind-9.3/lib/bind/resolv/res_debug.c +++ b/contrib/bind-9.3/lib/bind/resolv/res_debug.c @@ -113,7 +113,7 @@ static const char rcsid[] = "$Id: res_debug.c,v 1.3.2.5.4.6 2005/07/28 07:43:22 #include #include #include -#include +#include "resolv_mt.h" #include #include #include @@ -375,7 +375,7 @@ const struct res_sym __p_class_syms[] = { /* * Names of message sections. */ -const struct res_sym __p_default_section_syms[] = { +static const struct res_sym __p_default_section_syms[] = { {ns_s_qd, "QUERY", (char *)0}, {ns_s_an, "ANSWER", (char *)0}, {ns_s_ns, "AUTHORITY", (char *)0}, @@ -383,7 +383,7 @@ const struct res_sym __p_default_section_syms[] = { {0, (char *)0, (char *)0} }; -const struct res_sym __p_update_section_syms[] = { +static const struct res_sym __p_update_section_syms[] = { {S_ZONE, "ZONE", (char *)0}, {S_PREREQ, "PREREQUISITE", (char *)0}, {S_UPDATE, "UPDATE", (char *)0}, @@ -1161,3 +1161,24 @@ res_nametotype(const char *buf, int *successp) { *successp = success; return (result); } + +#ifdef _LIBC +/* + * Weak aliases for applications that use certain private entry points, + * and fail to include . + */ +#undef fp_resstat +__weak_reference(__fp_resstat, fp_resstat); +#undef p_fqnname +__weak_reference(__p_fqnname, p_fqnname); +#undef sym_ston +__weak_reference(__sym_ston, sym_ston); +#undef sym_ntos +__weak_reference(__sym_ntos, sym_ntos); +#undef sym_ntop +__weak_reference(__sym_ntop, sym_ntop); +#undef dn_count_labels +__weak_reference(__dn_count_labels, dn_count_labels); +#undef p_secstodate +__weak_reference(__p_secstodate, p_secstodate); +#endif diff --git a/contrib/bind-9.3/lib/bind/resolv/res_findzonecut.c b/contrib/bind-9.3/lib/bind/resolv/res_findzonecut.c index 804beb6474..e8c18f9a66 100644 --- a/contrib/bind-9.3/lib/bind/resolv/res_findzonecut.c +++ b/contrib/bind-9.3/lib/bind/resolv/res_findzonecut.c @@ -39,7 +39,7 @@ static const char rcsid[] = "$Id: res_findzonecut.c,v 1.2.2.3.4.4 2005/10/11 00: #include #include -#include +#include "isc/list.h" #include "port_after.h" @@ -149,6 +149,7 @@ static void res_dprintf(const char *, ...) ISC_FORMAT_PRINTF(1, 2); * keep going. for the NS and A queries this means we just give up. */ +#ifndef _LIBC int res_findzonecut(res_state statp, const char *dname, ns_class class, int opts, char *zname, size_t zsize, struct in_addr *addrs, int naddrs) @@ -173,6 +174,7 @@ res_findzonecut(res_state statp, const char *dname, ns_class class, int opts, free(u); return (result); } +#endif int res_findzonecut2(res_state statp, const char *dname, ns_class class, int opts, diff --git a/contrib/bind-9.3/lib/bind/resolv/res_init.c b/contrib/bind-9.3/lib/bind/resolv/res_init.c index fd82e87203..004d459fbb 100644 --- a/contrib/bind-9.3/lib/bind/resolv/res_init.c +++ b/contrib/bind-9.3/lib/bind/resolv/res_init.c @@ -75,6 +75,9 @@ static const char rcsid[] = "$Id: res_init.c,v 1.9.2.5.4.6 2006/08/30 23:23:01 m #include "port_before.h" +#ifdef _LIBC +#include "namespace.h" +#endif #include #include #include @@ -90,7 +93,9 @@ static const char rcsid[] = "$Id: res_init.c,v 1.9.2.5.4.6 2006/08/30 23:23:01 m #include #include #include - +#ifdef _LIBC +#include "un-namespace.h" +#endif #include "port_after.h" /* ensure that sockaddr_in6 and IN6ADDR_ANY_INIT are declared / defined */ @@ -246,7 +251,7 @@ __res_vinit(res_state statp, int preinit) { #endif /* SOLARIS2 */ /* Allow user to override the local domain definition */ - if ((cp = getenv("LOCALDOMAIN")) != NULL) { + if (issetugid() == 0 && (cp = getenv("LOCALDOMAIN")) != NULL) { (void)strncpy(statp->defdname, cp, sizeof(statp->defdname) - 1); statp->defdname[sizeof(statp->defdname) - 1] = '\0'; haveenv++; @@ -383,6 +388,10 @@ __res_vinit(res_state statp, int preinit) { #ifdef RESOLVSORT if (MATCH(buf, "sortlist")) { struct in_addr a; + struct in6_addr a6; + int m, i; + u_char *u; + struct __res_state_ext *ext = statp->_u._ext.ext; cp = buf + sizeof("sortlist") - 1; while (nsort < MAXRESOLVSORT) { @@ -417,6 +426,57 @@ __res_vinit(res_state statp, int preinit) { statp->sort_list[nsort].mask = net_mask(statp->sort_list[nsort].addr); } + ext->sort_list[nsort].af = AF_INET; + ext->sort_list[nsort].addr.ina = + statp->sort_list[nsort].addr; + ext->sort_list[nsort].mask.ina.s_addr = + statp->sort_list[nsort].mask; + nsort++; + } + else if (inet_pton(AF_INET6, net, &a6) == 1) { + + ext->sort_list[nsort].af = AF_INET6; + ext->sort_list[nsort].addr.in6a = a6; + u = (u_char *)&ext->sort_list[nsort].mask.in6a; + *cp++ = n; + net = cp; + while (*cp && *cp != ';' && + isascii(*cp) && !isspace(*cp)) + cp++; + m = n; + n = *cp; + *cp = 0; + switch (m) { + case '/': + m = atoi(net); + break; + case '&': + if (inet_pton(AF_INET6, net, u) == 1) { + m = -1; + break; + } + /*FALLTHROUGH*/ + default: + m = sizeof(struct in6_addr) * CHAR_BIT; + break; + } + if (m >= 0) { + for (i = 0; i < sizeof(struct in6_addr); i++) { + if (m <= 0) { + *u = 0; + } else { + m -= CHAR_BIT; + *u = (u_char)~0; + if (m < 0) + *u <<= -m; + } + u++; + } + } + statp->sort_list[nsort].addr.s_addr = + (u_int32_t)0xffffffff; + statp->sort_list[nsort].mask = + (u_int32_t)0xffffffff; nsort++; } *cp = n; @@ -479,7 +539,9 @@ __res_vinit(res_state statp, int preinit) { #endif } - if ((cp = getenv("RES_OPTIONS")) != NULL) + if (issetugid()) + statp->options |= RES_NOALIASES; + else if ((cp = getenv("RES_OPTIONS")) != NULL) res_setoptions(statp, cp, "env"); statp->options |= RES_INIT; return (0); @@ -499,7 +561,9 @@ res_setoptions(res_state statp, const char *options, const char *source) { const char *cp = options; int i; +#ifndef _LIBC struct __res_state_ext *ext = statp->_u._ext.ext; +#endif #ifdef DEBUG if (statp->options & RES_DEBUG) @@ -573,6 +637,10 @@ res_setoptions(res_state statp, const char *options, const char *source) statp->options |= RES_NOTLDQUERY; } else if (!strncmp(cp, "inet6", sizeof("inet6") - 1)) { statp->options |= RES_USE_INET6; + } else if (!strncmp(cp, "insecure1", sizeof("insecure1") - 1)) { + statp->options |= RES_INSECURE1; + } else if (!strncmp(cp, "insecure2", sizeof("insecure2") - 1)) { + statp->options |= RES_INSECURE2; } else if (!strncmp(cp, "rotate", sizeof("rotate") - 1)) { statp->options |= RES_ROTATE; } else if (!strncmp(cp, "no-check-names", @@ -584,6 +652,7 @@ res_setoptions(res_state statp, const char *options, const char *source) statp->options |= RES_USE_EDNS0; } #endif +#ifndef _LIBC else if (!strncmp(cp, "dname", sizeof("dname") - 1)) { statp->options |= RES_USE_DNAME; } @@ -613,10 +682,13 @@ res_setoptions(res_state statp, const char *options, const char *source) ~RES_NO_NIBBLE2; } } +#endif else { /* XXX - print a warning here? */ } +#ifndef _LIBC skip: +#endif /* skip to next run of spaces */ while (*cp && *cp != ' ' && *cp != '\t') cp++; @@ -659,13 +731,21 @@ res_nclose(res_state statp) { int ns; if (statp->_vcsock >= 0) { +#ifndef _LIBC (void) close(statp->_vcsock); +#else + _close(statp->_vcsock); +#endif statp->_vcsock = -1; statp->_flags &= ~(RES_F_VC | RES_F_CONN); } for (ns = 0; ns < statp->_u._ext.nscount; ns++) { if (statp->_u._ext.nssocks[ns] != -1) { +#ifndef _LIBC (void) close(statp->_u._ext.nssocks[ns]); +#else + _close(statp->_u._ext.nssocks[ns]); +#endif statp->_u._ext.nssocks[ns] = -1; } } @@ -680,6 +760,7 @@ res_ndestroy(res_state statp) { statp->_u._ext.ext = NULL; } +#ifndef _LIBC const char * res_get_nibblesuffix(res_state statp) { if (statp->_u._ext.ext) @@ -693,6 +774,7 @@ res_get_nibblesuffix2(res_state statp) { return (statp->_u._ext.ext->nsuffix2); return ("ip6.int"); } +#endif void res_setservers(res_state statp, const union res_sockaddr_union *set, int cnt) { diff --git a/contrib/bind-9.3/lib/bind/resolv/res_mkquery.c b/contrib/bind-9.3/lib/bind/resolv/res_mkquery.c index 89000edf6a..8d888e7555 100644 --- a/contrib/bind-9.3/lib/bind/resolv/res_mkquery.c +++ b/contrib/bind-9.3/lib/bind/resolv/res_mkquery.c @@ -234,6 +234,8 @@ res_nopt(res_state statp, ns_put16(T_OPT, cp); /* TYPE */ cp += INT16SZ; + if (anslen > 0xffff) + anslen = 0xffff; /* limit to 16bit value */ ns_put16(anslen & 0xffff, cp); /* CLASS = UDP payload size */ cp += INT16SZ; *cp++ = NOERROR; /* extended RCODE */ diff --git a/contrib/bind-9.3/lib/bind/resolv/res_mkupdate.c b/contrib/bind-9.3/lib/bind/resolv/res_mkupdate.c index 01078f1a51..a135bf0547 100644 --- a/contrib/bind-9.3/lib/bind/resolv/res_mkupdate.c +++ b/contrib/bind-9.3/lib/bind/resolv/res_mkupdate.c @@ -44,6 +44,9 @@ static const char rcsid[] = "$Id: res_mkupdate.c,v 1.1.2.1.4.5 2005/10/14 05:43: #include #include +#ifdef _LIBC +#include "isc/list.h" +#endif #include "port_after.h" /* Options. Leave them on. */ @@ -58,8 +61,13 @@ static int getstr_str(char *, int, u_char **, u_char *); #define ShrinkBuffer(x) if ((buflen -= x) < 0) return (-2); /* Forward. */ - +#ifdef _LIBC +static +#endif int res_protocolnumber(const char *); +#ifdef _LIBC +static +#endif int res_servicenumber(const char *); /* @@ -89,7 +97,10 @@ res_nmkupdate(res_state statp, ns_updrec *rrecp_in, u_char *buf, int buflen) { u_int16_t rtype, rclass; u_int32_t n1, rttl; u_char *dnptrs[20], **dpp, **lastdnptr; - int siglen, keylen, certlen; +#ifndef _LIBC + int siglen; +#endif + int keylen, certlen; /* * Initialize header fields. @@ -445,6 +456,9 @@ res_nmkupdate(res_state statp, ns_updrec *rrecp_in, u_char *buf, int buflen) { return (-1); break; case ns_t_sig: +#ifdef _LIBC + return (-1); +#else { int sig_type, success, dateerror; u_int32_t exptime, timesigned; @@ -535,6 +549,7 @@ res_nmkupdate(res_state statp, ns_updrec *rrecp_in, u_char *buf, int buflen) { cp += siglen; break; } +#endif case ns_t_key: /* flags */ n = gethexnum_str(&startp, endp); @@ -980,6 +995,7 @@ res_buildservicelist() { endservent(); } +#ifndef _LIBC void res_destroyservicelist() { struct valuelist *slp, *slp_next; @@ -992,6 +1008,7 @@ res_destroyservicelist() { } servicelist = (struct valuelist *)0; } +#endif void res_buildprotolist(void) { @@ -1022,6 +1039,7 @@ res_buildprotolist(void) { endprotoent(); } +#ifndef _LIBC void res_destroyprotolist(void) { struct valuelist *plp, *plp_next; @@ -1033,6 +1051,7 @@ res_destroyprotolist(void) { } protolist = (struct valuelist *)0; } +#endif static int findservice(const char *s, struct valuelist **list) { @@ -1059,6 +1078,9 @@ findservice(const char *s, struct valuelist **list) { /* * Convert service name or (ascii) number to int. */ +#ifdef _LIBC +static +#endif int res_servicenumber(const char *p) { if (servicelist == (struct valuelist *)0) @@ -1069,6 +1091,9 @@ res_servicenumber(const char *p) { /* * Convert protocol name or (ascii) number to int. */ +#ifdef _LIBC +static +#endif int res_protocolnumber(const char *p) { if (protolist == (struct valuelist *)0) @@ -1076,6 +1101,7 @@ res_protocolnumber(const char *p) { return (findservice(p, &protolist)); } +#ifndef _LIBC static struct servent * cgetservbyport(u_int16_t port, const char *proto) { /* Host byte order. */ struct valuelist **list = &servicelist; @@ -1156,3 +1182,4 @@ res_servicename(u_int16_t port, const char *proto) { /* Host byte order. */ } return (ss->s_name); } +#endif diff --git a/contrib/bind-9.3/lib/bind/resolv/res_query.c b/contrib/bind-9.3/lib/bind/resolv/res_query.c index 5156ce84c0..62e953e4ab 100644 --- a/contrib/bind-9.3/lib/bind/resolv/res_query.c +++ b/contrib/bind-9.3/lib/bind/resolv/res_query.c @@ -86,6 +86,7 @@ static const char rcsid[] = "$Id: res_query.c,v 1.2.2.3.4.2 2004/03/16 12:34:19 #include #include #include +#include #include "port_after.h" /* Options. Leave them on. */ @@ -242,6 +243,21 @@ res_nsearch(res_state statp, answer, anslen); if (ret > 0 || trailing_dot) return (ret); + if (errno == ECONNREFUSED) { + RES_SET_H_ERRNO(statp, TRY_AGAIN); + return (-1); + } + switch (statp->res_h_errno) { + case NO_DATA: + case HOST_NOT_FOUND: + break; + case TRY_AGAIN: + if (hp->rcode == SERVFAIL) + break; + /* FALLTHROUGH */ + default: + return (-1); + } saved_herrno = statp->res_h_errno; tried_as_is++; } @@ -265,6 +281,9 @@ res_nsearch(res_state statp, (domain[0][0] == '.' && domain[0][1] == '\0')) root_on_list++; + if (root_on_list && tried_as_is) + continue; + ret = res_nquerydomain(statp, name, *domain, class, type, answer, anslen); @@ -297,9 +316,26 @@ res_nsearch(res_state statp, /* keep trying */ break; case TRY_AGAIN: + /* + * This can occur due to a server failure + * (that is, all listed servers have failed), + * or all listed servers have timed out. + * ((HEADER *)answer)->rcode may not be set + * to SERVFAIL in the case of a timeout. + * + * Either way we must return TRY_AGAIN in + * order to avoid non-deterministic + * return codes. + * For example, loaded name servers or races + * against network startup/validation (dhcp, + * ppp, etc) can cause the search to timeout + * on one search element, e.g. 'fu.bar.com', + * and return a definitive failure on the + * next search element, e.g. 'fu.'. + */ + got_servfail++; if (hp->rcode == SERVFAIL) { /* try next search element, if any */ - got_servfail++; break; } /* FALLTHROUGH */ @@ -316,6 +352,18 @@ res_nsearch(res_state statp, } } + switch (statp->res_h_errno) { + case NO_DATA: + case HOST_NOT_FOUND: + break; + case TRY_AGAIN: + if (hp->rcode == SERVFAIL) + break; + /* FALLTHROUGH */ + default: + goto giveup; + } + /* * If the query has not already been tried as is then try it * unless RES_NOTLDQUERY is set and there were no dots. @@ -335,6 +383,7 @@ res_nsearch(res_state statp, * else send back meaningless H_ERRNO, that being the one from * the last DNSRCH we did. */ +giveup: if (saved_herrno != -1) RES_SET_H_ERRNO(statp, saved_herrno); else if (got_nodata) @@ -401,6 +450,8 @@ res_hostalias(const res_state statp, const char *name, char *dst, size_t siz) { if (statp->options & RES_NOALIASES) return (NULL); + if (issetugid()) + return (NULL); file = getenv("HOSTALIASES"); if (file == NULL || (fp = fopen(file, "r")) == NULL) return (NULL); diff --git a/contrib/bind-9.3/lib/bind/resolv/res_send.c b/contrib/bind-9.3/lib/bind/resolv/res_send.c index c47dd49bc6..08abfe0cfe 100644 --- a/contrib/bind-9.3/lib/bind/resolv/res_send.c +++ b/contrib/bind-9.3/lib/bind/resolv/res_send.c @@ -78,8 +78,13 @@ static const char rcsid[] = "$Id: res_send.c,v 1.5.2.2.4.9 2006/10/16 23:00:50 m */ #include "port_before.h" +#ifndef USE_KQUEUE #include "fd_setsize.h" +#endif +#ifdef _LIBC +#include "namespace.h" +#endif #include #include #include @@ -99,16 +104,23 @@ static const char rcsid[] = "$Id: res_send.c,v 1.5.2.2.4.9 2006/10/16 23:00:50 m #include #include -#include +#include "isc/eventlib.h" #include "port_after.h" - +#ifdef USE_KQUEUE +#include +#else #ifdef USE_POLL #ifdef HAVE_STROPTS_H #include #endif #include #endif /* USE_POLL */ +#endif + +#ifdef _LIBC +#include "un-namespace.h" +#endif /* Options. Leave them on. */ #define DEBUG @@ -117,10 +129,8 @@ static const char rcsid[] = "$Id: res_send.c,v 1.5.2.2.4.9 2006/10/16 23:00:50 m #define EXT(res) ((res)->_u._ext) -#ifndef USE_POLL +#if !defined(USE_POLL) && !defined(USE_KQUEUE) static const int highestFD = FD_SETSIZE - 1; -#else -static int highestFD = 0; #endif /* Forward. */ @@ -129,14 +139,18 @@ static int get_salen __P((const struct sockaddr *)); static struct sockaddr * get_nsaddr __P((res_state, size_t)); static int send_vc(res_state, const u_char *, int, u_char *, int, int *, int); -static int send_dg(res_state, const u_char *, int, +static int send_dg(res_state, +#ifdef USE_KQUEUE + int, +#endif + const u_char *, int, u_char *, int, int *, int, int, int *, int *); static void Aerror(const res_state, FILE *, const char *, int, const struct sockaddr *, int); static void Perror(const res_state, FILE *, const char *, int); static int sock_eq(struct sockaddr *, struct sockaddr *); -#if defined(NEED_PSELECT) && !defined(USE_POLL) +#if defined(NEED_PSELECT) && !defined(USE_POLL) && !defined(USE_KQUEUE) static int pselect(int, void *, void *, void *, struct timespec *, const sigset_t *); @@ -289,11 +303,10 @@ res_nsend(res_state statp, const u_char *buf, int buflen, u_char *ans, int anssiz) { int gotsomewhere, terrno, try, v_circuit, resplen, ns, n; - char abuf[NI_MAXHOST]; - -#ifdef USE_POLL - highestFD = sysconf(_SC_OPEN_MAX) - 1; +#ifdef USE_KQUEUE + int kq; #endif + char abuf[NI_MAXHOST]; /* No name servers or res_init() failure */ if (statp->nscount == 0 || EXT(statp).ext == NULL) { @@ -310,6 +323,13 @@ res_nsend(res_state statp, gotsomewhere = 0; terrno = ETIMEDOUT; +#ifdef USE_KQUEUE + if ((kq = kqueue()) < 0) { + Perror(statp, stderr, "kqueue", errno); + return (-1); + } +#endif + /* * If the ns_addr_list in the resolver context has changed, then * invalidate our cached copy and the associated timing data. @@ -333,7 +353,11 @@ res_nsend(res_state statp, if (EXT(statp).nssocks[ns] == -1) continue; peerlen = sizeof(peer); +#ifndef _LIBC if (getsockname(EXT(statp).nssocks[ns], +#else + if (_getsockname(EXT(statp).nssocks[ns], +#endif (struct sockaddr *)&peer, &peerlen) < 0) { needclose++; break; @@ -425,6 +449,9 @@ res_nsend(res_state statp, res_nclose(statp); goto next_ns; case res_done: +#ifdef USE_KQUEUE + _close(kq); +#endif return (resplen); case res_modified: /* give the hook another try */ @@ -458,7 +485,11 @@ res_nsend(res_state statp, resplen = n; } else { /* Use datagrams. */ - n = send_dg(statp, buf, buflen, ans, anssiz, &terrno, + n = send_dg(statp, +#ifdef USE_KQUEUE + kq, +#endif + buf, buflen, ans, anssiz, &terrno, ns, try, &v_circuit, &gotsomewhere); if (n < 0) goto fail; @@ -517,11 +548,17 @@ res_nsend(res_state statp, } while (!done); } +#ifdef USE_KQUEUE + _close(kq); +#endif return (resplen); next_ns: ; } /*foreach ns*/ } /*foreach retry*/ res_nclose(statp); +#ifdef USE_KQUEUE + _close(kq); +#endif if (!v_circuit) { if (!gotsomewhere) errno = ECONNREFUSED; /* no nameservers found */ @@ -609,7 +646,11 @@ send_vc(res_state statp, struct sockaddr_storage peer; ISC_SOCKLEN_T size = sizeof peer; +#ifndef _LIBC if (getpeername(statp->_vcsock, +#else + if (_getpeername(statp->_vcsock, +#endif (struct sockaddr *)&peer, &size) < 0 || !sock_eq((struct sockaddr *)&peer, nsap)) { res_nclose(statp); @@ -621,11 +662,17 @@ send_vc(res_state statp, if (statp->_vcsock >= 0) res_nclose(statp); +#ifndef _LIBC statp->_vcsock = socket(nsap->sa_family, SOCK_STREAM, 0); +#else + statp->_vcsock = _socket(nsap->sa_family, SOCK_STREAM, 0); +#endif +#if !defined(USE_POLL) && !defined(USE_KQUEUE) if (statp->_vcsock > highestFD) { res_nclose(statp); errno = ENOTSOCK; } +#endif if (statp->_vcsock < 0) { switch (errno) { case EPROTONOSUPPORT: @@ -642,7 +689,11 @@ send_vc(res_state statp, } } errno = 0; +#ifndef _LIBC if (connect(statp->_vcsock, nsap, nsaplen) < 0) { +#else + if (_connect(statp->_vcsock, nsap, nsaplen) < 0) { +#endif *terrno = errno; Aerror(statp, stderr, "connect/vc", errno, nsap, nsaplen); @@ -659,7 +710,11 @@ send_vc(res_state statp, iov[0] = evConsIovec(&len, INT16SZ); DE_CONST(buf, tmp); iov[1] = evConsIovec(tmp, buflen); +#ifndef _LIBC if (writev(statp->_vcsock, iov, 2) != (INT16SZ + buflen)) { +#else + if (_writev(statp->_vcsock, iov, 2) != (INT16SZ + buflen)) { +#endif *terrno = errno; Perror(statp, stderr, "write failed", errno); res_nclose(statp); @@ -671,7 +726,11 @@ send_vc(res_state statp, read_len: cp = ans; len = INT16SZ; +#ifndef _LIBC while ((n = read(statp->_vcsock, (char *)cp, (int)len)) > 0) { +#else + while ((n = _read(statp->_vcsock, (char *)cp, (int)len)) > 0) { +#endif cp += n; if ((len -= n) == 0) break; @@ -717,7 +776,11 @@ send_vc(res_state statp, return (0); } cp = ans; +#ifndef _LIBC while (len != 0 && (n = read(statp->_vcsock, (char *)cp, (int)len)) > 0){ +#else + while (len != 0 && (n = _read(statp->_vcsock, (char *)cp, (int)len)) > 0){ +#endif cp += n; len -= n; } @@ -736,7 +799,11 @@ send_vc(res_state statp, while (len != 0) { char junk[PACKETSZ]; +#ifndef _LIBC n = read(statp->_vcsock, junk, +#else + n = _read(statp->_vcsock, junk, +#endif (len > sizeof junk) ? sizeof junk : len); if (n > 0) len -= n; @@ -767,7 +834,11 @@ send_vc(res_state statp, } static int -send_dg(res_state statp, const u_char *buf, int buflen, u_char *ans, +send_dg(res_state statp, +#ifdef USE_KQUEUE + int kq, +#endif + const u_char *buf, int buflen, u_char *ans, int anssiz, int *terrno, int ns, int try, int *v_circuit, int *gotsomewhere) { @@ -779,21 +850,31 @@ send_dg(res_state statp, const u_char *buf, int buflen, u_char *ans, struct sockaddr_storage from; ISC_SOCKLEN_T fromlen; int resplen, seconds, n, s; +#ifdef USE_KQUEUE + struct kevent kv; +#else #ifdef USE_POLL int polltimeout; struct pollfd pollfd; #else fd_set dsmask; +#endif #endif nsap = get_nsaddr(statp, ns); nsaplen = get_salen(nsap); if (EXT(statp).nssocks[ns] == -1) { +#ifndef _LIBC EXT(statp).nssocks[ns] = socket(nsap->sa_family, SOCK_DGRAM, 0); +#else + EXT(statp).nssocks[ns] = _socket(nsap->sa_family, SOCK_DGRAM, 0); +#endif +#if !defined(USE_POLL) && !defined(USE_KQUEUE) if (EXT(statp).nssocks[ns] > highestFD) { res_nclose(statp); errno = ENOTSOCK; } +#endif if (EXT(statp).nssocks[ns] < 0) { switch (errno) { case EPROTONOSUPPORT: @@ -820,8 +901,21 @@ send_dg(res_state statp, const u_char *buf, int buflen, u_char *ans, * socket operation, and select returns if the * error message is received. We can thus detect * the absence of a nameserver without timing out. + * + * + * When the option "insecure1" is specified, we'd + * rather expect to see responses from an "unknown" + * address. In order to let the kernel accept such + * responses, do not connect the socket here. + * XXX: or do we need an explicit option to disable + * connecting? */ - if (connect(EXT(statp).nssocks[ns], nsap, nsaplen) < 0) { + if (!(statp->options & RES_INSECURE1) && +#ifndef _LIBC + connect(EXT(statp).nssocks[ns], nsap, nsaplen) < 0) { +#else + _connect(EXT(statp).nssocks[ns], nsap, nsaplen) < 0) { +#endif Aerror(statp, stderr, "connect(dg)", errno, nsap, nsaplen); res_nclose(statp); @@ -833,13 +927,28 @@ send_dg(res_state statp, const u_char *buf, int buflen, u_char *ans, } s = EXT(statp).nssocks[ns]; #ifndef CANNOT_CONNECT_DGRAM - if (send(s, (const char*)buf, buflen, 0) != buflen) { + if (statp->options & RES_INSECURE1) { +#ifndef _LIBC + if (sendto(s, +#else + if (_sendto(s, +#endif + (const char*)buf, buflen, 0, nsap, nsaplen) != buflen) { + Aerror(statp, stderr, "sendto", errno, nsap, nsaplen); + res_nclose(statp); + return (0); + } + } else if (send(s, (const char*)buf, buflen, 0) != buflen) { Perror(statp, stderr, "send", errno); res_nclose(statp); return (0); } #else /* !CANNOT_CONNECT_DGRAM */ +#ifndef _LIBC if (sendto(s, (const char*)buf, buflen, 0, nsap, nsaplen) != buflen) +#else + if (_sendto(s, (const char*)buf, buflen, 0, nsap, nsaplen) != buflen) +#endif { Aerror(statp, stderr, "sendto", errno, nsap, nsaplen); res_nclose(statp); @@ -863,13 +972,18 @@ send_dg(res_state statp, const u_char *buf, int buflen, u_char *ans, now = evNowTime(); nonow: #ifndef USE_POLL - FD_ZERO(&dsmask); - FD_SET(s, &dsmask); if (evCmpTime(finish, now) > 0) timeout = evSubTime(finish, now); else timeout = evConsTime(0, 0); +#ifdef USE_KQUEUE + EV_SET(&kv, s, EVFILT_READ, EV_ADD | EV_ONESHOT, 0, 0, 0); + n = _kevent(kq, &kv, 1, &kv, 1, &timeout); +#else + FD_ZERO(&dsmask); + FD_SET(s, &dsmask); n = pselect(s + 1, &dsmask, NULL, NULL, &timeout, NULL); +#endif #else timeout = evSubTime(finish, now); if (timeout.tv_sec < 0) @@ -889,17 +1003,29 @@ send_dg(res_state statp, const u_char *buf, int buflen, u_char *ans, if (n < 0) { if (errno == EINTR) goto wait; +#ifdef USE_KQUEUE + Perror(statp, stderr, "kevent", errno); +#else #ifndef USE_POLL Perror(statp, stderr, "select", errno); #else Perror(statp, stderr, "poll", errno); #endif /* USE_POLL */ +#endif res_nclose(statp); return (0); } +#ifdef USE_KQUEUE + if (kv.ident != s) + goto wait; +#endif errno = 0; fromlen = sizeof(from); +#ifndef _LIBC resplen = recvfrom(s, (char*)ans, anssiz,0, +#else + resplen = _recvfrom(s, (char*)ans, anssiz,0, +#endif (struct sockaddr *)&from, &fromlen); if (resplen <= 0) { Perror(statp, stderr, "recvfrom", errno); @@ -1062,7 +1188,7 @@ sock_eq(struct sockaddr *a, struct sockaddr *b) { } } -#if defined(NEED_PSELECT) && !defined(USE_POLL) +#if defined(NEED_PSELECT) && !defined(USE_POLL) && !defined(USE_KQUEUE) /* XXX needs to move to the porting library. */ static int pselect(int nfds, void *rfds, void *wfds, void *efds, diff --git a/contrib/bind-9.3/lib/bind/resolv/res_update.c b/contrib/bind-9.3/lib/bind/resolv/res_update.c index 8783d8a764..d8ed05fe8a 100644 --- a/contrib/bind-9.3/lib/bind/resolv/res_update.c +++ b/contrib/bind-9.3/lib/bind/resolv/res_update.c @@ -43,7 +43,7 @@ static const char rcsid[] = "$Id: res_update.c,v 1.6.2.4.4.2 2004/03/16 12:34:20 #include #include -#include +#include "isc/list.h" #include #include "port_after.h" @@ -167,8 +167,16 @@ res_nupdate(res_state statp, ns_updrec *rrecp_in, ns_tsig_key *key) { /* Send the update and remember the result. */ if (key != NULL) +#ifdef _LIBC + { + DPRINTF(("TSIG is not supported\n")); + RES_SET_H_ERRNO(statp, NO_RECOVERY); + goto done; + } +#else n = res_nsendsigned(statp, packet, n, key, answer, sizeof answer); +#endif else n = res_nsend(statp, packet, n, answer, sizeof answer); if (n < 0) { diff --git a/contrib/gcc-3.4/gcc/config/i386/i386.c b/contrib/gcc-3.4/gcc/config/i386/i386.c index e6f71b466f..443da968eb 100644 --- a/contrib/gcc-3.4/gcc/config/i386/i386.c +++ b/contrib/gcc-3.4/gcc/config/i386/i386.c @@ -1176,7 +1176,7 @@ override_options (void) if (!ix86_tune_string) ix86_tune_string = cpu_names [TARGET_CPU_DEFAULT]; if (!ix86_arch_string) - ix86_arch_string = TARGET_64BIT ? "x86-64" : "i386"; + ix86_arch_string = TARGET_64BIT ? "x86-64" : "i486"; if (ix86_cmodel_string != 0) { diff --git a/contrib/gcc-4.1/gcc/config/i386/i386.c b/contrib/gcc-4.1/gcc/config/i386/i386.c index 82e5e1bc9f..ef0f62f56f 100644 --- a/contrib/gcc-4.1/gcc/config/i386/i386.c +++ b/contrib/gcc-4.1/gcc/config/i386/i386.c @@ -1310,7 +1310,7 @@ override_options (void) ix86_tune_defaulted = 1; } if (!ix86_arch_string) - ix86_arch_string = TARGET_64BIT ? "x86-64" : "i386"; + ix86_arch_string = TARGET_64BIT ? "x86-64" : "i486"; if (ix86_cmodel_string != 0) { diff --git a/contrib/libpcap-0.9/bpf/net/bpf_filter.c b/contrib/libpcap-0.9/bpf/net/bpf_filter.c index 40df32a8b3..8b8adf2e7b 100644 --- a/contrib/libpcap-0.9/bpf/net/bpf_filter.c +++ b/contrib/libpcap-0.9/bpf/net/bpf_filter.c @@ -71,7 +71,7 @@ static const char rcsid[] _U_ = #endif /* WIN32 */ -#include +#include #if !defined(KERNEL) && !defined(_KERNEL) #include diff --git a/contrib/libpcap-0.9/pcap-bpf.h b/contrib/libpcap-0.9/pcap-bpf.h deleted file mode 100644 index 62c493b276..0000000000 --- a/contrib/libpcap-0.9/pcap-bpf.h +++ /dev/null @@ -1,834 +0,0 @@ -/*- - * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from the Stanford/CMU enet packet filter, - * (net/enet.c) distributed as part of 4.3BSD, and code contributed - * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence - * Berkeley Laboratory. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)bpf.h 7.1 (Berkeley) 5/7/91 - * - * @(#) $Header: /tcpdump/master/libpcap/pcap-bpf.h,v 1.34.2.24 2007/09/19 02:52:12 guy Exp $ (LBL) - */ - -/* - * This is libpcap's cut-down version of bpf.h; it includes only - * the stuff needed for the code generator and the userland BPF - * interpreter, and the libpcap APIs for setting filters, etc.. - * - * "pcap-bpf.c" will include the native OS version, as it deals with - * the OS's BPF implementation. - * - * XXX - should this all just be moved to "pcap.h"? - */ - -#ifndef BPF_MAJOR_VERSION - -#ifdef __cplusplus -extern "C" { -#endif - -/* BSD style release date */ -#define BPF_RELEASE 199606 - -#ifdef MSDOS /* must be 32-bit */ -typedef long bpf_int32; -typedef unsigned long bpf_u_int32; -#else -typedef int bpf_int32; -typedef u_int bpf_u_int32; -#endif - -/* - * Alignment macros. BPF_WORDALIGN rounds up to the next - * even multiple of BPF_ALIGNMENT. - */ -#ifndef __NetBSD__ -#define BPF_ALIGNMENT sizeof(bpf_int32) -#else -#define BPF_ALIGNMENT sizeof(long) -#endif -#define BPF_WORDALIGN(x) (((x)+(BPF_ALIGNMENT-1))&~(BPF_ALIGNMENT-1)) - -#define BPF_MAXINSNS 512 -#define BPF_MAXBUFSIZE 0x8000 -#define BPF_MINBUFSIZE 32 - -/* - * Structure for "pcap_compile()", "pcap_setfilter()", etc.. - */ -struct bpf_program { - u_int bf_len; - struct bpf_insn *bf_insns; -}; - -/* - * Struct return by BIOCVERSION. This represents the version number of - * the filter language described by the instruction encodings below. - * bpf understands a program iff kernel_major == filter_major && - * kernel_minor >= filter_minor, that is, if the value returned by the - * running kernel has the same major number and a minor number equal - * equal to or less than the filter being downloaded. Otherwise, the - * results are undefined, meaning an error may be returned or packets - * may be accepted haphazardly. - * It has nothing to do with the source code version. - */ -struct bpf_version { - u_short bv_major; - u_short bv_minor; -}; -/* Current version number of filter architecture. */ -#define BPF_MAJOR_VERSION 1 -#define BPF_MINOR_VERSION 1 - -/* - * Data-link level type codes. - * - * Do *NOT* add new values to this list without asking - * "tcpdump-workers@tcpdump.org" for a value. Otherwise, you run the - * risk of using a value that's already being used for some other purpose, - * and of having tools that read libpcap-format captures not being able - * to handle captures with your new DLT_ value, with no hope that they - * will ever be changed to do so (as that would destroy their ability - * to read captures using that value for that other purpose). - */ - -/* - * These are the types that are the same on all platforms, and that - * have been defined by for ages. - */ -#define DLT_NULL 0 /* BSD loopback encapsulation */ -#define DLT_EN10MB 1 /* Ethernet (10Mb) */ -#define DLT_EN3MB 2 /* Experimental Ethernet (3Mb) */ -#define DLT_AX25 3 /* Amateur Radio AX.25 */ -#define DLT_PRONET 4 /* Proteon ProNET Token Ring */ -#define DLT_CHAOS 5 /* Chaos */ -#define DLT_IEEE802 6 /* 802.5 Token Ring */ -#define DLT_ARCNET 7 /* ARCNET, with BSD-style header */ -#define DLT_SLIP 8 /* Serial Line IP */ -#define DLT_PPP 9 /* Point-to-point Protocol */ -#define DLT_FDDI 10 /* FDDI */ - -/* - * These are types that are different on some platforms, and that - * have been defined by for ages. We use #ifdefs to - * detect the BSDs that define them differently from the traditional - * libpcap - * - * XXX - DLT_ATM_RFC1483 is 13 in BSD/OS, and DLT_RAW is 14 in BSD/OS, - * but I don't know what the right #define is for BSD/OS. - */ -#define DLT_ATM_RFC1483 11 /* LLC-encapsulated ATM */ - -#ifdef __OpenBSD__ -#define DLT_RAW 14 /* raw IP */ -#else -#define DLT_RAW 12 /* raw IP */ -#endif - -/* - * Given that the only OS that currently generates BSD/OS SLIP or PPP - * is, well, BSD/OS, arguably everybody should have chosen its values - * for DLT_SLIP_BSDOS and DLT_PPP_BSDOS, which are 15 and 16, but they - * didn't. So it goes. - */ -#if defined(__NetBSD__) || defined(__FreeBSD__) -#ifndef DLT_SLIP_BSDOS -#define DLT_SLIP_BSDOS 13 /* BSD/OS Serial Line IP */ -#define DLT_PPP_BSDOS 14 /* BSD/OS Point-to-point Protocol */ -#endif -#else -#define DLT_SLIP_BSDOS 15 /* BSD/OS Serial Line IP */ -#define DLT_PPP_BSDOS 16 /* BSD/OS Point-to-point Protocol */ -#endif - -/* - * 17 is used for DLT_OLD_PFLOG in OpenBSD; - * OBSOLETE: DLT_PFLOG is 117 in OpenBSD now as well. See below. - * 18 is used for DLT_PFSYNC in OpenBSD; don't use it for anything else. - */ - -#define DLT_ATM_CLIP 19 /* Linux Classical-IP over ATM */ - -/* - * Apparently Redback uses this for its SmartEdge 400/800. I hope - * nobody else decided to use it, too. - */ -#define DLT_REDBACK_SMARTEDGE 32 - -/* - * These values are defined by NetBSD; other platforms should refrain from - * using them for other purposes, so that NetBSD savefiles with link - * types of 50 or 51 can be read as this type on all platforms. - */ -#define DLT_PPP_SERIAL 50 /* PPP over serial with HDLC encapsulation */ -#define DLT_PPP_ETHER 51 /* PPP over Ethernet */ - -/* - * The Axent Raptor firewall - now the Symantec Enterprise Firewall - uses - * a link-layer type of 99 for the tcpdump it supplies. The link-layer - * header has 6 bytes of unknown data, something that appears to be an - * Ethernet type, and 36 bytes that appear to be 0 in at least one capture - * I've seen. - */ -#define DLT_SYMANTEC_FIREWALL 99 - -/* - * Values between 100 and 103 are used in capture file headers as - * link-layer types corresponding to DLT_ types that differ - * between platforms; don't use those values for new DLT_ new types. - */ - -/* - * This value was defined by libpcap 0.5; platforms that have defined - * it with a different value should define it here with that value - - * a link type of 104 in a save file will be mapped to DLT_C_HDLC, - * whatever value that happens to be, so programs will correctly - * handle files with that link type regardless of the value of - * DLT_C_HDLC. - * - * The name DLT_C_HDLC was used by BSD/OS; we use that name for source - * compatibility with programs written for BSD/OS. - * - * libpcap 0.5 defined it as DLT_CHDLC; we define DLT_CHDLC as well, - * for source compatibility with programs written for libpcap 0.5. - */ -#define DLT_C_HDLC 104 /* Cisco HDLC */ -#define DLT_CHDLC DLT_C_HDLC - -#define DLT_IEEE802_11 105 /* IEEE 802.11 wireless */ - -/* - * 106 is reserved for Linux Classical IP over ATM; it's like DLT_RAW, - * except when it isn't. (I.e., sometimes it's just raw IP, and - * sometimes it isn't.) We currently handle it as DLT_LINUX_SLL, - * so that we don't have to worry about the link-layer header.) - */ - -/* - * Frame Relay; BSD/OS has a DLT_FR with a value of 11, but that collides - * with other values. - * DLT_FR and DLT_FRELAY packets start with the Q.922 Frame Relay header - * (DLCI, etc.). - */ -#define DLT_FRELAY 107 - -/* - * OpenBSD DLT_LOOP, for loopback devices; it's like DLT_NULL, except - * that the AF_ type in the link-layer header is in network byte order. - * - * DLT_LOOP is 12 in OpenBSD, but that's DLT_RAW in other OSes, so - * we don't use 12 for it in OSes other than OpenBSD. - */ -#ifdef __OpenBSD__ -#define DLT_LOOP 12 -#else -#define DLT_LOOP 108 -#endif - -/* - * Encapsulated packets for IPsec; DLT_ENC is 13 in OpenBSD, but that's - * DLT_SLIP_BSDOS in NetBSD, so we don't use 13 for it in OSes other - * than OpenBSD. - */ -#ifdef __OpenBSD__ -#define DLT_ENC 13 -#else -#define DLT_ENC 109 -#endif - -/* - * Values between 110 and 112 are reserved for use in capture file headers - * as link-layer types corresponding to DLT_ types that might differ - * between platforms; don't use those values for new DLT_ types - * other than the corresponding DLT_ types. - */ - -/* - * This is for Linux cooked sockets. - */ -#define DLT_LINUX_SLL 113 - -/* - * Apple LocalTalk hardware. - */ -#define DLT_LTALK 114 - -/* - * Acorn Econet. - */ -#define DLT_ECONET 115 - -/* - * Reserved for use with OpenBSD ipfilter. - */ -#define DLT_IPFILTER 116 - -/* - * OpenBSD DLT_PFLOG; DLT_PFLOG is 17 in OpenBSD, but that's DLT_LANE8023 - * in SuSE 6.3, so we can't use 17 for it in capture-file headers. - * - * XXX: is there a conflict with DLT_PFSYNC 18 as well? - */ -#ifdef __OpenBSD__ -#define DLT_OLD_PFLOG 17 -#define DLT_PFSYNC 18 -#endif -#define DLT_PFLOG 117 - -/* - * Registered for Cisco-internal use. - */ -#define DLT_CISCO_IOS 118 - -/* - * For 802.11 cards using the Prism II chips, with a link-layer - * header including Prism monitor mode information plus an 802.11 - * header. - */ -#define DLT_PRISM_HEADER 119 - -/* - * Reserved for Aironet 802.11 cards, with an Aironet link-layer header - * (see Doug Ambrisko's FreeBSD patches). - */ -#define DLT_AIRONET_HEADER 120 - -/* - * Reserved for Siemens HiPath HDLC. - */ -#define DLT_HHDLC 121 - -/* - * This is for RFC 2625 IP-over-Fibre Channel. - * - * This is not for use with raw Fibre Channel, where the link-layer - * header starts with a Fibre Channel frame header; it's for IP-over-FC, - * where the link-layer header starts with an RFC 2625 Network_Header - * field. - */ -#define DLT_IP_OVER_FC 122 - -/* - * This is for Full Frontal ATM on Solaris with SunATM, with a - * pseudo-header followed by an AALn PDU. - * - * There may be other forms of Full Frontal ATM on other OSes, - * with different pseudo-headers. - * - * If ATM software returns a pseudo-header with VPI/VCI information - * (and, ideally, packet type information, e.g. signalling, ILMI, - * LANE, LLC-multiplexed traffic, etc.), it should not use - * DLT_ATM_RFC1483, but should get a new DLT_ value, so tcpdump - * and the like don't have to infer the presence or absence of a - * pseudo-header and the form of the pseudo-header. - */ -#define DLT_SUNATM 123 /* Solaris+SunATM */ - -/* - * Reserved as per request from Kent Dahlgren - * for private use. - */ -#define DLT_RIO 124 /* RapidIO */ -#define DLT_PCI_EXP 125 /* PCI Express */ -#define DLT_AURORA 126 /* Xilinx Aurora link layer */ - -/* - * Header for 802.11 plus a number of bits of link-layer information - * including radio information, used by some recent BSD drivers as - * well as the madwifi Atheros driver for Linux. - */ -#define DLT_IEEE802_11_RADIO 127 /* 802.11 plus radiotap radio header */ - -/* - * Reserved for the TZSP encapsulation, as per request from - * Chris Waters - * TZSP is a generic encapsulation for any other link type, - * which includes a means to include meta-information - * with the packet, e.g. signal strength and channel - * for 802.11 packets. - */ -#define DLT_TZSP 128 /* Tazmen Sniffer Protocol */ - -/* - * BSD's ARCNET headers have the source host, destination host, - * and type at the beginning of the packet; that's what's handed - * up to userland via BPF. - * - * Linux's ARCNET headers, however, have a 2-byte offset field - * between the host IDs and the type; that's what's handed up - * to userland via PF_PACKET sockets. - * - * We therefore have to have separate DLT_ values for them. - */ -#define DLT_ARCNET_LINUX 129 /* ARCNET */ - -/* - * Juniper-private data link types, as per request from - * Hannes Gredler . The DLT_s are used - * for passing on chassis-internal metainformation such as - * QOS profiles, etc.. - */ -#define DLT_JUNIPER_MLPPP 130 -#define DLT_JUNIPER_MLFR 131 -#define DLT_JUNIPER_ES 132 -#define DLT_JUNIPER_GGSN 133 -#define DLT_JUNIPER_MFR 134 -#define DLT_JUNIPER_ATM2 135 -#define DLT_JUNIPER_SERVICES 136 -#define DLT_JUNIPER_ATM1 137 - -/* - * Apple IP-over-IEEE 1394, as per a request from Dieter Siegmund - * . The header that's presented is an Ethernet-like - * header: - * - * #define FIREWIRE_EUI64_LEN 8 - * struct firewire_header { - * u_char firewire_dhost[FIREWIRE_EUI64_LEN]; - * u_char firewire_shost[FIREWIRE_EUI64_LEN]; - * u_short firewire_type; - * }; - * - * with "firewire_type" being an Ethernet type value, rather than, - * for example, raw GASP frames being handed up. - */ -#define DLT_APPLE_IP_OVER_IEEE1394 138 - -/* - * Various SS7 encapsulations, as per a request from Jeff Morriss - * and subsequent discussions. - */ -#define DLT_MTP2_WITH_PHDR 139 /* pseudo-header with various info, followed by MTP2 */ -#define DLT_MTP2 140 /* MTP2, without pseudo-header */ -#define DLT_MTP3 141 /* MTP3, without pseudo-header or MTP2 */ -#define DLT_SCCP 142 /* SCCP, without pseudo-header or MTP2 or MTP3 */ - -/* - * DOCSIS MAC frames. - */ -#define DLT_DOCSIS 143 - -/* - * Linux-IrDA packets. Protocol defined at http://www.irda.org. - * Those packets include IrLAP headers and above (IrLMP...), but - * don't include Phy framing (SOF/EOF/CRC & byte stuffing), because Phy - * framing can be handled by the hardware and depend on the bitrate. - * This is exactly the format you would get capturing on a Linux-IrDA - * interface (irdaX), but not on a raw serial port. - * Note the capture is done in "Linux-cooked" mode, so each packet include - * a fake packet header (struct sll_header). This is because IrDA packet - * decoding is dependant on the direction of the packet (incomming or - * outgoing). - * When/if other platform implement IrDA capture, we may revisit the - * issue and define a real DLT_IRDA... - * Jean II - */ -#define DLT_LINUX_IRDA 144 - -/* - * Reserved for IBM SP switch and IBM Next Federation switch. - */ -#define DLT_IBM_SP 145 -#define DLT_IBM_SN 146 - -/* - * Reserved for private use. If you have some link-layer header type - * that you want to use within your organization, with the capture files - * using that link-layer header type not ever be sent outside your - * organization, you can use these values. - * - * No libpcap release will use these for any purpose, nor will any - * tcpdump release use them, either. - * - * Do *NOT* use these in capture files that you expect anybody not using - * your private versions of capture-file-reading tools to read; in - * particular, do *NOT* use them in products, otherwise you may find that - * people won't be able to use tcpdump, or snort, or Ethereal, or... to - * read capture files from your firewall/intrusion detection/traffic - * monitoring/etc. appliance, or whatever product uses that DLT_ value, - * and you may also find that the developers of those applications will - * not accept patches to let them read those files. - * - * Also, do not use them if somebody might send you a capture using them - * for *their* private type and tools using them for *your* private type - * would have to read them. - * - * Instead, ask "tcpdump-workers@tcpdump.org" for a new DLT_ value, - * as per the comment above, and use the type you're given. - */ -#define DLT_USER0 147 -#define DLT_USER1 148 -#define DLT_USER2 149 -#define DLT_USER3 150 -#define DLT_USER4 151 -#define DLT_USER5 152 -#define DLT_USER6 153 -#define DLT_USER7 154 -#define DLT_USER8 155 -#define DLT_USER9 156 -#define DLT_USER10 157 -#define DLT_USER11 158 -#define DLT_USER12 159 -#define DLT_USER13 160 -#define DLT_USER14 161 -#define DLT_USER15 162 - -/* - * For future use with 802.11 captures - defined by AbsoluteValue - * Systems to store a number of bits of link-layer information - * including radio information: - * - * http://www.shaftnet.org/~pizza/software/capturefrm.txt - * - * but it might be used by some non-AVS drivers now or in the - * future. - */ -#define DLT_IEEE802_11_RADIO_AVS 163 /* 802.11 plus AVS radio header */ - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . The DLT_s are used - * for passing on chassis-internal metainformation such as - * QOS profiles, etc.. - */ -#define DLT_JUNIPER_MONITOR 164 - -/* - * Reserved for BACnet MS/TP. - */ -#define DLT_BACNET_MS_TP 165 - -/* - * Another PPP variant as per request from Karsten Keil . - * - * This is used in some OSes to allow a kernel socket filter to distinguish - * between incoming and outgoing packets, on a socket intended to - * supply pppd with outgoing packets so it can do dial-on-demand and - * hangup-on-lack-of-demand; incoming packets are filtered out so they - * don't cause pppd to hold the connection up (you don't want random - * input packets such as port scans, packets from old lost connections, - * etc. to force the connection to stay up). - * - * The first byte of the PPP header (0xff03) is modified to accomodate - * the direction - 0x00 = IN, 0x01 = OUT. - */ -#define DLT_PPP_PPPD 166 - -/* - * Names for backwards compatibility with older versions of some PPP - * software; new software should use DLT_PPP_PPPD. - */ -#define DLT_PPP_WITH_DIRECTION DLT_PPP_PPPD -#define DLT_LINUX_PPP_WITHDIRECTION DLT_PPP_PPPD - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . The DLT_s are used - * for passing on chassis-internal metainformation such as - * QOS profiles, cookies, etc.. - */ -#define DLT_JUNIPER_PPPOE 167 -#define DLT_JUNIPER_PPPOE_ATM 168 - -#define DLT_GPRS_LLC 169 /* GPRS LLC */ -#define DLT_GPF_T 170 /* GPF-T (ITU-T G.7041/Y.1303) */ -#define DLT_GPF_F 171 /* GPF-F (ITU-T G.7041/Y.1303) */ - -/* - * Requested by Oolan Zimmer for use in Gcom's T1/E1 line - * monitoring equipment. - */ -#define DLT_GCOM_T1E1 172 -#define DLT_GCOM_SERIAL 173 - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . The DLT_ is used - * for internal communication to Physical Interface Cards (PIC) - */ -#define DLT_JUNIPER_PIC_PEER 174 - -/* - * Link types requested by Gregor Maier of Endace - * Measurement Systems. They add an ERF header (see - * http://www.endace.com/support/EndaceRecordFormat.pdf) in front of - * the link-layer header. - */ -#define DLT_ERF_ETH 175 /* Ethernet */ -#define DLT_ERF_POS 176 /* Packet-over-SONET */ - -/* - * Requested by Daniele Orlandi for raw LAPD - * for vISDN (http://www.orlandi.com/visdn/). Its link-layer header - * includes additional information before the LAPD header, so it's - * not necessarily a generic LAPD header. - */ -#define DLT_LINUX_LAPD 177 - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . - * The DLT_ are used for prepending meta-information - * like interface index, interface name - * before standard Ethernet, PPP, Frelay & C-HDLC Frames - */ -#define DLT_JUNIPER_ETHER 178 -#define DLT_JUNIPER_PPP 179 -#define DLT_JUNIPER_FRELAY 180 -#define DLT_JUNIPER_CHDLC 181 - -/* - * Multi Link Frame Relay (FRF.16) - */ -#define DLT_MFR 182 - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . - * The DLT_ is used for internal communication with a - * voice Adapter Card (PIC) - */ -#define DLT_JUNIPER_VP 183 - -/* - * Arinc 429 frames. - * DLT_ requested by Gianluca Varenni . - * Every frame contains a 32bit A429 label. - * More documentation on Arinc 429 can be found at - * http://www.condoreng.com/support/downloads/tutorials/ARINCTutorial.pdf - */ -#define DLT_A429 184 - -/* - * Arinc 653 Interpartition Communication messages. - * DLT_ requested by Gianluca Varenni . - * Please refer to the A653-1 standard for more information. - */ -#define DLT_A653_ICM 185 - -/* - * USB packets, beginning with a USB setup header; requested by - * Paolo Abeni . - */ -#define DLT_USB 186 - -/* - * Bluetooth HCI UART transport layer (part H:4); requested by - * Paolo Abeni. - */ -#define DLT_BLUETOOTH_HCI_H4 187 - -/* - * IEEE 802.16 MAC Common Part Sublayer; requested by Maria Cruz - * . - */ -#define DLT_IEEE802_16_MAC_CPS 188 - -/* - * USB packets, beginning with a Linux USB header; requested by - * Paolo Abeni . - */ -#define DLT_USB_LINUX 189 - -/* - * Controller Area Network (CAN) v. 2.0B packets. - * DLT_ requested by Gianluca Varenni . - * Used to dump CAN packets coming from a CAN Vector board. - * More documentation on the CAN v2.0B frames can be found at - * http://www.can-cia.org/downloads/?269 - */ -#define DLT_CAN20B 190 - -/* - * IEEE 802.15.4, with address fields padded, as is done by Linux - * drivers; requested by Juergen Schimmer. - */ -#define DLT_IEEE802_15_4_LINUX 191 - -/* - * Per Packet Information encapsulated packets. - * DLT_ requested by Gianluca Varenni . - */ -#define DLT_PPI 192 - -/* - * Header for 802.16 MAC Common Part Sublayer plus a radiotap radio header; - * requested by Charles Clancy. - */ -#define DLT_IEEE802_16_MAC_CPS_RADIO 193 - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . - * The DLT_ is used for internal communication with a - * integrated service module (ISM). - */ -#define DLT_JUNIPER_ISM 194 - -/* - * IEEE 802.15.4, exactly as it appears in the spec (no padding, no - * nothing); requested by Mikko Saarnivala . - */ -#define DLT_IEEE802_15_4 195 - -/* - * Various link-layer types, with a pseudo-header, for SITA - * (http://www.sita.aero/); requested by Fulko Hew (fulko.hew@gmail.com). - */ -#define DLT_SITA 196 - -/* - * Various link-layer types, with a pseudo-header, for Endace DAG cards; - * encapsulates Endace ERF records. Requested by Stephen Donnelly - * . - */ -#define DLT_ERF 197 - -/* - * Special header prepended to Ethernet packets when capturing from a - * u10 Networks board. Requested by Phil Mulholland - * . - */ -#define DLT_RAIF1 198 - -/* - * IPMB packet for IPMI, beginning with the I2C slave address, followed - * by the netFn and LUN, etc.. Requested by Chanthy Toeung - * . - */ -#define DLT_IPMB 199 - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . - * The DLT_ is used for capturing data on a secure tunnel interface. - */ -#define DLT_JUNIPER_ST 200 - -/* - * Bluetooth HCI UART transport layer (part H:4), with pseudo-header - * that includes direction information; requested by Paolo Abeni. - */ -#define DLT_BLUETOOTH_HCI_H4_WITH_PHDR 201 - - -/* - * The instruction encodings. - */ -/* instruction classes */ -#define BPF_CLASS(code) ((code) & 0x07) -#define BPF_LD 0x00 -#define BPF_LDX 0x01 -#define BPF_ST 0x02 -#define BPF_STX 0x03 -#define BPF_ALU 0x04 -#define BPF_JMP 0x05 -#define BPF_RET 0x06 -#define BPF_MISC 0x07 - -/* ld/ldx fields */ -#define BPF_SIZE(code) ((code) & 0x18) -#define BPF_W 0x00 -#define BPF_H 0x08 -#define BPF_B 0x10 -#define BPF_MODE(code) ((code) & 0xe0) -#define BPF_IMM 0x00 -#define BPF_ABS 0x20 -#define BPF_IND 0x40 -#define BPF_MEM 0x60 -#define BPF_LEN 0x80 -#define BPF_MSH 0xa0 - -/* alu/jmp fields */ -#define BPF_OP(code) ((code) & 0xf0) -#define BPF_ADD 0x00 -#define BPF_SUB 0x10 -#define BPF_MUL 0x20 -#define BPF_DIV 0x30 -#define BPF_OR 0x40 -#define BPF_AND 0x50 -#define BPF_LSH 0x60 -#define BPF_RSH 0x70 -#define BPF_NEG 0x80 -#define BPF_JA 0x00 -#define BPF_JEQ 0x10 -#define BPF_JGT 0x20 -#define BPF_JGE 0x30 -#define BPF_JSET 0x40 -#define BPF_SRC(code) ((code) & 0x08) -#define BPF_K 0x00 -#define BPF_X 0x08 - -/* ret - BPF_K and BPF_X also apply */ -#define BPF_RVAL(code) ((code) & 0x18) -#define BPF_A 0x10 - -/* misc */ -#define BPF_MISCOP(code) ((code) & 0xf8) -#define BPF_TAX 0x00 -#define BPF_TXA 0x80 - -/* - * The instruction data structure. - */ -struct bpf_insn { - u_short code; - u_char jt; - u_char jf; - bpf_int32 k; -}; - -/* - * Macros for insn array initializers. - */ -#define BPF_STMT(code, k) { (u_short)(code), 0, 0, k } -#define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k } - -#if __STDC__ || defined(__cplusplus) -extern int bpf_validate(struct bpf_insn *, int); -extern u_int bpf_filter(struct bpf_insn *, u_char *, u_int, u_int); -#else -extern int bpf_validate(); -extern u_int bpf_filter(); -#endif - -/* - * Number of scratch memory words (for BPF_LD|BPF_MEM and BPF_ST). - */ -#define BPF_MEMWORDS 16 - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/contrib/libpcap-0.9/pcap.h b/contrib/libpcap-0.9/pcap.h index 9c8767e25a..df0784f72e 100644 --- a/contrib/libpcap-0.9/pcap.h +++ b/contrib/libpcap-0.9/pcap.h @@ -47,9 +47,7 @@ #include #endif /* WIN32/MSDOS/UN*X */ -#ifndef PCAP_DONT_INCLUDE_PCAP_BPF_H -#include -#endif +#include #include diff --git a/contrib/openpam/CREDITS b/contrib/openpam/CREDITS index aa8bd57cae..c8da3ff7c1 100644 --- a/contrib/openpam/CREDITS +++ b/contrib/openpam/CREDITS @@ -14,6 +14,7 @@ or indirectly, with patches, criticism, suggestions, or ideas: Andrew Morgan Brian Fundakowski Feldman Christos Zoulas + Daniel Richard G. Darren J. Moffat Dmitry V. Levin Emmanuel Dreyfus @@ -24,11 +25,13 @@ or indirectly, with patches, criticism, suggestions, or ideas: Hubert Feyrer Mark Murray Mike Petullo + Mikhail Teterin Mikko Työläjärvi Robert Watson Ruslan Ermilov Solar Designer Takanori Saneto + Wojciech A. Koszek Yar Tikhiy -$P4: //depot/projects/openpam/CREDITS#12 $ +$Id: CREDITS 400 2007-10-24 15:04:23Z des $ diff --git a/contrib/openpam/HISTORY b/contrib/openpam/HISTORY index fec20caa25..9c1c26e25c 100644 --- a/contrib/openpam/HISTORY +++ b/contrib/openpam/HISTORY @@ -1,4 +1,27 @@ -OpenPAM Figwort 2005-06-16 +OpenPAM Hydrangea 2007-12-21 + + - ENHANCE: when compiling with GCC, mark up API functions with GCC + attributes where appropriate. + + - BUGFIX: fixed numerous warnings uncovered by GCC 4. + + - ENHANCE: building the documentation is now optional. + + - ENHANCE: corrected a number of mistakes and style issues in the + build system. + + - ENHANCE: API function arguments are now const where appropriate, to + match corresponding changes in the Solaris PAM and Linux-PAM APIs. + + - ENHANCE: corrected a number of C namespace violations. + + - ENHANCE: the module cache has been removed, allowing long-lived + applications to pick up module changes. This also allows multiple + threads to use PAM simultaneously (as long as they use separate PAM + contexts), since the module cache was the only part of OpenPAM that + was not thread-safe. +============================================================================ +OpenPAM Figwort 2005-06-16 - BUGFIX: Correct several small signedness and initialization bugs discovered during review by the NetBSD team. @@ -304,4 +327,4 @@ OpenPAM Calamite 2002-02-09 First (beta) release. ============================================================================ -$P4: //depot/projects/openpam/HISTORY#24 $ +$Id: HISTORY 409 2007-12-21 11:38:50Z des $ diff --git a/contrib/openpam/LICENSE b/contrib/openpam/LICENSE index 19a9687854..0260cca641 100644 --- a/contrib/openpam/LICENSE +++ b/contrib/openpam/LICENSE @@ -1,5 +1,6 @@ Copyright (c) 2002-2003 Networks Associates Technology, Inc. +Copyright (c) 2004-2007 Dag-Erling Smørgrav All rights reserved. This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,4 +32,4 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -$P4: //depot/projects/openpam/LICENSE#6 $ +$Id: LICENSE 408 2007-12-21 11:36:24Z des $ diff --git a/contrib/openpam/README b/contrib/openpam/README index 77c766cb19..475dd74f95 100644 --- a/contrib/openpam/README +++ b/contrib/openpam/README @@ -24,4 +24,4 @@ These are some of OpenPAM's features: Please direct bug reports and inquiries to des@freebsd.org. -$P4: //depot/projects/openpam/README#5 $ +$Id: README 320 2006-02-16 20:33:19Z des $ diff --git a/contrib/openpam/README.DELETED b/contrib/openpam/README.DELETED index 15399e256a..dcc1dd8a44 100644 --- a/contrib/openpam/README.DELETED +++ b/contrib/openpam/README.DELETED @@ -1,10 +1,10 @@ INSTALL -MANIFEST Makefile.am Makefile.in aclocal.m4 autogen.sh bin +compile config.guess config.h.in config.sub diff --git a/contrib/openpam/README.DRAGONFLY b/contrib/openpam/README.DRAGONFLY index ca2a66ba0d..6106451b1e 100644 --- a/contrib/openpam/README.DRAGONFLY +++ b/contrib/openpam/README.DRAGONFLY @@ -1,5 +1,5 @@ Original source can be obtained from: http://www.openpam.org -MD5 (openpam-20050616.tar.gz) = e82a48944d7080e7a3fb343afd5d8b0a +MD5 (openpam-20071221.tar.gz) = 33b7c097d96331b79cf1559abec78141 The file README.DELETED contains a list of deleted files. diff --git a/contrib/openpam/RELNOTES b/contrib/openpam/RELNOTES index a8aa9f1aea..d66c8f0061 100644 --- a/contrib/openpam/RELNOTES +++ b/contrib/openpam/RELNOTES @@ -1,6 +1,6 @@ - Release notes for OpenPAM Figwort - ================================= + Release notes for OpenPAM Hydrangea + =================================== This release corresponds to the code used in FreeBSD-CURRENT as of the release date. It has also been tested on several other platforms, and @@ -26,4 +26,4 @@ proper credit for your contribution. Please direct bug reports and inquiries to . -$P4: //depot/projects/openpam/RELNOTES#22 $ +$Id: RELNOTES 404 2007-11-28 12:31:04Z des $ diff --git a/contrib/openpam/doc/man/openpam.3 b/contrib/openpam/doc/man/openpam.3 index 8e0957c46e..eb23a76c48 100644 --- a/contrib/openpam/doc/man/openpam.3 +++ b/contrib/openpam/doc/man/openpam.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt OPENPAM 3 .Os .Sh NAME @@ -81,23 +82,23 @@ .Ft "int" .Fn openpam_ttyconv "int n" "const struct pam_message **msg" "struct pam_response **resp" "void *data" .Ft "int" -.Fn pam_error "pam_handle_t *pamh" "const char *fmt" "..." +.Fn pam_error "const pam_handle_t *pamh" "const char *fmt" "..." .Ft "int" .Fn pam_get_authtok "pam_handle_t *pamh" "int item" "const char **authtok" "const char *prompt" .Ft "int" -.Fn pam_info "pam_handle_t *pamh" "const char *fmt" "..." +.Fn pam_info "const pam_handle_t *pamh" "const char *fmt" "..." .Ft "int" -.Fn pam_prompt "pam_handle_t *pamh" "int style" "char **resp" "const char *fmt" "..." +.Fn pam_prompt "const pam_handle_t *pamh" "int style" "char **resp" "const char *fmt" "..." .Ft "int" .Fn pam_setenv "pam_handle_t *pamh" "const char *name" "const char *value" "int overwrite" .Ft "int" -.Fn pam_verror "pam_handle_t *pamh" "const char *fmt" "va_list ap" +.Fn pam_verror "const pam_handle_t *pamh" "const char *fmt" "va_list ap" .Ft "int" -.Fn pam_vinfo "pam_handle_t *pamh" "const char *fmt" "va_list ap" +.Fn pam_vinfo "const pam_handle_t *pamh" "const char *fmt" "va_list ap" .Ft "int" -.Fn pam_vprompt "pam_handle_t *pamh" "int style" "char **resp" "const char *fmt" "va_list ap" +.Fn pam_vprompt "const pam_handle_t *pamh" "int style" "char **resp" "const char *fmt" "va_list ap" .\" -.\" $P4: //depot/projects/openpam/doc/man/openpam.man#2 $ +.\" $Id: openpam.man 320 2006-02-16 20:33:19Z des $ .\" .Sh DESCRIPTION These functions are OpenPAM extensions to the PAM API. @@ -137,7 +138,7 @@ standardization. The OpenPAM library and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/openpam_borrow_cred.3 b/contrib/openpam/doc/man/openpam_borrow_cred.3 index 632693bc4b..4ae7123857 100644 --- a/contrib/openpam/doc/man/openpam_borrow_cred.3 +++ b/contrib/openpam/doc/man/openpam_borrow_cred.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt OPENPAM_BORROW_CRED 3 .Os .Sh NAME @@ -88,7 +89,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/openpam_free_data.3 b/contrib/openpam/doc/man/openpam_free_data.3 index 0c9329f3c6..542a5d2890 100644 --- a/contrib/openpam/doc/man/openpam_free_data.3 +++ b/contrib/openpam/doc/man/openpam_free_data.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt OPENPAM_FREE_DATA 3 .Os .Sh NAME @@ -71,7 +72,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/openpam_free_envlist.3 b/contrib/openpam/doc/man/openpam_free_envlist.3 index 08b993a160..8f02464ba0 100644 --- a/contrib/openpam/doc/man/openpam_free_envlist.3 +++ b/contrib/openpam/doc/man/openpam_free_envlist.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt OPENPAM_FREE_ENVLIST 3 .Os .Sh NAME @@ -68,7 +69,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/openpam_get_option.3 b/contrib/openpam/doc/man/openpam_get_option.3 index 2bab2b407a..cb5d5e3422 100644 --- a/contrib/openpam/doc/man/openpam_get_option.3 +++ b/contrib/openpam/doc/man/openpam_get_option.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt OPENPAM_GET_OPTION 3 .Os .Sh NAME @@ -74,7 +75,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/openpam_log.3 b/contrib/openpam/doc/man/openpam_log.3 index b96cd1d8d6..208bdf4feb 100644 --- a/contrib/openpam/doc/man/openpam_log.3 +++ b/contrib/openpam/doc/man/openpam_log.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt OPENPAM_LOG 3 .Os .Sh NAME @@ -108,7 +109,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/openpam_nullconv.3 b/contrib/openpam/doc/man/openpam_nullconv.3 index a41a7d938a..6e9bb8e8f3 100644 --- a/contrib/openpam/doc/man/openpam_nullconv.3 +++ b/contrib/openpam/doc/man/openpam_nullconv.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt OPENPAM_NULLCONV 3 .Os .Sh NAME @@ -95,7 +96,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/openpam_readline.3 b/contrib/openpam/doc/man/openpam_readline.3 index c4cbb2fdc4..8478920693 100644 --- a/contrib/openpam/doc/man/openpam_readline.3 +++ b/contrib/openpam/doc/man/openpam_readline.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt OPENPAM_READLINE 3 .Os .Sh NAME @@ -102,7 +103,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/openpam_restore_cred.3 b/contrib/openpam/doc/man/openpam_restore_cred.3 index 70fa3d70df..f1da98a938 100644 --- a/contrib/openpam/doc/man/openpam_restore_cred.3 +++ b/contrib/openpam/doc/man/openpam_restore_cred.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt OPENPAM_RESTORE_CRED 3 .Os .Sh NAME @@ -80,7 +81,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/openpam_set_option.3 b/contrib/openpam/doc/man/openpam_set_option.3 index 105e19517f..e262584753 100644 --- a/contrib/openpam/doc/man/openpam_set_option.3 +++ b/contrib/openpam/doc/man/openpam_set_option.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt OPENPAM_SET_OPTION 3 .Os .Sh NAME @@ -77,7 +78,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/openpam_ttyconv.3 b/contrib/openpam/doc/man/openpam_ttyconv.3 index d2512c3ea8..7374a94021 100644 --- a/contrib/openpam/doc/man/openpam_ttyconv.3 +++ b/contrib/openpam/doc/man/openpam_ttyconv.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt OPENPAM_TTYCONV 3 .Os .Sh NAME @@ -90,7 +91,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam.3 b/contrib/openpam/doc/man/pam.3 index e8a664737d..5740a4d243 100644 --- a/contrib/openpam/doc/man/pam.3 +++ b/contrib/openpam/doc/man/pam.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM 3 .Os .Sh NAME @@ -70,9 +71,9 @@ .Ft "int" .Fn pam_end "pam_handle_t *pamh" "int status" .Ft "int" -.Fn pam_get_data "pam_handle_t *pamh" "const char *module_data_name" "void **data" +.Fn pam_get_data "const pam_handle_t *pamh" "const char *module_data_name" "const void **data" .Ft "int" -.Fn pam_get_item "pam_handle_t *pamh" "int item_type" "const void **item" +.Fn pam_get_item "const pam_handle_t *pamh" "int item_type" "const void **item" .Ft "int" .Fn pam_get_user "pam_handle_t *pamh" "const char **user" "const char *prompt" .Ft "const char *" @@ -92,9 +93,9 @@ .Ft "int" .Fn pam_start "const char *service" "const char *user" "const struct pam_conv *pam_conv" "pam_handle_t **pamh" .Ft "const char *" -.Fn pam_strerror "pam_handle_t *pamh" "int error_number" +.Fn pam_strerror "const pam_handle_t *pamh" "int error_number" .\" -.\" $P4: //depot/projects/openpam/doc/man/pam.man#4 $ +.\" $Id: pam.man 320 2006-02-16 20:33:19Z des $ .\" .Sh DESCRIPTION The Pluggable Authentication Modules (PAM) library abstracts a number @@ -286,7 +287,7 @@ Unknown user. The OpenPAM library and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam.conf.5 b/contrib/openpam/doc/man/pam.conf.5 index 51dd12e229..8ffb6a32b0 100644 --- a/contrib/openpam/doc/man/pam.conf.5 +++ b/contrib/openpam/doc/man/pam.conf.5 @@ -26,9 +26,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam.conf.5#2 $ +.\" $Id: pam.conf.5 320 2006-02-16 20:33:19Z des $ .\" -.Dd June 9, 2005 +.Dd June 16, 2005 .Dt PAM.CONF 5 .Os .Sh NAME @@ -56,7 +56,7 @@ policy is used instead, if it exists. Entries in per-service policy files must be of one of the two forms below: .Bd -unfilled -offset indent -.Ar function-class Ar control-flag Ar module-path Op Ar arguments ... +.Ar function-class control-flag module-path Op Ar arguments ... .Ar function-class Cm include Ar other-service-name .Ed .Pp @@ -66,13 +66,15 @@ policy files are of the same form, but are prefixed by an additional field specifying the name of the service they apply to. .Pp In both types of policy files, blank lines are ignored, as is anything -to the right of a `#' sign. +to the right of a +.Ql # +sign. .Pp The .Ar function-class field specifies the class of functions the entry applies to, and is one of: -.Bl -tag -width "password" +.Bl -tag -width ".Cm password" .It Cm auth Authentication functions .Po @@ -98,7 +100,7 @@ The field determines how the result returned by the module affects the flow of control through (and the final result of) the rest of the chain, and is one of: -.Bl -tag -width "sufficient" +.Bl -tag -width ".Cm sufficient" .It Cm required If this module succeeds, the result of the chain will be success unless a later module fails. @@ -163,9 +165,11 @@ modify each and every service-specific policy. .%D "June 1997" .Re .Sh AUTHORS -The OpenPAM library was developed for the FreeBSD Project by ThinkSec +The OpenPAM library was developed for the +.Fx +Project by ThinkSec AS and Network Associates Laboratories, the Security Research Division -of Network Associates, Inc. under DARPA/SPAWAR contract +of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_acct_mgmt.3 b/contrib/openpam/doc/man/pam_acct_mgmt.3 index 5484bb74da..9fee0d3acc 100644 --- a/contrib/openpam/doc/man/pam_acct_mgmt.3 +++ b/contrib/openpam/doc/man/pam_acct_mgmt.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_ACCT_MGMT 3 .Os .Sh NAME @@ -107,7 +108,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_authenticate.3 b/contrib/openpam/doc/man/pam_authenticate.3 index b5bead3049..4cb1ec3924 100644 --- a/contrib/openpam/doc/man/pam_authenticate.3 +++ b/contrib/openpam/doc/man/pam_authenticate.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_AUTHENTICATE 3 .Os .Sh NAME @@ -121,7 +122,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_chauthtok.3 b/contrib/openpam/doc/man/pam_chauthtok.3 index eb76c83d88..570dbc293e 100644 --- a/contrib/openpam/doc/man/pam_chauthtok.3 +++ b/contrib/openpam/doc/man/pam_chauthtok.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_CHAUTHTOK 3 .Os .Sh NAME @@ -113,7 +114,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_close_session.3 b/contrib/openpam/doc/man/pam_close_session.3 index 8a3b07c8dd..d6e3bc3e5a 100644 --- a/contrib/openpam/doc/man/pam_close_session.3 +++ b/contrib/openpam/doc/man/pam_close_session.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_CLOSE_SESSION 3 .Os .Sh NAME @@ -103,7 +104,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_conv.3 b/contrib/openpam/doc/man/pam_conv.3 index 296275a91e..b74e8f4baf 100644 --- a/contrib/openpam/doc/man/pam_conv.3 +++ b/contrib/openpam/doc/man/pam_conv.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2002-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,9 +32,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $P4: //depot/projects/openpam/doc/man/pam_conv.3#4 $ +.\" $Id: pam_conv.3 408 2007-12-21 11:36:24Z des $ .\" -.Dd May 27, 2002 +.Dd June 16, 2005 .Dt PAM_CONV 3 .Os .Sh NAME @@ -159,8 +160,8 @@ Success. System error. .El .Sh SEE ALSO -.Xr openpam_ttyconv 3 , .Xr openpam_nullconv 3 , +.Xr openpam_ttyconv 3 , .Xr pam 3 , .Xr pam_error 3 , .Xr pam_get_item 3 , @@ -176,7 +177,7 @@ System error. .Sh AUTHORS The OpenPAM library and this manual page were developed for the FreeBSD Project by ThinkSec AS and Network Associates Laboratories, -the Security Research Division of Network Associates, Inc. under +the Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_end.3 b/contrib/openpam/doc/man/pam_end.3 index a9196a005a..bb1309309d 100644 --- a/contrib/openpam/doc/man/pam_end.3 +++ b/contrib/openpam/doc/man/pam_end.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_END 3 .Os .Sh NAME @@ -80,7 +81,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_error.3 b/contrib/openpam/doc/man/pam_error.3 index 86f395c948..2863a1e410 100644 --- a/contrib/openpam/doc/man/pam_error.3 +++ b/contrib/openpam/doc/man/pam_error.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_ERROR 3 .Os .Sh NAME @@ -45,7 +46,7 @@ .In sys/types.h .In security/pam_appl.h .Ft "int" -.Fn pam_error "pam_handle_t *pamh" "const char *fmt" "..." +.Fn pam_error "const pam_handle_t *pamh" "const char *fmt" "..." .Sh DESCRIPTION The .Nm @@ -80,7 +81,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_get_authtok.3 b/contrib/openpam/doc/man/pam_get_authtok.3 index 71fc11824a..d2cda79800 100644 --- a/contrib/openpam/doc/man/pam_get_authtok.3 +++ b/contrib/openpam/doc/man/pam_get_authtok.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_GET_AUTHTOK 3 .Os .Sh NAME @@ -127,7 +128,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_get_data.3 b/contrib/openpam/doc/man/pam_get_data.3 index 0b0b256584..6ae03cf11b 100644 --- a/contrib/openpam/doc/man/pam_get_data.3 +++ b/contrib/openpam/doc/man/pam_get_data.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_GET_DATA 3 .Os .Sh NAME @@ -45,7 +46,7 @@ .In sys/types.h .In security/pam_appl.h .Ft "int" -.Fn pam_get_data "pam_handle_t *pamh" "const char *module_data_name" "void **data" +.Fn pam_get_data "const pam_handle_t *pamh" "const char *module_data_name" "const void **data" .Sh DESCRIPTION The .Nm @@ -89,7 +90,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_get_item.3 b/contrib/openpam/doc/man/pam_get_item.3 index e5e3973d0f..01c4243566 100644 --- a/contrib/openpam/doc/man/pam_get_item.3 +++ b/contrib/openpam/doc/man/pam_get_item.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_GET_ITEM 3 .Os .Sh NAME @@ -45,7 +46,7 @@ .In sys/types.h .In security/pam_appl.h .Ft "int" -.Fn pam_get_item "pam_handle_t *pamh" "int item_type" "const void **item" +.Fn pam_get_item "const pam_handle_t *pamh" "int item_type" "const void **item" .Sh DESCRIPTION The .Nm @@ -122,7 +123,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_get_user.3 b/contrib/openpam/doc/man/pam_get_user.3 index 260bc7dd07..74b713072b 100644 --- a/contrib/openpam/doc/man/pam_get_user.3 +++ b/contrib/openpam/doc/man/pam_get_user.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_GET_USER 3 .Os .Sh NAME @@ -104,7 +105,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_getenv.3 b/contrib/openpam/doc/man/pam_getenv.3 index 281459617c..bacaf13756 100644 --- a/contrib/openpam/doc/man/pam_getenv.3 +++ b/contrib/openpam/doc/man/pam_getenv.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_GETENV 3 .Os .Sh NAME @@ -78,7 +79,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_getenvlist.3 b/contrib/openpam/doc/man/pam_getenvlist.3 index 59e12a1176..bafd482e02 100644 --- a/contrib/openpam/doc/man/pam_getenvlist.3 +++ b/contrib/openpam/doc/man/pam_getenvlist.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_GETENVLIST 3 .Os .Sh NAME @@ -99,7 +100,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_info.3 b/contrib/openpam/doc/man/pam_info.3 index ea89c31c38..dc1fcc910e 100644 --- a/contrib/openpam/doc/man/pam_info.3 +++ b/contrib/openpam/doc/man/pam_info.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_INFO 3 .Os .Sh NAME @@ -45,7 +46,7 @@ .In sys/types.h .In security/pam_appl.h .Ft "int" -.Fn pam_info "pam_handle_t *pamh" "const char *fmt" "..." +.Fn pam_info "const pam_handle_t *pamh" "const char *fmt" "..." .Sh DESCRIPTION The .Nm @@ -80,7 +81,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_open_session.3 b/contrib/openpam/doc/man/pam_open_session.3 index 9e0edf0b21..1bc4de4398 100644 --- a/contrib/openpam/doc/man/pam_open_session.3 +++ b/contrib/openpam/doc/man/pam_open_session.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_OPEN_SESSION 3 .Os .Sh NAME @@ -104,7 +105,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_prompt.3 b/contrib/openpam/doc/man/pam_prompt.3 index 604325038f..8712647c99 100644 --- a/contrib/openpam/doc/man/pam_prompt.3 +++ b/contrib/openpam/doc/man/pam_prompt.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_PROMPT 3 .Os .Sh NAME @@ -45,7 +46,7 @@ .In sys/types.h .In security/pam_appl.h .Ft "int" -.Fn pam_prompt "pam_handle_t *pamh" "int style" "char **resp" "const char *fmt" "..." +.Fn pam_prompt "const pam_handle_t *pamh" "int style" "char **resp" "const char *fmt" "..." .Sh DESCRIPTION The .Nm @@ -92,7 +93,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_putenv.3 b/contrib/openpam/doc/man/pam_putenv.3 index 7937818fb9..0db2828e7c 100644 --- a/contrib/openpam/doc/man/pam_putenv.3 +++ b/contrib/openpam/doc/man/pam_putenv.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_PUTENV 3 .Os .Sh NAME @@ -83,7 +84,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_set_data.3 b/contrib/openpam/doc/man/pam_set_data.3 index 97f66c87e4..d8c2c610a9 100644 --- a/contrib/openpam/doc/man/pam_set_data.3 +++ b/contrib/openpam/doc/man/pam_set_data.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_SET_DATA 3 .Os .Sh NAME @@ -93,7 +94,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_set_item.3 b/contrib/openpam/doc/man/pam_set_item.3 index 18497ede28..f4662d068c 100644 --- a/contrib/openpam/doc/man/pam_set_item.3 +++ b/contrib/openpam/doc/man/pam_set_item.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_SET_ITEM 3 .Os .Sh NAME @@ -87,7 +88,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_setcred.3 b/contrib/openpam/doc/man/pam_setcred.3 index e435c9a686..4df9b30ba5 100644 --- a/contrib/openpam/doc/man/pam_setcred.3 +++ b/contrib/openpam/doc/man/pam_setcred.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_SETCRED 3 .Os .Sh NAME @@ -116,7 +117,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_setenv.3 b/contrib/openpam/doc/man/pam_setenv.3 index 122b41e451..681ea0329f 100644 --- a/contrib/openpam/doc/man/pam_setenv.3 +++ b/contrib/openpam/doc/man/pam_setenv.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_SETENV 3 .Os .Sh NAME @@ -82,7 +83,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_sm_acct_mgmt.3 b/contrib/openpam/doc/man/pam_sm_acct_mgmt.3 index b30435262c..b4aa0d9bc7 100644 --- a/contrib/openpam/doc/man/pam_sm_acct_mgmt.3 +++ b/contrib/openpam/doc/man/pam_sm_acct_mgmt.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_SM_ACCT_MGMT 3 .Os .Sh NAME @@ -97,7 +98,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_sm_authenticate.3 b/contrib/openpam/doc/man/pam_sm_authenticate.3 index 56bfcd8519..0dbb6460e4 100644 --- a/contrib/openpam/doc/man/pam_sm_authenticate.3 +++ b/contrib/openpam/doc/man/pam_sm_authenticate.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_SM_AUTHENTICATE 3 .Os .Sh NAME @@ -99,7 +100,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_sm_chauthtok.3 b/contrib/openpam/doc/man/pam_sm_chauthtok.3 index 9ce954f5b7..b348cf2b20 100644 --- a/contrib/openpam/doc/man/pam_sm_chauthtok.3 +++ b/contrib/openpam/doc/man/pam_sm_chauthtok.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_SM_CHAUTHTOK 3 .Os .Sh NAME @@ -99,7 +100,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_sm_close_session.3 b/contrib/openpam/doc/man/pam_sm_close_session.3 index 751a9d258b..927d48a5c3 100644 --- a/contrib/openpam/doc/man/pam_sm_close_session.3 +++ b/contrib/openpam/doc/man/pam_sm_close_session.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_SM_CLOSE_SESSION 3 .Os .Sh NAME @@ -91,7 +92,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_sm_open_session.3 b/contrib/openpam/doc/man/pam_sm_open_session.3 index 6ae3d32466..bc47b30ce1 100644 --- a/contrib/openpam/doc/man/pam_sm_open_session.3 +++ b/contrib/openpam/doc/man/pam_sm_open_session.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_SM_OPEN_SESSION 3 .Os .Sh NAME @@ -91,7 +92,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_sm_setcred.3 b/contrib/openpam/doc/man/pam_sm_setcred.3 index 799e281d63..6f37589845 100644 --- a/contrib/openpam/doc/man/pam_sm_setcred.3 +++ b/contrib/openpam/doc/man/pam_sm_setcred.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_SM_SETCRED 3 .Os .Sh NAME @@ -97,7 +98,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_start.3 b/contrib/openpam/doc/man/pam_start.3 index 29f08d2af3..b020456229 100644 --- a/contrib/openpam/doc/man/pam_start.3 +++ b/contrib/openpam/doc/man/pam_start.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_START 3 .Os .Sh NAME @@ -102,7 +103,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_strerror.3 b/contrib/openpam/doc/man/pam_strerror.3 index de7e90f02b..b626eac536 100644 --- a/contrib/openpam/doc/man/pam_strerror.3 +++ b/contrib/openpam/doc/man/pam_strerror.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_STRERROR 3 .Os .Sh NAME @@ -45,7 +46,7 @@ .In sys/types.h .In security/pam_appl.h .Ft "const char *" -.Fn pam_strerror "pam_handle_t *pamh" "int error_number" +.Fn pam_strerror "const pam_handle_t *pamh" "int error_number" .Sh DESCRIPTION The .Nm @@ -74,7 +75,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_verror.3 b/contrib/openpam/doc/man/pam_verror.3 index 46f8e24349..1a034389f4 100644 --- a/contrib/openpam/doc/man/pam_verror.3 +++ b/contrib/openpam/doc/man/pam_verror.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_VERROR 3 .Os .Sh NAME @@ -45,7 +46,7 @@ .In sys/types.h .In security/pam_appl.h .Ft "int" -.Fn pam_verror "pam_handle_t *pamh" "const char *fmt" "va_list ap" +.Fn pam_verror "const pam_handle_t *pamh" "const char *fmt" "va_list ap" .Sh DESCRIPTION The .Nm @@ -84,7 +85,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_vinfo.3 b/contrib/openpam/doc/man/pam_vinfo.3 index 13bc9e44f2..a28965db90 100644 --- a/contrib/openpam/doc/man/pam_vinfo.3 +++ b/contrib/openpam/doc/man/pam_vinfo.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_VINFO 3 .Os .Sh NAME @@ -45,7 +46,7 @@ .In sys/types.h .In security/pam_appl.h .Ft "int" -.Fn pam_vinfo "pam_handle_t *pamh" "const char *fmt" "va_list ap" +.Fn pam_vinfo "const pam_handle_t *pamh" "const char *fmt" "va_list ap" .Sh DESCRIPTION The .Nm @@ -84,7 +85,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/doc/man/pam_vprompt.3 b/contrib/openpam/doc/man/pam_vprompt.3 index 1d24051846..72bca709bf 100644 --- a/contrib/openpam/doc/man/pam_vprompt.3 +++ b/contrib/openpam/doc/man/pam_vprompt.3 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2001-2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2004-2007 Dag-Erling Smørgrav .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by ThinkSec AS and @@ -33,7 +34,7 @@ .\" .\" $P4$ .\" -.Dd June 16, 2005 +.Dd December 21, 2007 .Dt PAM_VPROMPT 3 .Os .Sh NAME @@ -45,7 +46,7 @@ .In sys/types.h .In security/pam_appl.h .Ft "int" -.Fn pam_vprompt "pam_handle_t *pamh" "int style" "char **resp" "const char *fmt" "va_list ap" +.Fn pam_vprompt "const pam_handle_t *pamh" "int style" "char **resp" "const char *fmt" "va_list ap" .Sh DESCRIPTION The .Nm @@ -121,7 +122,7 @@ The function and this manual page were developed for the .Fx Project by ThinkSec AS and Network Associates Laboratories, the -Security Research Division of Network Associates, Inc.& under +Security Research Division of Network Associates, Inc.\& under DARPA/SPAWAR contract N66001-01-C-8035 .Pq Dq CBOSS , as part of the DARPA CHATS research program. diff --git a/contrib/openpam/include/security/openpam.h b/contrib/openpam/include/security/openpam.h index 55b237ecba..3361d62513 100644 --- a/contrib/openpam/include/security/openpam.h +++ b/contrib/openpam/include/security/openpam.h @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,17 +32,19 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/include/security/openpam.h#28 $ + * $Id: openpam.h 408 2007-12-21 11:36:24Z des $ */ -#ifndef _SECURITY_OPENPAM_H_INCLUDED -#define _SECURITY_OPENPAM_H_INCLUDED +#ifndef SECURITY_OPENPAM_H_INCLUDED +#define SECURITY_OPENPAM_H_INCLUDED /* * Annoying but necessary header pollution */ #include +#include + #ifdef __cplusplus extern "C" { #endif @@ -53,7 +56,8 @@ struct passwd; */ int openpam_borrow_cred(pam_handle_t *_pamh, - const struct passwd *_pwd); + const struct passwd *_pwd) + OPENPAM_NONNULL((1,2)); void openpam_free_data(pam_handle_t *_pamh, @@ -68,7 +72,8 @@ openpam_get_option(pam_handle_t *_pamh, const char *_option); int -openpam_restore_cred(pam_handle_t *_pamh); +openpam_restore_cred(pam_handle_t *_pamh) + OPENPAM_NONNULL((1)); int openpam_set_option(pam_handle_t *_pamh, @@ -76,50 +81,64 @@ openpam_set_option(pam_handle_t *_pamh, const char *_value); int -pam_error(pam_handle_t *_pamh, +pam_error(const pam_handle_t *_pamh, const char *_fmt, - ...); + ...) + OPENPAM_FORMAT ((__printf__, 2, 3)) + OPENPAM_NONNULL((1,2)); int pam_get_authtok(pam_handle_t *_pamh, int _item, const char **_authtok, - const char *_prompt); + const char *_prompt) + OPENPAM_NONNULL((1,3)); int -pam_info(pam_handle_t *_pamh, +pam_info(const pam_handle_t *_pamh, const char *_fmt, - ...); + ...) + OPENPAM_FORMAT ((__printf__, 2, 3)) + OPENPAM_NONNULL((1,2)); int -pam_prompt(pam_handle_t *_pamh, +pam_prompt(const pam_handle_t *_pamh, int _style, char **_resp, const char *_fmt, - ...); + ...) + OPENPAM_FORMAT ((__printf__, 4, 5)) + OPENPAM_NONNULL((1,4)); int pam_setenv(pam_handle_t *_pamh, const char *_name, const char *_value, - int _overwrite); + int _overwrite) + OPENPAM_NONNULL((1,2,3)); int -pam_vinfo(pam_handle_t *_pamh, +pam_vinfo(const pam_handle_t *_pamh, const char *_fmt, - va_list _ap); + va_list _ap) + OPENPAM_FORMAT ((__printf__, 2, 0)) + OPENPAM_NONNULL((1,2)); int -pam_verror(pam_handle_t *_pamh, +pam_verror(const pam_handle_t *_pamh, const char *_fmt, - va_list _ap); + va_list _ap) + OPENPAM_FORMAT ((__printf__, 2, 0)) + OPENPAM_NONNULL((1,2)); int -pam_vprompt(pam_handle_t *_pamh, +pam_vprompt(const pam_handle_t *_pamh, int _style, char **_resp, const char *_fmt, - va_list _ap); + va_list _ap) + OPENPAM_FORMAT ((__printf__, 4, 0)) + OPENPAM_NONNULL((1,4)); /* * Read cooked lines. @@ -130,7 +149,8 @@ pam_vprompt(pam_handle_t *_pamh, char * openpam_readline(FILE *_f, int *_lineno, - size_t *_lenp); + size_t *_lenp) + OPENPAM_NONNULL((1)); #endif /* @@ -151,10 +171,8 @@ _openpam_log(int _level, const char *_func, const char *_fmt, ...) -#if defined(__GNUC__) - __attribute__((__format__(__printf__, 3, 4))) -#endif - ; + OPENPAM_FORMAT ((__printf__, 3, 4)) + OPENPAM_NONNULL((3)); #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) #define openpam_log(lvl, ...) \ @@ -172,7 +190,9 @@ _openpam_log(int _level, void openpam_log(int _level, const char *_format, - ...); + ...) + OPENPAM_FORMAT ((__printf__, 2, 3)) + OPENPAM_NONNULL((2)); #endif /* @@ -217,6 +237,11 @@ PAM_EXTERN int \ pam_sm_##type(pam_handle_t *pamh, int flags, \ int argc, const char *argv[]) \ { \ + \ + (void)pamh; \ + (void)flags; \ + (void)argc; \ + (void)argv; \ return (PAM_IGNORE); \ } @@ -234,9 +259,6 @@ struct pam_module { char *path; pam_func_t func[PAM_NUM_PRIMITIVES]; void *dlh; - int refcount; - pam_module_t *prev; - pam_module_t *next; }; /* @@ -244,39 +266,43 @@ struct pam_module { */ #if defined(PAM_SM_AUTH) || defined(PAM_SM_ACCOUNT) || \ defined(PAM_SM_SESSION) || defined(PAM_SM_PASSWORD) -#define LINUX_PAM_MODULE +# define LINUX_PAM_MODULE #endif + #if defined(LINUX_PAM_MODULE) && !defined(PAM_SM_AUTH) -#define _PAM_SM_AUTHENTICATE 0 -#define _PAM_SM_SETCRED 0 +# define _PAM_SM_AUTHENTICATE 0 +# define _PAM_SM_SETCRED 0 #else -#undef PAM_SM_AUTH -#define PAM_SM_AUTH -#define _PAM_SM_AUTHENTICATE pam_sm_authenticate -#define _PAM_SM_SETCRED pam_sm_setcred +# undef PAM_SM_AUTH +# define PAM_SM_AUTH +# define _PAM_SM_AUTHENTICATE pam_sm_authenticate +# define _PAM_SM_SETCRED pam_sm_setcred #endif + #if defined(LINUX_PAM_MODULE) && !defined(PAM_SM_ACCOUNT) -#define _PAM_SM_ACCT_MGMT 0 +# define _PAM_SM_ACCT_MGMT 0 #else -#undef PAM_SM_ACCOUNT -#define PAM_SM_ACCOUNT -#define _PAM_SM_ACCT_MGMT pam_sm_acct_mgmt +# undef PAM_SM_ACCOUNT +# define PAM_SM_ACCOUNT +# define _PAM_SM_ACCT_MGMT pam_sm_acct_mgmt #endif + #if defined(LINUX_PAM_MODULE) && !defined(PAM_SM_SESSION) -#define _PAM_SM_OPEN_SESSION 0 -#define _PAM_SM_CLOSE_SESSION 0 +# define _PAM_SM_OPEN_SESSION 0 +# define _PAM_SM_CLOSE_SESSION 0 #else -#undef PAM_SM_SESSION -#define PAM_SM_SESSION -#define _PAM_SM_OPEN_SESSION pam_sm_open_session -#define _PAM_SM_CLOSE_SESSION pam_sm_close_session +# undef PAM_SM_SESSION +# define PAM_SM_SESSION +# define _PAM_SM_OPEN_SESSION pam_sm_open_session +# define _PAM_SM_CLOSE_SESSION pam_sm_close_session #endif + #if defined(LINUX_PAM_MODULE) && !defined(PAM_SM_PASSWORD) -#define _PAM_SM_CHAUTHTOK 0 +# define _PAM_SM_CHAUTHTOK 0 #else -#undef PAM_SM_PASSWORD -#define PAM_SM_PASSWORD -#define _PAM_SM_CHAUTHTOK pam_sm_chauthtok +# undef PAM_SM_PASSWORD +# define PAM_SM_PASSWORD +# define _PAM_SM_CHAUTHTOK pam_sm_chauthtok #endif /* @@ -284,33 +310,40 @@ struct pam_module { * You are not expected to understand this. */ #if defined(__FreeBSD__) -#define PAM_SOEXT ".so" +# define PAM_SOEXT ".so" #else -#ifndef NO_STATIC_MODULES -#define NO_STATIC_MODULES -#endif +# undef NO_STATIC_MODULES +# define NO_STATIC_MODULES #endif + #if defined(__GNUC__) && !defined(__PIC__) && !defined(NO_STATIC_MODULES) /* gcc, static linking */ -#include -#include -#define OPENPAM_STATIC_MODULES -#define PAM_EXTERN static -#define PAM_MODULE_ENTRY(name) \ -static char _pam_name[] = name PAM_SOEXT; \ -static struct pam_module _pam_module = { _pam_name, { \ - _PAM_SM_AUTHENTICATE, _PAM_SM_SETCRED, _PAM_SM_ACCT_MGMT, \ - _PAM_SM_OPEN_SESSION, _PAM_SM_CLOSE_SESSION, _PAM_SM_CHAUTHTOK }, \ - NULL, 0, NULL, NULL }; \ -DATA_SET(_openpam_static_modules, _pam_module) +# include +# include +# define OPENPAM_STATIC_MODULES +# define PAM_EXTERN static +# define PAM_MODULE_ENTRY(name) \ + static char _pam_name[] = name PAM_SOEXT; \ + static struct pam_module _pam_module = { \ + .path = _pam_name, \ + .func = { \ + [PAM_SM_AUTHENTICATE] = _PAM_SM_AUTHENTICATE, \ + [PAM_SM_SETCRED] = _PAM_SM_SETCRED, \ + [PAM_SM_ACCT_MGMT] = _PAM_SM_ACCT_MGMT, \ + [PAM_SM_OPEN_SESSION] = _PAM_SM_OPEN_SESSION, \ + [PAM_SM_CLOSE_SESSION] = _PAM_SM_CLOSE_SESSION, \ + [PAM_SM_CHAUTHTOK] = _PAM_SM_CHAUTHTOK \ + }, \ + }; \ + DATA_SET(_openpam_static_modules, _pam_module) #else /* normal case */ -#define PAM_EXTERN -#define PAM_MODULE_ENTRY(name) +# define PAM_EXTERN +# define PAM_MODULE_ENTRY(name) #endif #ifdef __cplusplus } #endif -#endif +#endif /* !SECURITY_OPENPAM_H_INCLUDED */ diff --git a/contrib/openpam/include/security/openpam_attr.h b/contrib/openpam/include/security/openpam_attr.h new file mode 100644 index 0000000000..aada5cc883 --- /dev/null +++ b/contrib/openpam/include/security/openpam_attr.h @@ -0,0 +1,28 @@ +/* + * $Id: openpam_attr.h 405 2007-12-19 11:38:27Z des $ + */ + +#ifndef SECURITY_PAM_ATTRIBUTES_H_INCLUDED +#define SECURITY_PAM_ATTRIBUTES_H_INCLUDED + +/* GCC attributes */ +#if defined(__GNUC__) && defined(__GNUC_MINOR__) && !defined(__STRICT_ANSI__) +# define OPENPAM_GNUC_PREREQ(maj, min) \ + ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) +#else +# define OPENPAM_GNUC_PREREQ(maj, min) 0 +#endif + +#if OPENPAM_GNUC_PREREQ(2,5) +# define OPENPAM_FORMAT(params) __attribute__((__format__ params)) +#else +# define OPENPAM_FORMAT(params) +#endif + +#if OPENPAM_GNUC_PREREQ(3,3) +# define OPENPAM_NONNULL(params) __attribute__((__nonnull__ params)) +#else +# define OPENPAM_NONNULL(params) +#endif + +#endif /* !SECURITY_PAM_ATTRIBUTES_H_INCLUDED */ diff --git a/contrib/openpam/include/security/openpam_version.h b/contrib/openpam/include/security/openpam_version.h index b7b3e8e85c..1a3b153bd3 100644 --- a/contrib/openpam/include/security/openpam_version.h +++ b/contrib/openpam/include/security/openpam_version.h @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,14 +32,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/include/security/openpam_version.h#14 $ + * $Id: openpam_version.h 409 2007-12-21 11:38:50Z des $ */ -#ifndef _OPENPAM_VERSION_H_INCLUDED -#define _OPENPAM_VERSION_H_INCLUDED +#ifndef SECURITY_OPENPAM_VERSION_H_INCLUDED +#define SECURITY_OPENPAM_VERSION_H_INCLUDED -#define _OPENPAM -#define _OPENPAM_VERSION 20050616 -#define _OPENPAM_RELEASE "Figwort" +#define OPENPAM +#define OPENPAM_VERSION 20071221 +#define OPENPAM_RELEASE "Hydrangea" -#endif +#endif /* !SECURITY_OPENPAM_VERSION_H_INCLUDED */ diff --git a/contrib/openpam/include/security/pam_appl.h b/contrib/openpam/include/security/pam_appl.h index d97022e2db..8316c68ab0 100644 --- a/contrib/openpam/include/security/pam_appl.h +++ b/contrib/openpam/include/security/pam_appl.h @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,14 +32,15 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/include/security/pam_appl.h#14 $ + * $Id: pam_appl.h 408 2007-12-21 11:36:24Z des $ */ -#ifndef _PAM_APPL_H_INCLUDED -#define _PAM_APPL_H_INCLUDED +#ifndef SECURITY_PAM_APPL_H_INCLUDED +#define SECURITY_PAM_APPL_H_INCLUDED #include #include +#include #ifdef __cplusplus extern "C" { @@ -50,53 +52,65 @@ extern "C" { int pam_acct_mgmt(pam_handle_t *_pamh, - int _flags); + int _flags) + OPENPAM_NONNULL((1)); int pam_authenticate(pam_handle_t *_pamh, - int _flags); + int _flags) + OPENPAM_NONNULL((1)); int pam_chauthtok(pam_handle_t *_pamh, - int _flags); + int _flags) + OPENPAM_NONNULL((1)); int pam_close_session(pam_handle_t *_pamh, - int _flags); + int _flags) + OPENPAM_NONNULL((1)); int pam_end(pam_handle_t *_pamh, - int _status); + int _status) + OPENPAM_NONNULL((1)); int -pam_get_data(pam_handle_t *_pamh, +pam_get_data(const pam_handle_t *_pamh, const char *_module_data_name, - void **_data); + const void **_data) + OPENPAM_NONNULL((1,2,3)); int -pam_get_item(pam_handle_t *_pamh, +pam_get_item(const pam_handle_t *_pamh, int _item_type, - const void **_item); + const void **_item) + OPENPAM_NONNULL((1,3)); int pam_get_user(pam_handle_t *_pamh, const char **_user, - const char *_prompt); + const char *_prompt) + OPENPAM_NONNULL((1,2)); const char * pam_getenv(pam_handle_t *_pamh, - const char *_name); + const char *_name) + OPENPAM_NONNULL((1,2)); char ** -pam_getenvlist(pam_handle_t *_pamh); +pam_getenvlist(pam_handle_t *_pamh) + OPENPAM_NONNULL((1)); int pam_open_session(pam_handle_t *_pamh, - int _flags); + int _flags) + OPENPAM_NONNULL((1)); int pam_putenv(pam_handle_t *_pamh, - const char *_namevalue); + const char *_namevalue) + OPENPAM_NONNULL((1,2)); int pam_set_data(pam_handle_t *_pamh, @@ -104,25 +118,29 @@ pam_set_data(pam_handle_t *_pamh, void *_data, void (*_cleanup)(pam_handle_t *_pamh, void *_data, - int _pam_end_status)); + int _pam_end_status)) + OPENPAM_NONNULL((1,2)); int pam_set_item(pam_handle_t *_pamh, int _item_type, - const void *_item); + const void *_item) + OPENPAM_NONNULL((1)); int pam_setcred(pam_handle_t *_pamh, - int _flags); + int _flags) + OPENPAM_NONNULL((1)); int pam_start(const char *_service, const char *_user, const struct pam_conv *_pam_conv, - pam_handle_t **_pamh); + pam_handle_t **_pamh) + OPENPAM_NONNULL((4)); const char * -pam_strerror(pam_handle_t *_pamh, +pam_strerror(const pam_handle_t *_pamh, int _error_number); /* @@ -177,4 +195,4 @@ pam_set_mapped_username(pam_handle_t *_pamh, } #endif -#endif +#endif /* !SECURITY_PAM_APPL_H_INCLUDED */ diff --git a/contrib/openpam/include/security/pam_constants.h b/contrib/openpam/include/security/pam_constants.h index f3f8d304be..b005c7f4f8 100644 --- a/contrib/openpam/include/security/pam_constants.h +++ b/contrib/openpam/include/security/pam_constants.h @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,11 +32,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/include/security/pam_constants.h#22 $ + * $Id: pam_constants.h 408 2007-12-21 11:36:24Z des $ */ -#ifndef _PAM_CONSTANTS_H_INCLUDED -#define _PAM_CONSTANTS_H_INCLUDED +#ifndef SECURITY_PAM_CONSTANTS_H_INCLUDED +#define SECURITY_PAM_CONSTANTS_H_INCLUDED #include @@ -132,4 +133,4 @@ enum { } #endif -#endif +#endif /* !SECURITY_PAM_CONSTANTS_H_INCLUDED */ diff --git a/contrib/openpam/include/security/pam_modules.h b/contrib/openpam/include/security/pam_modules.h index 821b03d6c7..539f662a04 100644 --- a/contrib/openpam/include/security/pam_modules.h +++ b/contrib/openpam/include/security/pam_modules.h @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,11 +32,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/include/security/pam_modules.h#9 $ + * $Id: pam_modules.h 408 2007-12-21 11:36:24Z des $ */ -#ifndef _PAM_MODULES_H_INCLUDED -#define _PAM_MODULES_H_INCLUDED +#ifndef SECURITY_PAM_MODULES_H_INCLUDED +#define SECURITY_PAM_MODULES_H_INCLUDED #include #include @@ -157,4 +158,4 @@ pam_sm_set_mapped_username(pam_handle_t *_pamh, } #endif -#endif +#endif /* !SECURITY_PAM_MODULES_H_INCLUDED */ diff --git a/contrib/openpam/include/security/pam_types.h b/contrib/openpam/include/security/pam_types.h index ebe2eec736..0209bc8a62 100644 --- a/contrib/openpam/include/security/pam_types.h +++ b/contrib/openpam/include/security/pam_types.h @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,11 +32,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/include/security/pam_types.h#13 $ + * $Id: pam_types.h 408 2007-12-21 11:36:24Z des $ */ -#ifndef _PAM_TYPES_H_INCLUDED -#define _PAM_TYPES_H_INCLUDED +#ifndef SECURITY_PAM_TYPES_H_INCLUDED +#define SECURITY_PAM_TYPES_H_INCLUDED #include @@ -77,11 +78,11 @@ typedef struct pam_handle pam_handle_t; typedef struct pam_repository { char *type; void *scope; - size_t scope_len; + size_t scope_len; } pam_repository_t; #ifdef __cplusplus } #endif -#endif +#endif /* !SECURITY_PAM_TYPES_H_INCLUDED */ diff --git a/contrib/openpam/lib/openpam_borrow_cred.c b/contrib/openpam/lib/openpam_borrow_cred.c index edf8889d26..79a349f800 100644 --- a/contrib/openpam/lib/openpam_borrow_cred.c +++ b/contrib/openpam/lib/openpam_borrow_cred.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_borrow_cred.c#13 $ + * $Id: openpam_borrow_cred.c 408 2007-12-21 11:36:24Z des $ */ #include @@ -57,7 +58,7 @@ openpam_borrow_cred(pam_handle_t *pamh, const struct passwd *pwd) { struct pam_saved_cred *scred; - void *scredp; + const void *scredp; int r; ENTERI(pwd->pw_uid); diff --git a/contrib/openpam/lib/openpam_configure.c b/contrib/openpam/lib/openpam_configure.c index 348f224b1f..f9197adcfa 100644 --- a/contrib/openpam/lib/openpam_configure.c +++ b/contrib/openpam/lib/openpam_configure.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2001-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_configure.c#11 $ + * $Id: openpam_configure.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/openpam_dispatch.c b/contrib/openpam/lib/openpam_dispatch.c index d36b2bd974..69fe472a7a 100644 --- a/contrib/openpam/lib/openpam_dispatch.c +++ b/contrib/openpam/lib/openpam_dispatch.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_dispatch.c#21 $ + * $Id: openpam_dispatch.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/openpam_dynamic.c b/contrib/openpam/lib/openpam_dynamic.c index 2e062fb735..084408ec1e 100644 --- a/contrib/openpam/lib/openpam_dynamic.c +++ b/contrib/openpam/lib/openpam_dynamic.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_dynamic.c#14 $ + * $Id: openpam_dynamic.c 408 2007-12-21 11:36:24Z des $ */ #include @@ -80,6 +81,7 @@ openpam_dynamic(const char *path) *strrchr(vpath, '.') = '\0'; if ((dlh = dlopen(vpath, RTLD_NOW)) == NULL) { openpam_log(PAM_LOG_DEBUG, "%s: %s", vpath, dlerror()); + FREE(vpath); FREE(module); return (NULL); } diff --git a/contrib/openpam/lib/openpam_findenv.c b/contrib/openpam/lib/openpam_findenv.c index f6ddf61223..d78e1479c7 100644 --- a/contrib/openpam/lib/openpam_findenv.c +++ b/contrib/openpam/lib/openpam_findenv.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_findenv.c#12 $ + * $Id: openpam_findenv.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/openpam_free_data.c b/contrib/openpam/lib/openpam_free_data.c index 6a6e5026ec..e071c0a101 100644 --- a/contrib/openpam/lib/openpam_free_data.c +++ b/contrib/openpam/lib/openpam_free_data.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_free_data.c#7 $ + * $Id: openpam_free_data.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/openpam_free_envlist.c b/contrib/openpam/lib/openpam_free_envlist.c index 42caddf9e8..346c2ddb6b 100644 --- a/contrib/openpam/lib/openpam_free_envlist.c +++ b/contrib/openpam/lib/openpam_free_envlist.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_free_envlist.c#2 $ + * $Id: openpam_free_envlist.c 320 2006-02-16 20:33:19Z des $ */ #include diff --git a/contrib/openpam/lib/openpam_get_option.c b/contrib/openpam/lib/openpam_get_option.c index bfdd8569ac..73bc070a10 100644 --- a/contrib/openpam/lib/openpam_get_option.c +++ b/contrib/openpam/lib/openpam_get_option.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_get_option.c#10 $ + * $Id: openpam_get_option.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/openpam_impl.h b/contrib/openpam/lib/openpam_impl.h index f5ec65da37..7704d4ed6f 100644 --- a/contrib/openpam/lib/openpam_impl.h +++ b/contrib/openpam/lib/openpam_impl.h @@ -1,5 +1,6 @@ /*- * Copyright (c) 2001-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_impl.h#29 $ + * $Id: openpam_impl.h 408 2007-12-21 11:36:24Z des $ */ #ifndef _OPENPAM_IMPL_H_INCLUDED diff --git a/contrib/openpam/lib/openpam_load.c b/contrib/openpam/lib/openpam_load.c index 35d2b1770b..303f3f580a 100644 --- a/contrib/openpam/lib/openpam_load.c +++ b/contrib/openpam/lib/openpam_load.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_load.c#21 $ + * $Id: openpam_load.c 408 2007-12-21 11:36:24Z des $ */ #include @@ -60,11 +61,8 @@ const char *_pam_sm_func_name[PAM_NUM_PRIMITIVES] = { "pam_sm_chauthtok" }; -static pam_module_t *modules; - /* - * Locate a matching dynamic or static module. Keep a list of previously - * found modules to speed up the process. + * Locate a matching dynamic or static module. */ pam_module_t * @@ -72,12 +70,6 @@ openpam_load_module(const char *path) { pam_module_t *module; - /* check cache first */ - for (module = modules; module != NULL; module = module->next) - if (strcmp(module->path, path) == 0) - goto found; - - /* nope; try to load */ module = openpam_dynamic(path); openpam_log(PAM_LOG_DEBUG, "%s dynamic %s", (module == NULL) ? "no" : "using", path); @@ -94,14 +86,6 @@ openpam_load_module(const char *path) openpam_log(PAM_LOG_ERROR, "no %s found", path); return (NULL); } - openpam_log(PAM_LOG_DEBUG, "adding %s to cache", module->path); - module->next = modules; - if (module->next != NULL) - module->next->prev = module; - module->prev = NULL; - modules = module; - found: - ++module->refcount; return (module); } @@ -116,25 +100,10 @@ openpam_release_module(pam_module_t *module) { if (module == NULL) return; - --module->refcount; - if (module->refcount > 0) - /* still in use */ - return; - if (module->refcount < 0) { - openpam_log(PAM_LOG_ERROR, "module %s has negative refcount", - module->path); - module->refcount = 0; - } if (module->dlh == NULL) /* static module */ return; dlclose(module->dlh); - if (module->prev != NULL) - module->prev->next = module->next; - if (module->next != NULL) - module->next->prev = module->prev; - if (module == modules) - modules = module->next; openpam_log(PAM_LOG_DEBUG, "releasing %s", module->path); FREE(module->path); FREE(module); diff --git a/contrib/openpam/lib/openpam_log.c b/contrib/openpam/lib/openpam_log.c index 6d76474842..e49229484b 100644 --- a/contrib/openpam/lib/openpam_log.c +++ b/contrib/openpam/lib/openpam_log.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_log.c#24 $ + * $Id: openpam_log.c 408 2007-12-21 11:36:24Z des $ */ #include @@ -45,7 +46,11 @@ #include "openpam_impl.h" +#ifdef OPENPAM_DEBUG +int _openpam_debug = 1; +#else int _openpam_debug = 0; +#endif #if !defined(openpam_log) diff --git a/contrib/openpam/lib/openpam_nullconv.c b/contrib/openpam/lib/openpam_nullconv.c index 6668ce2f50..3294dcf82a 100644 --- a/contrib/openpam/lib/openpam_nullconv.c +++ b/contrib/openpam/lib/openpam_nullconv.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_nullconv.c#7 $ + * $Id: openpam_nullconv.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/openpam_readline.c b/contrib/openpam/lib/openpam_readline.c index 11dda5cb3a..17f03f3ae0 100644 --- a/contrib/openpam/lib/openpam_readline.c +++ b/contrib/openpam/lib/openpam_readline.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_readline.c#3 $ + * $Id: openpam_readline.c 408 2007-12-21 11:36:24Z des $ */ #include @@ -52,7 +53,7 @@ char * openpam_readline(FILE *f, int *lineno, size_t *lenp) { - unsigned char *line; + char *line; size_t len, size; int ch; @@ -63,7 +64,7 @@ openpam_readline(FILE *f, int *lineno, size_t *lenp) #define line_putch(ch) do { \ if (len >= size - 1) { \ - unsigned char *tmp = realloc(line, size *= 2); \ + char *tmp = realloc(line, size *= 2); \ if (tmp == NULL) \ goto fail; \ line = tmp; \ @@ -83,7 +84,7 @@ openpam_readline(FILE *f, int *lineno, size_t *lenp) /* eof */ if (ch == EOF) { /* remove trailing whitespace */ - while (len > 0 && isspace(line[len - 1])) + while (len > 0 && isspace((int)line[len - 1])) --len; line[len] = '\0'; if (len == 0) @@ -96,7 +97,7 @@ openpam_readline(FILE *f, int *lineno, size_t *lenp) ++*lineno; /* remove trailing whitespace */ - while (len > 0 && isspace(line[len - 1])) + while (len > 0 && isspace((int)line[len - 1])) --len; line[len] = '\0'; /* skip blank lines */ diff --git a/contrib/openpam/lib/openpam_restore_cred.c b/contrib/openpam/lib/openpam_restore_cred.c index 9585e3f290..20e80d41a2 100644 --- a/contrib/openpam/lib/openpam_restore_cred.c +++ b/contrib/openpam/lib/openpam_restore_cred.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_restore_cred.c#11 $ + * $Id: openpam_restore_cred.c 408 2007-12-21 11:36:24Z des $ */ #include @@ -55,8 +56,8 @@ int openpam_restore_cred(pam_handle_t *pamh) { - struct pam_saved_cred *scred; - void *scredp; + const struct pam_saved_cred *scred; + const void *scredp; int r; ENTER(); diff --git a/contrib/openpam/lib/openpam_set_option.c b/contrib/openpam/lib/openpam_set_option.c index a955d2b14f..57161d3129 100644 --- a/contrib/openpam/lib/openpam_set_option.c +++ b/contrib/openpam/lib/openpam_set_option.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_set_option.c#13 $ + * $Id: openpam_set_option.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/openpam_static.c b/contrib/openpam/lib/openpam_static.c index 1346c8b446..c06ceedb2f 100644 --- a/contrib/openpam/lib/openpam_static.c +++ b/contrib/openpam/lib/openpam_static.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_static.c#6 $ + * $Id: openpam_static.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/openpam_ttyconv.c b/contrib/openpam/lib/openpam_ttyconv.c index cad2a1b99f..a6820b9d71 100644 --- a/contrib/openpam/lib/openpam_ttyconv.c +++ b/contrib/openpam/lib/openpam_ttyconv.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_ttyconv.c#26 $ + * $Id: openpam_ttyconv.c 408 2007-12-21 11:36:24Z des $ */ #include @@ -87,6 +88,7 @@ prompt(const char *msg) fd = fileno(stdin); buf[0] = '\0'; eof = error = 0; + saved_alarm = 0; if (openpam_ttyconv_timeout >= 0) saved_alarm = alarm(openpam_ttyconv_timeout); ch = '\0'; @@ -110,7 +112,7 @@ prompt(const char *msg) alarm(0); sigaction(SIGALRM, &saved_action, NULL); sigprocmask(SIG_SETMASK, &saved_sigset, NULL); - if (openpam_ttyconv_timeout >= 0) + if (saved_alarm > 0) alarm(saved_alarm); if (error == EINTR) fputs(" timeout!", stderr); diff --git a/contrib/openpam/lib/pam_acct_mgmt.c b/contrib/openpam/lib/pam_acct_mgmt.c index d5bdbfb703..0088ecf8b2 100644 --- a/contrib/openpam/lib/pam_acct_mgmt.c +++ b/contrib/openpam/lib/pam_acct_mgmt.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_acct_mgmt.c#14 $ + * $Id: pam_acct_mgmt.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_authenticate.c b/contrib/openpam/lib/pam_authenticate.c index a37e32bf35..3b5a78d119 100644 --- a/contrib/openpam/lib/pam_authenticate.c +++ b/contrib/openpam/lib/pam_authenticate.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_authenticate.c#15 $ + * $Id: pam_authenticate.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_authenticate_secondary.c b/contrib/openpam/lib/pam_authenticate_secondary.c index 09e983904f..27e3ce790b 100644 --- a/contrib/openpam/lib/pam_authenticate_secondary.c +++ b/contrib/openpam/lib/pam_authenticate_secondary.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_authenticate_secondary.c#8 $ + * $Id: pam_authenticate_secondary.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_chauthtok.c b/contrib/openpam/lib/pam_chauthtok.c index 224e8f27cc..ecf1063c71 100644 --- a/contrib/openpam/lib/pam_chauthtok.c +++ b/contrib/openpam/lib/pam_chauthtok.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_chauthtok.c#16 $ + * $Id: pam_chauthtok.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_close_session.c b/contrib/openpam/lib/pam_close_session.c index ee4945fbb0..ab50e357ed 100644 --- a/contrib/openpam/lib/pam_close_session.c +++ b/contrib/openpam/lib/pam_close_session.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_close_session.c#13 $ + * $Id: pam_close_session.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_end.c b/contrib/openpam/lib/pam_end.c index 0dd3ea75e6..80baf8ac82 100644 --- a/contrib/openpam/lib/pam_end.c +++ b/contrib/openpam/lib/pam_end.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_end.c#14 $ + * $Id: pam_end.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_error.c b/contrib/openpam/lib/pam_error.c index a2708bfa46..f42a6b5fbf 100644 --- a/contrib/openpam/lib/pam_error.c +++ b/contrib/openpam/lib/pam_error.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_error.c#10 $ + * $Id: pam_error.c 408 2007-12-21 11:36:24Z des $ */ #include @@ -50,7 +51,7 @@ */ int -pam_error(pam_handle_t *pamh, +pam_error(const pam_handle_t *pamh, const char *fmt, ...) { diff --git a/contrib/openpam/lib/pam_get_authtok.c b/contrib/openpam/lib/pam_get_authtok.c index b65430a508..2a974c9c86 100644 --- a/contrib/openpam/lib/pam_get_authtok.c +++ b/contrib/openpam/lib/pam_get_authtok.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_get_authtok.c#28 $ + * $Id: pam_get_authtok.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_get_data.c b/contrib/openpam/lib/pam_get_data.c index 5b31064cec..0cceef0c97 100644 --- a/contrib/openpam/lib/pam_get_data.c +++ b/contrib/openpam/lib/pam_get_data.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_get_data.c#14 $ + * $Id: pam_get_data.c 408 2007-12-21 11:36:24Z des $ */ #include @@ -48,9 +49,9 @@ */ int -pam_get_data(pam_handle_t *pamh, +pam_get_data(const pam_handle_t *pamh, const char *module_data_name, - void **data) + const void **data) { pam_data_t *dp; diff --git a/contrib/openpam/lib/pam_get_item.c b/contrib/openpam/lib/pam_get_item.c index 16b20ed2b2..9f127bea23 100644 --- a/contrib/openpam/lib/pam_get_item.c +++ b/contrib/openpam/lib/pam_get_item.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_get_item.c#17 $ + * $Id: pam_get_item.c 408 2007-12-21 11:36:24Z des $ */ #include @@ -64,7 +65,7 @@ const char *_pam_item_name[PAM_NUM_ITEMS] = { */ int -pam_get_item(pam_handle_t *pamh, +pam_get_item(const pam_handle_t *pamh, int item_type, const void **item) { diff --git a/contrib/openpam/lib/pam_get_mapped_authtok.c b/contrib/openpam/lib/pam_get_mapped_authtok.c index 7a5b3b1393..c49a9182f6 100644 --- a/contrib/openpam/lib/pam_get_mapped_authtok.c +++ b/contrib/openpam/lib/pam_get_mapped_authtok.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_get_mapped_authtok.c#8 $ + * $Id: pam_get_mapped_authtok.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_get_mapped_username.c b/contrib/openpam/lib/pam_get_mapped_username.c index cec8a252a2..359baee462 100644 --- a/contrib/openpam/lib/pam_get_mapped_username.c +++ b/contrib/openpam/lib/pam_get_mapped_username.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_get_mapped_username.c#8 $ + * $Id: pam_get_mapped_username.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_get_user.c b/contrib/openpam/lib/pam_get_user.c index d59d33239d..115a3eaf33 100644 --- a/contrib/openpam/lib/pam_get_user.c +++ b/contrib/openpam/lib/pam_get_user.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_get_user.c#20 $ + * $Id: pam_get_user.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_getenv.c b/contrib/openpam/lib/pam_getenv.c index 4faafdc375..f2d791084c 100644 --- a/contrib/openpam/lib/pam_getenv.c +++ b/contrib/openpam/lib/pam_getenv.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_getenv.c#16 $ + * $Id: pam_getenv.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_getenvlist.c b/contrib/openpam/lib/pam_getenvlist.c index 82f2320493..c0e128a8fc 100644 --- a/contrib/openpam/lib/pam_getenvlist.c +++ b/contrib/openpam/lib/pam_getenvlist.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_getenvlist.c#13 $ + * $Id: pam_getenvlist.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_info.c b/contrib/openpam/lib/pam_info.c index 7d3ab94986..2e4dbc74af 100644 --- a/contrib/openpam/lib/pam_info.c +++ b/contrib/openpam/lib/pam_info.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_info.c#9 $ + * $Id: pam_info.c 408 2007-12-21 11:36:24Z des $ */ #include @@ -50,7 +51,7 @@ */ int -pam_info(pam_handle_t *pamh, +pam_info(const pam_handle_t *pamh, const char *fmt, ...) { diff --git a/contrib/openpam/lib/pam_open_session.c b/contrib/openpam/lib/pam_open_session.c index c7ae8651e3..f8d6eca62c 100644 --- a/contrib/openpam/lib/pam_open_session.c +++ b/contrib/openpam/lib/pam_open_session.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_open_session.c#14 $ + * $Id: pam_open_session.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_prompt.c b/contrib/openpam/lib/pam_prompt.c index 61355d40fd..76da55f64b 100644 --- a/contrib/openpam/lib/pam_prompt.c +++ b/contrib/openpam/lib/pam_prompt.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_prompt.c#9 $ + * $Id: pam_prompt.c 408 2007-12-21 11:36:24Z des $ */ #include @@ -48,7 +49,7 @@ */ int -pam_prompt(pam_handle_t *pamh, +pam_prompt(const pam_handle_t *pamh, int style, char **resp, const char *fmt, diff --git a/contrib/openpam/lib/pam_putenv.c b/contrib/openpam/lib/pam_putenv.c index 41530e6596..79d6228ab1 100644 --- a/contrib/openpam/lib/pam_putenv.c +++ b/contrib/openpam/lib/pam_putenv.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_putenv.c#12 $ + * $Id: pam_putenv.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_set_data.c b/contrib/openpam/lib/pam_set_data.c index a17ea0fb92..963de9285c 100644 --- a/contrib/openpam/lib/pam_set_data.c +++ b/contrib/openpam/lib/pam_set_data.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_set_data.c#15 $ + * $Id: pam_set_data.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_set_item.c b/contrib/openpam/lib/pam_set_item.c index 5b6efa6ca4..9b606183a8 100644 --- a/contrib/openpam/lib/pam_set_item.c +++ b/contrib/openpam/lib/pam_set_item.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_set_item.c#21 $ + * $Id: pam_set_item.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_set_mapped_authtok.c b/contrib/openpam/lib/pam_set_mapped_authtok.c index 0b59d5e6b2..01ad25584d 100644 --- a/contrib/openpam/lib/pam_set_mapped_authtok.c +++ b/contrib/openpam/lib/pam_set_mapped_authtok.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_set_mapped_authtok.c#8 $ + * $Id: pam_set_mapped_authtok.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_set_mapped_username.c b/contrib/openpam/lib/pam_set_mapped_username.c index 41f0a06817..ae3619bd22 100644 --- a/contrib/openpam/lib/pam_set_mapped_username.c +++ b/contrib/openpam/lib/pam_set_mapped_username.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_set_mapped_username.c#8 $ + * $Id: pam_set_mapped_username.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_setcred.c b/contrib/openpam/lib/pam_setcred.c index 625a07c7a3..80eb468608 100644 --- a/contrib/openpam/lib/pam_setcred.c +++ b/contrib/openpam/lib/pam_setcred.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_setcred.c#14 $ + * $Id: pam_setcred.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_setenv.c b/contrib/openpam/lib/pam_setenv.c index 1c1603970e..e73f6b52b2 100644 --- a/contrib/openpam/lib/pam_setenv.c +++ b/contrib/openpam/lib/pam_setenv.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_setenv.c#12 $ + * $Id: pam_setenv.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_sm_acct_mgmt.c b/contrib/openpam/lib/pam_sm_acct_mgmt.c index e5d65c2340..a57e86a43b 100644 --- a/contrib/openpam/lib/pam_sm_acct_mgmt.c +++ b/contrib/openpam/lib/pam_sm_acct_mgmt.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_sm_acct_mgmt.c#7 $ + * $Id: pam_sm_acct_mgmt.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_sm_authenticate.c b/contrib/openpam/lib/pam_sm_authenticate.c index 25446b2cc9..7f4bb1c70c 100644 --- a/contrib/openpam/lib/pam_sm_authenticate.c +++ b/contrib/openpam/lib/pam_sm_authenticate.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_sm_authenticate.c#7 $ + * $Id: pam_sm_authenticate.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_sm_authenticate_secondary.c b/contrib/openpam/lib/pam_sm_authenticate_secondary.c index b163baaf8b..bde0366ad5 100644 --- a/contrib/openpam/lib/pam_sm_authenticate_secondary.c +++ b/contrib/openpam/lib/pam_sm_authenticate_secondary.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_sm_authenticate_secondary.c#6 $ + * $Id: pam_sm_authenticate_secondary.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_sm_chauthtok.c b/contrib/openpam/lib/pam_sm_chauthtok.c index dc53be9bc1..2c41d6d905 100644 --- a/contrib/openpam/lib/pam_sm_chauthtok.c +++ b/contrib/openpam/lib/pam_sm_chauthtok.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_sm_chauthtok.c#8 $ + * $Id: pam_sm_chauthtok.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_sm_close_session.c b/contrib/openpam/lib/pam_sm_close_session.c index 428ac655d8..25cee92579 100644 --- a/contrib/openpam/lib/pam_sm_close_session.c +++ b/contrib/openpam/lib/pam_sm_close_session.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_sm_close_session.c#7 $ + * $Id: pam_sm_close_session.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_sm_get_mapped_authtok.c b/contrib/openpam/lib/pam_sm_get_mapped_authtok.c index 38f7c665ab..9d85d5f6b8 100644 --- a/contrib/openpam/lib/pam_sm_get_mapped_authtok.c +++ b/contrib/openpam/lib/pam_sm_get_mapped_authtok.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_sm_get_mapped_authtok.c#6 $ + * $Id: pam_sm_get_mapped_authtok.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_sm_get_mapped_username.c b/contrib/openpam/lib/pam_sm_get_mapped_username.c index c00a7de48b..ee4d2506ad 100644 --- a/contrib/openpam/lib/pam_sm_get_mapped_username.c +++ b/contrib/openpam/lib/pam_sm_get_mapped_username.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_sm_get_mapped_username.c#6 $ + * $Id: pam_sm_get_mapped_username.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_sm_open_session.c b/contrib/openpam/lib/pam_sm_open_session.c index 54040395ef..bfe0794a89 100644 --- a/contrib/openpam/lib/pam_sm_open_session.c +++ b/contrib/openpam/lib/pam_sm_open_session.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_sm_open_session.c#7 $ + * $Id: pam_sm_open_session.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_sm_set_mapped_authtok.c b/contrib/openpam/lib/pam_sm_set_mapped_authtok.c index d16c265f30..54fd370495 100644 --- a/contrib/openpam/lib/pam_sm_set_mapped_authtok.c +++ b/contrib/openpam/lib/pam_sm_set_mapped_authtok.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_sm_set_mapped_authtok.c#6 $ + * $Id: pam_sm_set_mapped_authtok.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_sm_set_mapped_username.c b/contrib/openpam/lib/pam_sm_set_mapped_username.c index 54bed9146b..0239dbb4df 100644 --- a/contrib/openpam/lib/pam_sm_set_mapped_username.c +++ b/contrib/openpam/lib/pam_sm_set_mapped_username.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_sm_set_mapped_username.c#6 $ + * $Id: pam_sm_set_mapped_username.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_sm_setcred.c b/contrib/openpam/lib/pam_sm_setcred.c index 919256d893..4d472b34dd 100644 --- a/contrib/openpam/lib/pam_sm_setcred.c +++ b/contrib/openpam/lib/pam_sm_setcred.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_sm_setcred.c#7 $ + * $Id: pam_sm_setcred.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_start.c b/contrib/openpam/lib/pam_start.c index e180fe84bc..ee6468b664 100644 --- a/contrib/openpam/lib/pam_start.c +++ b/contrib/openpam/lib/pam_start.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_start.c#18 $ + * $Id: pam_start.c 408 2007-12-21 11:36:24Z des $ */ #include diff --git a/contrib/openpam/lib/pam_strerror.c b/contrib/openpam/lib/pam_strerror.c index 4c7915f378..24498c4566 100644 --- a/contrib/openpam/lib/pam_strerror.c +++ b/contrib/openpam/lib/pam_strerror.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_strerror.c#13 $ + * $Id: pam_strerror.c 408 2007-12-21 11:36:24Z des $ */ #include @@ -81,7 +82,7 @@ const char *_pam_err_name[PAM_NUM_ERRORS] = { */ const char * -pam_strerror(pam_handle_t *pamh, +pam_strerror(const pam_handle_t *pamh, int error_number) { static char unknown[16]; diff --git a/contrib/openpam/lib/pam_verror.c b/contrib/openpam/lib/pam_verror.c index 292cadf7bd..0b128d1386 100644 --- a/contrib/openpam/lib/pam_verror.c +++ b/contrib/openpam/lib/pam_verror.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_verror.c#8 $ + * $Id: pam_verror.c 408 2007-12-21 11:36:24Z des $ */ #include @@ -49,7 +50,7 @@ */ int -pam_verror(pam_handle_t *pamh, +pam_verror(const pam_handle_t *pamh, const char *fmt, va_list ap) { diff --git a/contrib/openpam/lib/pam_vinfo.c b/contrib/openpam/lib/pam_vinfo.c index 3d02c0a525..5282714454 100644 --- a/contrib/openpam/lib/pam_vinfo.c +++ b/contrib/openpam/lib/pam_vinfo.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_vinfo.c#8 $ + * $Id: pam_vinfo.c 408 2007-12-21 11:36:24Z des $ */ #include @@ -49,7 +50,7 @@ */ int -pam_vinfo(pam_handle_t *pamh, +pam_vinfo(const pam_handle_t *pamh, const char *fmt, va_list ap) { diff --git a/contrib/openpam/lib/pam_vprompt.c b/contrib/openpam/lib/pam_vprompt.c index 99215dfa0b..e1215c3d72 100644 --- a/contrib/openpam/lib/pam_vprompt.c +++ b/contrib/openpam/lib/pam_vprompt.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. + * Copyright (c) 2004-2007 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -31,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/pam_vprompt.c#13 $ + * $Id: pam_vprompt.c 408 2007-12-21 11:36:24Z des $ */ #include @@ -49,7 +50,7 @@ */ int -pam_vprompt(pam_handle_t *pamh, +pam_vprompt(const pam_handle_t *pamh, int style, char **resp, const char *fmt, diff --git a/contrib/smbfs/smbutil/dumptree.c b/contrib/smbfs/smbutil/dumptree.c index 7d06142c3b..2ae383318e 100644 --- a/contrib/smbfs/smbutil/dumptree.c +++ b/contrib/smbfs/smbutil/dumptree.c @@ -1,5 +1,7 @@ #include #include +#include +#include #include #include #include diff --git a/etc/Makefile b/etc/Makefile index 103365f85d..30d1010e05 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -28,10 +28,10 @@ BIN1= amd.map auth.conf \ crontab csh.cshrc csh.login csh.logout \ devd.conf devices.conf dhclient.conf dm.conf dntpd.conf \ ftpusers group \ - hosts hosts.allow host.conf hosts.equiv hosts.lpd \ + hosts hosts.allow hosts.equiv hosts.lpd \ inetd.conf login.access login.conf \ - motd modems networks newsyslog.conf \ - pf.conf phones printcap profile \ + motd modems netconfig networks newsyslog.conf \ + nscd.conf pf.conf phones printcap profile \ remote sensorsd.conf \ shells sysctl.conf syslog.conf usbd.conf \ etc.${MACHINE_ARCH}/ttys @@ -231,9 +231,6 @@ upgrade_etc: preupgrade remove-obsolete-files .endif ldconfig -R .if !defined(BINARY_UPGRADE) # binary upgrade just copies these nodes -.if !defined(NOMAN) - cd ${UPGRADE_SRCDIR}/../share/man; ${MAKE} makedb -.endif .if !defined(NO_MAKEDEV) cd ${UPGRADE_SRCDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 555 \ MAKEDEV.local MAKEDEV ${DESTDIR}/dev diff --git a/etc/defaults/make.conf b/etc/defaults/make.conf index af0cce9831..29f8d5fc4a 100644 --- a/etc/defaults/make.conf +++ b/etc/defaults/make.conf @@ -95,6 +95,13 @@ THREAD_LIB?= thread_xu # To use GNU cpio as the standard cpio. The default is bsdcpio. #WITH_GCPIO= true # +# To enable Hesiod support in libc +#WANT_HESIOD= true +# +# To disable name caching in the nsswitch subsystem. The generic caching +# daemon, nscd(8), will not be built either if this option is set. +#NO_NS_CACHING= true +# # To avoid building various parts of the base system: #NO_BIND= true # do not build BIND #NO_CRYPT= true # do not build crypto code diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 9e72ffeb1e..0f7895baea 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -201,11 +201,12 @@ weak_mountd_authentication="NO" # Allow non-root mount requests to be served. nfs_reserved_port_only="NO" # Provide NFS only on secure port (or NO). nfs_bufpackets="" # bufspace (in packets) for client rpc_lockd_enable="NO" # Run NFS rpc.lockd needed for client/server. +rpc_lockd_flags="" # Flags to rpc.lockd (if enabled). rpc_statd_enable="NO" # Run NFS rpc.statd needed for client/server. +rpc_statd_flags="" # Flags to rpc.statd (if enabled). rpc_umntall_enable="YES" # Run NFS rpc.umntall on boot and shutdown rpcbind_enable="NO" # Run the portmapper service (YES/NO). -# this is rpcbind in 5.x -rpcbind_program="/usr/sbin/portmap" # path to rpcbind, if you want a different one. +rpcbind_program="/usr/sbin/rpcbind" # path to rpcbind, if you want a different one. rpcbind_flags="" # Flags to rpcbind (if enabled). rpc_ypupdated_enable="NO" # Run if NIS master and SecureRPC (or NO). keyserv_enable="NO" # Run the SecureRPC keyserver (or NO). @@ -403,6 +404,7 @@ cron_flags="" # Which options to pass to the cron daemon. lpd_enable="NO" # Run the line printer daemon. lpd_program="/usr/sbin/lpd" # path to lpd, if you want a different one. lpd_flags="" # Flags to lpd (if enabled). +nscd_enable="NO" # Run the nsswitch caching daemon. usbd_enable="NO" # Run the usbd daemon. usbd_flags="" # Flags to usbd (if enabled). devd_enable="NO" # Rund devd(8) daemon. diff --git a/etc/etc.amd64/disktab b/etc/etc.amd64/disktab new file mode 100644 index 0000000000..6fc7545dfd --- /dev/null +++ b/etc/etc.amd64/disktab @@ -0,0 +1,238 @@ +# $FreeBSD: src/etc/etc.i386/disktab,v 1.20.2.2 2002/04/15 00:44:15 dougb Exp $ +# $DragonFly: src/etc/etc.i386/disktab,v 1.3 2007/05/18 17:14:12 dillon Exp $ +# +# Disk geometry and partition layout tables. +# Key: +# dt controller type +# ty type of disk (fixed, removeable, simulated) +# ns #sectors/track +# nt #tracks/cylinder +# nc #cylinders/disk +# sc #sectors/cylinder, ns*nt default +# su #sectors/unit, sc*nc default +# se sector size, DEV_BSIZE default +# rm rpm, 3600 default +# sf supports bad144-style bad sector forwarding +# sk sector skew per track, default 0 +# cs sector skew per cylinder, default 0 +# hs headswitch time, default 0 +# ts one-cylinder seek time, default 0 +# il sector interleave (n:1), 1 default +# bs boot block size, default BBSIZE +# sb superblock size, default SBSIZE +# o[a-h] partition offsets in sectors +# p[a-h] partition sizes in sectors +# b[a-h] partition block sizes in bytes +# f[a-h] partition fragment sizes in bytes +# t[a-h] partition types (filesystem, swap, etc) +# +# Obsolete keys no longer supported: +# b0 used to allow specification of boot0 +# b1 used to allow specification of boot1 +# d[0-4] used to be drive-type-dependent parameters +# +# Software driven bad sector tables are no longer supported (if +# they ever were in the first place). + +# Floppy formats: +# +# To make a filesystem on a floppy: +# fdformat [-f ] fd[.] +# disklabel -B -r -w fd[.] fd +# newfs fd[.] +# +# with : +# -t 2 - two heads +# -u 9|15|18 - sectors per track +# (using the default value of 1/4096 is not much useful for floppies) +# -l 1 - interleave 1 (for most floppies) +# -i 65536 - bytes of data per i-node +# (the default -i value will render you with a floppy wasting way +# too much space in i-node areas) +# + +fd360:\ + :ty=floppy:se#512:nt#2:rm#300:ns#9:nc#40:\ + :pa#720:oa#0:ba#4096:fa#512:\ + :pb#720:ob#0:bb#4096:fb#512:\ + :pc#720:oc#0:bc#4096:fc#512: + +fd720:\ + :ty=floppy:se#512:nt#2:rm#300:ns#9:nc#80:\ + :pa#1440:oa#0:ba#4096:fa#512:\ + :pb#1440:ob#0:bb#4096:fb#512:\ + :pc#1440:oc#0:bc#4096:fc#512: + +fd1200|floppy5|5in|5.25in High Density Floppy:\ + :ty=floppy:se#512:nt#2:rm#360:ns#15:nc#80:\ + :pa#2400:oa#0:ba#4096:fa#512:\ + :pb#2400:ob#0:bb#4096:fb#512:\ + :pc#2400:oc#0:bc#4096:fc#512: + +fd1440|floppy|floppy3|3in|3.5in High Density Floppy:\ + :ty=floppy:se#512:nt#2:rm#300:ns#18:nc#80:\ + :pa#2880:oa#0:ba#4096:fa#512:\ + :pb#2880:ob#0:bb#4096:fb#512:\ + :pc#2880:oc#0:bc#4096:fc#512: + +# +# Stressed floppy-formats. No guarantees given. +# + +fd800:\ + :ty=floppy:se#512:nt#2:rm#300:ns#10:nc#80:\ + :pa#1600:oa#0:ba#4096:fa#512:\ + :pb#1600:ob#0:bb#4096:fb#512:\ + :pc#1600:oc#0:bc#4096:fc#512: + +fd820:\ + :ty=floppy:se#512:nt#2:rm#300:ns#10:nc#82:\ + :pa#1640:oa#0:ba#4096:fa#512:\ + :pb#1640:ob#0:bb#4096:fb#512:\ + :pc#1640:oc#0:bc#4096:fc#512: + +fd1480:\ + :ty=floppy:se#512:nt#2:rm#300:ns#18:nc#82:\ + :pa#2952:oa#0:ba#4096:fa#512:\ + :pb#2952:ob#0:bb#4096:fb#512:\ + :pc#2952:oc#0:bc#4096:fc#512: + +fd1720:\ + :ty=floppy:se#512:nt#2:rm#300:ns#21:nc#82:\ + :pa#3444:oa#0:ba#4096:fa#512:\ + :pb#3444:ob#0:bb#4096:fb#512:\ + :pc#3444:oc#0:bc#4096:fc#512: + +# +# LS-120 floppy-format. +# +fd120m|floppy120|floppy120m|3.5in LS-120 Floppy:\ + :ty=floppy:se#512:nt#8:rm#300:ns#32:nc#963:\ + :pa#246528:oa#0:ba#4096:fa#512:\ + :pb#246528:ob#0:bb#4096:fb#512:\ + :pc#246528:oc#0:bc#4096:fc#512: + +# +# Harddisk formats +# +qp120at|Quantum Peripherals 120MB IDE:\ + :dt=ESDI:ty=winchester:se#512:nt#9:ns#32:nc#813:sf: \ + :pa#13824:oa#0:ta=4.2BSD:ba#4096:fa#512: \ + :pb#13824:ob#13824:tb=swap: \ + :pc#234144:oc#0: \ + :ph#206496:oh#27648:th=4.2BSD:bh#4096:fh#512: + +pan60|Panasonic Laptop's 60MB IDE:\ + :dt=ST506:ty=winchester:se#512:nt#13:ns#17:nc#565:\ + :pa#13260:oa#0:ta=4.2BSD:ba#4096:fa#512:\ + :pb#13260:ob#13260:tb=swap: \ + :pc#124865:oc#0: \ + :ph#97682:oh#26520:th=4.2BSD:bh#4096:fh#512: + +mk156|toshiba156|Toshiba MK156 156Mb:\ + :dt=SCSI:ty=winchester:se#512:nt#10:ns#35:nc#825:\ + :pa#15748:oa#0:ba#4096:fa#512:ta=4.2BSD:\ + :pb#15748:ob#15748:tb=swap:\ + :pc#288750:oc#0:\ + :ph#257250:oh#31500:bh#4096:fh#512:th=4.2BSD: + +cp3100|Connor Peripherals 100MB IDE:\ + :dt=ST506:ty=winchester:se#512:nt#8:ns#33:nc#766: \ + :pa#12144:oa#0:ta=4.2BSD:ba#4096:fa#512: \ + :pb#12144:ob#12144:tb=swap: \ + :pc#202224:oc#0: \ + :ph#177936:oh#24288:th=4.2BSD:bh#4096:fh#512: + +# a == root +# b == swap +# c == d == whole disk +# e == /var +# f == scratch +# h == /usr + +cp3100new|Connor Peripherals 100MB IDE, with a different configuration:\ + :dt=ST506:ty=winchester:se#512:nt#8:ns#33:nc#766: \ + :pa#15840:oa#0:ta=4.2BSD:ba#4096:fa#512: \ + :pb#24288:ob#15840:tb=swap: \ + :pc#202224:oc#0: \ + :pd#202224:od#0: \ + :pe#15840:oe#40128:te=4.2BSD:be#4096:fe#512: \ + :pg#15840:og#55968:tg=4.2BSD:bg#4096:fg#512: \ + :ph#130416:oh#71808:th=4.2BSD:bh#4096:fh#512: + +maxtor4380|Maxtor XT4380E ESDI :\ + :dt=ESDI:ty=winchester:se#512:nt#15:ns#36:nc#1222:sf: \ + :pa#21600:oa#0:ta=4.2BSD:ba#4096:fa#512:\ + :pb#21600:ob#21600:tb=swap: \ + :pc#659880:oc#0: \ + :pd#216000:od#53200:td=4.2BSD:bd#4096:fd#512: \ + :ph#398520:oh#269200:th=4.2BSD:bh#4096:fh#512: + +miniscribe9380|compaq38|Miniscribe 9380 ESDI :\ + :ty=winchester:dt=ESDI:se#512:nt#15:ns#35:nc#1223:rm#3600:sf: \ + :pa#21000:oa#0:ba#8192:fa#1024:ta=4.2BSD: \ + :pb#42000:ob#21000:tb=swap: \ + :pc#642075:oc#0: \ + :pd#21000:od#63000:bd#8192:fd#1024:td=4.2BSD: \ + :ph#556500:oh#84000:bh#8192:fh#1024:th=4.2BSD: + +ida4|compaq88|Compaq IDA (4 drives) :\ + :ty=winchester:dt=IDA:se#512:nt#16:ns#63:nc#1644:rm#3600:\ + :pa#20160:oa#0:ba#8192:fa#1024:ta=4.2BSD: \ + :pb#80640:ob#20160:tb=swap: \ + :pc#1659168:oc#0: \ + :pd#201600:od#100800:bd#8192:fd#1024:td=4.2BSD: \ + :pe#20160:oe#1310400:be#8192:fe#1024:te=4.2BSD: \ + :ph#1008000:oh#302400:bh#8192:fh#1024:th=4.2BSD: \ + :pg#302400:og#1330560:bg#4096:fg#512:tg=4.2BSD: + +fuji513|Fujitsu M22XXXX: \ + :ty=winchester:dt=ESDI:se#512:nt#16:ns#63:nc#954:rm#3600:\ + :pa#20160:oa#82656:ba#4096:fa#512:ta=4.2BSD: \ + :pb#40320:ob#102816:tb=swap: \ + :pc#961632:oc#0: \ + :ph#656208:oh#143136:bh#4096:fh#512:th=4.2BSD: + +sony650|Sony 650 MB MOD|\ + :ty=removable:dt=SCSI:se#512:nt#1:ns#31:nc#18600:ts#1:rm#4800:\ + :pc#576600:oc#0:\ + :pa#576600:oa#0:ta=4.2BSD:ba#8192:fa#1024: + +mta3230|mo230|IBM MTA-3230 230 Meg 3.5inch Magneto-Optical:\ + :ty=removeable:dt=SCSI:rm#3600:\ + :se#512:nt#64:ns#32:nc#216:sc#2048:su#444384:\ + :pa#444384:oa#0:ba#4096:fa#0:ta=4.2BSD:\ + :pc#444384:oc#0: + +minimum:ty=mfs:se#512:nt#1:rm#300:\ + :ns#2880:nc#1:\ + :pa#2880:oa#0:ba#4096:fa#512:\ + :pc#2880:oc#0:bc#4096:fc#512: + +minimum2:ty=mfs:se#512:nt#1:rm#300:\ + :ns#5760:nc#1:\ + :pa#5760:oa#0:ba#4096:fa#512:\ + :pc#5760:oc#0:bc#4096:fc#512: + +minimum3:ty=mfs:se#512:nt#1:rm#300:\ + :ns#8640:nc#1:\ + :pa#8640:oa#0:ba#4096:fa#512:\ + :pc#8640:oc#0:bc#4096:fc#512: + +zip100|zip 100:\ + :ty=removable:se#512:nc#96:nt#64:ns#32:\ + :pa#196608:oa#0:ba#4096:fa#512:\ + :pb#196608:ob#0:bb#4096:fb#512:\ + :pc#196608:oc#0:bc#4096:fc#512: + +zip250|zip 250:\ + :ty=removable:se#512:nc#239:nt#64:ns#32:\ + :pa#489472:oa#0:ba#4096:fa#512:\ + :pb#489472:ob#0:bb#4096:fb#512:\ + :pc#489472:oc#0:bc#4096:fc#512: + +orb2200|orb22|orb:\ + :ty=removable:ns#63:nt#128:nc#4273:sc#1008:su#4307184:se#512:\ + :pa#4307184:oa#0:ba#8192:fa#1024:\ + :pc#4307184:oc#0:bc#8192:fc#1024: + diff --git a/etc/etc.amd64/ttys b/etc/etc.amd64/ttys new file mode 100644 index 0000000000..e15be96df9 --- /dev/null +++ b/etc/etc.amd64/ttys @@ -0,0 +1,308 @@ +# +# $FreeBSD: src/etc/etc.i386/ttys,v 1.8 2000/01/29 12:18:03 obrien Exp $ +# $DragonFly: src/etc/etc.i386/ttys,v 1.6 2006/08/29 07:41:46 swildner Exp $ +# @(#)ttys 5.1 (Berkeley) 4/17/89 +# +# This file specifies various information about terminals on the system. +# It is used by several different programs. Common entries for the +# various columns include: +# +# name The name of the terminal device. +# +# getty The program to start running on the terminal. Typically a +# getty program, as the name implies. Other common entries +# include none, when no getty is needed, and xdm, to start the +# X Window System. +# +# type The initial terminal type for this port. For hardwired +# terminal lines, this will contain the type of terminal used. +# For virtual consoles, the correct type is cons25. Other +# common values include network for network connections on +# pseudo-terminals, dialup for incoming modem ports, and unknown +# when the terminal type cannot be predetermined. +# +# status Must be on or off. If on, init will run the getty program on +# the specified port. If the word "secure" appears, this tty +# allows root login. +# +# name getty type status comments +# +# If console is marked "insecure", then init will ask for the root password +# when going to single-user mode. +console none unknown off secure +# +ttyv0 "/usr/libexec/getty Pc" cons25 on secure +# Virtual terminals +ttyv1 "/usr/libexec/getty Pc" cons25 on secure +ttyv2 "/usr/libexec/getty Pc" cons25 on secure +ttyv3 "/usr/libexec/getty Pc" cons25 on secure +ttyv4 "/usr/libexec/getty Pc" cons25 on secure +ttyv5 "/usr/libexec/getty Pc" cons25 on secure +ttyv6 "/usr/libexec/getty Pc" cons25 on secure +ttyv7 "/usr/libexec/getty Pc" cons25 on secure +ttyv8 "/usr/pkg/xorg/bin/xdm -nodaemon" xterm off secure +# Serial terminals +# The 'dialup' keyword identifies dialin lines to login, fingerd etc. +ttyd0 "/usr/libexec/getty std.9600" dialup off secure +ttyd1 "/usr/libexec/getty std.9600" dialup off secure +ttyd2 "/usr/libexec/getty std.9600" dialup off secure +ttyd3 "/usr/libexec/getty std.9600" dialup off secure +# Dumb console +dcons "/usr/libexec/getty std.9600" vt100 off secure +# Pseudo terminals +ttyp0 none network +ttyp1 none network +ttyp2 none network +ttyp3 none network +ttyp4 none network +ttyp5 none network +ttyp6 none network +ttyp7 none network +ttyp8 none network +ttyp9 none network +ttypa none network +ttypb none network +ttypc none network +ttypd none network +ttype none network +ttypf none network +ttypg none network +ttyph none network +ttypi none network +ttypj none network +ttypk none network +ttypl none network +ttypm none network +ttypn none network +ttypo none network +ttypp none network +ttypq none network +ttypr none network +ttyps none network +ttypt none network +ttypu none network +ttypv none network +ttyq0 none network +ttyq1 none network +ttyq2 none network +ttyq3 none network +ttyq4 none network +ttyq5 none network +ttyq6 none network +ttyq7 none network +ttyq8 none network +ttyq9 none network +ttyqa none network +ttyqb none network +ttyqc none network +ttyqd none network +ttyqe none network +ttyqf none network +ttyqg none network +ttyqh none network +ttyqi none network +ttyqj none network +ttyqk none network +ttyql none network +ttyqm none network +ttyqn none network +ttyqo none network +ttyqp none network +ttyqq none network +ttyqr none network +ttyqs none network +ttyqt none network +ttyqu none network +ttyqv none network +ttyr0 none network +ttyr1 none network +ttyr2 none network +ttyr3 none network +ttyr4 none network +ttyr5 none network +ttyr6 none network +ttyr7 none network +ttyr8 none network +ttyr9 none network +ttyra none network +ttyrb none network +ttyrc none network +ttyrd none network +ttyre none network +ttyrf none network +ttyrg none network +ttyrh none network +ttyri none network +ttyrj none network +ttyrk none network +ttyrl none network +ttyrm none network +ttyrn none network +ttyro none network +ttyrp none network +ttyrq none network +ttyrr none network +ttyrs none network +ttyrt none network +ttyru none network +ttyrv none network +ttys0 none network +ttys1 none network +ttys2 none network +ttys3 none network +ttys4 none network +ttys5 none network +ttys6 none network +ttys7 none network +ttys8 none network +ttys9 none network +ttysa none network +ttysb none network +ttysc none network +ttysd none network +ttyse none network +ttysf none network +ttysg none network +ttysh none network +ttysi none network +ttysj none network +ttysk none network +ttysl none network +ttysm none network +ttysn none network +ttyso none network +ttysp none network +ttysq none network +ttysr none network +ttyss none network +ttyst none network +ttysu none network +ttysv none network +ttyP0 none network +ttyP1 none network +ttyP2 none network +ttyP3 none network +ttyP4 none network +ttyP5 none network +ttyP6 none network +ttyP7 none network +ttyP8 none network +ttyP9 none network +ttyPa none network +ttyPb none network +ttyPc none network +ttyPd none network +ttyPe none network +ttyPf none network +ttyPg none network +ttyPh none network +ttyPi none network +ttyPj none network +ttyPk none network +ttyPl none network +ttyPm none network +ttyPn none network +ttyPo none network +ttyPp none network +ttyPq none network +ttyPr none network +ttyPs none network +ttyPt none network +ttyPu none network +ttyPv none network +ttyQ0 none network +ttyQ1 none network +ttyQ2 none network +ttyQ3 none network +ttyQ4 none network +ttyQ5 none network +ttyQ6 none network +ttyQ7 none network +ttyQ8 none network +ttyQ9 none network +ttyQa none network +ttyQb none network +ttyQc none network +ttyQd none network +ttyQe none network +ttyQf none network +ttyQg none network +ttyQh none network +ttyQi none network +ttyQj none network +ttyQk none network +ttyQl none network +ttyQm none network +ttyQn none network +ttyQo none network +ttyQp none network +ttyQq none network +ttyQr none network +ttyQs none network +ttyQt none network +ttyQu none network +ttyQv none network +ttyR0 none network +ttyR1 none network +ttyR2 none network +ttyR3 none network +ttyR4 none network +ttyR5 none network +ttyR6 none network +ttyR7 none network +ttyR8 none network +ttyR9 none network +ttyRa none network +ttyRb none network +ttyRc none network +ttyRd none network +ttyRe none network +ttyRf none network +ttyRg none network +ttyRh none network +ttyRi none network +ttyRj none network +ttyRk none network +ttyRl none network +ttyRm none network +ttyRn none network +ttyRo none network +ttyRp none network +ttyRq none network +ttyRr none network +ttyRs none network +ttyRt none network +ttyRu none network +ttyRv none network +ttyS0 none network +ttyS1 none network +ttyS2 none network +ttyS3 none network +ttyS4 none network +ttyS5 none network +ttyS6 none network +ttyS7 none network +ttyS8 none network +ttyS9 none network +ttySa none network +ttySb none network +ttySc none network +ttySd none network +ttySe none network +ttySf none network +ttySg none network +ttySh none network +ttySi none network +ttySj none network +ttySk none network +ttySl none network +ttySm none network +ttySn none network +ttySo none network +ttySp none network +ttySq none network +ttySr none network +ttySs none network +ttySt none network +ttySu none network +ttySv none network diff --git a/etc/host.conf b/etc/host.conf deleted file mode 100644 index eed1658cf2..0000000000 --- a/etc/host.conf +++ /dev/null @@ -1,8 +0,0 @@ -# $FreeBSD: src/etc/host.conf,v 1.6 1999/08/27 23:23:41 peter Exp $ -# $DragonFly: src/etc/host.conf,v 1.2 2003/06/17 04:24:45 dillon Exp $ -# First try the /etc/hosts file -hosts -# Now try the nameserver next. -bind -# If you have YP/NIS configured, uncomment the next line -# nis diff --git a/etc/hosts b/etc/hosts index 9e01843a11..a36591bfe8 100644 --- a/etc/hosts +++ b/etc/hosts @@ -1,4 +1,4 @@ -# $FreeBSD: src/etc/hosts,v 1.11.2.4 2003/02/06 20:36:58 dbaker Exp $ +# $FreeBSD: src/etc/hosts,v 1.16 2003/01/28 21:29:23 dbaker Exp $ # $DragonFly: src/etc/hosts,v 1.2 2003/06/17 04:24:45 dillon Exp $ # # Host Database @@ -8,7 +8,7 @@ # machine. # # In the presence of the domain name service or NIS, this file may -# not be consulted at all; see /etc/host.conf for the resolution order. +# not be consulted at all; see /etc/nsswitch.conf for the resolution order. # # ::1 localhost localhost.my.domain diff --git a/etc/netconfig b/etc/netconfig new file mode 100644 index 0000000000..0f2fbcd6e1 --- /dev/null +++ b/etc/netconfig @@ -0,0 +1,20 @@ +# $FreeBSD: src/etc/netconfig,v 1.3 2002/12/16 22:24:25 mbr Exp $ +# $DragonFly$ +# +# The network configuration file. This file is currently only used in +# conjunction with the (TI-) RPC code in the C library, unlike its +# use in SVR4. +# +# Entries consist of: +# +# \ +# +# +# The and fields are always empty in DragonFly. +# +udp6 tpi_clts v inet6 udp - - +tcp6 tpi_cots_ord v inet6 tcp - - +udp tpi_clts v inet udp - - +tcp tpi_cots_ord v inet tcp - - +rawip tpi_raw - inet - - - +local tpi_cots_ord - loopback - - - diff --git a/etc/nscd.conf b/etc/nscd.conf new file mode 100644 index 0000000000..8706c212b4 --- /dev/null +++ b/etc/nscd.conf @@ -0,0 +1,12 @@ +# +# Default caching daemon configuration file +# $FreeBSD: src/etc/nscd.conf,v 1.2 2007/10/18 08:26:20 bushman Exp $ +# + +enable-cache passwd yes +enable-cache group yes +enable-cache hosts yes +enable-cache services yes +enable-cache protocols yes +enable-cache rpc yes +enable-cache networks yes diff --git a/etc/rc.d/Makefile b/etc/rc.d/Makefile index 0ede6d0c9d..7a0f6d41f3 100644 --- a/etc/rc.d/Makefile +++ b/etc/rc.d/Makefile @@ -14,17 +14,18 @@ FILES= DAEMON LOGIN NETWORKING SERVERS abi accounting addswap adjkerntz \ inetd initdiskless initrandom ip6fw ipfilter ipfs ipfw ipmon \ ipnat ipsec ipxrouted isdnd jail \ kadmind kerberos keyserv kpasswdd \ - ldconfig local localdaemons lpd \ + ldconfig local localdaemons lockd lpd \ mixer motd mountcritlocal mountcritremote \ mountd moused mroute6d mrouted msgs \ named netif netoptions newsyslog \ - network_ipv6 nfsclient nfsd nfslocking nfsserver nisdomain \ + network_ipv6 nfsclient nfsd nfsserver nisdomain nscd nsswitch \ dntpd othermta pf pflog ppp ppp-user pppoed pwcheck \ quota random rarpd rcconf.sh resident rndcontrol root route6d routed \ routing rpcbind rtadvd rtsold rwho sysdb savecore sdpd securelevel \ - sendmail sensorsd serial sppp sshd swap1 syscons sysctl syslogd \ + sendmail sensorsd serial sppp sshd statd swap1 syscons sysctl syslogd \ timed ttys usbd varsym vinum virecover watchdogd wpa_supplicant \ ypbind yppasswdd ypserv ypset ypupdated ypxfrd + FILESDIR= /etc/rc.d FILESMODE= ${BINMODE} diff --git a/etc/rc.d/lockd b/etc/rc.d/lockd new file mode 100644 index 0000000000..d660c7dcef --- /dev/null +++ b/etc/rc.d/lockd @@ -0,0 +1,44 @@ +#!/bin/sh +# +# FreeBSD History: src/etc/rc.d/nfslocking,v 1.11 2004/10/07 13:55:26 mtm +# $FreeBSD: src/etc/rc.d/lockd,v 1.22 2008/07/16 19:50:29 dougb Exp $ +# $DragonFly$ +# + +# PROVIDE: lockd +# REQUIRE: nfsserver nfsclient nfsd rpcbind statd +# BEFORE: DAEMON +# KEYWORD: nojail shutdown + +. /etc/rc.subr + +name="lockd" +rcvar=rpc_lockd_enable +command="/usr/sbin/rpc.${name}" +start_precmd='lockd_precmd' +stop_precmd='checkyesno nfs_server_enable || checkyesno nfs_client_enable' +status_precmd=$stop_precmd + +# Make sure that we are either an NFS client or server, and that we get +# the correct flags from rc.conf(5). +# +lockd_precmd() +{ + local ret + ret=0 + + if ! checkyesno nfs_server_enable && ! checkyesno nfs_client_enable + then + ret=1 + fi + if ! checkyesno rpcbind_enable && \ + ! /etc/rc.d/rpcbind forcestatus 1>/dev/null 2>&1 + then + force_depend rpcbind || ret=1 + fi + rc_flags=${rpc_lockd_flags} + return ${ret} +} + +load_rc_config $name +run_rc_command $1 diff --git a/etc/rc.d/nfslocking b/etc/rc.d/nfslocking deleted file mode 100644 index aa4425624a..0000000000 --- a/etc/rc.d/nfslocking +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# -# $NetBSD: nfslocking,v 1.6 2002/03/24 15:52:41 lukem Exp $ -# $FreeBSD: src/etc/rc.d/nfslocking,v 1.4 2003/01/20 18:57:16 mtm Exp $ -# $DragonFly: src/etc/rc.d/nfslocking,v 1.4 2005/11/19 21:47:32 swildner Exp $ -# - -# PROVIDE: nfslocking -# REQUIRE: nfsserver nfsclient nfsd -# BEFORE: DAEMON - -. /etc/rc.subr - -arg=$1 - -RCVAR_SERVER="nfs_server_enable" -RCVAR_CLIENT="nfs_client_enable" -RCVAR_STATD="rpc_statd_enable" -RCVAR_LOCKD="rpc_lockd_enable" - -start_precmd='checkyesno ${RCVAR_SERVER} || checkyesno ${RCVAR_CLIENT} || - [ -n "$rc_force" ]' -stop_precmd=$start_precmd -status_precmd=$start_precmd - -name="statd" -rcvar=${RCVAR_STATD} -command="/usr/sbin/rpc.${name}" -load_rc_config $name -run_rc_command "$arg" - -name="lockd" -rcvar=${RCVAR_LOCKD} -command="/usr/sbin/rpc.${name}" -load_rc_config $name -run_rc_command "$arg" diff --git a/etc/rc.d/nscd b/etc/rc.d/nscd new file mode 100644 index 0000000000..13bbd851c8 --- /dev/null +++ b/etc/rc.d/nscd @@ -0,0 +1,52 @@ +#!/bin/sh +# +# $FreeBSD: src/etc/rc.d/nscd,v 1.7 2008/07/16 19:50:29 dougb Exp $ +# + +# PROVIDE: nscd +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf to enable nscd: +# +# nscd_enable="YES" +# +# See nscd(8) for flags +# + +. /etc/rc.subr + +name=nscd +rcvar=`set_rcvar` + +command=/usr/sbin/nscd +extra_commands="flush" +flush_cmd="${command} -I all" + +# usage: _nscd_set_option