This commit is contained in:
2025-08-26 08:11:42 +02:00
parent 18e2a5368d
commit 67c8d5ea09
189 changed files with 8108 additions and 980 deletions

64
system/sudo/Makefile Normal file
View File

@@ -0,0 +1,64 @@
#
# $Id$
#
PORTNAME= sudo
DISTVERSION= 1.8.25p1
PORTVERSION= ${DISTVERSION:S/p/./}
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_SUDO}
MAINTAINER= onborodin@gmail.com
COMMENT= Allow others to run commands as root
GNU_CONFIGURE= yes
USES+= gmake
LDFLAGS+= -lgcc
LDFLAGS+= -lssp_nonshared
CONFIGURE_ARGS+= --sysconfdir=${PREFIX}/etc
CONFIGURE_ARGS+= --with-ignore-dot
CONFIGURE_ARGS+= --with-tty-tickets
CONFIGURE_ARGS+= --with-env-editor
CONFIGURE_ARGS+= --with-logincap
CONFIGURE_ARGS+= --with-long-otp-prompt
CONFIGURE_ARGS+= --with-insults
CONFIGURE_ARGS+= --with-all-insults
CONFIGURE_ARGS+= --enable-shell-sets-home
CONFIGURE_ARGS+= --without-lecture
CONFIGURE_ARGS+= --without-ldap
##CONFIGURE_ARGS+= --disable-root-sudo
##CONFIGURE_ARGS+= --disable-authentication
CONFIGURE_ARGS+= --without-opie
CONFIGURE_ARGS+= --with-pam
CONFIGURE_ARGS+= --disable-pie
LOGFAC?= authpriv
CONFIGURE_ARGS+= --with-logfac=${LOGFAC}
## ex: make SUDO_SECURE_PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"
#.if defined(SUDO_SECURE_PATH)
#CONFIGURE_ARGS+= --with-secure-path="${SUDO_SECURE_PATH}"
#.endif
LDFLAGS+= -L${LOCALBASE}/lib -lintl
CFLAGS+= -I${LOCALBASE}/include
post-patch:
# ${REINPLACE_CMD} -E '/install-(binaries|noexec):/,/^$$/ \
# s/\$$\(INSTALL\)/& ${STRIP}/;s/-b\~/-b ~/' \
# ${WRKSRC}/src/Makefile.in
# ${REINPLACE_CMD} -e 's,$$(srcdir)/sudoers2ldif $$(DESTDIR)$$(docdir),$$(srcdir)/sudoers2ldif $$(DESTDIR)$$(bindir),' ${WRKSRC}/plugins/sudoers/Makefile.in
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/sudoreplay
${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/visudo
.for FILE in group_file.so sudoers.so system_group.so
${STRIP_CMD} ${STAGEDIR}${PREFIX}/libexec/sudo/${FILE}
.endfor
cd ${STAGEDIR}/${PREFIX}/man/man8 && ${LN} -sf sudo.8 sudoedit.8
.include <bsd.port.mk>
#EOF

2
system/sudo/distinfo Normal file
View File

@@ -0,0 +1,2 @@
SHA256 (sudo-1.8.25p1.tar.gz) = 9dc99c7a7d37a0ab938410995c133e15d6afb970c2c66f9264fe36d20c89195b
SIZE (sudo-1.8.25p1.tar.gz) = 3189951

View File

@@ -0,0 +1,19 @@
#
# $FreeBSD: head/security/sudo/files/pam.conf 340872 2014-01-24 00:14:07Z mat $
#
# PAM configuration for the "sudo" service
#
# auth
auth include system
# account
account include system
# session
# XXX: pam_lastlog (used in system) causes users to appear as though
# they are no longer logged in in system logs.
session required pam_permit.so
# password
password include system

View File

@@ -0,0 +1,28 @@
--- install-sh.orig 2017-01-14 04:30:15 UTC
+++ install-sh
@@ -171,12 +171,6 @@ if ${DIRMODE} ; then
if [ ! -d "${DEST}" ] ; then
${MKDIR} "${DEST}" || exit 1
fi
- if ${CHOWNIT} ; then
- ${CHOWN} "${OWNER}" "${DEST}" || exit 1
- fi
- if ${CHGROUPIT} ; then
- ${CHGRP} "${GROUP}" "${DEST}" || exit 1
- fi
if ${CHMODIT} ; then
${CHMOD} "${MODE}" "${DEST}" || exit 1
fi
@@ -226,12 +220,6 @@ fi
## Strip and set the owner/mode.
if ${STRIPIT} ; then
${STRIP} "${DEST}" || exit 1
-fi
-if ${CHOWNIT} ; then
- ${CHOWN} "${OWNER}" "${DEST}" || exit 1
-fi
-if ${CHGROUPIT} ; then
- ${CHGRP} "${GROUP}" "${DEST}" || exit 1
fi
if ${CHMODIT} ; then
${CHMOD} "${MODE}" "${DEST}" || exit 1

View File

@@ -0,0 +1,27 @@
--- plugins/sudoers/sudoers.in.orig 2018-01-15 17:30:32 UTC
+++ plugins/sudoers/sudoers.in
@@ -32,6 +32,14 @@
##
## Defaults specification
##
+## Uncomment if needed to preserve environmental variables related to the
+## FreeBSD pkg utility and fetch.
+# Defaults env_keep += "PKG_CACHEDIR PKG_DBDIR FTP_PASSIVE_MODE"
+##
+## Additionally uncomment if needed to preserve environmental variables
+## related to portupgrade
+# Defaults env_keep += "PORTSDIR PORTS_INDEX PORTS_DBDIR PACKAGES PKGTOOLS_CONF"
+##
## You may wish to keep some of the following environment variables
## when running commands via sudo.
##
@@ -91,6 +99,9 @@ root ALL=(ALL) ALL
## of the user they are running the command as (root by default).
# Defaults targetpw # Ask for the password of the target user
# ALL ALL=(ALL) ALL # WARNING: only use this together with 'Defaults targetpw'
+
+## Uncomment to show on password prompt which users' password is being expected
+# Defaults passprompt="%p's password:"
## Read drop-in files from @sysconfdir@/sudoers.d
## (the '#' here does not indicate a comment)

View File

@@ -0,0 +1,11 @@
--- plugins/sudoers/parse.c.orig 2019-01-22 13:45:48 UTC
+++ plugins/sudoers/parse.c
@@ -60,7 +60,7 @@ sudoers_lookup_pseudo(struct sudo_nss_list *snl, struc
debug_decl(sudoers_lookup_pseudo, SUDOERS_DEBUG_PARSER)
pwcheck = (pwflag == -1) ? never : sudo_defs_table[pwflag].sd_un.tuple;
- nopass = (pwcheck == all) ? true : false;
+ nopass = (pwcheck == never) ? true : false;
if (list_pw == NULL)
SET(validated, FLAG_NO_CHECK);

View File

@@ -0,0 +1,20 @@
--- ./ltmain.sh.orig 2015-02-28 18:50:58.000000000 +0200
+++ ./ltmain.sh 2015-08-12 17:22:19.429971000 +0200
@@ -8891,15 +8891,10 @@
esac
;;
- freebsd-aout)
- major=.$current
- versuffix=.$current.$revision
- ;;
-
- freebsd-elf)
+ freebsd*)
func_arith $current - $age
major=.$func_arith_result
- versuffix=$major.$age.$revision
+ versuffix=$major
;;
irix | nonstopux)

8
system/sudo/pkg-descr Normal file
View File

@@ -0,0 +1,8 @@
This is the CU version of sudo.
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.
WWW: http://www.sudo.ws/

15
system/sudo/pkg-install Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
set -x
PREFIX=${PKG_PREFIX}
case $2 in
PRE-INSTALL)
install -d -o root -g wheel -m 0750 /var/db/sudo
install -d -o root -g wheel -m 0750 /var/run/sudo
install -d -o root -g wheel -m 0750 ${PREFIX}/etc/sudoers.d
;;
POST-INSTALL)
;;
esac
#EOF

154
system/sudo/pkg-plist Normal file
View File

@@ -0,0 +1,154 @@
bin/cvtsudoers
bin/sudo
bin/sudoedit
bin/sudoreplay
include/sudo_plugin.h
libexec/sudo/group_file.la
libexec/sudo/group_file.so
libexec/sudo/libsudo_util.la
libexec/sudo/libsudo_util.so
libexec/sudo/libsudo_util.so.0
libexec/sudo/sudo_noexec.la
libexec/sudo/sudo_noexec.so
libexec/sudo/sudoers.la
libexec/sudo/sudoers.so
libexec/sudo/system_group.la
libexec/sudo/system_group.so
man/man1/cvtsudoers.1.gz
man/man5/sudo.conf.5.gz
man/man5/sudoers_timestamp.5.gz
man/man5/sudoers.5.gz
man/man8/sudo_plugin.8.gz
man/man8/sudo.8.gz
man/man8/sudoedit.8.gz
man/man8/sudoreplay.8.gz
man/man8/visudo.8.gz
sbin/visudo
share/locale/ca/LC_MESSAGES/sudo.mo
share/locale/ca/LC_MESSAGES/sudoers.mo
share/locale/cs/LC_MESSAGES/sudo.mo
share/locale/cs/LC_MESSAGES/sudoers.mo
share/locale/da/LC_MESSAGES/sudo.mo
share/locale/da/LC_MESSAGES/sudoers.mo
share/locale/de/LC_MESSAGES/sudo.mo
share/locale/de/LC_MESSAGES/sudoers.mo
share/locale/el/LC_MESSAGES/sudoers.mo
share/locale/eo/LC_MESSAGES/sudo.mo
share/locale/eo/LC_MESSAGES/sudoers.mo
share/locale/es/LC_MESSAGES/sudo.mo
share/locale/eu/LC_MESSAGES/sudo.mo
share/locale/eu/LC_MESSAGES/sudoers.mo
share/locale/fi/LC_MESSAGES/sudo.mo
share/locale/fi/LC_MESSAGES/sudoers.mo
share/locale/fr/LC_MESSAGES/sudo.mo
share/locale/fr/LC_MESSAGES/sudoers.mo
share/locale/fur/LC_MESSAGES/sudo.mo
share/locale/fur/LC_MESSAGES/sudoers.mo
share/locale/gl/LC_MESSAGES/sudo.mo
share/locale/hr/LC_MESSAGES/sudo.mo
share/locale/hr/LC_MESSAGES/sudoers.mo
share/locale/hu/LC_MESSAGES/sudo.mo
share/locale/hu/LC_MESSAGES/sudoers.mo
share/locale/it/LC_MESSAGES/sudo.mo
share/locale/it/LC_MESSAGES/sudoers.mo
share/locale/ja/LC_MESSAGES/sudo.mo
share/locale/ja/LC_MESSAGES/sudoers.mo
share/locale/ko/LC_MESSAGES/sudo.mo
share/locale/ko/LC_MESSAGES/sudoers.mo
share/locale/lt/LC_MESSAGES/sudoers.mo
share/locale/nb/LC_MESSAGES/sudo.mo
share/locale/nb/LC_MESSAGES/sudoers.mo
share/locale/nl/LC_MESSAGES/sudo.mo
share/locale/nl/LC_MESSAGES/sudoers.mo
share/locale/nn/LC_MESSAGES/sudo.mo
share/locale/pl/LC_MESSAGES/sudo.mo
share/locale/pl/LC_MESSAGES/sudoers.mo
share/locale/pt_BR/LC_MESSAGES/sudo.mo
share/locale/pt_BR/LC_MESSAGES/sudoers.mo
share/locale/ru/LC_MESSAGES/sudo.mo
share/locale/ru/LC_MESSAGES/sudoers.mo
share/locale/sk/LC_MESSAGES/sudo.mo
share/locale/sk/LC_MESSAGES/sudoers.mo
share/locale/sl/LC_MESSAGES/sudo.mo
share/locale/sl/LC_MESSAGES/sudoers.mo
share/locale/sr/LC_MESSAGES/sudo.mo
share/locale/sr/LC_MESSAGES/sudoers.mo
share/locale/sv/LC_MESSAGES/sudo.mo
share/locale/sv/LC_MESSAGES/sudoers.mo
share/locale/tr/LC_MESSAGES/sudo.mo
share/locale/tr/LC_MESSAGES/sudoers.mo
share/locale/uk/LC_MESSAGES/sudo.mo
share/locale/uk/LC_MESSAGES/sudoers.mo
share/locale/vi/LC_MESSAGES/sudo.mo
share/locale/vi/LC_MESSAGES/sudoers.mo
share/locale/zh_CN/LC_MESSAGES/sudo.mo
share/locale/zh_CN/LC_MESSAGES/sudoers.mo
share/locale/zh_TW/LC_MESSAGES/sudo.mo
@dir libexec/sudo
@dir share/locale/ca/LC_MESSAGES
@dir share/locale/ca
@dir share/locale/cs/LC_MESSAGES
@dir share/locale/cs
@dir share/locale/da/LC_MESSAGES
@dir share/locale/da
@dir share/locale/de/LC_MESSAGES
@dir share/locale/de
@dir share/locale/el/LC_MESSAGES
@dir share/locale/el
@dir share/locale/eo/LC_MESSAGES
@dir share/locale/eo
@dir share/locale/es/LC_MESSAGES
@dir share/locale/es
@dir share/locale/eu/LC_MESSAGES
@dir share/locale/eu
@dir share/locale/fi/LC_MESSAGES
@dir share/locale/fi
@dir share/locale/fr/LC_MESSAGES
@dir share/locale/fr
@dir share/locale/fur/LC_MESSAGES
@dir share/locale/fur
@dir share/locale/gl/LC_MESSAGES
@dir share/locale/gl
@dir share/locale/hr/LC_MESSAGES
@dir share/locale/hr
@dir share/locale/hu/LC_MESSAGES
@dir share/locale/hu
@dir share/locale/it/LC_MESSAGES
@dir share/locale/it
@dir share/locale/ja/LC_MESSAGES
@dir share/locale/ja
@dir share/locale/ko/LC_MESSAGES
@dir share/locale/ko
@dir share/locale/lt/LC_MESSAGES
@dir share/locale/lt
@dir share/locale/nb/LC_MESSAGES
@dir share/locale/nb
@dir share/locale/nl/LC_MESSAGES
@dir share/locale/nl
@dir share/locale/nn/LC_MESSAGES
@dir share/locale/nn
@dir share/locale/pl/LC_MESSAGES
@dir share/locale/pl
@dir share/locale/pt_BR/LC_MESSAGES
@dir share/locale/pt_BR
@dir share/locale/ru/LC_MESSAGES
@dir share/locale/ru
@dir share/locale/sk/LC_MESSAGES
@dir share/locale/sk
@dir share/locale/sl/LC_MESSAGES
@dir share/locale/sl
@dir share/locale/sr/LC_MESSAGES
@dir share/locale/sr
@dir share/locale/sv/LC_MESSAGES
@dir share/locale/sv
@dir share/locale/tr/LC_MESSAGES
@dir share/locale/tr
@dir share/locale/uk/LC_MESSAGES
@dir share/locale/uk
@dir share/locale/vi/LC_MESSAGES
@dir share/locale/vi
@dir share/locale/zh_CN/LC_MESSAGES
@dir share/locale/zh_CN
@dir share/locale/zh_TW/LC_MESSAGES
@dir share/locale/zh_TW
@dir share/locale