head	1.1;
branch	1.1.1;
access;
symbols
	netbsd-11-0-RC7:1.1.1.3
	netbsd-11-0-RC6:1.1.1.3
	netbsd-11-0-RC5:1.1.1.3
	netbsd-11-0-RC4:1.1.1.3
	netbsd-11-0-RC3:1.1.1.3
	netbsd-11-0-RC2:1.1.1.3
	netbsd-11-0-RC1:1.1.1.3
	netbsd-11:1.1.1.3.0.2
	netbsd-11-base:1.1.1.3
	xinit-1-4-3:1.1.1.3
	netbsd-10-1-RELEASE:1.1.1.2
	netbsd-8-3-RELEASE:1.1.1.2
	netbsd-9-4-RELEASE:1.1.1.2
	netbsd-10-0-RELEASE:1.1.1.2
	netbsd-10-0-RC6:1.1.1.2
	netbsd-10-0-RC5:1.1.1.2
	netbsd-10-0-RC4:1.1.1.2
	netbsd-10-0-RC3:1.1.1.2
	netbsd-10-0-RC2:1.1.1.2
	netbsd-10-0-RC1:1.1.1.2
	xinit-1-4-2:1.1.1.2
	netbsd-10:1.1.1.2.0.12
	netbsd-10-base:1.1.1.2
	netbsd-9-3-RELEASE:1.1.1.2
	netbsd-9-2-RELEASE:1.1.1.2
	netbsd-9-1-RELEASE:1.1.1.2
	netbsd-8-2-RELEASE:1.1.1.2
	netbsd-9-0-RELEASE:1.1.1.2
	netbsd-9-0-RC2:1.1.1.2
	netbsd-9-0-RC1:1.1.1.2
	netbsd-9:1.1.1.2.0.10
	netbsd-9-base:1.1.1.2
	netbsd-8-1-RELEASE:1.1.1.2
	netbsd-8-1-RC1:1.1.1.2
	xinit-1-4-1:1.1.1.2
	netbsd-7-2-RELEASE:1.1.1.2
	netbsd-8-0-RELEASE:1.1.1.2
	netbsd-8-0-RC2:1.1.1.2
	netbsd-8-0-RC1:1.1.1.2
	netbsd-7-1-2-RELEASE:1.1.1.2
	xinit-1-4-0:1.1.1.2
	netbsd-7-1-1-RELEASE:1.1.1.2
	netbsd-8:1.1.1.2.0.8
	netbsd-8-base:1.1.1.2
	netbsd-7-1:1.1.1.2.0.6
	netbsd-7-1-RELEASE:1.1.1.2
	netbsd-7-1-RC2:1.1.1.2
	netbsd-7-1-RC1:1.1.1.2
	netbsd-7-0-2-RELEASE:1.1.1.2
	netbsd-7-0-1-RELEASE:1.1.1.2
	netbsd-7-0:1.1.1.2.0.4
	netbsd-7-0-RELEASE:1.1.1.2
	netbsd-7-0-RC3:1.1.1.2
	netbsd-7-0-RC2:1.1.1.2
	xinit-1-3-4:1.1.1.2
	netbsd-7-0-RC1:1.1.1.2
	netbsd-6-0-6-RELEASE:1.1.1.1
	netbsd-6-1-5-RELEASE:1.1.1.1
	netbsd-7:1.1.1.2.0.2
	netbsd-7-base:1.1.1.2
	netbsd-6-1-4-RELEASE:1.1.1.1
	netbsd-6-0-5-RELEASE:1.1.1.1
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.2
	xinit-1-3-3:1.1.1.2
	riastradh-drm2:1.1.1.1.0.8
	riastradh-drm2-base:1.1.1.1
	netbsd-6-1-3-RELEASE:1.1.1.1
	netbsd-6-0-4-RELEASE:1.1.1.1
	netbsd-6-1-2-RELEASE:1.1.1.1
	netbsd-6-0-3-RELEASE:1.1.1.1
	netbsd-6-1-1-RELEASE:1.1.1.1
	xinit-1-3-2:1.1.1.1
	netbsd-6-1:1.1.1.1.0.6
	netbsd-6-0-2-RELEASE:1.1.1.1
	netbsd-6-1-RELEASE:1.1.1.1
	netbsd-6-1-RC4:1.1.1.1
	netbsd-6-1-RC3:1.1.1.1
	netbsd-6-1-RC2:1.1.1.1
	netbsd-6-1-RC1:1.1.1.1
	netbsd-6-0-1-RELEASE:1.1.1.1
	netbsd-6-0:1.1.1.1.0.4
	netbsd-6-0-RELEASE:1.1.1.1
	netbsd-6-0-RC2:1.1.1.1
	netbsd-6-0-RC1:1.1.1.1
	netbsd-6:1.1.1.1.0.2
	netbsd-6-base:1.1.1.1
	xinit-1-3-1:1.1.1.1
	xorg:1.1.1;
locks; strict;
comment	@// @;


1.1
date	2011.08.03.02.44.52;	author mrg;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2011.08.03.02.44.52;	author mrg;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	2014.03.17.09.37.35;	author mrg;	state Exp;
branches;
next	1.1.1.3;
commitid	VBCSl7bGH4VMc2tx;

1.1.1.3
date	2025.03.09.07.58.32;	author mrg;	state Exp;
branches;
next	;
commitid	m0Z5Btu96vshLmMF;


desc
@@


1.1
log
@Initial revision
@
text
@XCOMM!/bin/sh
XCOMM Copyright (c) 2008 Apple Inc.
XCOMM
XCOMM Permission is hereby granted, free of charge, to any person
XCOMM obtaining a copy of this software and associated documentation files
XCOMM (the "Software"), to deal in the Software without restriction,
XCOMM including without limitation the rights to use, copy, modify, merge,
XCOMM publish, distribute, sublicense, and/or sell copies of the Software,
XCOMM and to permit persons to whom the Software is furnished to do so,
XCOMM subject to the following conditions:
XCOMM
XCOMM The above copyright notice and this permission notice shall be
XCOMM included in all copies or substantial portions of the Software.
XCOMM
XCOMM THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
XCOMM EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
XCOMM MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
XCOMM NONINFRINGEMENT.  IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
XCOMM HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
XCOMM WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
XCOMM OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
XCOMM DEALINGS IN THE SOFTWARE.
XCOMM
XCOMM Except as contained in this notice, the name(s) of the above
XCOMM copyright holders shall not be used in advertising or otherwise to
XCOMM promote the sale, use or other dealings in this Software without
XCOMM prior written authorization.

XCOMM Make sure these are owned by root

XCOMM Our usage of mktemp fails with GNU, so prefer /usr/bin to hopefully
XCOMM get BSD mktemp
if [ -x /usr/bin/mktemp ] ; then
    MKTEMP=/usr/bin/mktemp
else
    MKTEMP=mktemp
fi

for dir in /tmp/.ICE-unix /tmp/.X11-unix /tmp/.font-unix ; do
	XCOMM Use mktemp rather than mkdir to avoid possible security issue
	XCOMM if $dir exists and is a symlink
	if ${MKTEMP} -d ${dir} >& /dev/null ; then
		chmod 1777 $dir
		chown root:wheel $dir
	fi
done
@


1.1.1.1
log
@initial import of xinit-1.3.1
@
text
@@


1.1.1.2
log
@initial import of xinit-1.3.3
@
text
@d2 1
a2 1
XCOMM Copyright (c) 2008-2012 Apple Inc.
a38 2
STAT=/usr/bin/stat

d40 5
a44 25
	success=0
	for attempt in 1 2 3 4 5 ; do
		check=`${STAT} -f '%#p %u %g' ${dir} 2> /dev/null`
		if [ "${check}" = "041777 0 0" ] ; then
			success=1
			break
		elif [ -n "${check}" ] ; then
			saved=$(${MKTEMP} -d ${dir}-XXXXXXXX)
			mv ${dir} ${saved}
			echo "${dir} exists but is insecure.  It has been moved into ${saved}" >&2
		fi

		# Use mktemp rather than mkdir to avoid possible security issue
		# if $dir exists and is a symlink (ie protect against a race
		# against the above check)
		if ${MKTEMP} -d ${dir} >& /dev/null ; then
			chmod 1777 $dir
			chown root:wheel $dir
			success=1
			break
		fi
	done

	if [ "${success}" -eq 0 ] ; then
		echo "Could not successfully create ${dir}" >&2
@


1.1.1.3
log
@initial import of xinit-1.4.3
@
text
@d57 1
a57 1
		if ${MKTEMP} -d ${dir} > /dev/null 2>&1 ; then
@


