Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

4
security/sudo/DESCR Normal file
View File

@@ -0,0 +1,4 @@
Sudo is a program designed to allow a sysadmin to give limited root
privileges to users and log root activity. The basic philosophy is to
give as few privileges as possible but still allow people to get their
work done.

11
security/sudo/MESSAGE Normal file
View File

@@ -0,0 +1,11 @@
===========================================================================
$NetBSD: MESSAGE,v 1.6 2004/03/11 23:33:09 reed Exp $
Use the visudo(8) command to edit the sudoers file.
If you are upgrading from a version of sudo prior to 1.6, please read
${PREFIX}/share/doc/sudo/UPGRADE
on how to modify your sudoers file appropriately.
===========================================================================

56
security/sudo/Makefile Normal file
View File

@@ -0,0 +1,56 @@
# $NetBSD: Makefile,v 1.140 2013/03/01 14:24:57 kim Exp $
#
DISTNAME= sudo-1.7.10p7
CATEGORIES= security
MASTER_SITES= http://www.sudo.ws/dist/ \
ftp://ftp.sudo.ws/pub/sudo/ \
ftp://ftp.uwsg.indiana.edu/pub/security/sudo/ \
ftp://ftp.twaren.net/Unix/Security/Sudo/ \
http://ftp.tux.org/pub/security/sudo/
MAINTAINER= kim@tac.nyc.ny.us
HOMEPAGE= http://www.sudo.ws/
COMMENT= Allow others to run commands as root
LICENSE= isc AND modified-bsd
PKG_INSTALLATION_TYPES= overwrite pkgviews
USE_LIBTOOL= yes
OWN_DIRS+= ${VARBASE}/run
GNU_CONFIGURE= yes
BUILD_DEFS+= VARBASE
PLIST_VARS+= ldap
.include "../../mk/bsd.prefs.mk"
# to always install man instead of cat
CONFIGURE_ENV+= NROFFPROG=${CAT:Q}
CONFIGURE_ENV+= mansectsu=8
CONFIGURE_ENV+= mansectform=5
CONFIGURE_ARGS+= --disable-root-mailer --with-ignore-dot
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= --with-timedir=${VARBASE}/run/sudo
CONFIGURE_ARGS+= --with-logpath=${VARBASE}/log/sudo.log
.include "options.mk"
CONFIGURE_ARGS+= --with-nbsdops --disable-path-info
DOCDIR= share/doc/${PKGBASE}
EGDIR= share/examples/${PKGBASE}
CONF_FILES_PERMS= ${EGDIR}/sudoers ${PKG_SYSCONFDIR}/sudoers \
${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0440
OWN_DIRS+= ${PKG_SYSCONFDIR}/sudoers.d
SPECIAL_PERMS+= bin/sudo ${SETUID_ROOT_PERMS}
SPECIAL_PERMS+= bin/sudoreplay ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 511
INSTALLATION_DIRS+= ${DOCDIR} ${EGDIR}
post-install:
${INSTALL_DATA} ${WRKSRC}/UPGRADE ${DESTDIR}${PREFIX}/${DOCDIR}
${INSTALL_DATA} ${WRKSRC}/sudoers ${DESTDIR}${PREFIX}/${EGDIR}/sudoers
${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/${DOCDIR}
.include "../../devel/zlib/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

28
security/sudo/PLIST Normal file
View File

@@ -0,0 +1,28 @@
@comment $NetBSD: PLIST,v 1.6 2010/09/21 03:05:27 taca Exp $
bin/sudo
bin/sudoedit
bin/sudoreplay
libexec/sudo_noexec.so
man/man5/sudoers.5
${PLIST.ldap}man/man5/sudoers.ldap.5
man/man8/sudo.8
man/man8/sudoedit.8
man/man8/sudoreplay.8
man/man8/visudo.8
sbin/visudo
share/doc/sudo/ChangeLog
share/doc/sudo/HISTORY
share/doc/sudo/LICENSE
share/doc/sudo/NEWS
share/doc/sudo/README
${PLIST.ldap}share/doc/sudo/README.LDAP
share/doc/sudo/TROUBLESHOOTING
share/doc/sudo/UPGRADE
share/doc/sudo/sample.pam
share/doc/sudo/sample.sudoers
share/doc/sudo/sample.syslog.conf
${PLIST.ldap}share/doc/sudo/schema.ActiveDirectory
${PLIST.ldap}share/doc/sudo/schema.OpenLDAP
${PLIST.ldap}share/doc/sudo/schema.iPlanet
${PLIST.ldap}share/doc/sudo/sudoers2ldif
share/examples/sudo/sudoers

9
security/sudo/distinfo Normal file
View File

@@ -0,0 +1,9 @@
$NetBSD: distinfo,v 1.79 2013/03/01 14:24:57 kim Exp $
SHA1 (sudo-1.7.10p7.tar.gz) = b5beb1a470d1f03b3940aff612f5089244dd773a
RMD160 (sudo-1.7.10p7.tar.gz) = 171e54506c30a85fa642070332db012aba4a6203
Size (sudo-1.7.10p7.tar.gz) = 1217508 bytes
SHA1 (patch-aa) = 0c9c173a26ea72dd06a7d3947a0b3ba6dc00cf40
SHA1 (patch-af) = 045e6daceea982a161272af822e3554138ac7dbf
SHA1 (patch-ag) = abd8b76259e0eae75fe4ef8c2fb63f090fe14999
SHA1 (patch-logging.c) = 26608d7423b77f71f17b37cc87f4b2e75978d7cb

44
security/sudo/options.mk Normal file
View File

@@ -0,0 +1,44 @@
# $NetBSD: options.mk,v 1.17 2009/02/14 19:30:33 tonnerre Exp $
#
PKG_OPTIONS_VAR= PKG_OPTIONS.sudo
PKG_SUPPORTED_OPTIONS= ldap
PKG_OPTIONS_OPTIONAL_GROUPS= auth
PKG_OPTIONS_GROUP.auth= kerberos pam skey
.if ${OPSYS} == "NetBSD" && exists(/usr/include/skey.h)
PKG_SUGGESTED_OPTIONS= skey
.endif
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Mpam)
. include "../../mk/pam.buildlink3.mk"
DL_AUTO_VARS= yes
CONFIGURE_ARGS+= --with-pam
.else
CONFIGURE_ARGS+= --without-pam
.endif
.if !empty(PKG_OPTIONS:Mkerberos)
. include "../../mk/krb5.buildlink3.mk"
CONFIGURE_ARGS+= --without-kerb4
CONFIGURE_ARGS+= --with-kerb5
.else
CONFIGURE_ARGS+= --without-kerb5
.endif
.if !empty(PKG_OPTIONS:Mldap)
. include "../../databases/openldap-client/buildlink3.mk"
. include "../../security/cyrus-sasl/buildlink3.mk"
DL_AUTO_VARS= yes
CONFIGURE_ARGS+= --with-ldap=${BUILDLINK_PREFIX.openldap-client}
CONFIGURE_ARGS+= --with-ldap-conf-file=${PKG_SYSCONFDIR}/ldap.conf
PLIST.ldap= yes
.endif
.if !empty(PKG_OPTIONS:Mskey)
CONFIGURE_ARGS+= --with-skey
.else
CONFIGURE_ARGS+= --without-skey
.endif

View File

@@ -0,0 +1,79 @@
$NetBSD: patch-aa,v 1.30 2013/03/01 14:24:58 kim Exp $
* Fix libtools's link option.
* Prevent to install sudoers files and directory.
* Use standard instal(8) option instead of shell wrapper.
* Don't setuid here.
--- Makefile.in.orig 2013-01-15 19:59:25.000000000 +0000
+++ Makefile.in 2013-03-01 13:46:11.000000000 +0000
@@ -250,7 +250,7 @@
$(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $(srcdir)/sudo_noexec.c
libsudo_noexec.la: sudo_noexec.lo
- $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ sudo_noexec.lo -avoid-version -rpath $(noexecdir)
+ $(LIBTOOL) --mode=link $(CC) -module $(LDFLAGS) -o $@ sudo_noexec.lo -avoid-version -rpath $(noexecdir)
GENERATED = gram.h gram.c toke.c def_data.c def_data.h getdate.c
@@ -686,43 +686,43 @@
./visudo -c -f $(DESTDIR)$(sudoersdir)/sudoers; \
fi
-install: pre-install install-dirs install-binaries @INSTALL_NOEXEC@ install-sudoers install-doc
+install: install-binaries @INSTALL_NOEXEC@ install-doc
install-dirs:
$(SHELL) $(srcdir)/mkinstalldirs $(DESTDIR)$(sudodir) \
$(DESTDIR)$(visudodir) $(DESTDIR)$(noexecdir) \
- $(DESTDIR)$(sudoersdir) $(DESTDIR)$(docdir) \
+ $(DESTDIR)$(sudoersdir) \
$(DESTDIR)$(mandirsu) $(DESTDIR)$(mandirform) \
`echo $(DESTDIR)$(timedir)|sed 's,/[^/]*$$,,'`
- $(INSTALL) -d -O $(install_uid) -G $(install_gid) -m 0700 $(DESTDIR)$(timedir)
+ $(INSTALL) -d -m 0700 $(DESTDIR)$(timedir)
install-binaries: install-dirs $(PROGS)
if [ X"$$SUDO_PREINSTALL_CMD" != X"" ]; then exec $$SUDO_PREINSTALL_CMD sudo; fi
- $(INSTALL) -b~ -O $(install_uid) -G $(install_gid) -M 04755 sudo $(DESTDIR)$(sudodir)/sudo
+ $(INSTALL) sudo $(DESTDIR)$(sudodir)/sudo
rm -f $(DESTDIR)$(sudodir)/sudoedit
ln -s sudo $(DESTDIR)$(sudodir)/sudoedit
- if [ -f sudoreplay ]; then $(INSTALL) -b~ -O $(install_uid) -G $(install_gid) -m 0755 sudoreplay $(DESTDIR)$(sudodir)/sudoreplay; fi
- $(INSTALL) -b~ -O $(install_uid) -G $(install_gid) -m 0755 visudo $(DESTDIR)$(visudodir)/visudo
- if [ -f sesh ]; then $(INSTALL) -b~ -O $(install_uid) -G $(install_gid) -m 0755 sesh $(DESTDIR)$(libexecdir)/sesh; fi
+ if [ -f sudoreplay ]; then $(INSTALL) sudoreplay $(DESTDIR)$(sudodir)/sudoreplay; fi
+ $(INSTALL) visudo $(DESTDIR)$(visudodir)/visudo
+ if [ -f sesh ]; then $(INSTALL) sesh $(DESTDIR)$(libexecdir)/sesh; fi
install-noexec: install-dirs libsudo_noexec.la
- if [ -f .libs/lib$(noexecfile) ]; then $(INSTALL) -b~ -O $(install_uid) -G $(install_gid) -m $(shlib_mode) .libs/lib$(noexecfile) $(DESTDIR)$(noexecdir)/$(noexecfile); fi
+ if [ -f .libs/lib$(noexecfile) ]; then $(INSTALL) -m $(shlib_mode) .libs/lib$(noexecfile) $(DESTDIR)$(noexecdir)/$(noexecfile); fi
install-sudoers: install-dirs
- $(INSTALL) -d -O $(sudoers_uid) -G $(sudoers_gid) -m 0750 \
+ $(INSTALL) -d -m 0750 \
$(DESTDIR)$(sudoersdir)/sudoers.d
test -f $(DESTDIR)$(sudoersdir)/sudoers || \
- $(INSTALL) -O $(sudoers_uid) -G $(sudoers_gid) -m $(sudoers_mode) \
+ $(INSTALL) -m $(sudoers_mode) \
sudoers $(DESTDIR)$(sudoersdir)/sudoers
install-doc: install-dirs ChangeLog
- (cd $(srcdir) && for f in ChangeLog HISTORY LICENSE NEWS README TROUBLESHOOTING UPGRADE sample.*; do $(INSTALL) -O $(install_uid) -G $(install_gid) -m 0644 $$f $(DESTDIR)$(docdir); done)
- @LDAP@(cd $(srcdir) && for f in README.LDAP schema.* sudoers2ldif; do $(INSTALL) -O $(install_uid) -G $(install_gid) -m 0644 $$f $(DESTDIR)$(docdir); done)
- $(INSTALL) -O $(install_uid) -G $(install_gid) -m 0644 @mansrcdir@/sudo.$(mantype) $(DESTDIR)$(mandirsu)/sudo.$(mansectsu)
- @REPLAY@$(INSTALL) -O $(install_uid) -G $(install_gid) -m 0644 @mansrcdir@/sudoreplay.$(mantype) $(DESTDIR)$(mandirsu)/sudoreplay.$(mansectsu)
- $(INSTALL) -O $(install_uid) -G $(install_gid) -m 0644 @mansrcdir@/visudo.$(mantype) $(DESTDIR)$(mandirsu)/visudo.$(mansectsu)
- $(INSTALL) -O $(install_uid) -G $(install_gid) -m 0644 @mansrcdir@/sudoers.$(mantype) $(DESTDIR)$(mandirform)/sudoers.$(mansectform)
- @LDAP@$(INSTALL) -O $(install_uid) -G $(install_gid) -m 0644 @mansrcdir@/sudoers.ldap.$(mantype) $(DESTDIR)$(mandirform)/sudoers.ldap.$(mansectform)
+ (cd $(srcdir) && for f in ChangeLog HISTORY LICENSE NEWS README TROUBLESHOOTING UPGRADE sample.*; do $(INSTALL) -m 0644 $$f $(DESTDIR)$(docdir); done)
+ @LDAP@(cd $(srcdir) && for f in README.LDAP schema.* sudoers2ldif; do $(INSTALL) -m 0644 $$f $(DESTDIR)$(docdir); done)
+ $(INSTALL) -m 0644 @mansrcdir@/sudo.$(mantype) $(DESTDIR)$(mandirsu)/sudo.$(mansectsu)
+ @REPLAY@$(INSTALL) -m 0644 @mansrcdir@/sudoreplay.$(mantype) $(DESTDIR)$(mandirsu)/sudoreplay.$(mansectsu)
+ $(INSTALL) -m 0644 @mansrcdir@/visudo.$(mantype) $(DESTDIR)$(mandirsu)/visudo.$(mansectsu)
+ $(INSTALL) -m 0644 @mansrcdir@/sudoers.$(mantype) $(DESTDIR)$(mandirform)/sudoers.$(mansectform)
+ @LDAP@$(INSTALL) -m 0644 @mansrcdir@/sudoers.ldap.$(mantype) $(DESTDIR)$(mandirform)/sudoers.ldap.$(mansectform)
@if test -n "$(MANCOMPRESS)"; then \
for f in $(mandirsu)/sudo.$(mansectsu) $(mandirsu)/sudoreplay.$(mansectsu) $(mandirsu)/visudo.$(mansectsu) $(mandirform)/sudoers.$(mansectform) $(mandirform)/sudoers.ldap.$(mansectform); do \
if test -f $(DESTDIR)$$f; then \

View File

@@ -0,0 +1,56 @@
$NetBSD: patch-af,v 1.29 2013/03/01 14:24:58 kim Exp $
* Add "--with-nbsdops" option, NetBSD standard options.
* Link with util(3) in the case of DragonFly, too.
* When specified "--with-kerb5" option, test existence of several functions
even if there is krb5-config. krb5-config dosen't give all definitions for
functions (HAVE_KRB5_*).
* Remove setting sysconfdir to "/etc".
--- configure.in.orig 2013-02-21 15:43:17.000000000 +0000
+++ configure.in 2013-03-01 13:56:47.000000000 +0000
@@ -330,6 +330,18 @@
;;
esac])
+AC_ARG_WITH(nbsdops, [AS_HELP_STRING([--with-nbsdops], [add NetBSD standard options])],
+[case $with_nbsdops in
+ yes) echo 'Adding NetBSD standard options'
+ CHECKSIA=false
+ with_ignore_dot=yes
+ with_env_editor=yes
+ with_tty_tickets=yes
+ ;;
+ no) ;;
+ *) echo "Ignoring unknown argument to --with-nbsdops: $with_nbsdops"
+ ;;
+esac])
AC_ARG_WITH(passwd, [AS_HELP_STRING([--without-passwd], [don't use passwd/shadow file for authentication])],
[case $with_passwd in
yes|no) AC_MSG_CHECKING(whether to use shadow/passwd file authentication)
@@ -2015,7 +2027,7 @@
if test ${with_logincap-'no'} != "no"; then
AC_CHECK_HEADERS(login_cap.h, [LOGINCAP_USAGE='[[-c class|-]] '; LCMAN=1
case "$OS" in
- freebsd|netbsd) SUDO_LIBS="${SUDO_LIBS} -lutil"
+ dragonfly*|freebsd*|netbsd*) SUDO_LIBS="${SUDO_LIBS} -lutil"
;;
esac
])
@@ -2634,6 +2646,8 @@
])
AUTH_OBJS="$AUTH_OBJS kerb5.o"
fi
+fi
+if test ${with_kerb5-'no'} != "no"; then
_LIBS="$LIBS"
LIBS="${LIBS} ${SUDO_LIBS}"
AC_CHECK_FUNCS(krb5_verify_user krb5_init_secure_context)
@@ -3167,7 +3181,6 @@
test "$docdir" = '${datarootdir}/doc/${PACKAGE_TARNAME}' && docdir='$(datarootdir)/doc/$(PACKAGE_TARNAME)'
test "$localedir" = '${datarootdir}/locale' && localedir='$(datarootdir)/locale'
test "$localstatedir" = '${prefix}/var' && localstatedir='$(prefix)/var'
-test "$sysconfdir" = '${prefix}/etc' -a X"$with_stow" != X"yes" && sysconfdir='/etc'
dnl
dnl Substitute into the Makefile, sudo_usage.h and example sudoers

View File

@@ -0,0 +1,77 @@
$NetBSD: patch-ag,v 1.20 2013/03/01 14:24:58 kim Exp $
* Add "--with-nbsdops" option, NetBSD standard options.
* Link with util(3) in the case of DragonFly, too.
* When specified "--with-kerb5" option, test existence of several functions
even if there is krb5-config. krb5-config dosen't give all definitions for
functions (HAVE_KRB5_*).
* Remove setting sysconfdir to "/etc".
--- configure.orig 2013-02-21 15:43:29.000000000 +0000
+++ configure 2013-03-01 13:58:36.000000000 +0000
@@ -1484,7 +1484,7 @@
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
- --sysconfdir=DIR read-only single-machine data [/etc]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
@@ -1569,6 +1569,7 @@
--with-libraries additional libraries to link with
--with-efence link with -lefence for malloc() debugging
--with-csops add CSOps standard options
+ --with-nbsdops add NetBSD standard options
--without-passwd don't use passwd/shadow file for authentication
--with-skey=DIR enable S/Key support
--with-opie=DIR enable OPIE support
@@ -3959,6 +3960,22 @@
esac
fi
+# Check whether --with-nbsdops or --without-nbsdops was given.
+if test "${with_nbsdops+set}" = set; then
+ withval="$with_nbsdops"
+ case $with_nbsdops in
+ yes) echo 'Adding NetBSD standard options'
+ CHECKSIA=false
+ with_ignore_dot=yes
+ with_env_editor=yes
+ with_tty_tickets=yes
+ ;;
+ no) ;;
+ *) echo "Ignoring unknown argument to --with-nbsdops: $with_nbsdops"
+ ;;
+esac
+fi;
+
# Check whether --with-passwd was given.
@@ -15632,7 +15649,7 @@
_ACEOF
LOGINCAP_USAGE='[-c class|-] '; LCMAN=1
case "$OS" in
- freebsd|netbsd) SUDO_LIBS="${SUDO_LIBS} -lutil"
+ dragonfly*|freebsd*|netbsd*) SUDO_LIBS="${SUDO_LIBS} -lutil"
;;
esac
@@ -18569,6 +18586,8 @@
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
AUTH_OBJS="$AUTH_OBJS kerb5.o"
fi
+fi
+if test ${with_kerb5-'no'} != "no"; then
_LIBS="$LIBS"
LIBS="${LIBS} ${SUDO_LIBS}"
for ac_func in krb5_verify_user krb5_init_secure_context
@@ -20313,7 +20332,6 @@
test "$docdir" = '${datarootdir}/doc/${PACKAGE_TARNAME}' && docdir='$(datarootdir)/doc/$(PACKAGE_TARNAME)'
test "$localedir" = '${datarootdir}/locale' && localedir='$(datarootdir)/locale'
test "$localstatedir" = '${prefix}/var' && localstatedir='$(prefix)/var'
-test "$sysconfdir" = '${prefix}/etc' -a X"$with_stow" != X"yes" && sysconfdir='/etc'
ac_config_files="$ac_config_files Makefile sudo_usage.h sudoers"

View File

@@ -0,0 +1,16 @@
$NetBSD: patch-logging.c,v 1.3 2011/09/18 14:18:25 ryoon Exp $
Make sure CODESET is actually defined, for the sake of
old NetBSD versions
--- logging.c.orig 2011-08-13 17:32:04 +0000
+++ logging.c
@@ -573,7 +573,7 @@ send_mail(fmt, va_alist)
(void) fputc(*p, mail);
}
-#ifdef HAVE_NL_LANGINFO
+#if defined(HAVE_NL_LANGINFO) && defined(CODESET)
if (strcmp(def_sudoers_locale, "C") != 0)
(void) fprintf(mail, "\nContent-Type: text/plain; charset=\"%s\"\nContent-Transfer-Encoding: 8bit", nl_langinfo(CODESET));
#endif /* HAVE_NL_LANGINFO */