Date: Mon, 23 Oct 2006 12:24:36 GMT From: Michael Bushkov <bushman@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 108305 for review Message-ID: <200610231224.k9NCOaYM007239@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=108305 Change 108305 by bushman@bushman_nss_ldap_cached on 2006/10/23 12:23:41 IFC Affected files ... .. //depot/projects/soc2006/nss_ldap_cached/src/Makefile.inc1#4 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/etc/defaults/rc.conf#9 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/etc/disktab#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/Makefile#6 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/amd#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/auto_linklocal#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/cleartmp#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/idmapd#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/gen/basename.3#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/gen/dirname.3#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/gen/msgsnd.3#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/i386/sys/i386_get_ldt.2#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/locale/wctype.3#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/sparc64/fpu/fpu_emu.h#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/stdio/freopen.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/stdio/xprintf.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/stdlib/getenv.3#3 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/string/ffs.3#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/sys/Makefile.inc#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/sys/intro.2#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/sys/read.2#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/sys/stat.2#3 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/sys/write.2#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/share/mk/bsd.cpu.mk#3 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/Makefile#5 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/arp/arp.c#3 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/config/config.8#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/freebsd-update/freebsd-update.sh#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/mountd/mountd.c#5 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/pccard/Makefile#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/pccard/dumpcis/Makefile#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/pccard/dumpcis/dumpcis.8#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/pccard/dumpcis/main.c#1 branch .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/pccard/pccardd/Makefile#2 delete .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/pccard/pccardd/cardd.c#2 delete .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/pccard/pccardd/cardd.h#2 delete .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/pccard/pccardd/file.c#2 delete .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/pccard/pccardd/pccard.conf.5#2 delete .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/pccard/pccardd/pccardd.8#2 delete .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/pccard/pccardd/pccardd.c#2 delete .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/pccard/pccardd/server.c#2 delete .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/pccard/pccardd/util.c#2 delete .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/portsnap/portsnap/portsnap.sh#3 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/syslogd/syslog.conf.5#3 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/wicontrol/wicontrol.8#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/wicontrol/wicontrol.c#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/zic/zdump/Makefile#2 integrate .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/zic/zic/Makefile#2 integrate Differences ... ==== //depot/projects/soc2006/nss_ldap_cached/src/Makefile.inc1#4 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.562 2006/10/09 04:58:44 kmacy Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.563 2006/10/16 22:18:13 jb Exp $ # # Make command line options: # -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir @@ -98,7 +98,7 @@ # Guess machine architecture from machine type, and vice versa. .if !defined(TARGET_ARCH) && defined(TARGET) -TARGET_ARCH= ${TARGET:S/pc98/i386/} +TARGET_ARCH= ${TARGET:S/pc98/i386/:S/sun4v/sparc64/} .elif !defined(TARGET) && defined(TARGET_ARCH) && \ ${TARGET_ARCH} != ${MACHINE_ARCH} TARGET= ${TARGET_ARCH} ==== //depot/projects/soc2006/nss_ldap_cached/src/etc/defaults/rc.conf#9 (text+ko) ==== @@ -15,7 +15,7 @@ # For a more detailed explanation of all the rc.conf variables, please # refer to the rc.conf(5) manual page. # -# $FreeBSD: src/etc/defaults/rc.conf,v 1.298 2006/10/06 23:22:12 flz Exp $ +# $FreeBSD: src/etc/defaults/rc.conf,v 1.300 2006/10/15 15:55:00 ceri Exp $ ############################################################## ### Important initial Boot-time options #################### @@ -242,6 +242,8 @@ nfs_access_cache="60" # Client cache timeout in seconds nfs_server_enable="NO" # This host is an NFS server (or NO). nfs_server_flags="-u -t -n 4" # Flags to nfsd (if enabled). +idmapd_enable="NO" # Run the NFS4 id mapper (YES/NO). +idmapd_flags="" # Additional flags for idmapd. mountd_enable="NO" # Run mountd (or NO). mountd_flags="-r" # Flags to mountd (if NFS server enabled). weak_mountd_authentication="NO" # Allow non-root mount requests to be served. ==== //depot/projects/soc2006/nss_ldap_cached/src/etc/disktab#2 (text+ko) ==== @@ -1,33 +1,7 @@ -# $FreeBSD: src/etc/disktab,v 1.25 2004/06/06 11:46:27 schweikh Exp $ +# $FreeBSD: src/etc/disktab,v 1.26 2006/10/14 16:39:03 ru Exp $ # # Disk geometry and partition layout tables. -# Key: -# dt controller type -# ty type of disk (fixed, removeable, simulated) -# d[0-4] drive-type-dependent parameters -# ns #sectors/track -# nt #tracks/cylinder -# nc #cylinders/disk -# sc #sectors/cylinder, ns*nt default -# su #sectors/unit, sc*nc default -# se sector size, DEV_BSIZE default -# rm rpm, 3600 default -# sf supports bad144-style bad sector forwarding -# sk sector skew per track, default 0 -# cs sector skew per cylinder, default 0 -# hs headswitch time, default 0 -# ts one-cylinder seek time, default 0 -# il sector interleave (n:1), 1 default -# bs boot block size, default BBSIZE -# sb superblock size, default SBSIZE -# o[a-h] partition offsets in sectors -# p[a-h] partition sizes in sectors -# b[a-h] partition block sizes in bytes -# f[a-h] partition fragment sizes in bytes -# t[a-h] partition types (filesystem, swap, etc) -# -# All partition sizes reserve space for bad sector tables. -# (5 cylinders needed for maintenance + replacement sectors) +# See disktab(5) for format of this file. # # ==== //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/Makefile#6 (text+ko) ==== @@ -1,5 +1,5 @@ # $NetBSD: Makefile,v 1.16 2001/01/14 15:37:22 minoura Exp $ -# $FreeBSD: src/etc/rc.d/Makefile,v 1.77 2006/10/07 15:45:56 ume Exp $ +# $FreeBSD: src/etc/rc.d/Makefile,v 1.78 2006/10/15 14:19:06 ceri Exp $ .include <bsd.own.mk> @@ -15,7 +15,7 @@ gbde geli geli2 \ hcsecd \ hostapd hostname \ - inetd initrandom \ + idmapd inetd initrandom \ ip6addrctl ip6fw ipfilter ipfs ipfw ipmon \ ipnat ipsec ipxrouted isdnd \ jail \ ==== //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/amd#2 (text+ko) ==== @@ -1,7 +1,7 @@ #!/bin/sh # # $NetBSD: amd,v 1.10 2002/04/29 12:08:17 lukem Exp $ -# $FreeBSD: src/etc/rc.d/amd,v 1.17 2006/04/11 09:02:06 flz Exp $ +# $FreeBSD: src/etc/rc.d/amd,v 1.18 2006/10/18 15:56:11 flz Exp $ # # PROVIDE: amd @@ -16,6 +16,7 @@ command="/usr/sbin/${name}" start_precmd="amd_precmd" command_args="&" +extra_commands="reload" amd_precmd() { ==== //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/auto_linklocal#2 (text+ko) ==== @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/auto_linklocal,v 1.1 2006/10/07 15:45:56 ume Exp $ +# $FreeBSD: src/etc/rc.d/auto_linklocal,v 1.3 2006/10/22 17:21:03 hrs Exp $ # # PROVIDE: auto_linklocal @@ -10,9 +10,15 @@ . /etc/rc.subr name="auto_linklocal" -rcvar=`set_rcvar ipv6` -start_cmd="${SYSCTL_W} net.inet6.ip6.auto_linklocal=1" +start_cmd="auto_linklocal_start" stop_cmd=":" +auto_linklocal_start() +{ + if ! checkyesno ipv6_enable && ${SYSCTL} net.inet6 > /dev/null 2>&1; then + ${SYSCTL_W} net.inet6.ip6.auto_linklocal=0 + fi +} + load_rc_config $name run_rc_command "$1" ==== //depot/projects/soc2006/nss_ldap_cached/src/etc/rc.d/cleartmp#2 (text+ko) ==== @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: src/etc/rc.d/cleartmp,v 1.17 2005/12/27 23:22:18 dougb Exp $ +# $FreeBSD: src/etc/rc.d/cleartmp,v 1.18 2006/10/16 13:01:45 yar Exp $ # # PROVIDE: cleartmp @@ -10,47 +10,48 @@ . /etc/rc.subr name="cleartmp" -rcvar=`set_rcvar clear_tmp` - +# Disguise rcvar for the start method to run irrespective of its setting. +rcvar1=`set_rcvar clear_tmp` start_cmd="${name}_start" +stop_cmd=":" -cleartmp_prestart() +cleartmp_start() { - checkyesno clear_tmp_X || return + # Make /tmp location variable for easier debugging. + local tmp="/tmp" - local x11_socket_dirs="/tmp/.X11-unix /tmp/.ICE-unix /tmp/.font-unix \ - /tmp/.XIM-unix" + # X related directories to create in /tmp. + local x11_socket_dirs="${tmp}/.X11-unix ${tmp}/.XIM-unix \ + ${tmp}/.ICE-unix ${tmp}/.font-unix" - # Remove X lock files, since they will prevent you from restarting X. - rm -f /tmp/.X[0-9]-lock + if checkyesno ${rcvar1}; then + echo "Clearing ${tmp}." - # Create socket directories with correct permissions to avoid - # security problem. - # - rm -fr ${x11_socket_dirs} - mkdir -m 1777 ${x11_socket_dirs} + # This is not needed for mfs, but doesn't hurt anything. + # Things to note: + # + The dot in ${tmp}/. is important. + # + Put -prune before -exec so find never descends + # into a directory that was already passed to rm -rf. + # + "--" in rm arguments isn't strictly necessary, but + # it can prevent foot-shooting in future. + # + /tmp/lost+found is preserved, but its contents are removed. + # + lost+found and quota.* in subdirectories are removed. + find -x ${tmp}/. ! -name . \ + ! \( -name lost+found -type d -user root \) \ + ! \( \( -name quota.user -or -name quota.group \) \ + -type f -user root \) \ + -prune -exec rm -rf -- {} + + elif checkyesno clear_tmp_X; then + # Remove X lock files, since they will prevent you from + # restarting X. Remove other X related directories. + echo "Clearing ${tmp} (X related)." + rm -rf ${tmp}/.X[0-9]-lock ${x11_socket_dirs} + fi + if checkyesno clear_tmp_X; then + # Create X related directories with proper permissions. + mkdir -m 1777 ${x11_socket_dirs} + fi } -cleartmp_start() -{ - echo "Clearing /tmp." - # - # Prune quickly with one rm, then use find to clean up - # /tmp/[lq]* (this is not needed with mfs /tmp, but - # doesn't hurt anything). - # - (cd /tmp && rm -rf [a-km-pr-zA-Z]* && - find -x . ! -name . ! -name lost+found ! -name quota.user \ - ! -name quota.group ! -name .X11-unix ! -name .ICE-unix \ - ! -name .font-unix ! -name .XIM-unix \ - -exec rm -rf -- {} \; -type d -prune) -} - load_rc_config $name - -# The clear_tmp_X variable should be tested even if clear_tmp_enable is NO -case "$1" in -*start) cleartmp_prestart ;; -esac - run_rc_command "$1" ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/gen/basename.3#2 (text+ko) ==== @@ -25,9 +25,9 @@ .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $OpenBSD: basename.3,v 1.12 2000/04/18 03:01:25 aaron Exp $ -.\" $FreeBSD: src/lib/libc/gen/basename.3,v 1.7 2004/07/02 23:52:10 ru Exp $ +.\" $FreeBSD: src/lib/libc/gen/basename.3,v 1.8 2006/10/12 14:31:17 ru Exp $ .\" -.Dd August 17, 1997 +.Dd October 12, 2006 .Dt BASENAME 3 .Os .Sh NAME @@ -58,6 +58,13 @@ is a null pointer or the empty string, a pointer to the string .Qq \&. is returned. +.Sh IMPLEMENTATION NOTES +The +.Fn basename +function +returns a pointer to internal storage space allocated on the first call +that will be overwritten +by subsequent calls. .Sh RETURN VALUES On successful completion, .Fn basename @@ -77,12 +84,6 @@ The path component to be returned was larger than .Dv MAXPATHLEN . .El -.Sh WARNINGS -The -.Fn basename -function -returns a pointer to internal static storage space that will be overwritten -by subsequent calls. .Sh SEE ALSO .Xr basename 1 , .Xr dirname 1 , ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/gen/dirname.3#2 (text+ko) ==== @@ -25,9 +25,9 @@ .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $OpenBSD: dirname.3,v 1.9 2000/04/18 03:01:25 aaron Exp $ -.\" $FreeBSD: src/lib/libc/gen/dirname.3,v 1.8 2004/07/02 23:52:10 ru Exp $ +.\" $FreeBSD: src/lib/libc/gen/dirname.3,v 1.9 2006/10/12 14:31:17 ru Exp $ .\" -.Dd August 17, 1997 +.Dd October 12, 2006 .Dt DIRNAME 3 .Os .Sh NAME @@ -58,6 +58,20 @@ returns a pointer to the string .Qq \&. , signifying the current directory. +.Sh IMPLEMENTATION NOTES +The +.Fn dirname +function +returns a pointer to internal storage space allocated on the first call +that will be overwritten +by subsequent calls. +.Pp +Other vendor implementations of +.Fn dirname +may modify the contents of the string passed to +.Fn dirname ; +this should be taken into account when writing code which calls this function +if portability is desired. .Sh RETURN VALUES On successful completion, .Fn dirname @@ -77,19 +91,6 @@ The path component to be returned was larger than .Dv MAXPATHLEN . .El -.Sh WARNINGS -The -.Fn dirname -function -returns a pointer to internal static storage space that will be overwritten -by subsequent calls (each function has its own separate storage). -.Pp -Other vendor implementations of -.Fn dirname -may modify the contents of the string passed to -.Fn dirname ; -this should be taken into account when writing code which calls this function -if portability is desired. .Sh SEE ALSO .Xr basename 1 , .Xr dirname 1 , ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/gen/msgsnd.3#2 (text+ko) ==== @@ -29,9 +29,9 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/gen/msgsnd.3,v 1.20 2005/01/20 09:17:02 ru Exp $ +.\" $FreeBSD: src/lib/libc/gen/msgsnd.3,v 1.21 2006/10/12 11:42:41 ru Exp $ .\" -.Dd November 24, 1997 +.Dd October 12, 2006 .Dt MSGSND 3 .Os .Sh NAME @@ -65,8 +65,13 @@ is an integer greater than 0 that can be used for selecting messages (see .Xr msgrcv 3 ) , .Va mtext -is an array of bytes, with a size up to that of the system limit -.Pf ( Dv MSGMAX ) . +is an array of +.Fa msgsz +bytes. +The argument +.Fa msgsz +can range from 0 to a system-imposed maximum, +.Dv MSGMAX . .Pp If the number of bytes already on the message queue plus .Fa msgsz @@ -144,7 +149,7 @@ The .Fa msgsz argument -is less than 0, or greater than +is greater than .Va msg_qbytes . .Pp The ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/i386/sys/i386_get_ldt.2#2 (text+ko) ==== @@ -30,9 +30,9 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)fork.2 6.5 (Berkeley) 3/10/91 -.\" $FreeBSD: src/lib/libc/i386/sys/i386_get_ldt.2,v 1.21 2004/07/02 19:07:30 ru Exp $ +.\" $FreeBSD: src/lib/libc/i386/sys/i386_get_ldt.2,v 1.23 2006/10/13 20:34:44 ru Exp $ .\" -.Dd September 20, 1993 +.Dd October 14, 2006 .Dt I386_GET_LDT 2 .Os .Sh NAME @@ -52,24 +52,24 @@ The .Fn i386_get_ldt system call -will return the list of i386 descriptors that the process has in its +returns a list of the i386 descriptors in the current process' LDT. The .Fn i386_set_ldt system call -will set a list of i386 descriptors for the current process in its +sets a list of i386 descriptors in the current process' LDT. -Both routines accept a starting selector number -.Fa start_sel , -an array of memory that -will contain the descriptors to be set or returned -.Fa descs , -and the number of entries to set or return -.Fa num_sels . +For both routines, +.Fa start_sel +specifies the index of the selector in the LDT at which to begin and +.Fa descs +points to an array of +.Fa num_sels +descriptors to be set or returned. .Pp -The argument +Each entry in the .Fa descs -can be either segment_descriptor or gate_descriptor and are defined in +array can be either a segment_descriptor or gate_descriptor and are defined in .In i386/segments.h . These structures are defined by the architecture as disjoint bit-fields, so care must be taken in constructing them. @@ -113,9 +113,9 @@ The .Fn i386_set_ldt system call -returns the first selector set. -In the case when a descriptor is allocated by the kernel, its number will -be returned. +returns the first selector set on success. +If the kernel allocated a descriptor in the LDT, +the allocated index is returned. Otherwise, a value of -1 is returned and the global variable .Va errno ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/locale/wctype.3#2 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/locale/wctype.3,v 1.6 2005/07/21 10:32:17 tjr Exp $ +.\" $FreeBSD: src/lib/libc/locale/wctype.3,v 1.7 2006/10/13 16:11:12 ru Exp $ .\" .Dd March 27, 2004 .Dt WCTYPE 3 @@ -105,7 +105,7 @@ .St -p1003.1-2001 . The .Dq Li ideogram , -.Dq Li phonogram +.Dq Li phonogram , .Dq Li special , and .Dq Li rune ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/sparc64/fpu/fpu_emu.h#2 (text+ko) ==== @@ -41,7 +41,7 @@ * * @(#)fpu_emu.h 8.1 (Berkeley) 6/11/93 * $NetBSD: fpu_emu.h,v 1.4 2000/08/03 18:32:07 eeh Exp $ - * $FreeBSD: src/lib/libc/sparc64/fpu/fpu_emu.h,v 1.4 2002/03/22 23:41:59 obrien Exp $ + * $FreeBSD: src/lib/libc/sparc64/fpu/fpu_emu.h,v 1.5 2006/10/12 04:38:41 kmacy Exp $ */ /* @@ -157,6 +157,7 @@ struct fpemu { u_long fe_fsr; /* fsr copy (modified during op) */ int fe_cx; /* exceptions */ + int pad; /* align access to following fields */ struct fpn fe_f1; /* operand 1 */ struct fpn fe_f2; /* operand 2, if required */ struct fpn fe_f3; /* available storage for result */ ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/stdio/freopen.c#2 (text+ko) ==== @@ -38,7 +38,7 @@ static char sccsid[] = "@(#)freopen.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/lib/libc/stdio/freopen.c,v 1.13 2004/05/22 15:19:41 tjr Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/stdio/freopen.c,v 1.17 2006/10/16 14:31:56 ache Exp $"); #include "namespace.h" #include <sys/types.h> @@ -67,7 +67,9 @@ int dflags, flags, isopen, oflags, sverrno, wantfd; if ((flags = __sflags(mode, &oflags)) == 0) { + sverrno = errno; (void) fclose(fp); + errno = sverrno; return (NULL); } @@ -102,6 +104,8 @@ errno = EINVAL; return (NULL); } + if (fp->_flags & __SWR) + (void) __sflush(fp); if ((oflags ^ dflags) & O_APPEND) { dflags &= ~O_APPEND; dflags |= oflags & O_APPEND; @@ -114,15 +118,9 @@ } } if (oflags & O_TRUNC) - ftruncate(fp->_file, 0); - if (_fseeko(fp, 0, oflags & O_APPEND ? SEEK_END : SEEK_SET, - 0) < 0 && errno != ESPIPE) { - sverrno = errno; - fclose(fp); - FUNLOCKFILE(fp); - errno = sverrno; - return (NULL); - } + (void) ftruncate(fp->_file, (off_t)0); + if (!(oflags & O_APPEND)) + (void) _sseek(fp, (fpos_t)0, SEEK_SET); f = fp->_file; isopen = 0; wantfd = -1; @@ -192,8 +190,8 @@ if (f < 0) { /* did not get it after all */ fp->_flags = 0; /* set it free */ + FUNLOCKFILE(fp); errno = sverrno; /* restore in case _close clobbered */ - FUNLOCKFILE(fp); return (NULL); } @@ -216,6 +214,16 @@ fp->_write = __swrite; fp->_seek = __sseek; fp->_close = __sclose; + /* + * When opening in append mode, even though we use O_APPEND, + * we need to seek to the end so that ftell() gets the right + * answer. If the user then alters the seek pointer, or + * the file extends, this will fail, but there is not much + * we can do about this. (We could set __SAPP and check in + * fseek and ftell.) + */ + if (oflags & O_APPEND) + (void) _sseek(fp, (fpos_t)0, SEEK_END); FUNLOCKFILE(fp); return (fp); } ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/stdio/xprintf.c#2 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/stdio/xprintf.c,v 1.3 2006/04/01 19:06:54 phk Exp $ + * $FreeBSD: src/lib/libc/stdio/xprintf.c,v 1.4 2006/10/21 11:49:07 kib Exp $ */ #include <namespace.h> @@ -261,7 +261,7 @@ static int -__v2printf(FILE *fp, const char *fmt0, unsigned pct, const va_list ap) +__v2printf(FILE *fp, const char *fmt0, unsigned pct, const va_list ap1) { struct printf_info *pi, *pil; const char *fmt; @@ -274,7 +274,9 @@ int ret = 0; int n; struct __printf_io io; + va_list ap; + va_copy(ap, ap1); __printf_init(&io); io.fp = fp; @@ -561,6 +563,7 @@ errx(1, "render[%c] = NULL", *fmt); } __printf_flush(&io); + va_end(ap); return (ret); } ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/stdlib/getenv.3#3 (text+ko) ==== @@ -34,9 +34,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)getenv.3 8.2 (Berkeley) 12/11/93 -.\" $FreeBSD: src/lib/libc/stdlib/getenv.3,v 1.18 2006/10/07 21:27:21 trhodes Exp $ +.\" $FreeBSD: src/lib/libc/stdlib/getenv.3,v 1.19 2006/10/12 08:39:24 trhodes Exp $ .\" -.Dd December 11, 1993 +.Dd October 12, 2006 .Dt GETENV 3 .Os .Sh NAME @@ -75,6 +75,10 @@ .Fn getenv function obtains the current value of the environment variable, .Fa name . +The application should not modify the string pointed +to by the +.Fn getenv +function. .Pp The .Fn setenv ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/string/ffs.3#2 (text+ko) ==== @@ -32,9 +32,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)ffs.3 8.2 (Berkeley) 4/19/94 -.\" $FreeBSD: src/lib/libc/string/ffs.3,v 1.9 2004/06/30 20:09:09 ru Exp $ +.\" $FreeBSD: src/lib/libc/string/ffs.3,v 1.10 2006/10/12 15:08:41 ru Exp $ .\" -.Dd January 13, 2004 +.Dd October 12, 2006 .Dt FFS 3 .Os .Sh NAME @@ -60,7 +60,9 @@ .Fn ffs and .Fn ffsl -functions find the first bit set in +functions find the first bit set +(beginning with the least significant bit) +in .Fa value and return the index of that bit. .Pp @@ -72,8 +74,7 @@ .Fa value and return the index of that bit. .Pp -Bits are numbered starting from 1, starting at the right-most -(least significant) bit. +Bits are numbered starting at 1 (the least significant bit). A return value of zero from any of these functions means that the argument was zero. .Sh SEE ALSO ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/sys/Makefile.inc#2 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile.inc 8.3 (Berkeley) 10/24/94 -# $FreeBSD: src/lib/libc/sys/Makefile.inc,v 1.121 2006/03/13 01:15:00 deischen Exp $ +# $FreeBSD: src/lib/libc/sys/Makefile.inc,v 1.122 2006/10/12 13:46:33 ru Exp $ # sys sources .PATH: ${.CURDIR}/${MACHINE_ARCH}/sys ${.CURDIR}/sys @@ -136,6 +136,8 @@ MLINKS+=pathconf.2 fpathconf.2 MLINKS+=read.2 pread.2 read.2 readv.2 read.2 preadv.2 MLINKS+=recv.2 recvfrom.2 recv.2 recvmsg.2 +MLINKS+=select.2 FD_CLR.3 select.2 FD_ISSET.3 select.2 FD_SET.3 \ + select.2 FD_ZERO.3 MLINKS+=send.2 sendmsg.2 send.2 sendto.2 MLINKS+=setpgid.2 setpgrp.2 MLINKS+=setresuid.2 setresgid.2 setresuid.2 getresuid.2 setresuid.2 getresgid.2 ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/sys/intro.2#2 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)intro.2 8.5 (Berkeley) 2/27/95 -.\" $FreeBSD: src/lib/libc/sys/intro.2,v 1.46 2005/11/19 11:30:55 simon Exp $ +.\" $FreeBSD: src/lib/libc/sys/intro.2,v 1.47 2006/10/12 20:50:26 ru Exp $ .\" .Dd February 27, 1995 .Dt INTRO 2 @@ -48,7 +48,7 @@ .\".Pp .\".Sy System call restart .\".Pp -.\"<more later...> +.\"(more later...) .Sh RETURN VALUES Nearly all of the system calls provide an error number referenced via the external identifier errno. @@ -76,8 +76,8 @@ and sets the variable .Va errno accordingly. -<This allows interpretation of the failure on receiving -a -1 and to take action accordingly.> +(This allows interpretation of the failure on receiving +a -1 and to take action accordingly.) Successful calls never set .Va errno ; once set, it remains until another error occurs. @@ -197,8 +197,8 @@ has been reached and a requests for an open cannot be satisfied until at least one has been closed. .It Er 24 EMFILE Em "Too many open files" . -<As released, the limit on the number of -open files per process is 64.> +(As released, the limit on the number of +open files per process is 64.) The .Xr getdtablesize 2 system call will obtain the current limit. ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/sys/read.2#2 (text+ko) ==== @@ -30,9 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)read.2 8.4 (Berkeley) 2/26/94 -.\" $FreeBSD: src/lib/libc/sys/read.2,v 1.32 2005/11/17 13:00:00 ru Exp $ +.\" $FreeBSD: src/lib/libc/sys/read.2,v 1.34 2006/10/21 18:03:53 ru Exp $ .\" -.Dd July 29, 2005 +.Dd October 11, 2006 .Dt READ 2 .Os .Sh NAME @@ -169,8 +169,10 @@ .It Bq Er EIO An I/O error occurred while reading from the file system. .It Bq Er EINTR -A read from a slow device was interrupted before -any data arrived by the delivery of a signal. +A read from a slow device +(i.e.\& one that might block for an arbitrary amount of time) +was interrupted by the delivery of a signal +before any data arrived. .It Bq Er EINVAL The pointer associated with .Fa d ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/sys/stat.2#3 (text+ko) ==== @@ -30,9 +30,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)stat.2 8.4 (Berkeley) 5/1/95 -.\" $FreeBSD: src/lib/libc/sys/stat.2,v 1.45 2006/06/13 12:49:14 maxim Exp $ +.\" $FreeBSD: src/lib/libc/sys/stat.2,v 1.46 2006/10/12 13:35:07 ru Exp $ .\" -.Dd November 15, 2004 +.Dd October 12, 2006 .Dt STAT 2 .Os .Sh NAME @@ -195,7 +195,7 @@ .Fa st_mode has the following bits: .Bd -literal -#define S_IFMT 0170000 /* type of file */ +#define S_IFMT 0170000 /* type of file mask */ #define S_IFIFO 0010000 /* named pipe (fifo) */ #define S_IFCHR 0020000 /* character special */ #define S_IFDIR 0040000 /* directory */ @@ -207,9 +207,18 @@ #define S_ISUID 0004000 /* set user id on execution */ #define S_ISGID 0002000 /* set group id on execution */ #define S_ISVTX 0001000 /* save swapped text even after use */ +#define S_IRWXU 0000700 /* RWX mask for owner */ #define S_IRUSR 0000400 /* read permission, owner */ #define S_IWUSR 0000200 /* write permission, owner */ #define S_IXUSR 0000100 /* execute/search permission, owner */ +#define S_IRWXG 0000070 /* RWX mask for group */ +#define S_IRGRP 0000040 /* read permission, group */ +#define S_IWGRP 0000020 /* write permission, group */ +#define S_IXGRP 0000010 /* execute/search permission, group */ +#define S_IRWXO 0000007 /* RWX mask for other */ +#define S_IROTH 0000004 /* read permission, other */ +#define S_IWOTH 0000002 /* write permission, other */ +#define S_IXOTH 0000001 /* execute/search permission, other */ .Ed .Pp For a list of access modes, see ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/sys/write.2#2 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)write.2 8.5 (Berkeley) 4/2/94 -.\" $FreeBSD: src/lib/libc/sys/write.2,v 1.32 2006/04/14 19:34:07 ru Exp $ +.\" $FreeBSD: src/lib/libc/sys/write.2,v 1.33 2006/10/21 20:36:50 simon Exp $ .\" .Dd July 7, 2005 .Dt WRITE 2 @@ -85,7 +85,7 @@ For .Fn writev and -.Fn pwritev, +.Fn pwritev , the .Fa iovec structure is defined as: ==== //depot/projects/soc2006/nss_ldap_cached/src/share/mk/bsd.cpu.mk#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/mk/bsd.cpu.mk,v 1.57 2006/08/22 07:51:10 ru Exp $ +# $FreeBSD: src/share/mk/bsd.cpu.mk,v 1.58 2006/10/19 22:51:26 cognet Exp $ # Set default CPU compile flags and baseline CPUTYPE for each arch. The # compile flags must support the minimum CPU type for each architecture but @@ -162,7 +162,7 @@ . endif .endif -.if ${MACHINE_ARCH} == "arm" && defined(ARM_BIG_ENDIAN) +.if ${MACHINE_ARCH} == "arm" && defined(TARGET_BIG_ENDIAN) CFLAGS += -mbig-endian LDFLAGS += -mbig-endian LD += -EB ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/Makefile#5 (text+ko) ==== @@ -1,5 +1,5 @@ # From: @(#)Makefile 5.20 (Berkeley) 6/12/93 -# $FreeBSD: src/usr.sbin/Makefile,v 1.362 2006/10/05 12:18:15 ru Exp $ +# $FreeBSD: src/usr.sbin/Makefile,v 1.363 2006/10/18 19:56:41 imp Exp $ .include <bsd.own.mk> @@ -111,7 +111,7 @@ ntp \ ${_nvram} \ ${_ofwdump} \ - ${_pccard} \ + pccard \ pciconf \ periodic \ pkg_install \ @@ -303,7 +303,6 @@ _mount_smbfs= mount_smbfs _mptable= mptable _ndiscvt= ndiscvt -_pccard= pccard _pnpinfo= pnpinfo .if ${MK_LIBPTHREAD} != "no" _pppctl= pppctl ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/arp/arp.c#3 (text+ko) ==== @@ -42,7 +42,7 @@ #endif /* not lint */ #endif #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/usr.sbin/arp/arp.c,v 1.63 2006/09/29 16:07:44 ru Exp $"); +__FBSDID("$FreeBSD: src/usr.sbin/arp/arp.c,v 1.64 2006/10/13 12:38:43 glebius Exp $"); /* * arp - display, set, and delete arp table entries @@ -761,9 +761,9 @@ for (ifr = ifc.ifc_req; ifr < ifend; ifr = NEXTIFR(ifr) ) { if (ifr->ifr_addr.sa_family != AF_INET) continue; - /* XXX can't we use *ifr instead of ifreq ? */ strncpy(ifreq.ifr_name, ifr->ifr_name, sizeof(ifreq.ifr_name)); + ifreq.ifr_addr = ifr->ifr_addr; /* * Check that the interface is up, * and not point-to-point or loopback. ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/config/config.8#2 (text+ko) ==== @@ -26,7 +26,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)config.8 8.2 (Berkeley) 4/19/94 -.\" $FreeBSD: src/usr.sbin/config/config.8,v 1.44 2005/08/10 06:36:44 obrien Exp $ +.\" $FreeBSD: src/usr.sbin/config/config.8,v 1.45 2006/10/21 20:09:51 ru Exp $ .\" .Dd December 16, 2004 .Dt CONFIG 8 @@ -40,20 +40,20 @@ .Op Fl d Ar destdir .Ar SYSTEM_NAME .Sh DESCRIPTION -This is the old version of the -.Nm -utility. -It understands the old autoconfiguration scheme -used on the HP300, i386, DECstation, and derivative platforms. -The new version of -.Nm -is used with the -SPARC platform. -Only the version of -.Nm -applicable to the architecture that you are running -will be installed on your machine. -.Pp +.\" This is the old version of the +.\" .Nm +.\" utility. +.\" It understands the old autoconfiguration scheme +.\" used on the HP300, i386, DECstation, and derivative platforms. +.\" The new version of +.\" .Nm +.\" is used with the +.\" SPARC platform. +.\" Only the version of +.\" .Nm +.\" applicable to the architecture that you are running +.\" will be installed on your machine. +.\" .Pp The .Nm utility builds a set of system configuration files from the file ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/freebsd-update/freebsd-update.sh#2 (text+ko) ==== @@ -25,7 +25,7 @@ # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -# $FreeBSD: src/usr.sbin/freebsd-update/freebsd-update.sh,v 1.2 2006/09/02 10:47:01 cperciva Exp $ +# $FreeBSD: src/usr.sbin/freebsd-update/freebsd-update.sh,v 1.3 2006/10/21 11:04:34 cperciva Exp $ #### Usage function -- called from command-line handling code. @@ -1926,6 +1926,9 @@ >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610231224.k9NCOaYM007239>