Bug 95598 - [PATCH] sudo can be build with ldap support
Summary: [PATCH] sudo can be build with ldap support
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Michael Haro
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-10 17:10 UTC by Dmitriy Kirhlarov
Modified: 2006-04-28 20:34 UTC (History)
0 users

See Also:


Attachments
file.diff (431 bytes, patch)
2006-04-10 17:10 UTC, Dmitriy Kirhlarov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitriy Kirhlarov 2006-04-10 17:10:26 UTC
	configure key for building sudo with ldap support not included
	in port without this patch

How-To-Repeat: 	just look /usr/ports/security/sudo/Makefile
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2006-04-10 23:48:38 UTC
Responsible Changed
From-To: freebsd-ports-bugs->mharo

Over to maintainer
Comment 2 Dmitriy Kirhlarov 2006-04-22 17:49:29 UTC
I'm update my patch, because find error in ldap conffile parameter.
Now it tested and worked.

--- Makefile.orig	Sat Dec 17 22:12:41 2005
+++ Makefile	Sat Apr 22 16:38:53 2006
@@ -36,7 +36,14 @@
 		--with-long-otp-prompt \
 		--with-pam
 
+OPTIONS=       LDAP    "With LDAP support" off \
+
 .include <bsd.port.pre.mk>
+
+.if defined(WITH_LDAP)
+CONFIGURE_ARGS+=--with-ldap=${PREFIX}
+CONFIGURE_ARGS+=--with-ldap-conf-file=${PREFIX}/etc/ldap.conf
+.endif
 
 .if defined(WITH_OPIE) || ${OSVERSION} > 500021
 CONFIGURE_ARGS+=--with-opie

--
Dmitriy Kirhlarov
OILspace, 26 Leninskaya sloboda, bld. 2, 2nd floor, 115280 Moscow, Russia
P:+7 495 105 7247 ext.203 F:+7 495 105 7246 E:DmitriyKirhlarov@oilspace.com
OILspace - The resource enriched - www.oilspace.com
Comment 3 Dmitriy Kirhlarov 2006-04-24 13:02:34 UTC
add USE_OPENLDAP for getting ldap-dependence.

--- Makefile.orig	Sat Dec 17 22:12:41 2005
+++ Makefile	Mon Apr 24 11:51:20 2006
@@ -36,7 +36,15 @@
 		--with-long-otp-prompt \
 		--with-pam
 
+OPTIONS=       LDAP    "With LDAP support" off \
+
 .include <bsd.port.pre.mk>
+
+.if defined(WITH_LDAP)
+USE_OPENLDAP=yes
+CONFIGURE_ARGS+=--with-ldap=${PREFIX}
+CONFIGURE_ARGS+=--with-ldap-conf-file=${PREFIX}/etc/ldap.conf
+.endif
 
 .if defined(WITH_OPIE) || ${OSVERSION} > 500021
 CONFIGURE_ARGS+=--with-opie
Comment 4 Dmitriy Kirhlarov 2006-04-24 17:29:20 UTC
Add notification about pam config:

diff -Nur sudo.orig/Makefile sudo/Makefile
--- sudo.orig/Makefile	Mon Apr 24 15:48:33 2006
+++ sudo/Makefile	Mon Apr 24 15:52:01 2006
@@ -36,8 +36,16 @@
 		--with-long-otp-prompt \
 		--with-pam
 
+OPTIONS=       LDAP    "With LDAP support" off \
+
 .include <bsd.port.pre.mk>
 
+.if defined(WITH_LDAP)
+USE_OPENLDAP=yes
+CONFIGURE_ARGS+=--with-ldap=${PREFIX}
+CONFIGURE_ARGS+=--with-ldap-conf-file=${PREFIX}/etc/ldap.conf
+.endif
+
 .if defined(WITH_OPIE) || ${OSVERSION} > 500021
 CONFIGURE_ARGS+=--with-opie
 .else
@@ -59,5 +67,6 @@
 	${INSTALL_DATA} ${WRKSRC}/sample.sudoers ${PREFIX}/etc/sudoers.sample
 	${INSTALL_DATA} ${WRKSRC}/sudoers ${PREFIX}/etc/sudoers.default
 	${RM} ${PREFIX}/libexec/sudo_noexec.la
+	${CAT} ${PKGMESSAGE}
 
 .include <bsd.port.post.mk>
diff -Nur sudo.orig/pkg-message sudo/pkg-message
--- sudo.orig/pkg-message	Thu Jan  1 00:00:00 1970
+++ sudo/pkg-message	Mon Apr 24 15:50:56 2006
@@ -0,0 +1,22 @@
+=====================================================================
+If you store accounts in external place and want to use password 
+authentication for sudo, you must create /etc/pam.d/sudo file 
+like:
+
+#
+# PAM configuration for the "sudoers" service
+#
+
+# auth
+auth		include		system
+
+# account
+account		include		system
+
+# session
+session		include		system
+
+# password
+password	include		system
+
+=====================================================================

-- 
Dmitriy Kirhlarov
OILspace, 26 Leninskaya sloboda, bld. 2, 2nd floor, 115280 Moscow, Russia
P:+7 495 105 7247 ext.203 F:+7 495 105 7246 E:DmitriyKirhlarov@oilspace.com
OILspace - The resource enriched - www.oilspace.com
Comment 5 Sergey Matveychuk freebsd_committer freebsd_triage 2006-04-28 20:34:43 UTC
State Changed
From-To: open->closed

Committed. Thanks!