Enable PAM option by default on OS X as sudo does not work without it otherwise.

Reported by @kusalananda on twitter, confirmed by comparing the output of sudo
-V as root between Apple bundled version & pkgsrc version.
It's not possible to use sudo from a unprivileged build as sudo expects to be
setuid to root so mark it as NOT_FOR_UNPRIVILEGED.

Reviewed by wiz@
This commit is contained in:
sevan 2015-07-11 15:12:27 +00:00
parent 087ed2256f
commit 40ed947a79
2 changed files with 7 additions and 2 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.145 2015/02/11 09:11:59 spz Exp $
# $NetBSD: Makefile,v 1.146 2015/07/11 15:12:27 sevan Exp $
#
DISTNAME= sudo-1.7.10p9
@ -51,6 +51,7 @@ SPECIAL_PERMS+= bin/sudo ${SETUID_ROOT_PERMS}
SPECIAL_PERMS+= bin/sudoreplay ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 511
INSTALLATION_DIRS+= ${DOCDIR} ${EGDIR}
NOT_FOR_UNPRIVILEGED= yes
post-install:
${INSTALL_DATA} ${WRKSRC}/UPGRADE ${DESTDIR}${PREFIX}/${DOCDIR}

View file

@ -1,4 +1,4 @@
# $NetBSD: options.mk,v 1.17 2009/02/14 19:30:33 tonnerre Exp $
# $NetBSD: options.mk,v 1.18 2015/07/11 15:12:27 sevan Exp $
#
PKG_OPTIONS_VAR= PKG_OPTIONS.sudo
@ -10,6 +10,10 @@ PKG_OPTIONS_GROUP.auth= kerberos pam skey
PKG_SUGGESTED_OPTIONS= skey
.endif
.if ${OPSYS} == "Darwin"
PKG_SUGGESTED_OPTIONS= pam
.endif
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Mpam)