NetBSD Problem Report #31991

From ghen@telenet.be  Thu Nov  3 13:23:36 2005
Return-Path: <ghen@telenet.be>
Received: from mailer03.ua.ac.be (mailer03.ua.ac.be [143.169.242.11])
	by narn.netbsd.org (Postfix) with ESMTP id D5DE363B8E4
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  3 Nov 2005 13:23:35 +0000 (UTC)
Message-Id: <200511031323.jA3DNHNo003249@localhost.>
Date: Thu, 3 Nov 2005 14:23:17 +0100 (CET)
From: Geert Hendrickx <ghen@telenet.be>
Reply-To: Geert Hendrickx <ghen@telenet.be>
To: gnats-bugs@netbsd.org
Subject: additional password backends for net/samba
X-Send-Pr-Version: 3.95

>Number:         31991
>Category:       pkg
>Synopsis:       additional password backends for net/samba
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    jlam
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 03 13:24:00 +0000 2005
>Closed-Date:    Mon Nov 14 08:17:17 +0000 2005
>Last-Modified:  Mon Nov 14 08:17:17 +0000 2005
>Originator:     Geert Hendrickx
>Release:        NetBSD 2.1
>Organization:
>Environment:


System: NetBSD mantis 2.1 NetBSD 2.1 (MANTIS) #0: Fri Oct 28 15:48:15 CEST 2005 geert@mantis:/cvs/obj/sys/arch/i386/compile/MANTIS i386
Architecture: i386
Machine: i386
>Description:

The patch below adds some new (but still experimental) passdb backends to net/samba: 
PostgreSQL, MySQL, and XML-based.  

An example setup can be found here: http://www.ogris.de/samba/
>How-To-Repeat:
>Fix:
Index: Makefile
===================================================================
RCS file: /pub/NetBSD-CVS/pkgsrc/net/samba/Makefile,v
retrieving revision 1.146
diff -u -r1.146 Makefile
--- Makefile	19 Aug 2005 18:12:38 -0000	1.146
+++ Makefile	3 Nov 2005 13:18:30 -0000
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.146 2005/08/19 18:12:38 jlam Exp $

 DISTNAME=		samba-3.0.14a
-PKGREVISION=		1
+PKGREVISION=		2
 CATEGORIES=		net
 MASTER_SITES=		ftp://ftp.samba.org/pub/samba/old-versions/ \
 			ftp://ring.asahi-net.or.jp/pub/net/samba/old-versions/ \
Index: PLIST
===================================================================
RCS file: /pub/NetBSD-CVS/pkgsrc/net/samba/PLIST,v
retrieving revision 1.31
diff -u -r1.31 PLIST
--- PLIST	5 Jun 2005 13:13:05 -0000	1.31
+++ PLIST	3 Nov 2005 13:18:30 -0000
@@ -39,6 +39,9 @@
 lib/samba/libsmbclient.so.0
 lib/samba/lowcase.dat
 lib/samba/nl.msg
+${MYSQL}lib/samba/pdb/mysql.so
+${PGSQL}lib/samba/pdb/pgsql.so
+${XML}lib/samba/pdb/xml.so
 lib/samba/pl.msg
 lib/samba/tr.msg
 lib/samba/upcase.dat
@@ -580,5 +583,6 @@
 @dirrm share/examples/samba
 @dirrm share/doc/samba
 @dirrm lib/samba/vfs
+${PDB}@dirrm lib/samba/pdb
 @dirrm lib/samba/charset
 @dirrm lib/samba
Index: options.mk
===================================================================
RCS file: /pub/NetBSD-CVS/pkgsrc/net/samba/options.mk,v
retrieving revision 1.8
diff -u -r1.8 options.mk
--- options.mk	5 Jun 2005 14:17:53 -0000	1.8
+++ options.mk	3 Nov 2005 13:18:30 -0000
@@ -1,9 +1,9 @@
 # $NetBSD: options.mk,v 1.8 2005/06/05 14:17:53 taca Exp $

-# Global and legacy options
+# Global options

 PKG_OPTIONS_VAR=	PKG_OPTIONS.samba
-PKG_SUPPORTED_OPTIONS=	pam ads cups ldap ldap-compat
+PKG_SUPPORTED_OPTIONS=	pam ads cups ldap ldap-compat pgsql mysql xml
 .include "../../mk/bsd.options.mk"

 ###
@@ -62,6 +62,49 @@
 .endif

 ###
+### Support PostgreSQL authentication and storage of Samba account information
+### Experimental!
+###
+.if !empty(PKG_OPTIONS:Mpgsql)
+.  include "../../mk/pgsql.buildlink3.mk"
+PDB+=			pgsql
+PLIST_SUBST+=		PGSQL=
+.else
+PLIST_SUBST+=		PGSQL="@comment "
+.endif
+
+###
+### Support MySQL authentication and storage of Samba account information
+### Experimental!
+###
+.if !empty(PKG_OPTIONS:Mmysql)
+.  include "../../mk/mysql.buildlink3.mk"
+PDB+=			mysql
+PLIST_SUBST+=		MYSQL=
+.else
+PLIST_SUBST+=		MYSQL="@comment "
+.endif
+
+###
+### Support XML authentication and storage of Samba account information
+### Experimental!
+###
+.if !empty(PKG_OPTIONS:Mxml)
+.  include "../../textproc/libxml2/buildlink3.mk"
+PDB+=			xml
+PLIST_SUBST+=		XML=
+.else
+PLIST_SUBST+=		XML="@comment "
+.endif
+
+.if !empty(PDB)
+CONFIGURE_ARGS+=	--with-expsam=${PDB:ts,}
+PLIST_SUBST+=		PDB=
+.else
+PLIST_SUBST+=		PDB="@comment "
+.endif
+
+###
 ### Only Linux supports smbmount for mounting a Samba share into the
 ### filesystem.
 ###

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->jlam
Responsible-Changed-By: reed@netbsd.org
Responsible-Changed-When: Fri, 04 Nov 2005 02:24:14 +0000
Responsible-Changed-Why:
Assigned to maintainer.


State-Changed-From-To: open->analyzed
State-Changed-By: jlam@netbsd.org
State-Changed-When: Sat, 12 Nov 2005 01:44:23 +0000
State-Changed-Why:
I will be adding these backends as part of the samba-3.0.20b update.


State-Changed-From-To: analyzed->closed
State-Changed-By: jlam@netbsd.org
State-Changed-When: Mon, 14 Nov 2005 08:17:17 +0000
State-Changed-Why:
The samba-3.0.20.2 package can be built with "mysql", "pgsql", "xml"
package options, which will statically link the chosen passdb (SAM)
backends into the Samba suite.  Thanks for the PR!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.