1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-01 10:59:55 +00:00
freebsd-ports/security/doas/Makefile
Kai Knoblich 2c4ec752b6 security/doas: Update to 6.1
* Update the pkg-message to give users that install/upgrade the port some
  info about the changed behavior regarding the environment variables. [1]

* Make the configuration of target user's sanitized $PATH that is set at
  compile time more flexible by enabling users to configure it via
  _GLOBAL_PATH. [2]

* Also pet portlint/portclippy by placing USES to the top of the USES block
  and remove the superfluous occurence of GH_PROJECT while I'm here.

Changelog:

* Most environment variables are no longer copied to the target user's
  environment. This avoids corrupting files through use of $HOME, for
  example.

  When environment variables are required, keepenv can be set in the
  doas.conf file.

* The target user's sanitized $PATH can be set at compile time to avoid
  passing malicious executables to the target user's path.

https://github.com/slicer69/doas/releases/tag/6.1

PR:		239629
Submitted by:	jsmith@resonatingmedia.com (maintainer)
Approved by:	jsmith@resonatingmedia.com (maintainer) [1] [2]
MFH:		2019Q3
2019-08-04 15:43:27 +00:00

43 lines
1.2 KiB
Makefile

# $FreeBSD$
PORTNAME= doas
PORTVERSION= 6.1
CATEGORIES= security
MAINTAINER= jsmith@resonatingmedia.com
COMMENT= Simple sudo alternative to run commands as another user
LICENSE= BSD2CLAUSE ISCL
LICENSE_COMB= multi
LICENSE_FILE_BSD2CLAUSE= ${WRKSRC}/LICENSE
LICENSE_FILE_ISCL= ${WRKSRC}/LICENSE
USES= gmake
USE_GITHUB= yes
GH_ACCOUNT= slicer69
MAKE_ENV+= TARGETPATH=-DGLOBAL_PATH='\"${_GLOBAL_PATH}\"'
BINMODE= 4755
SUB_FILES= pkg-message
PLIST_FILES= bin/doas \
man/man5/doas.conf.5.gz \
man/man1/doas.1.gz
# These are upstream's default paths that are set for the GLOBAL_PATH variable
# in doas.h since the 6.1 release. Those paths are then used for target user's
# PATH variable instead of those of the original user.
#
# See also:
# * https://github.com/slicer69/doas/blob/6.1/doas.h#L36
# * https://github.com/slicer69/doas/releases/tag/6.1
_GLOBAL_PATH?= ${LOCALBASE}/sbin:${LOCALBASE}/bin:/usr/sbin:/usr/bin:/sbin:/bin
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/doas.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
${INSTALL_MAN} ${WRKSRC}/doas.conf.5 ${STAGEDIR}${MAN5PREFIX}/man/man5
.include <bsd.port.mk>