Merge branches 'master' and 'suser_to_priv'
authorMichael Neumann <mneumann@ntecs.de>
Wed, 31 Dec 2008 13:06:40 +0000 (13:06 +0000)
committerMichael Neumann <mneumann@ntecs.de>
Wed, 31 Dec 2008 13:06:40 +0000 (13:06 +0000)
Conflicts:

sys/netinet/ip_carp.c
sys/platform/pc64/amd64/machdep.c

835 files changed:
Makefile.inc1
Makefile_upgrade.inc
bin/mv/mv.c
bin/ps/print.c
bin/rm/rm.c
contrib/bind-9.3/lib/bind/include/isc/list.h
contrib/bind-9.3/lib/bind/inet/inet_addr.c
contrib/bind-9.3/lib/bind/inet/inet_cidr_pton.c
contrib/bind-9.3/lib/bind/inet/inet_lnaof.c
contrib/bind-9.3/lib/bind/inet/inet_makeaddr.c
contrib/bind-9.3/lib/bind/inet/inet_net_pton.c
contrib/bind-9.3/lib/bind/inet/inet_neta.c
contrib/bind-9.3/lib/bind/inet/inet_netof.c
contrib/bind-9.3/lib/bind/inet/inet_network.c
contrib/bind-9.3/lib/bind/inet/inet_ntoa.c
contrib/bind-9.3/lib/bind/inet/inet_ntop.c
contrib/bind-9.3/lib/bind/inet/inet_pton.c
contrib/bind-9.3/lib/bind/inet/nsap_addr.c
contrib/bind-9.3/lib/bind/isc/ev_streams.c
contrib/bind-9.3/lib/bind/isc/ev_timers.c
contrib/bind-9.3/lib/bind/isc/eventlib_p.h
contrib/bind-9.3/lib/bind/nameser/ns_print.c
contrib/bind-9.3/lib/bind/nameser/ns_samedomain.c
contrib/bind-9.3/lib/bind/resolv/herror.c
contrib/bind-9.3/lib/bind/resolv/mtctxres.c
contrib/bind-9.3/lib/bind/resolv/res_comp.c
contrib/bind-9.3/lib/bind/resolv/res_data.c
contrib/bind-9.3/lib/bind/resolv/res_debug.c
contrib/bind-9.3/lib/bind/resolv/res_findzonecut.c
contrib/bind-9.3/lib/bind/resolv/res_init.c
contrib/bind-9.3/lib/bind/resolv/res_mkquery.c
contrib/bind-9.3/lib/bind/resolv/res_mkupdate.c
contrib/bind-9.3/lib/bind/resolv/res_query.c
contrib/bind-9.3/lib/bind/resolv/res_send.c
contrib/bind-9.3/lib/bind/resolv/res_update.c
contrib/gcc-3.4/gcc/config/i386/i386.c
contrib/gcc-4.1/gcc/config/i386/i386.c
contrib/libpcap-0.9/bpf/net/bpf_filter.c
contrib/libpcap-0.9/pcap-bpf.h [deleted file]
contrib/libpcap-0.9/pcap.h
contrib/openpam/CREDITS
contrib/openpam/HISTORY
contrib/openpam/LICENSE
contrib/openpam/README
contrib/openpam/README.DELETED
contrib/openpam/README.DRAGONFLY
contrib/openpam/RELNOTES
contrib/openpam/doc/man/openpam.3
contrib/openpam/doc/man/openpam_borrow_cred.3
contrib/openpam/doc/man/openpam_free_data.3
contrib/openpam/doc/man/openpam_free_envlist.3
contrib/openpam/doc/man/openpam_get_option.3
contrib/openpam/doc/man/openpam_log.3
contrib/openpam/doc/man/openpam_nullconv.3
contrib/openpam/doc/man/openpam_readline.3
contrib/openpam/doc/man/openpam_restore_cred.3
contrib/openpam/doc/man/openpam_set_option.3
contrib/openpam/doc/man/openpam_ttyconv.3
contrib/openpam/doc/man/pam.3
contrib/openpam/doc/man/pam.conf.5
contrib/openpam/doc/man/pam_acct_mgmt.3
contrib/openpam/doc/man/pam_authenticate.3
contrib/openpam/doc/man/pam_chauthtok.3
contrib/openpam/doc/man/pam_close_session.3
contrib/openpam/doc/man/pam_conv.3
contrib/openpam/doc/man/pam_end.3
contrib/openpam/doc/man/pam_error.3
contrib/openpam/doc/man/pam_get_authtok.3
contrib/openpam/doc/man/pam_get_data.3
contrib/openpam/doc/man/pam_get_item.3
contrib/openpam/doc/man/pam_get_user.3
contrib/openpam/doc/man/pam_getenv.3
contrib/openpam/doc/man/pam_getenvlist.3
contrib/openpam/doc/man/pam_info.3
contrib/openpam/doc/man/pam_open_session.3
contrib/openpam/doc/man/pam_prompt.3
contrib/openpam/doc/man/pam_putenv.3
contrib/openpam/doc/man/pam_set_data.3
contrib/openpam/doc/man/pam_set_item.3
contrib/openpam/doc/man/pam_setcred.3
contrib/openpam/doc/man/pam_setenv.3
contrib/openpam/doc/man/pam_sm_acct_mgmt.3
contrib/openpam/doc/man/pam_sm_authenticate.3
contrib/openpam/doc/man/pam_sm_chauthtok.3
contrib/openpam/doc/man/pam_sm_close_session.3
contrib/openpam/doc/man/pam_sm_open_session.3
contrib/openpam/doc/man/pam_sm_setcred.3
contrib/openpam/doc/man/pam_start.3
contrib/openpam/doc/man/pam_strerror.3
contrib/openpam/doc/man/pam_verror.3
contrib/openpam/doc/man/pam_vinfo.3
contrib/openpam/doc/man/pam_vprompt.3
contrib/openpam/include/security/openpam.h
contrib/openpam/include/security/openpam_attr.h [new file with mode: 0644]
contrib/openpam/include/security/openpam_version.h
contrib/openpam/include/security/pam_appl.h
contrib/openpam/include/security/pam_constants.h
contrib/openpam/include/security/pam_modules.h
contrib/openpam/include/security/pam_types.h
contrib/openpam/lib/openpam_borrow_cred.c
contrib/openpam/lib/openpam_configure.c
contrib/openpam/lib/openpam_dispatch.c
contrib/openpam/lib/openpam_dynamic.c
contrib/openpam/lib/openpam_findenv.c
contrib/openpam/lib/openpam_free_data.c
contrib/openpam/lib/openpam_free_envlist.c
contrib/openpam/lib/openpam_get_option.c
contrib/openpam/lib/openpam_impl.h
contrib/openpam/lib/openpam_load.c
contrib/openpam/lib/openpam_log.c
contrib/openpam/lib/openpam_nullconv.c
contrib/openpam/lib/openpam_readline.c
contrib/openpam/lib/openpam_restore_cred.c
contrib/openpam/lib/openpam_set_option.c
contrib/openpam/lib/openpam_static.c
contrib/openpam/lib/openpam_ttyconv.c
contrib/openpam/lib/pam_acct_mgmt.c
contrib/openpam/lib/pam_authenticate.c
contrib/openpam/lib/pam_authenticate_secondary.c
contrib/openpam/lib/pam_chauthtok.c
contrib/openpam/lib/pam_close_session.c
contrib/openpam/lib/pam_end.c
contrib/openpam/lib/pam_error.c
contrib/openpam/lib/pam_get_authtok.c
contrib/openpam/lib/pam_get_data.c
contrib/openpam/lib/pam_get_item.c
contrib/openpam/lib/pam_get_mapped_authtok.c
contrib/openpam/lib/pam_get_mapped_username.c
contrib/openpam/lib/pam_get_user.c
contrib/openpam/lib/pam_getenv.c
contrib/openpam/lib/pam_getenvlist.c
contrib/openpam/lib/pam_info.c
contrib/openpam/lib/pam_open_session.c
contrib/openpam/lib/pam_prompt.c
contrib/openpam/lib/pam_putenv.c
contrib/openpam/lib/pam_set_data.c
contrib/openpam/lib/pam_set_item.c
contrib/openpam/lib/pam_set_mapped_authtok.c
contrib/openpam/lib/pam_set_mapped_username.c
contrib/openpam/lib/pam_setcred.c
contrib/openpam/lib/pam_setenv.c
contrib/openpam/lib/pam_sm_acct_mgmt.c
contrib/openpam/lib/pam_sm_authenticate.c
contrib/openpam/lib/pam_sm_authenticate_secondary.c
contrib/openpam/lib/pam_sm_chauthtok.c
contrib/openpam/lib/pam_sm_close_session.c
contrib/openpam/lib/pam_sm_get_mapped_authtok.c
contrib/openpam/lib/pam_sm_get_mapped_username.c
contrib/openpam/lib/pam_sm_open_session.c
contrib/openpam/lib/pam_sm_set_mapped_authtok.c
contrib/openpam/lib/pam_sm_set_mapped_username.c
contrib/openpam/lib/pam_sm_setcred.c
contrib/openpam/lib/pam_start.c
contrib/openpam/lib/pam_strerror.c
contrib/openpam/lib/pam_verror.c
contrib/openpam/lib/pam_vinfo.c
contrib/openpam/lib/pam_vprompt.c
contrib/smbfs/smbutil/dumptree.c
etc/Makefile
etc/defaults/make.conf
etc/defaults/rc.conf
etc/etc.amd64/disktab [new file with mode: 0644]
etc/etc.amd64/ttys [new file with mode: 0644]
etc/host.conf [deleted file]
etc/hosts
etc/netconfig [new file with mode: 0644]
etc/nscd.conf [new file with mode: 0644]
etc/rc.d/Makefile
etc/rc.d/lockd [new file with mode: 0644]
etc/rc.d/nfslocking [deleted file]
etc/rc.d/nscd [new file with mode: 0644]
etc/rc.d/nsswitch [new file with mode: 0644]
etc/rc.d/statd [new file with mode: 0644]
etc/rpc
games/fortune/datfiles/dragonfly-tips
gnu/usr.bin/grep/grep.c
include/Makefile
include/arpa/inet.h
include/arpa/nameser.h
include/arpa/nameser_compat.h
include/dlfcn.h
include/grp.h
include/hesiod.h [new file with mode: 0644]
include/netconfig.h [new file with mode: 0644]
include/netdb.h
include/nss.h [copied from contrib/openpam/lib/openpam_static.c with 58% similarity]
include/nsswitch.h [new file with mode: 0644]
include/pwd.h
include/res_update.h [new file with mode: 0644]
include/resolv.h
include/rpc/Makefile
include/rpc/auth.h
include/rpc/auth_des.h
include/rpc/auth_kerb.h [new file with mode: 0644]
include/rpc/clnt.h
include/rpc/clnt_soc.h [new file with mode: 0644]
include/rpc/clnt_stat.h [new file with mode: 0644]
include/rpc/des_crypt.h
include/rpc/nettype.h [copied from include/rpc/svc_auth.h with 63% similarity]
include/rpc/pmap_clnt.h
include/rpc/pmap_prot.h
include/rpc/pmap_rmt.h
include/rpc/raw.h [copied from lib/libc/rpc/rpc_commondata.c with 70% similarity]
include/rpc/rpc.h
include/rpc/rpc_com.h
include/rpc/rpc_msg.h
include/rpc/rpcb_clnt.h [new file with mode: 0644]
include/rpc/rpcb_prot.x [new file with mode: 0644]
include/rpc/rpcent.h [copied from lib/libc/rpc/authunix_prot.c with 58% similarity]
include/rpc/svc.h
include/rpc/svc_auth.h
include/rpc/svc_dg.h [copied from lib/libc/rpc/pmap_prot.c with 62% similarity]
include/rpc/svc_soc.h [new file with mode: 0644]
include/rpc/types.h
include/rpc/xdr.h
include/rpcsvc/bootparam_prot.x
include/rpcsvc/nis.x
include/rpcsvc/nislib.h
include/rpcsvc/nlm_prot.x
include/rpcsvc/pmap_prot.x
include/rpcsvc/rstat.x
include/rpcsvc/yp_prot.h
include/rpcsvc/ypclnt.h
include/stdio.h
include/stdlib.h
lib/Makefile
lib/libc/Makefile.inc
lib/libc/gen/Makefile.inc
lib/libc/gen/_pthread_stubs.c
lib/libc/gen/dlfunc.c [new file with mode: 0644]
lib/libc/gen/dlopen.3
lib/libc/gen/getdiskbyname.3
lib/libc/gen/getdisktabbyname.3
lib/libc/gen/getgrent.3
lib/libc/gen/getgrent.c
lib/libc/gen/getgrouplist.c
lib/libc/gen/getpwent.3
lib/libc/gen/getpwent.c
lib/libc/gen/getusershell.3
lib/libc/gen/getusershell.c
lib/libc/gen/getvfsbyname.c
lib/libc/gen/getvfsent.c
lib/libc/gen/pw_scan.c [moved from usr.sbin/pwd_mkdb/pw_scan.c with 65% similarity]
lib/libc/gen/pw_scan.h [moved from usr.sbin/pwd_mkdb/pw_scan.h with 78% similarity]
lib/libc/gen/pwcache.3
lib/libc/gen/pwcache.c
lib/libc/include/isc/platform.h [new file with mode: 0644]
lib/libc/include/namespace.h
lib/libc/include/nscache.h [new file with mode: 0644]
lib/libc/include/nscachedcli.h [new file with mode: 0644]
lib/libc/include/nss_tls.h [new file with mode: 0644]
lib/libc/include/port_after.h [new file with mode: 0644]
lib/libc/include/port_before.h [new file with mode: 0644]
lib/libc/include/reentrant.h [new file with mode: 0644]
lib/libc/include/un-namespace.h
lib/libc/net/Makefile.inc
lib/libc/net/gai_strerror.c [new file with mode: 0644]
lib/libc/net/getaddrinfo.3
lib/libc/net/getaddrinfo.c
lib/libc/net/gethostbydns.c
lib/libc/net/gethostbyht.c
lib/libc/net/gethostbyname.3
lib/libc/net/gethostbynis.c
lib/libc/net/gethostnamadr.c
lib/libc/net/getipnodebyname.3
lib/libc/net/getnameinfo.3
lib/libc/net/getnameinfo.c
lib/libc/net/getnetbydns.c
lib/libc/net/getnetbyht.c
lib/libc/net/getnetbynis.c
lib/libc/net/getnetent.3
lib/libc/net/getnetnamadr.c
lib/libc/net/getproto.c
lib/libc/net/getprotoent.c
lib/libc/net/getprotoname.c
lib/libc/net/getservbyname.c [deleted file]
lib/libc/net/getservbyport.c [deleted file]
lib/libc/net/getservent.c
lib/libc/net/herror.c [deleted file]
lib/libc/net/hesiod.3 [new file with mode: 0644]
lib/libc/net/hesiod.c [new file with mode: 0644]
lib/libc/net/inet6_rth_space.3
lib/libc/net/inet_addr.c [deleted file]
lib/libc/net/inet_lnaof.c [deleted file]
lib/libc/net/inet_makeaddr.c [deleted file]
lib/libc/net/inet_net_ntop.c [deleted file]
lib/libc/net/inet_net_pton.c [deleted file]
lib/libc/net/inet_neta.c [deleted file]
lib/libc/net/inet_netof.c [deleted file]
lib/libc/net/inet_network.c [deleted file]
lib/libc/net/inet_ntoa.c [deleted file]
lib/libc/net/inet_ntop.c [deleted file]
lib/libc/net/inet_pton.c [deleted file]
lib/libc/net/name6.c
lib/libc/net/netdb_private.h [new file with mode: 0644]
lib/libc/net/ns_name.c [deleted file]
lib/libc/net/ns_netint.c [deleted file]
lib/libc/net/ns_parse.c [deleted file]
lib/libc/net/ns_print.c [deleted file]
lib/libc/net/ns_ttl.c [deleted file]
lib/libc/net/nscache.c [new file with mode: 0644]
lib/libc/net/nscachedcli.c [new file with mode: 0644]
lib/libc/net/nsdispatch.3 [new file with mode: 0644]
lib/libc/net/nsdispatch.c [new file with mode: 0644]
lib/libc/net/nslexer.l [new file with mode: 0644]
lib/libc/net/nsparser.y [new file with mode: 0644]
lib/libc/net/nss_backends.h [copied from contrib/openpam/include/security/openpam_version.h with 65% similarity]
lib/libc/net/nss_compat.c [new file with mode: 0644]
lib/libc/net/res_comp.c [deleted file]
lib/libc/net/res_config.h
lib/libc/net/res_data.c [deleted file]
lib/libc/net/res_debug.c [deleted file]
lib/libc/net/res_init.c [deleted file]
lib/libc/net/res_mkquery.c [deleted file]
lib/libc/net/res_mkupdate.c [deleted file]
lib/libc/net/res_query.c [deleted file]
lib/libc/net/res_send.c [deleted file]
lib/libc/net/res_update.c [deleted file]
lib/libc/resolv/Makefile.inc [new file with mode: 0644]
lib/libc/resolv/h_errno.c [copied from usr.sbin/portmap/pmap_check.h with 63% similarity]
lib/libc/resolv/res_state.c [copied from contrib/openpam/lib/openpam_free_data.c with 52% similarity]
lib/libc/rpc/LICENSE [new file with mode: 0644]
lib/libc/rpc/Makefile.inc
lib/libc/rpc/README
lib/libc/rpc/auth_des.c
lib/libc/rpc/auth_none.c
lib/libc/rpc/auth_time.c
lib/libc/rpc/auth_unix.c
lib/libc/rpc/authdes_prot.c
lib/libc/rpc/authunix_prot.c
lib/libc/rpc/bindresvport.3
lib/libc/rpc/bindresvport.c
lib/libc/rpc/clnt_bcast.c [new file with mode: 0644]
lib/libc/rpc/clnt_dg.c [new file with mode: 0644]
lib/libc/rpc/clnt_generic.c
lib/libc/rpc/clnt_perror.c
lib/libc/rpc/clnt_raw.c
lib/libc/rpc/clnt_simple.c
lib/libc/rpc/clnt_tcp.c [deleted file]
lib/libc/rpc/clnt_udp.c [deleted file]
lib/libc/rpc/clnt_unix.c [deleted file]
lib/libc/rpc/clnt_vc.c [new file with mode: 0644]
lib/libc/rpc/crypt_client.c
lib/libc/rpc/get_myaddress.c [deleted file]
lib/libc/rpc/getnetconfig.3 [new file with mode: 0644]
lib/libc/rpc/getnetconfig.c [new file with mode: 0644]
lib/libc/rpc/getnetpath.3 [new file with mode: 0644]
lib/libc/rpc/getnetpath.c [new file with mode: 0644]
lib/libc/rpc/getpublickey.c
lib/libc/rpc/getrpcent.3
lib/libc/rpc/getrpcent.c
lib/libc/rpc/getrpcport.c
lib/libc/rpc/key_call.c
lib/libc/rpc/key_prot_xdr.c
lib/libc/rpc/mt_misc.c [new file with mode: 0644]
lib/libc/rpc/mt_misc.h [new file with mode: 0644]
lib/libc/rpc/netconfig.5 [new file with mode: 0644]
lib/libc/rpc/netname.c
lib/libc/rpc/netnamer.c
lib/libc/rpc/pmap_clnt.c
lib/libc/rpc/pmap_getmaps.c
lib/libc/rpc/pmap_getport.c
lib/libc/rpc/pmap_prot.c
lib/libc/rpc/pmap_prot2.c
lib/libc/rpc/pmap_rmt.c
lib/libc/rpc/rpc.3
lib/libc/rpc/rpc.5
lib/libc/rpc/rpc_callmsg.c
lib/libc/rpc/rpc_clnt_auth.3 [new file with mode: 0644]
lib/libc/rpc/rpc_clnt_calls.3 [new file with mode: 0644]
lib/libc/rpc/rpc_clnt_create.3 [new file with mode: 0644]
lib/libc/rpc/rpc_com.h [copied from include/rpc/rpc_com.h with 50% similarity]
lib/libc/rpc/rpc_commondata.c
lib/libc/rpc/rpc_dtablesize.c
lib/libc/rpc/rpc_generic.c [new file with mode: 0644]
lib/libc/rpc/rpc_prot.c
lib/libc/rpc/rpc_secure.3
lib/libc/rpc/rpc_soc.3 [copied from lib/libc/rpc/rpc.3 with 85% similarity]
lib/libc/rpc/rpc_soc.c [new file with mode: 0644]
lib/libc/rpc/rpc_svc_calls.3 [new file with mode: 0644]
lib/libc/rpc/rpc_svc_create.3 [new file with mode: 0644]
lib/libc/rpc/rpc_svc_err.3 [new file with mode: 0644]
lib/libc/rpc/rpc_svc_reg.3 [new file with mode: 0644]
lib/libc/rpc/rpc_xdr.3 [new file with mode: 0644]
lib/libc/rpc/rpcb_clnt.c [new file with mode: 0644]
lib/libc/rpc/rpcb_prot.c [new file with mode: 0644]
lib/libc/rpc/rpcb_st_xdr.c [new file with mode: 0644]
lib/libc/rpc/rpcbind.3 [new file with mode: 0644]
lib/libc/rpc/rpcdname.c
lib/libc/rpc/rtime.c
lib/libc/rpc/svc.c
lib/libc/rpc/svc_auth.c
lib/libc/rpc/svc_auth_des.c
lib/libc/rpc/svc_auth_unix.c
lib/libc/rpc/svc_dg.c [new file with mode: 0644]
lib/libc/rpc/svc_generic.c [new file with mode: 0644]
lib/libc/rpc/svc_raw.c
lib/libc/rpc/svc_run.c
lib/libc/rpc/svc_simple.c
lib/libc/rpc/svc_tcp.c [deleted file]
lib/libc/rpc/svc_udp.c [deleted file]
lib/libc/rpc/svc_unix.c [deleted file]
lib/libc/rpc/svc_vc.c [new file with mode: 0644]
lib/libc/stdio/__fpending.c
lib/libc/xdr/Makefile.inc
lib/libc/xdr/xdr.3
lib/libc/xdr/xdr.c
lib/libc/xdr/xdr_array.c
lib/libc/xdr/xdr_float.c
lib/libc/xdr/xdr_mem.c
lib/libc/xdr/xdr_rec.c
lib/libc/xdr/xdr_reference.c
lib/libc/xdr/xdr_sizeof.c
lib/libc/xdr/xdr_stdio.c
lib/libc_r/man/pthread_attr.3
lib/libc_rtld/Makefile
lib/libkvm/kvm_geterr.3
lib/libkvm/kvm_getfiles.3
lib/libkvm/kvm_getloadavg.3
lib/libkvm/kvm_getprocs.3
lib/libkvm/kvm_getswapinfo.3
lib/libkvm/kvm_nlist.3
lib/libkvm/kvm_open.3
lib/libkvm/kvm_read.3
lib/libpam/Makefile
lib/libpcap/Makefile
lib/librpcsvc/rnusers.c
lib/librpcsvc/rstat.c
lib/librpcsvc/rwall.c
lib/librpcsvc/secretkey.c
lib/librpcsvc/xcrypt.c
lib/librpcsvc/yp_passwd.c
lib/librpcsvc/yp_update.c
lib/libstand/hammerread.c
lib/libutil/Makefile
lib/libutil/flopen.3 [new file with mode: 0644]
lib/libutil/flopen.c [new file with mode: 0644]
lib/libutil/fparseln.3
lib/libutil/humanize_number.3
lib/libutil/libutil.h
lib/libutil/login_tty.3
lib/libutil/pidfile.3
lib/libypclnt/Makefile [new file with mode: 0644]
lib/libypclnt/ypclnt.h [copied from contrib/openpam/lib/openpam_static.c with 65% similarity]
lib/libypclnt/ypclnt_connect.c [copied from contrib/openpam/lib/openpam_restore_cred.c with 55% similarity]
lib/libypclnt/ypclnt_error.c [copied from contrib/openpam/lib/pam_set_mapped_username.c with 68% similarity]
lib/libypclnt/ypclnt_free.c [copied from contrib/openpam/include/security/openpam_version.h with 74% similarity]
lib/libypclnt/ypclnt_get.c [copied from contrib/openpam/include/security/openpam_version.h with 72% similarity]
lib/libypclnt/ypclnt_new.c [copied from contrib/openpam/lib/openpam_free_data.c with 65% similarity]
lib/libypclnt/ypclnt_passwd.c [new file with mode: 0644]
lib/pam_module/pam_krb5/pam_krb5.c
lib/pam_module/pam_ssh/pam_ssh.c
lib/pam_module/pam_unix/pam_unix.c
libexec/pppoed/Makefile
libexec/pppoed/pppoed.c
libexec/rpc.rquotad/rquotad.c
libexec/rpc.rstatd/rstat_proc.c
libexec/tftpd/Makefile
libexec/tftpd/tftpd.c
nrelease/Makefile
nrelease/root/cpignore
sbin/disklabel/disklabel.c
sbin/hammer/cmd_blockmap.c
sbin/hammer/hammer.c
sbin/ifconfig/ifcarp.c
sbin/mount_nfs/mount_nfs.c
sbin/mountd/Makefile
sbin/mountd/mountd.c
sbin/newfs_hammer/newfs_hammer.c
sbin/nfsd/nfsd.8
sbin/nfsd/nfsd.c
sbin/umount/Makefile
sbin/umount/umount.c
share/examples/Makefile
share/examples/rconfig/hammer.sh
share/man/man4/Makefile
share/man/man4/jme.4
share/man/man4/mpt.4
share/man/man4/polling.4
share/man/man4/vga.4
share/man/man5/Makefile
share/man/man5/group.5
share/man/man5/hesiod.conf.5 [new file with mode: 0644]
share/man/man5/hosts.5
share/man/man5/make.conf.5
share/man/man5/nsswitch.conf.5
share/man/man5/passwd.5
share/man/man5/rc.conf.5
share/man/man8/yp.8
share/sendmail/Makefile
sys/Makefile
sys/boot/pc32/boot0/Makefile
sys/boot/pc32/boot2/Makefile
sys/boot/pc32/boot2/boot1.S
sys/boot/pc32/boot2/boot2.c
sys/boot/pc32/bootasm.h
sys/boot/pc32/libi386/biosdisk.c
sys/boot/pc32/loader/conf.c
sys/bus/iicbus/i386/pcf.c
sys/bus/iicbus/iicbb.c
sys/bus/iicbus/iicbus_if.m
sys/bus/iicbus/iiconf.c
sys/bus/iicbus/iiconf.h
sys/bus/pci/pci.c
sys/bus/pci/pcidevs
sys/bus/pci/pcidevs.h
sys/bus/pci/pcidevs_data.h
sys/bus/pci/pcireg.h
sys/bus/pci/pcivar.h
sys/conf/files
sys/config/AMD64_GENERIC
sys/cpu/amd64/include/asmacros.h
sys/cpu/amd64/include/atomic.h
sys/cpu/amd64/include/param.h
sys/cpu/amd64/misc/amd64-gdbstub.c
sys/ddb/db_output.c
sys/ddb/ddb.h
sys/dev/acpica5/acpi_cmbat.c
sys/dev/acpica5/acpi_cpu.c
sys/dev/disk/mpt/mpt_pci.c
sys/dev/disk/nata/ata-all.c
sys/dev/disk/nata/ata-chipset.c
sys/dev/disk/nata/ata-pci.c
sys/dev/disk/nata/ata-pci.h
sys/dev/disk/trm/trm.c
sys/dev/drm/i915_dma.c
sys/dev/misc/syscons/syscons.c
sys/dev/netif/bge/if_bge.c
sys/dev/netif/cx/cx.c
sys/dev/netif/de/if_de.c
sys/dev/netif/jme/Makefile
sys/dev/netif/jme/if_jme.c
sys/dev/netif/jme/if_jmereg.h
sys/dev/netif/jme/if_jmevar.h
sys/dev/netif/mii_layer/Makefile
sys/dev/netif/mii_layer/atphy.c [new file with mode: 0644]
sys/dev/netif/mii_layer/atphyreg.h [copied from contrib/openpam/lib/openpam_free_data.c with 50% similarity]
sys/dev/netif/mii_layer/miidevs
sys/dev/netif/mii_layer/miidevs.h
sys/dev/netif/re/if_re.c
sys/dev/netif/wi/if_wi.c
sys/dev/netif/wl/if_wl.c
sys/dev/raid/vinum/vinumioctl.c
sys/dev/usbmisc/umass/Makefile
sys/dev/video/fb/fbreg.h
sys/dev/video/fb/vga.c
sys/emulation/linux/linux_socket.c
sys/kern/imgact_elf.c
sys/kern/init_main.c
sys/kern/kern_exit.c
sys/kern/kern_fork.c
sys/kern/kern_ktr.c
sys/kern/kern_objcache.c
sys/kern/kern_proc.c
sys/kern/kern_sig.c
sys/kern/lwkt_serialize.c
sys/kern/lwkt_thread.c
sys/kern/subr_scanf.c
sys/kern/uipc_domain.c
sys/kern/uipc_socket2.c
sys/kern/usched_bsd4.c
sys/kern/vfs_bio.c
sys/kern/vfs_cache.c
sys/kern/vfs_init.c
sys/kern/vfs_mount.c
sys/kern/vfs_subr.c
sys/kern/vfs_syscalls.c
sys/kern/vfs_vnops.c
sys/libkern/strtouq.c
sys/net/bridge/if_bridge.c
sys/net/dummynet/ip_dummynet.c
sys/net/if_var.h
sys/net/ipfw/ip_fw2.c
sys/net/netisr.c
sys/net/netisr.h
sys/net/pf/pf.c
sys/net/pf/pf_if.c
sys/net/route.c
sys/netinet/if_ether.c
sys/netinet/if_ether.h
sys/netinet/in.c
sys/netinet/ip_carp.c
sys/netinet/ip_carp.h
sys/netinet/ip_output.c
sys/netinet/tcp_input.c
sys/netinet/tcp_output.c
sys/netinet/tcp_subr.c
sys/netinet/tcp_syncache.c
sys/netinet/tcp_timer.c
sys/netinet/tcp_timer.h
sys/netinet/tcp_timer2.h [copied from sys/sys/syslimits.h with 53% similarity]
sys/netinet/tcp_usrreq.c
sys/netinet/tcp_var.h
sys/netinet6/in6.c
sys/netinet6/in6.h
sys/netinet6/in6_src.c
sys/netinet6/in6_var.h
sys/netinet6/ip6_input.c
sys/netinet6/mld6.c
sys/netproto/atm/spans/spans_kxdr.c
sys/netproto/atm/spans/spans_kxdr.h [copied from include/rpc/xdr.h with 57% similarity]
sys/netproto/atm/spans/spans_msg.c
sys/netproto/atm/spans/spans_xdr.x
sys/netproto/ipx/ipx_usrreq.c
sys/platform/pc32/conf/files
sys/platform/pc32/i386/identcpu.c
sys/platform/pc32/i386/mplock.s
sys/platform/pc32/i386/pmap.c
sys/platform/pc32/i386/trap.c
sys/platform/pc64/amd64/genassym.c
sys/platform/pc64/amd64/ipl.s
sys/platform/pc64/amd64/machdep.c
sys/platform/pc64/amd64/nexus.c
sys/platform/pc64/amd64/pmap.c
sys/platform/pc64/amd64/support.s
sys/platform/pc64/amd64/swtch.s
sys/platform/pc64/amd64/trap.c
sys/platform/pc64/amd64/vm_machdep.c
sys/platform/pc64/apic/apic_vector.s
sys/platform/pc64/include/globaldata.h
sys/platform/pc64/isa/asc.c
sys/platform/pc64/isa/clock.c
sys/platform/pc64/isa/intr_machdep.c
sys/platform/pc64/isa/npx.c
sys/platform/pc64/isa/prof_machdep.c
sys/platform/vkernel/conf/files
sys/platform/vkernel/i386/mplock.s
sys/platform/vkernel/i386/trap.c
sys/platform/vkernel/i386/vm_machdep.c
sys/platform/vkernel/platform/init.c
sys/platform/vkernel/platform/pmap.c
sys/sys/bus.h
sys/sys/ktr.h
sys/sys/mount.h
sys/sys/proc.h
sys/sys/protosw.h
sys/sys/serialize.h
sys/sys/syslimits.h
sys/sys/thread.h
sys/vfs/hammer/hammer.h
sys/vfs/hammer/hammer_blockmap.c
sys/vfs/hammer/hammer_btree.c
sys/vfs/hammer/hammer_cursor.c
sys/vfs/hammer/hammer_flusher.c
sys/vfs/hammer/hammer_inode.c
sys/vfs/hammer/hammer_ondisk.c
sys/vfs/hammer/hammer_transaction.c
sys/vfs/hammer/hammer_vfsops.c
sys/vfs/ntfs/ntfs_subr.c
sys/vfs/ntfs/ntfs_vfsops.c
sys/vfs/nwfs/nwfs_io.c
sys/vfs/smbfs/smbfs_io.c
sys/vfs/ufs/ffs_inode.c
sys/vm/swap_pager.c
sys/vm/swap_pager.h
sys/vm/vm_fault.c
sys/vm/vm_glue.c
sys/vm/vm_map.c
sys/vm/vm_map.h
sys/vm/vm_page.c
sys/vm/vm_page2.h
sys/vm/vm_pageout.c
sys/vm/vm_swap.c
sys/vm/vnode_pager.c
test/debug/vnodeinfo.c
test/sysperf/Makefile
test/sysperf/loop1.c
test/sysperf/socketpair.c [new file with mode: 0644]
tools/tools/kerninclude/kerninclude.sh
tools/tools/splitpatch/splitpatch.py
usr.bin/Makefile
usr.bin/chpass/Makefile
usr.bin/chpass/chpass.c
usr.bin/chpass/edit.c
usr.bin/chpass/pw_copy.c
usr.bin/hesinfo/Makefile [new file with mode: 0644]
usr.bin/hesinfo/hesinfo.1 [new file with mode: 0644]
usr.bin/hesinfo/hesinfo.c [new file with mode: 0644]
usr.bin/keylogin/keylogin.c
usr.bin/lastcomm/lastcomm.c
usr.bin/passwd/Makefile
usr.bin/rpcgen/rpc_clntout.c
usr.bin/rpcgen/rpc_cout.c
usr.bin/rpcgen/rpc_hout.c
usr.bin/rpcgen/rpc_main.c
usr.bin/rpcgen/rpc_parse.c
usr.bin/rpcgen/rpc_parse.h
usr.bin/rpcgen/rpc_sample.c
usr.bin/rpcgen/rpc_scan.c
usr.bin/rpcgen/rpc_scan.h
usr.bin/rpcgen/rpc_svcout.c
usr.bin/rpcgen/rpc_tblout.c
usr.bin/rpcgen/rpc_util.c
usr.bin/rpcgen/rpc_util.h
usr.bin/rpcgen/rpcgen.1
usr.bin/rpcinfo/Makefile
usr.bin/rpcinfo/rpcinfo.8
usr.bin/rpcinfo/rpcinfo.c
usr.bin/rup/rup.1
usr.bin/rup/rup.c
usr.bin/rusers/Makefile
usr.bin/rusers/rusers.1
usr.bin/rusers/rusers.c
usr.bin/rwall/rwall.1
usr.bin/rwall/rwall.c
usr.bin/showmount/showmount.8
usr.bin/showmount/showmount.c
usr.bin/systat/pigs.c
usr.bin/tftp/Makefile
usr.bin/tftp/main.c
usr.bin/tftp/tftp.c
usr.bin/tftp/tftpsubs.c
usr.bin/ypwhich/ypwhich.1
usr.bin/ypwhich/ypwhich.c
usr.sbin/Makefile
usr.sbin/bootparamd/bootparamd/Makefile
usr.sbin/bootparamd/bootparamd/README
usr.sbin/bootparamd/bootparamd/bootparamd.8
usr.sbin/bootparamd/bootparamd/bootparamd.c
usr.sbin/bootparamd/bootparamd/main.c
usr.sbin/keyserv/Makefile
usr.sbin/keyserv/keyserv.c
usr.sbin/keyserv/keyserv.h
usr.sbin/keyserv/keyserv_uid.c [deleted file]
usr.sbin/nscd/Makefile [new file with mode: 0644]
usr.sbin/nscd/agent.c [new file with mode: 0644]
usr.sbin/nscd/agent.h [copied from contrib/openpam/lib/openpam_static.c with 54% similarity]
usr.sbin/nscd/agents/Makefile.inc [new file with mode: 0644]
usr.sbin/nscd/agents/group.c [new file with mode: 0644]
usr.sbin/nscd/agents/group.h [copied from usr.sbin/portmap/pmap_check.h with 64% similarity]
usr.sbin/nscd/agents/passwd.c [new file with mode: 0644]
usr.sbin/nscd/agents/passwd.h [copied from usr.sbin/portmap/pmap_check.h with 64% similarity]
usr.sbin/nscd/agents/services.c [new file with mode: 0644]
usr.sbin/nscd/agents/services.h [copied from usr.sbin/portmap/pmap_check.h with 64% similarity]
usr.sbin/nscd/cachelib.c [new file with mode: 0644]
usr.sbin/nscd/cachelib.h [new file with mode: 0644]
usr.sbin/nscd/cacheplcs.c [new file with mode: 0644]
usr.sbin/nscd/cacheplcs.h [new file with mode: 0644]
usr.sbin/nscd/config.c [new file with mode: 0644]
usr.sbin/nscd/config.h [new file with mode: 0644]
usr.sbin/nscd/debug.c [new file with mode: 0644]
usr.sbin/nscd/debug.h [new file with mode: 0644]
usr.sbin/nscd/hashtable.h [new file with mode: 0644]
usr.sbin/nscd/log.c [copied from contrib/openpam/lib/openpam_free_data.c with 56% similarity]
usr.sbin/nscd/log.h [copied from contrib/openpam/include/security/openpam_version.h with 63% similarity]
usr.sbin/nscd/mp_rs_query.c [new file with mode: 0644]
usr.sbin/nscd/mp_rs_query.h [copied from usr.sbin/portmap/pmap_check.h with 64% similarity]
usr.sbin/nscd/mp_ws_query.c [new file with mode: 0644]
usr.sbin/nscd/mp_ws_query.h [copied from usr.sbin/portmap/pmap_check.h with 64% similarity]
usr.sbin/nscd/nscd.8 [new file with mode: 0644]
usr.sbin/nscd/nscd.c [new file with mode: 0644]
usr.sbin/nscd/nscd.conf.5 [new file with mode: 0644]
usr.sbin/nscd/nscdcli.c [new file with mode: 0644]
usr.sbin/nscd/nscdcli.h [copied from contrib/openpam/include/security/openpam_version.h with 60% similarity]
usr.sbin/nscd/parser.c [new file with mode: 0644]
usr.sbin/nscd/parser.h [copied from usr.sbin/portmap/pmap_check.h with 64% similarity]
usr.sbin/nscd/pidfile.c [new file with mode: 0644]
usr.sbin/nscd/pidfile.h [copied from lib/libc/stdio/__fpending.c with 75% similarity]
usr.sbin/nscd/protocol.c [new file with mode: 0644]
usr.sbin/nscd/protocol.h [new file with mode: 0644]
usr.sbin/nscd/query.c [new file with mode: 0644]
usr.sbin/nscd/query.h [new file with mode: 0644]
usr.sbin/nscd/singletons.c [copied from usr.sbin/portmap/pmap_check.h with 64% similarity]
usr.sbin/nscd/singletons.h [moved from usr.sbin/portmap/pmap_check.h with 64% similarity]
usr.sbin/portmap/Makefile [deleted file]
usr.sbin/portmap/from_local.c [deleted file]
usr.sbin/portmap/pmap_check.c [deleted file]
usr.sbin/portmap/pmap_dump/Makefile [deleted file]
usr.sbin/portmap/pmap_dump/pmap_dump.c [deleted file]
usr.sbin/portmap/pmap_set/Makefile [deleted file]
usr.sbin/portmap/pmap_set/pmap_set.c [deleted file]
usr.sbin/portmap/portmap.8 [deleted file]
usr.sbin/portmap/portmap.c [deleted file]
usr.sbin/pwd_mkdb/Makefile
usr.sbin/pwd_mkdb/pwd_mkdb.8
usr.sbin/pwd_mkdb/pwd_mkdb.c
usr.sbin/rarpd/Makefile
usr.sbin/rarpd/rarpd.8
usr.sbin/rarpd/rarpd.c
usr.sbin/rpc.lockd/Makefile
usr.sbin/rpc.lockd/lock_proc.c [new file with mode: 0644]
usr.sbin/rpc.lockd/lockd.c
usr.sbin/rpc.lockd/lockd.h
usr.sbin/rpc.lockd/lockd_lock.c [new file with mode: 0644]
usr.sbin/rpc.lockd/lockd_lock.h [new file with mode: 0644]
usr.sbin/rpc.lockd/procs.c [deleted file]
usr.sbin/rpc.lockd/rpc.lockd.8
usr.sbin/rpc.lockd/test.c
usr.sbin/rpc.umntall/rpc.umntall.8
usr.sbin/rpc.umntall/rpc.umntall.c
usr.sbin/rpc.yppasswdd/Makefile
usr.sbin/rpc.yppasswdd/pw_copy.c [deleted file]
usr.sbin/rpc.yppasswdd/pw_util.c [deleted file]
usr.sbin/rpc.yppasswdd/rpc.yppasswdd.8
usr.sbin/rpc.yppasswdd/yppasswdd_extern.h
usr.sbin/rpc.yppasswdd/yppasswdd_main.c
usr.sbin/rpc.yppasswdd/yppasswdd_server.c
usr.sbin/rpc.ypupdated/Makefile
usr.sbin/rpc.ypupdated/update.c
usr.sbin/rpc.ypupdated/yp_dbupdate.c
usr.sbin/rpc.ypupdated/ypupdated_main.c
usr.sbin/rpc.ypupdated/ypupdated_server.c
usr.sbin/rpcbind/Makefile [new file with mode: 0644]
usr.sbin/rpcbind/check_bound.c [new file with mode: 0644]
usr.sbin/rpcbind/pmap_svc.c [new file with mode: 0644]
usr.sbin/rpcbind/rpcb_stat.c [new file with mode: 0644]
usr.sbin/rpcbind/rpcb_svc.c [new file with mode: 0644]
usr.sbin/rpcbind/rpcb_svc_4.c [new file with mode: 0644]
usr.sbin/rpcbind/rpcb_svc_com.c [new file with mode: 0644]
usr.sbin/rpcbind/rpcbind.8 [new file with mode: 0644]
usr.sbin/rpcbind/rpcbind.c [new file with mode: 0644]
usr.sbin/rpcbind/rpcbind.h [new file with mode: 0644]
usr.sbin/rpcbind/security.c [new file with mode: 0644]
usr.sbin/rpcbind/util.c [new file with mode: 0644]
usr.sbin/rpcbind/warmstart.c [new file with mode: 0644]
usr.sbin/spray/spray.c
usr.sbin/ypbind/yp_ping.c
usr.sbin/ypbind/ypbind.8
usr.sbin/ypbind/ypbind.c
usr.sbin/yppush/Makefile
usr.sbin/yppush/yppush.8
usr.sbin/yppush/yppush_main.c
usr.sbin/ypserv/Makefile
usr.sbin/ypserv/Makefile.yp
usr.sbin/ypserv/yp_access.c
usr.sbin/ypserv/yp_dblookup.c
usr.sbin/ypserv/yp_dnslookup.c
usr.sbin/ypserv/yp_error.c
usr.sbin/ypserv/yp_extern.h
usr.sbin/ypserv/yp_main.c
usr.sbin/ypserv/yp_server.c
usr.sbin/ypserv/yp_svc_udp.c
usr.sbin/ypserv/ypinit.8
usr.sbin/ypserv/ypinit.sh
usr.sbin/ypserv/ypserv.8

index 0e35c04..a0bcd0b 100644 (file)
@@ -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)"; \
index 7a155cb..e8f0d82 100644 (file)
@@ -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
index cd6d22d..57dc6cd 100644 (file)
@@ -44,7 +44,9 @@
 #include <err.h>
 #include <errno.h>
 #include <fcntl.h>
+#include <grp.h>
 #include <limits.h>
+#include <pwd.h>
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
index 71510bd..d5e582c 100644 (file)
@@ -51,6 +51,7 @@
 #include <locale.h>
 #include <math.h>
 #include <nlist.h>
+#include <pwd.h>
 #include <stddef.h>
 #include <stdio.h>
 #include <stdlib.h>
index 514b3f1..47529b5 100644 (file)
@@ -45,6 +45,8 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <fts.h>
+#include <grp.h>
+#include <pwd.h>
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
index 4e27eb1..f79617a 100644 (file)
 
 #ifndef LIST_H
 #define LIST_H 1
+#ifdef _LIBC
+#include <assert.h>
+#define INSIST(cond)   assert(cond)
+#else
 #include <isc/assertions.h>
+#endif
 
 #define LIST(type) struct { type *head, *tail; }
 #define INIT_LIST(list) \
index b967dc2..82bbe7e 100644 (file)
@@ -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 <arpa/inet.h>.
+ */
+#undef inet_addr
+__weak_reference(__inet_addr, inet_addr);
+#undef inet_aton
+__weak_reference(__inet_aton, inet_aton);
+#endif
index 5bfef71..0341c38 100644 (file)
@@ -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 <arpa/nameser.h>
 #include <arpa/inet.h>
 
+#ifdef _LIBC
+#include <assert.h>
+#define        INSIST(x)       assert(x)
+#else
 #include <isc/assertions.h>
+#endif
 #include <ctype.h>
 #include <errno.h>
 #include <stdio.h>
index 97b80cf..5666be3 100644 (file)
@@ -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 <arpa/inet.h>.
+ */
+#undef inet_lnaof
+__weak_reference(__inet_lnaof, inet_lnaof);
+#endif
index 6e4ecc3..1b013a8 100644 (file)
@@ -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 <arpa/inet.h>.
+ */
+#undef inet_makeaddr
+__weak_reference(__inet_makeaddr, inet_makeaddr);
+#endif
index abecfc7..06eb476 100644 (file)
@@ -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 <arpa/nameser.h>
 #include <arpa/inet.h>
 
+#ifdef _LIBC
+#include <assert.h>
+#define INSIST(cond)   assert(cond)
+#else
 #include <isc/assertions.h>
+#endif
 #include <ctype.h>
 #include <errno.h>
 #include <stdio.h>
@@ -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 <arpa/inet.h>.
+ */
+#undef inet_net_pton
+__weak_reference(__inet_net_pton, inet_net_pton);
+#endif
index 325b7ce..f394122 100644 (file)
@@ -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 <arpa/inet.h>.
+ */
+#undef inet_neta
+__weak_reference(__inet_neta, inet_neta);
+#endif
index e887530..faf4524 100644 (file)
@@ -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 <arpa/inet.h>.
+ */
+#undef inet_netof
+__weak_reference(__inet_netof, inet_netof);
+#endif
index aaa50c8..f10558c 100644 (file)
@@ -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 <arpa/inet.h>.
+ */
+#undef inet_network
+__weak_reference(__inet_network, inet_network);
+#endif
index 7fad4b8..31d32a5 100644 (file)
@@ -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 <arpa/inet.h>.
+ */
+#undef inet_ntoa
+__weak_reference(__inet_ntoa, inet_ntoa);
+__weak_reference(__inet_ntoa_r, inet_ntoa_r);
+#endif
index cd502ab..eefc521 100644 (file)
@@ -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 <arpa/inet.h>.
+ */
+#undef inet_net_ntop
+__weak_reference(__inet_net_ntop, inet_net_ntop);
+#endif
index f18a7b6..c1aa9b2 100644 (file)
@@ -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 <arpa/inet.h>.
+ */
+#undef inet_pton
+__weak_reference(__inet_pton, inet_pton);
+#endif
index a4b98e7..eacd733 100644 (file)
@@ -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 <arpa/inet.h>.
+ */
+#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
index 64e88b0..fdac9b8 100644 (file)
@@ -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 <sys/types.h>
 #include <sys/uio.h>
 
 #include <errno.h>
 
-#include <isc/eventlib.h>
+#include "isc/eventlib.h"
+#ifndef _LIBC
 #include <isc/assertions.h>
+#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 */
index 11433fb..b6df4e3 100644 (file)
@@ -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 <errno.h>
 
+#ifndef _LIBC
 #include <isc/assertions.h>
-#include <isc/eventlib.h>
+#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 */
index 5c45ab8..bf47784 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 
+#ifndef _LIBC
 #include <isc/heap.h>
 #include <isc/list.h>
 #include <isc/memcluster.h>
+#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*/
index cb61cb1..0ee3a2d 100644 (file)
@@ -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 <arpa/nameser.h>
 #include <arpa/inet.h>
 
+#ifdef _LIBC
+#include <assert.h>
+#define INSIST(cond)   assert(cond)
+#else
 #include <isc/assertions.h>
 #include <isc/dst.h>
+#endif
 #include <errno.h>
 #include <resolv.h>
 #include <string.h>
@@ -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++;
index d4ca550..a5d039e 100644 (file)
@@ -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
index 58807e9..c5266b0 100644 (file)
@@ -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 <sys/types.h>
 #include <sys/param.h>
 #include <sys/uio.h>
@@ -66,7 +70,11 @@ static const char rcsid[] = "$Id: herror.c,v 1.2.206.1 2004/03/09 08:33:54 marka
 #include <resolv.h>
 #include <string.h>
 #include <unistd.h>
+#ifndef _LIBC
 #include <irs.h>
+#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
 }
 
 /*
index 635bbd4..e9dd65d 100644 (file)
@@ -1,13 +1,18 @@
 #include <port_before.h>
 #ifdef DO_PTHREADS
 #include <pthread.h>
+#ifdef _LIBC
+#include <pthread_np.h>
+#endif
 #endif
 #include <errno.h>
 #include <netdb.h>
 #include <stdlib.h>
 #include <string.h>
-#include <resolv_mt.h>
+#include "resolv_mt.h"
+#ifndef _LIBC
 #include <irs.h>
+#endif
 #include <port_after.h>
 
 #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
index 8cc99a7..9daed6f 100644 (file)
@@ -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 <resolv.h>.
+ */
+#undef dn_comp
+__weak_reference(__dn_comp, dn_comp);
+#undef dn_expand
+__weak_reference(__dn_expand, dn_expand);
+#endif
index 204e03d..1917dd0 100644 (file)
@@ -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 <unistd.h>
 
 #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 <resolv.h>.
+ */
+#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
index 8dda12c..eaae7a2 100644 (file)
@@ -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 <math.h>
 #include <netdb.h>
 #include <resolv.h>
-#include <resolv_mt.h>
+#include "resolv_mt.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -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 <resolv.h>.
+ */
+#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
index 804beb6..e8c18f9 100644 (file)
@@ -39,7 +39,7 @@ static const char rcsid[] = "$Id: res_findzonecut.c,v 1.2.2.3.4.4 2005/10/11 00:
 #include <stdlib.h>
 #include <string.h>
 
-#include <isc/list.h>
+#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,
index fd82e87..004d459 100644 (file)
@@ -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 <sys/types.h>
 #include <sys/param.h>
 #include <sys/socket.h>
@@ -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 <string.h>
 #include <unistd.h>
 #include <netdb.h>
-
+#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) {
index 89000ed..8d888e7 100644 (file)
@@ -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 */
index 01078f1..a135bf0 100644 (file)
@@ -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 <unistd.h>
 #include <ctype.h>
 
+#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
index 5156ce8..62e953e 100644 (file)
@@ -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 <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 #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);
index c47dd49..08abfe0 100644 (file)
@@ -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 <sys/types.h>
 #include <sys/param.h>
 #include <sys/time.h>
@@ -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 <string.h>
 #include <unistd.h>
 
-#include <isc/eventlib.h>
+#include "isc/eventlib.h"
 
 #include "port_after.h"
-
+#ifdef USE_KQUEUE
+#include <sys/event.h>
+#else
 #ifdef USE_POLL
 #ifdef HAVE_STROPTS_H
 #include <stropts.h>
 #endif
 #include <poll.h>
 #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,
index 8783d8a..d8ed05f 100644 (file)
@@ -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 <stdlib.h>
 #include <string.h>
 
-#include <isc/list.h>
+#include "isc/list.h"
 #include <resolv.h>
 
 #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) {
index e6f71b4..443da96 100644 (file)
@@ -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)
     {
index 82e5e1b..ef0f62f 100644 (file)
@@ -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)
     {
index 40df32a..8b8adf2 100644 (file)
@@ -71,7 +71,7 @@ static const char rcsid[] _U_ =
 
 #endif /* WIN32 */
 
-#include <pcap-bpf.h>
+#include <net/bpf.h>
 
 #if !defined(KERNEL) && !defined(_KERNEL)
 #include <stdlib.h>
diff --git a/contrib/libpcap-0.9/pcap-bpf.h b/contrib/libpcap-0.9/pcap-bpf.h
deleted file mode 100644 (file)
index 62c493b..0000000
+++ /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 <net/bpf.h> 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 <net/bpf.h> for ages.  We use #ifdefs to
- * detect the BSDs that define them differently from the traditional
- * libpcap <net/bpf.h>
- *
- * 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 <kent@praesum.com>
- * 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 <chris.waters@networkchemistry.com>
- * 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 <hannes@juniper.net>.  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
- * <dieter@apple.com>.  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
- * <jeff.morriss[AT]ulticom.com> 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 <hannes@juniper.net>.  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 <kkeil@suse.de>.
- *
- * 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 <hannes@juniper.net>.  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 <oz@gcom.com> 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 <hannes@juniper.net>.  The DLT_ is used
- * for internal communication to Physical Interface Cards (PIC)
- */
-#define DLT_JUNIPER_PIC_PEER    174
-
-/*
- * Link types requested by Gregor Maier <gregor@endace.com> 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 <daniele@orlandi.com> 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 <hannes@juniper.net>. 
- * 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 <hannes@juniper.net>. 
- * 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 <gianluca.varenni@cacetech.com>.
- * 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 <gianluca.varenni@cacetech.com>.
- * 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 <paolo.abeni@email.it>.
- */
-#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
- * <cruz_petagay@bah.com>.
- */
-#define DLT_IEEE802_16_MAC_CPS 188
-
-/*
- * USB packets, beginning with a Linux USB header; requested by
- * Paolo Abeni <paolo.abeni@email.it>.
- */
-#define DLT_USB_LINUX          189
-
-/*
- * Controller Area Network (CAN) v. 2.0B packets.
- * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
- * 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 <gianluca.varenni@cacetech.com>.
- */
-#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 <hannes@juniper.net>. 
- * 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 <mikko.saarnivala@sensinode.com>.
- */
-#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
- * <stephen@endace.com>.
- */
-#define DLT_ERF                        197
-
-/*
- * Special header prepended to Ethernet packets when capturing from a
- * u10 Networks board.  Requested by Phil Mulholland
- * <phil@u10networks.com>.
- */
-#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
- * <chanthy.toeung@ca.kontron.com>.
- */
-#define DLT_IPMB               199
-
-/*
- * Juniper-private data link type, as per request from
- * Hannes Gredler <hannes@juniper.net>. 
- * 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
index 9c8767e..df0784f 100644 (file)
@@ -47,9 +47,7 @@
   #include <sys/time.h>
 #endif /* WIN32/MSDOS/UN*X */
 
-#ifndef PCAP_DONT_INCLUDE_PCAP_BPF_H
-#include <pcap-bpf.h>
-#endif
+#include <net/bpf.h>
 
 #include <stdio.h>
 
index aa8bd57..c8da3ff 100644 (file)
@@ -14,6 +14,7 @@ or indirectly, with patches, criticism, suggestions, or ideas:
        Andrew Morgan <morgan@transmeta.com>
        Brian Fundakowski Feldman <green@freebsd.org>
        Christos Zoulas <christos@netbsd.org>
+       Daniel Richard G. <skunk@iskunk.org>
        Darren J. Moffat <Darren.Moffat@sun.com>
        Dmitry V. Levin <ldv@altlinux.org>
        Emmanuel Dreyfus <manu@netbsd.org>
@@ -24,11 +25,13 @@ or indirectly, with patches, criticism, suggestions, or ideas:
        Hubert Feyrer <hubert@feyrer.de>
        Mark Murray <markm@freebsd.org>
        Mike Petullo <mike@flyn.org>
+       Mikhail Teterin <mi@aldan.algebra.com>
        Mikko Työläjärvi <mbsd@pacbell.net>
        Robert Watson <rwatson@freebsd.org>
        Ruslan Ermilov <ru@freebsd.org>
        Solar Designer <solar@openwall.com>
        Takanori Saneto <sanewo@ba2.so-net.ne.jp>
+       Wojciech A. Koszek <wkoszek@freebsd.org>
        Yar Tikhiy <yar@freebsd.org>
 
-$P4: //depot/projects/openpam/CREDITS#12 $
+$Id: CREDITS 400 2007-10-24 15:04:23Z des $
index fec20ca..9c1c26e 100644 (file)
@@ -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 $
index 19a9687..0260cca 100644 (file)
@@ -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 $
index 77c766c..475dd74 100644 (file)
@@ -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 $
index 15399e2..dcc1dd8 100644 (file)
@@ -1,10 +1,10 @@
 INSTALL
-MANIFEST
 Makefile.am
 Makefile.in
 aclocal.m4
 autogen.sh
 bin
+compile
 config.guess
 config.h.in
 config.sub
index ca2a66b..6106451 100644 (file)
@@ -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.
index a8aa9f1..d66c8f0 100644 (file)
@@ -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 <des@freebsd.org>.
 
-$P4: //depot/projects/openpam/RELNOTES#22 $
+$Id: RELNOTES 404 2007-11-28 12:31:04Z des $
index 8e0957c..eb23a76 100644 (file)
@@ -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
 .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.
index 632693b..4ae7123 100644 (file)
@@ -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.
index 0c9329f..542a5d2 100644 (file)
@@ -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.
index 08b993a..8f02464 100644 (file)
@@ -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.
index 2bab2b4..cb5d5e3 100644 (file)
@@ -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.
index b96cd1d..208bdf4 100644 (file)
@@ -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.
index a41a7d9..6e9bb8e 100644 (file)
@@ -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.
index c4cbb2f..8478920 100644 (file)
@@ -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.
index 70fa3d7..f1da98a 100644 (file)
@@ -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.
index 105e195..e262584 100644 (file)
@@ -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.
index d2512c3..7374a94 100644 (file)
@@ -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.
index e8a6647..5740a4d 100644 (file)
@@ -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.
index 51dd12e..8ffb6a3 100644 (file)
@@ -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.
index 5484bb7..9fee0d3 100644 (file)
@@ -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.
index b5bead3..4cb1ec3 100644 (file)
@@ -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.
index eb76c83..570dbc2 100644 (file)
@@ -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.