summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authortaca <taca@pkgsrc.org>2005-06-19 18:38:40 +0000
committertaca <taca@pkgsrc.org>2005-06-19 18:38:40 +0000
commit73647eb75f7bae4af8957771b2ce2de8937e404b (patch)
tree12339c3ecc217f7fc8d1ca446ef7cbc3bfcdba75 /net
parent9da6d8300d17f1e00317292483f776ba41134dbd (diff)
downloadpkgsrc-73647eb75f7bae4af8957771b2ce2de8937e404b.tar.gz
Update ja-samba package to 2.2.12.0.9.1 (2.2.12-ja-1.0beta1).
- Fix security problem up fixed by 2.2.12 and recent problem reported by CAN-2004-1154. - pkgsrc changes: * Overhaul pkgsrc structure (as net/samba). * Adapt PKG_OPTIONS frame work. * Add support for winbind (not tested). * Add SAMBA_USER/SAMBA_GROUP for default user. * move codepages directory from share/samba to lib/samba.
Diffstat (limited to 'net')
-rw-r--r--net/ja-samba/MESSAGE.common6
-rw-r--r--net/ja-samba/Makefile175
-rw-r--r--net/ja-samba/Makefile.common61
-rw-r--r--net/ja-samba/PLIST138
-rw-r--r--net/ja-samba/distinfo20
-rw-r--r--net/ja-samba/files/adduser.sh5
-rwxr-xr-xnet/ja-samba/files/nmbd.sh10
-rw-r--r--net/ja-samba/files/samba.sh18
-rwxr-xr-xnet/ja-samba/files/smbd.sh10
-rw-r--r--net/ja-samba/files/winbindd.sh25
-rw-r--r--net/ja-samba/options.mk64
-rw-r--r--net/ja-samba/patches/patch-aa66
-rw-r--r--net/ja-samba/patches/patch-ab19
-rw-r--r--net/ja-samba/patches/patch-ac21
-rw-r--r--net/ja-samba/patches/patch-ao18
-rw-r--r--net/ja-samba/patches/patch-ax12
-rw-r--r--net/ja-samba/patches/patch-ay12
-rw-r--r--net/ja-samba/patches/patch-az13
-rw-r--r--net/ja-samba/patches/patch-bh39
19 files changed, 496 insertions, 236 deletions
diff --git a/net/ja-samba/MESSAGE.common b/net/ja-samba/MESSAGE.common
deleted file mode 100644
index 441a1d5241f..00000000000
--- a/net/ja-samba/MESSAGE.common
+++ /dev/null
@@ -1,6 +0,0 @@
-===========================================================================
-$NetBSD: MESSAGE.common,v 1.1 2004/08/17 17:32:43 taca Exp $
-
-This package contains the fix by Samba 2.2.11.
-
-===========================================================================
diff --git a/net/ja-samba/Makefile b/net/ja-samba/Makefile
index 3a0b4daffcf..5c5c8838307 100644
--- a/net/ja-samba/Makefile
+++ b/net/ja-samba/Makefile
@@ -1,56 +1,140 @@
-# $NetBSD: Makefile,v 1.35 2005/06/03 22:54:44 jlam Exp $
+# $NetBSD: Makefile,v 1.36 2005/06/19 18:38:40 taca Exp $
-.include "Makefile.common"
-
-PKGNAME= ja-samba-${SAMBA_BASE_VERS}.${SAMBA_JA_VERS}
-PKGREVISION= 1
+DISTNAME= samba-${SAMBA_VERSION}-ja-${JA_VERSION}
+PKGNAME= ja-samba-${SAMBA_VERSION}.${JA_PKG_VERSION}
CATEGORIES= net
+MASTER_SITES= ${JA_SAMBA_MASTER_SITES:S/$/beta\//}
+EXTRACT_SUFX= .tar.bz2
MAINTAINER= tech-pkg-ja@jp.NetBSD.org
HOMEPAGE= http://www.jp.samba.org/project/samba-ja/index.html.en
COMMENT= Samba supporting I18N swat and L10N for Japanese
-CONFLICTS+= samba-[0-9]*
+CONFLICTS+= samba-[0-9]* pam-smbpass-[0-9]* tdb-[0-9]* winbind-[0-9]*
+WRKSRC?= ${WRKDIR}/${DISTNAME}/source
+GNU_CONFIGURE= yes
-USE_PKGINSTALL= YES
-INSTALL_EXTRA_TMPL+= ${.CURDIR}/INSTALL
+SAMBA_VERSION= 2.2.12
+JA_VERSION= 1.0beta1
+JA_PKG_VERSION= 0.9.1
-USE_PKGLOCALEDIR= YES
+.include "../../mk/bsd.prefs.mk"
+
+PKG_SYSCONFSUBDIR?= samba
+PKG_SYSCONFVAR= samba
+
+SAMBA_USER?= samba
+SAMBA_GROUP?= samba
+
+SAMBA_ETCDIR?= ${PKG_SYSCONFDIR}
+SAMBA_LIBDIR?= ${PREFIX}/lib/samba
+SAMBA_LOCKDIR?= ${SAMBA_VARDIR}/db/samba
+SAMBA_LOGDIR?= ${SAMBA_VARDIR}/log
+SAMBA_PIDDIR?= ${SAMBA_VARDIR}/run
+SAMBA_PRIVATE?= ${SAMBA_ETCDIR}/private
+SAMBA_VARDIR?= ${VARBASE}
+
+FILES_SUBST= SAMBA_ETCDIR=${SAMBA_ETCDIR}
+FILES_SUBST+= SAMBA_LOCKDIR=${SAMBA_LOCKDIR}
+FILES_SUBST+= SAMBA_LOGDIR=${SAMBA_LOGDIR}
+FILES_SUBST+= SAMBA_PIDDIR=${SAMBA_PIDDIR}
+FILES_SUBST+= SAMBA_PRIVATE=${SAMBA_PRIVATE}
+FILES_SUBST+= SAMBA_VARDIR=${SAMBA_VARDIR}
+
+CONFIGURE_ARGS+= --with-configdir=${SAMBA_ETCDIR}
+CONFIGURE_ARGS+= --with-libdir=${SAMBA_LIBDIR}
+CONFIGURE_ARGS+= --with-lockdir=${SAMBA_LOCKDIR}
+CONFIGURE_ARGS+= --with-logfilebase=${SAMBA_LOGDIR}
+CONFIGURE_ARGS+= --with-piddir=${SAMBA_PIDDIR}
+CONFIGURE_ARGS+= --with-privatedir=${SAMBA_PRIVATE}
+CONFIGURE_ARGS+= --localstatedir=${SAMBA_VARDIR}
+
+CONFIGURE_ARGS+= --with-codepagedir=${SAMBA_LIBDIR}/codepages
+CONFIGURE_ARGS+= --with-swatdir=${PREFIX}/share/samba/swat
+CONFIGURE_ARGS+= --with-libsmbclient
+CONFIGURE_ARGS+= --with-msdfs
+CONFIGURE_ARGS+= --with-winbind
-USE_GNU_READLINE= # uses rl_event_hook interface to GNU readline
-CONFIGURE_ARGS+= --with-readline
+CONFIGURE_ARGS+= --with-i18n-swat
-CONFIGURE_ARGS+= --with-ssl
-CONFIGURE_ARGS+= --with-sslinc=${SSLBASE}
-CFLAGS+= -I${SSLBASE}/include/openssl # ssl.h, err.h
+.include "../../converters/libiconv/buildlink3.mk"
+CONFIGURE_ARGS+= --with-libiconv=${BUILDLINK_PREFIX.iconv}
-# Force the use of the included gettext library this doesn't seem to link
-# with the gettext-lib package.
-#
+## Force the use of the included gettext library this doesn't seem to link
+## with the gettext-lib package.
+##
CONFIGURE_ARGS+= --with-included-gettext
-.include "../../mk/bsd.prefs.mk"
+USE_GNU_READLINE= yes # uses rl_event_hook interface to GNU readline
+.include "../../devel/readline/buildlink3.mk"
+CONFIGURE_ARGS+= --with-readline=${BUILDLINK_PREFIX.readline}
+
+CONFIGURE_ENV+= ac_cv_lib_curses_tgetent=no
+
.include "options.mk"
-# Microsoft DFS support
-CONFIGURE_ARGS+= --with-msdfs
+# mktemp is useful for the replacement adduser script, but don't require
+# a full dependency since it's not actually needed by samba.
+#
+USE_TOOLS+= mktemp
-MESSAGE_SUBST+= SAMBA_PRIVATE=${SAMBA_PRIVATE}
-MESSAGE_SUBST+= ROOT_GROUP=${ROOT_GROUP}
-MESSAGE_SUBST+= ROOT_USER=${ROOT_USER}
+#
+# findsmb script use perl
+#
+USE_TOOLS+= perl
+
+.if !defined(PWD_MKDB)
+PWD_MKDB!= ${TYPE} pwd_mkdb 2>&1 | \
+ ${AWK} '/not found/ { print "pwd_mkdb"; exit } { print $$3 }'
+MAKEFLAGS+= PWD_MKDB=${PWD_MKDB:Q}
+.endif
+FILES_SUBST+= MKTEMP=${MKTEMP:Q}
+FILES_SUBST+= PWD_MKDB=${PWD_MKDB:Q}
-DOCDIR= ${PREFIX}/share/doc/samba
-EXAMPLESDIR= ${PREFIX}/share/examples/samba
+.if !empty(NSS_WINBIND)
+PLIST_SUBST+= NSS_WINBIND=lib/${NSS_WINBIND}
+.else
+PLIST_SUBST+= NSS_WINBIND="@comment no NSS winbind module"
+.endif
+.if !empty(NSS_WINS)
+PLIST_SUBST+= NSS_WINS=lib/${NSS_WINS}
+.else
+PLIST_SUBST+= NSS_WINS="@comment no NSS WINS module"
+.endif
+
+DOCDIR= ${PREFIX}/share/doc/samba
+EGDIR= ${PREFIX}/share/examples/samba
+
+USE_PKGLOCALEDIR= YES
+USE_LANGUAGE= c
+USE_LIBTOOL= yes
+SHLIBTOOL_OVERRIDE= libtool
+INSTALL_EXTRA_TMPL+= ${.CURDIR}/INSTALL
-CONF_FILES= ${EXAMPLESDIR}/smb.conf.default ${SAMBA_ETCDIR}/smb.conf
-SUPPORT_FILES_PERMS= ${SMBPASSWD_FILE}
-SUPPORT_FILES_PERMS+= ${EXAMPLESDIR}/adduser.sh ${SAMBA_ETCDIR}/adduser \
+USE_PKGINSTALL= YES
+CONF_FILES= ${EGDIR}/smb.conf.default ${SAMBA_ETCDIR}/smb.conf
+SUPPORT_FILES_PERMS+= ${EGDIR}/adduser.sh ${SAMBA_ETCDIR}/adduser \
${ROOT_USER} ${ROOT_GROUP} 0555
-SUPPORT_FILES_PERMS+= ${EXAMPLESDIR}/deluser.sh ${SAMBA_ETCDIR}/deluser \
+SUPPORT_FILES_PERMS+= ${EGDIR}/deluser.sh ${SAMBA_ETCDIR}/deluser \
${ROOT_USER} ${ROOT_GROUP} 0555
-RCD_SCRIPTS= samba nmbd smbd
+#SUPPORT_FILES_PERMS= ${SMBPASSWD_FILE}
+MAKE_DIRS= ${SAMBA_VARDIR} ${SAMBA_LOGDIR} ${SAMBA_PIDDIR}
OWN_DIRS= ${SAMBA_ETCDIR} ${SAMBA_LOCKDIR}
OWN_DIRS_PERMS= ${SAMBA_PRIVATE} ${ROOT_USER} ${ROOT_GROUP} 0500
+RCD_SCRIPTS= samba nmbd smbd winbindd
+
+PKG_GROUPS= ${SAMBA_GROUP}
+PKG_USERS= ${SAMBA_USER}:${SAMBA_GROUP}::Samba\\ pseudo-user
+
+BUILD_DEFS+= SAMBA_USER SAMBA_GROUP
+MAKE_FLAGS= CFLAGS='-DGUEST_ACCOUNT=\"${SAMBA_USER:Q}\"'
+
+INSTALL_LIBRARY= \
+ ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}
+
+MESSAGE_SUBST+= SAMBA_PRIVATE=${SAMBA_PRIVATE}
+MESSAGE_SUBST+= ROOT_GROUP=${ROOT_GROUP}
+MESSAGE_SUBST+= ROOT_USER=${ROOT_USER}
# mktemp is useful for the replacement adduser script, but don't require
# a full dependency since it's not actually needed by samba.
@@ -67,9 +151,6 @@ FILES_SUBST+= PWD_MKDB=${PWD_MKDB:Q}
REPLACE_PERL= script/findsmb.in
-.include "../../devel/readline/buildlink3.mk"
-.include "../../security/openssl/buildlink3.mk"
-
# Remove irrelevant files for this package.
post-extract:
${FIND} ${WRKDIR}/${DISTNAME} -name ".cvsignore" -print | \
@@ -88,23 +169,31 @@ post-build:
@${SED} ${FILES_SUBST_SED} ${FILESDIR}/deluser.sh > ${WRKDIR}/deluser.sh
post-install:
- # Install Samba documentation.
+ -cd ${PREFIX}/lib && ${LN} -s libsmbclient.so libsmbclient.so.0
+.if !empty(NSS_WINBIND)
+ ${INSTALL_LIBRARY} ${WRKSRC}/nsswitch/${NSS_WINBIND} ${PREFIX}/lib
+.endif
+.if !empty(PKG_OPTIONS:Mpam)
+ ${INSTALL_LIBRARY} ${WRKSRC}/bin/pam_smbpass.so ${PREFIX}/lib/security
+ ${INSTALL_LIBRARY} ${WRKSRC}/nsswitch/pam_winbind.so \
+ ${PREFIX}/lib/security
+.endif
${INSTALL_DATA_DIR} ${DOCDIR}
cd ${WRKDIR}/${DISTNAME}/docs; \
- for file in announce textdocs/* Registry/*.reg; do \
- ${INSTALL_DATA} $$file ${DOCDIR}; \
+ for f in announce textdocs/* Registry/*.reg; do \
+ ${INSTALL_DATA} $${f} ${DOCDIR}; \
done
# Install Samba examples.
- ${INSTALL_DATA_DIR} ${EXAMPLESDIR}
- ${INSTALL_SCRIPT} ${WRKDIR}/adduser.sh ${EXAMPLESDIR}/adduser.sh
- ${INSTALL_SCRIPT} ${WRKDIR}/deluser.sh ${EXAMPLESDIR}/deluser.sh
- ${CP} -R ${WRKDIR}/${DISTNAME}/examples/* ${EXAMPLESDIR}
- ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${EXAMPLESDIR}
- ${CHMOD} -R ugo-w ${EXAMPLESDIR}
+ ${INSTALL_DATA_DIR} ${EGDIR}
+ ${INSTALL_SCRIPT} ${WRKDIR}/adduser.sh ${EGDIR}/adduser.sh
+ ${INSTALL_SCRIPT} ${WRKDIR}/deluser.sh ${EGDIR}/deluser.sh
+ ${CP} -R ${WRKDIR}/${DISTNAME}/examples/* ${EGDIR}
+ ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${EGDIR}
+ ${CHMOD} -R ugo-w ${EGDIR}
${INSTALL_SCRIPT} ${WRKSRC}/script/convert_smbpasswd \
- ${EXAMPLESDIR}/misc
+ ${EGDIR}/misc
${INSTALL_SCRIPT} ${WRKSRC}/script/mksmbpasswd.sh \
${PREFIX}/sbin/mksmbpasswd
diff --git a/net/ja-samba/Makefile.common b/net/ja-samba/Makefile.common
deleted file mode 100644
index 3c9c51e4c4e..00000000000
--- a/net/ja-samba/Makefile.common
+++ /dev/null
@@ -1,61 +0,0 @@
-# $NetBSD: Makefile.common,v 1.7 2004/10/03 16:16:39 taca Exp $
-
-DISTNAME= samba-${SAMBA_BASE_VERS}-ja-${SAMBA_JA_VERS}
-SAMBA_BASE_VERS= 2.2.11
-SAMBA_JA_VERS= 1.0
-WRKSRC?= ${WRKDIR}/${DISTNAME}/source
-CATEGORIES?= net
-MASTER_SITES= ftp://ftp.samba.gr.jp/pub/samba-jp/samba-${SAMBA_BASE_VERS}-ja/ \
- ftp://ftp.ring.gr.jp/pub/net/samba-jp/samba-${SAMBA_BASE_VERS}-ja/ \
- ftp://ftp.mex.ad.jp/pub/samba-jp/pub/net/samba-jp/samba-${SAMBA_BASE_VERS}-ja/
-EXTRACT_SUFX= .tar.bz2
-
-DISTINFO_FILE?= ${.CURDIR}/../../net/ja-samba/distinfo
-PATCHDIR?= ${.CURDIR}/../../net/ja-samba/patches
-
-GNU_CONFIGURE= # defined
-USE_LIBTOOL= # defined
-LTCONFIG_OVERRIDE= ${WRKSRC}/ltconfig
-
-.include "../../mk/bsd.prefs.mk"
-
-PKG_SYSCONFSUBDIR?= samba
-
-VARDIR?= /var
-SAMBA_ETCDIR?= ${PKG_SYSCONFDIR}
-SAMBA_DATADIR= ${PREFIX}/share
-SAMBA_LOCKDIR?= ${VARDIR}/db/samba
-SAMBA_LOGDIR?= ${VARDIR}/log
-SAMBA_PIDDIR?= ${VARDIR}/run
-SAMBA_PRIVATE?= ${SAMBA_ETCDIR}/private
-
-CONFIGURE_ARGS+= --localstatedir=${VARDIR}
-CONFIGURE_ARGS+= --sbindir=${PREFIX}/sbin
-CONFIGURE_ARGS+= --with-configdir=${SAMBA_ETCDIR}
-CONFIGURE_ARGS+= --with-codepagedir=${SAMBA_DATADIR}/samba/codepages
-CONFIGURE_ARGS+= --with-datadir=${SAMBA_DATADIR}
-CONFIGURE_ARGS+= --with-lockdir=${SAMBA_LOCKDIR}
-CONFIGURE_ARGS+= --with-logfilebase=${SAMBA_LOGDIR}
-CONFIGURE_ARGS+= --with-piddir=${SAMBA_PIDDIR}
-CONFIGURE_ARGS+= --with-privatedir=${SAMBA_PRIVATE}
-CONFIGURE_ARGS+= --with-swatdir=${SAMBA_DATADIR}/samba/swat
-
-CONFIGURE_ARGS+= --without-readline
-CONFIGURE_ARGS+= --without-ssl
-
-CONFIGURE_ENV+= ac_cv_lib_curses_tgetent=no
-
-CONFIGURE_ARGS+= --disable-cups
-CONFIGURE_ARGS+= --without-pam
-CONFIGURE_ARGS+= --without-winbind
-
-CONFIGURE_ARGS+= --with-i18n-swat
-
-# The following are Linux-only options.
-CONFIGURE_ARGS+= --without-smbwrapper
-CONFIGURE_ARGS+= --without-smbmount
-
-FILES_SUBST= SAMBA_PRIVATE=${SAMBA_PRIVATE}
-FILES_SUBST+= SAMBA_LOCKDIR=${SAMBA_LOCKDIR}
-FILES_SUBST+= SAMBA_LOGDIR=${SAMBA_LOGDIR}
-FILES_SUBST+= SAMBA_ETCDIR=${SAMBA_ETCDIR}
diff --git a/net/ja-samba/PLIST b/net/ja-samba/PLIST
index dd9626b7415..9ec459d9221 100644
--- a/net/ja-samba/PLIST
+++ b/net/ja-samba/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.11 2005/05/03 15:40:11 wiz Exp $
+@comment $NetBSD: PLIST,v 1.12 2005/06/19 18:38:40 taca Exp $
bin/findsmb
bin/make_printerdef
bin/make_smbcodepage
@@ -9,13 +9,86 @@ bin/rpcclient
bin/smbcacls
bin/smbclient
bin/smbcontrol
+${SMBMOUNT}bin/smbmnt
+${SMBMOUNT}bin/smbmount
bin/smbpasswd
bin/smbspool
bin/smbstatus
bin/smbtar
+${SMBMOUNT}bin/smbumount
bin/tdbbackup
bin/testparm
bin/testprns
+${NSS_WINBIND}
+bin/wbinfo
+include/libsmbclient.h
+lib/libsmbclient.a
+lib/libsmbclient.so
+lib/libsmbclient.so.0
+lib/samba/codepages/codepage.1125
+lib/samba/codepages/codepage.1251
+lib/samba/codepages/codepage.437
+lib/samba/codepages/codepage.737
+lib/samba/codepages/codepage.775
+lib/samba/codepages/codepage.850
+lib/samba/codepages/codepage.852
+lib/samba/codepages/codepage.857
+lib/samba/codepages/codepage.861
+lib/samba/codepages/codepage.866
+lib/samba/codepages/codepage.932
+lib/samba/codepages/codepage.936
+lib/samba/codepages/codepage.949
+lib/samba/codepages/codepage.950
+lib/samba/codepages/nftable.1125
+lib/samba/codepages/nftable.1251
+lib/samba/codepages/nftable.437
+lib/samba/codepages/nftable.737
+lib/samba/codepages/nftable.775
+lib/samba/codepages/nftable.850
+lib/samba/codepages/nftable.852
+lib/samba/codepages/nftable.857
+lib/samba/codepages/nftable.861
+lib/samba/codepages/nftable.866
+lib/samba/codepages/nftable.932
+lib/samba/codepages/nftable.936
+lib/samba/codepages/nftable.949
+lib/samba/codepages/nftable.950
+lib/samba/codepages/nftable.ISO8859-1
+lib/samba/codepages/nftable.ISO8859-13
+lib/samba/codepages/nftable.ISO8859-15
+lib/samba/codepages/nftable.ISO8859-2
+lib/samba/codepages/nftable.ISO8859-5
+lib/samba/codepages/nftable.ISO8859-7
+lib/samba/codepages/nftable.ISO8859-9
+lib/samba/codepages/nftable.KOI8-R
+lib/samba/codepages/nftable.KOI8-U
+lib/samba/codepages/unicode_map.1125
+lib/samba/codepages/unicode_map.1251
+lib/samba/codepages/unicode_map.437
+lib/samba/codepages/unicode_map.737
+lib/samba/codepages/unicode_map.775
+lib/samba/codepages/unicode_map.850
+lib/samba/codepages/unicode_map.852
+lib/samba/codepages/unicode_map.857
+lib/samba/codepages/unicode_map.861
+lib/samba/codepages/unicode_map.866
+lib/samba/codepages/unicode_map.932
+lib/samba/codepages/unicode_map.936
+lib/samba/codepages/unicode_map.949
+lib/samba/codepages/unicode_map.950
+lib/samba/codepages/unicode_map.ISO8859-1
+lib/samba/codepages/unicode_map.ISO8859-13
+lib/samba/codepages/unicode_map.ISO8859-15
+lib/samba/codepages/unicode_map.ISO8859-2
+lib/samba/codepages/unicode_map.ISO8859-5
+lib/samba/codepages/unicode_map.ISO8859-7
+lib/samba/codepages/unicode_map.ISO8859-9
+lib/samba/codepages/unicode_map.KOI8-R
+lib/samba/codepages/unicode_map.KOI8-U
+@dirrm lib/samba/codepages
+@dirrm lib/samba
+${PAM}lib/security/pam_smbpass.so
+${PAM}lib/security/pam_winbind.so
man/ja_JP.EUC/man1/findsmb.1
man/ja_JP.EUC/man1/make_smbcodepage.1
man/ja_JP.EUC/man1/make_unicodemap.1
@@ -76,6 +149,7 @@ sbin/mksmbpasswd
sbin/nmbd
sbin/smbd
sbin/swat
+sbin/winbindd
share/doc/samba/Application_Serving.txt
share/doc/samba/BROWSING-Config.txt
share/doc/samba/BROWSING.txt
@@ -125,6 +199,7 @@ share/doc/samba/security_level.txt
share/examples/rc.d/nmbd
share/examples/rc.d/samba
share/examples/rc.d/smbd
+share/examples/rc.d/winbindd
share/examples/samba/LDAP/README
share/examples/samba/LDAP/export_smbpasswd.pl
share/examples/samba/LDAP/import_smbpasswd.pl
@@ -208,66 +283,6 @@ ${PKGLOCALEDIR}/locale/en/LC_MESSAGES/samba.mo
${PKGLOCALEDIR}/locale/en/LC_MESSAGES/samba_swat.mo
${PKGLOCALEDIR}/locale/ja/LC_MESSAGES/samba.mo
${PKGLOCALEDIR}/locale/ja/LC_MESSAGES/samba_swat.mo
-share/samba/codepages/codepage.1125
-share/samba/codepages/codepage.1251
-share/samba/codepages/codepage.437
-share/samba/codepages/codepage.737
-share/samba/codepages/codepage.775
-share/samba/codepages/codepage.850
-share/samba/codepages/codepage.852
-share/samba/codepages/codepage.857
-share/samba/codepages/codepage.861
-share/samba/codepages/codepage.866
-share/samba/codepages/codepage.932
-share/samba/codepages/codepage.936
-share/samba/codepages/codepage.949
-share/samba/codepages/codepage.950
-share/samba/codepages/nftable.1125
-share/samba/codepages/nftable.1251
-share/samba/codepages/nftable.437
-share/samba/codepages/nftable.737
-share/samba/codepages/nftable.775
-share/samba/codepages/nftable.850
-share/samba/codepages/nftable.852
-share/samba/codepages/nftable.857
-share/samba/codepages/nftable.861
-share/samba/codepages/nftable.866
-share/samba/codepages/nftable.932
-share/samba/codepages/nftable.936
-share/samba/codepages/nftable.949
-share/samba/codepages/nftable.950
-share/samba/codepages/nftable.ISO8859-1
-share/samba/codepages/nftable.ISO8859-13
-share/samba/codepages/nftable.ISO8859-15
-share/samba/codepages/nftable.ISO8859-2
-share/samba/codepages/nftable.ISO8859-5
-share/samba/codepages/nftable.ISO8859-7
-share/samba/codepages/nftable.ISO8859-9
-share/samba/codepages/nftable.KOI8-R
-share/samba/codepages/nftable.KOI8-U
-share/samba/codepages/unicode_map.1125
-share/samba/codepages/unicode_map.1251
-share/samba/codepages/unicode_map.437
-share/samba/codepages/unicode_map.737
-share/samba/codepages/unicode_map.775
-share/samba/codepages/unicode_map.850
-share/samba/codepages/unicode_map.852
-share/samba/codepages/unicode_map.857
-share/samba/codepages/unicode_map.861
-share/samba/codepages/unicode_map.866
-share/samba/codepages/unicode_map.932
-share/samba/codepages/unicode_map.936
-share/samba/codepages/unicode_map.949
-share/samba/codepages/unicode_map.950
-share/samba/codepages/unicode_map.ISO8859-1
-share/samba/codepages/unicode_map.ISO8859-13
-share/samba/codepages/unicode_map.ISO8859-15
-share/samba/codepages/unicode_map.ISO8859-2
-share/samba/codepages/unicode_map.ISO8859-5
-share/samba/codepages/unicode_map.ISO8859-7
-share/samba/codepages/unicode_map.ISO8859-9
-share/samba/codepages/unicode_map.KOI8-R
-share/samba/codepages/unicode_map.KOI8-U
share/samba/swat/help/CVS-Access.html
share/samba/swat/help/DOMAIN_MEMBER.html
share/samba/swat/help/ENCRYPTION.html
@@ -870,7 +885,6 @@ share/samba/swat/using_samba/this_edition.html
@dirrm share/examples/samba/tridge
@dirrm share/examples/samba/validchars
@dirrm share/examples/samba
-@dirrm share/samba/codepages
@dirrm share/samba/swat/help
@dirrm share/samba/swat/images
@dirrm share/samba/swat/include
diff --git a/net/ja-samba/distinfo b/net/ja-samba/distinfo
index c9abbe43620..23a10aa5812 100644
--- a/net/ja-samba/distinfo
+++ b/net/ja-samba/distinfo
@@ -1,18 +1,20 @@
-$NetBSD: distinfo,v 1.17 2005/02/24 12:13:50 agc Exp $
+$NetBSD: distinfo,v 1.18 2005/06/19 18:38:40 taca Exp $
-SHA1 (samba-2.2.11-ja-1.0.tar.bz2) = 94944b5a81e37322c6f112474e7df14e4cde8e1a
-RMD160 (samba-2.2.11-ja-1.0.tar.bz2) = 996e982032b9c493fd0baeedbdac6819f280a957
-Size (samba-2.2.11-ja-1.0.tar.bz2) = 7473344 bytes
-SHA1 (patch-aa) = 2f553bd640a819e9543d4678c779d5f98a164e3f
-SHA1 (patch-ab) = a2eef891b0a38955f22a9adeec09666d231a541f
-SHA1 (patch-ac) = c1de3af21a4b539236a906c4c072e6db283a2b28
+SHA1 (samba-2.2.12-ja-1.0beta1.tar.bz2) = ac2b872b83ff4850e145734444b2db5b315b882d
+RMD160 (samba-2.2.12-ja-1.0beta1.tar.bz2) = da855c790250443d0720362d898fad5357327390
+Size (samba-2.2.12-ja-1.0beta1.tar.bz2) = 7466052 bytes
+SHA1 (patch-aa) = c53979ae1bb6e2fe580948de22f04d9465a6a7a4
+SHA1 (patch-ab) = 86d9959bbea14e3ece2e0e8774742418c7035449
+SHA1 (patch-ac) = 69df864363ce780e7003a67b7dae4964c2e7aadd
SHA1 (patch-ad) = 358a9218bbe45cc5463a112ff6f2dec1b78da99e
SHA1 (patch-ai) = f29a725a65d8fff435bcef64c29acd4066101f83
SHA1 (patch-ak) = 0e3cbb4ac58a3445224779d72153e2bba5a4b6c2
SHA1 (patch-al) = e7caad8f6743537469866f9b47b0044ec95852ad
SHA1 (patch-am) = 92aa5e122529a30e05199cbe26620b3ac01adbc5
SHA1 (patch-an) = 55c7f9785c19d84b8ad74bbf0827162b156e2327
-SHA1 (patch-ao) = cc0b3d73d0c7de4cd46e66b0d66b2c3bbaddeb41
+SHA1 (patch-ao) = a582d3beeffad814202e7f839e06399dc52275b6
SHA1 (patch-ap) = 5c5dea7e8b67885e8214210dfff344a9d6102279
SHA1 (patch-aq) = 73017f99efd1b4e3d93d8f14e63f0c43e391236d
-SHA1 (patch-ax) = c794b68f644a70c95a8fac43a71b63c16e2f6acc
+SHA1 (patch-ay) = 10a336d3edadb00ceffe4b9d5088780a46da9516
+SHA1 (patch-az) = 3e4b3f33ac8d6b6f53386c1a8c947b2ec559a665
+SHA1 (patch-bh) = 37f3de2c49e69431403ed2a671cfb935dc095440
diff --git a/net/ja-samba/files/adduser.sh b/net/ja-samba/files/adduser.sh
index 61706e23a96..c962900f425 100644
--- a/net/ja-samba/files/adduser.sh
+++ b/net/ja-samba/files/adduser.sh
@@ -1,9 +1,10 @@
#!/bin/sh
#
-# $NetBSD: adduser.sh,v 1.1 2004/06/05 13:16:35 taca Exp $
+# $NetBSD: adduser.sh,v 1.2 2005/06/19 18:38:40 taca Exp $
#
# This is an adduser script for NetBSD systems whose useradd(8) doesn't
-# accept "$" in the username.
+# accept "$" in the username. This script may be used for the
+# "add machine script" in smb.conf.
awkprog="@AWK@"
catprog="@CAT@"
diff --git a/net/ja-samba/files/nmbd.sh b/net/ja-samba/files/nmbd.sh
index d92a5601c41..626a226c539 100755
--- a/net/ja-samba/files/nmbd.sh
+++ b/net/ja-samba/files/nmbd.sh
@@ -1,12 +1,11 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: nmbd.sh,v 1.2 2002/09/20 02:01:58 grant Exp $
+# $NetBSD: nmbd.sh,v 1.3 2005/06/19 18:38:40 taca Exp $
#
# PROVIDE: nmbd
# REQUIRE: DAEMON
-if [ -f /etc/rc.subr ]
-then
+if [ -f /etc/rc.subr ]; then
. /etc/rc.subr
fi
@@ -20,11 +19,10 @@ command_args="-D" # _must_ start as daemon from rc.d;
reload_cmd=":" # avoid dumping debug output on SIGHUP
-if [ -f /etc/rc.subr ]
-then
+if [ -f /etc/rc.subr ]; then
load_rc_config $name
run_rc_command "$1"
else
- @ECHO@ -n ' ${name}'
+ @ECHO@ -n " ${name}"
${command} ${nmbd_flags} ${command_args}
fi
diff --git a/net/ja-samba/files/samba.sh b/net/ja-samba/files/samba.sh
index 13338605d17..eb2149fcb9b 100644
--- a/net/ja-samba/files/samba.sh
+++ b/net/ja-samba/files/samba.sh
@@ -1,11 +1,16 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: samba.sh,v 1.2 2002/09/20 02:01:58 grant Exp $
+# $NetBSD: samba.sh,v 1.3 2005/06/19 18:38:40 taca Exp $
#
# KEYWORD: nostart
+#
+# This script is intended for the end-user.
+# It is not started by /etc/rc.
+# It manipulates various samba services (smbd, nmbd, winbindd),
+# which are controlled via their appropriate rc.conf(5) settings.
+#
-if [ -f /etc/rc.subr ]
-then
+if [ -f /etc/rc.subr ]; then
. /etc/rc.subr
fi
@@ -37,7 +42,7 @@ reverse_commands()
done
}
-COMMAND_LIST="nmbd smbd"
+COMMAND_LIST="nmbd smbd winbindd"
name="samba"
start_cmd="forward_commands"
@@ -46,11 +51,10 @@ reload_cmd="forward_commands"
status_cmd="forward_commands"
extra_commands="reload status"
-if [ -f /etc/rc.subr ]
-then
+if [ -f /etc/rc.subr ]; then
run_rc_command "$1"
else
- @ECHO@ -n ' ${name}'
+ @ECHO@ -n " ${name}"
_arg="$1"
${start_cmd}
fi
diff --git a/net/ja-samba/files/smbd.sh b/net/ja-samba/files/smbd.sh
index 4cf457670e3..c5b420c15b1 100755
--- a/net/ja-samba/files/smbd.sh
+++ b/net/ja-samba/files/smbd.sh
@@ -1,12 +1,11 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: smbd.sh,v 1.2 2002/09/20 02:01:58 grant Exp $
+# $NetBSD: smbd.sh,v 1.3 2005/06/19 18:38:40 taca Exp $
#
# PROVIDE: smbd
# REQUIRE: DAEMON
-if [ -f /etc/rc.subr ]
-then
+if [ -f /etc/rc.subr ]; then
. /etc/rc.subr
fi
@@ -18,11 +17,10 @@ extra_commands="reload"
command_args="-D" # _must_ start as daemon from rc.d;
# add more flags through ${${name}_flags}
-if [ -f /etc/rc.subr ]
-then
+if [ -f /etc/rc.subr ]; then
load_rc_config $name
run_rc_command "$1"
else
- @ECHO@ -n ' ${name}'
+ @ECHO@ -n " ${name}"
${command} ${smbd_flags} ${command_args}
fi
diff --git a/net/ja-samba/files/winbindd.sh b/net/ja-samba/files/winbindd.sh
new file mode 100644
index 00000000000..a1ac40461c3
--- /dev/null
+++ b/net/ja-samba/files/winbindd.sh
@@ -0,0 +1,25 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: winbindd.sh,v 1.1 2005/06/19 18:38:40 taca Exp $
+#
+# PROVIDE: winbindd
+# REQUIRE: nmbd
+
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
+
+name="winbindd"
+rcvar=$name
+command="@PREFIX@/sbin/${name}"
+required_vars="nmbd"
+required_files="@SAMBA_ETCDIR@/smb.conf"
+extra_commands="reload"
+
+if [ -f /etc/rc.subr ]; then
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ @ECHO@ -n " ${name}"
+ ${command} ${winbindd_flags}
+fi
diff --git a/net/ja-samba/options.mk b/net/ja-samba/options.mk
index 5b61a27e42e..044647dc121 100644
--- a/net/ja-samba/options.mk
+++ b/net/ja-samba/options.mk
@@ -1,17 +1,22 @@
-# $NetBSD: options.mk,v 1.3 2005/05/31 11:24:32 dillo Exp $
+# $NetBSD: options.mk,v 1.4 2005/06/19 18:38:40 taca Exp $
# Global and legacy options
PKG_OPTIONS_VAR= PKG_OPTIONS.ja-samba
-PKG_SUPPORTED_OPTIONS= pam cups ldap
+PKG_SUPPORTED_OPTIONS= pam cups ldap-compat ssl
.include "../../mk/bsd.options.mk"
###
-### Support PAM authentication.
+### Support PAM authentication and build smbpass and winbind PAM modules.
###
.if !empty(PKG_OPTIONS:Mpam)
. include "../../mk/pam.buildlink3.mk"
CONFIGURE_ARGS+= --with-pam
+CONFIGURE_ARGS+= --with-pam_smbpass
+PLIST_SUBST+= PAM=
+.else
+CONFIGURE_ARGS+= --without-pam
+PLIST_SUBST+= PAM="@comment "
.endif
###
@@ -20,19 +25,66 @@ CONFIGURE_ARGS+= --with-pam
.if !empty(PKG_OPTIONS:Mcups)
. include "../../print/cups/buildlink3.mk"
CONFIGURE_ARGS+= --enable-cups
+.else
+CONFIGURE_ARGS+= --disable-cups
.endif
###
-### Support Samba-2.x LDAP password and account databases.
+### Support LDAP password and account databases.
###
.if !empty(PKG_OPTIONS:Mldap-compat)
. include "../../databases/openldap/buildlink3.mk"
-BUILD_DEFS+= USE_OPENLDAP
CONFIGURE_ARGS+= --with-ldapsam
PLIST_SUBST+= SAMBA_LDAP=""
.else
PLIST_SUBST+= SAMBA_LDAP="@comment "
-MESSAGE_SRC= ${.CURDIR}/MESSAGE.common ${.CURDIR}/MESSAGE.smbpasswd
+MESSAGE_SRC= ${.CURDIR}/MESSAGE.smbpasswd
SMBPASSWD_FILE= /dev/null ${SAMBA_PRIVATE}/smbpasswd \
${ROOT_USER} ${ROOT_GROUP} 0600
.endif
+
+###
+### Only Linux supports smbmount for mounting a Samba share into the
+### filesystem.
+###
+.if ${OPSYS} == "Linux"
+CONFIGURE_ARGS+= --with-smbmount
+PLIST_SUBST+= SMBMOUNT=
+.else
+PLIST_SUBST+= SMBMOUNT="@comment "
+.endif
+
+###
+### Use of SSL function
+###
+.if !empty(PKG_OPTIONS:Mssl)
+.include "../../security/openssl/buildlink3.mk"
+CONFIGURE_ARGS+= --with-ssl
+CONFIGURE_ARGS+= --with-sslinc=${SSLBASE}
+CFLAGS+= -I${SSLBASE}/include/openssl # ssl.h, err.h
+.else
+CONFIGURE_ARGS+= --without-ssl
+.endif
+
+###
+### Determine the proper name for the winbind and WINS NSS modules.
+###
+NSS_WINBIND.${OPSYS}?= libnss_winbind.so
+NSS_WINS.${OPSYS}?= libnss_wins.so
+
+NSS_WINBIND.AIX= WINBIND
+NSS_WINS.AIX= # empty
+
+NSS_WINBIND.DragonFly= # empty
+NSS_WINS.DragonFly= # empty
+
+NSS_WINBIND.IRIX= libns_winbind.so
+NSS_WINS.IRIX= libns_wins.so
+
+.if !empty(MACHINE_PLATFORM:MFreeBSD-5.*)
+NSS_WINBIND.FreeBSD= nss_winbind.so
+NSS_WINS.FreeBSD= nss_wins.so
+.endif
+
+NSS_WINBIND= ${NSS_WINBIND.${OPSYS}}
+NSS_WINS= ${NSS_WINS.${OPSYS}}
diff --git a/net/ja-samba/patches/patch-aa b/net/ja-samba/patches/patch-aa
index 418c5bb9741..88c4b818cfd 100644
--- a/net/ja-samba/patches/patch-aa
+++ b/net/ja-samba/patches/patch-aa
@@ -1,17 +1,51 @@
-$NetBSD: patch-aa,v 1.6 2004/06/05 13:16:35 taca Exp $
+$NetBSD: patch-aa,v 1.7 2005/06/19 18:38:40 taca Exp $
--- Makefile.in.orig 2004-01-22 20:24:22.000000000 +0900
+++ Makefile.in
-@@ -117,6 +117,8 @@ LDSHFLAGSPO = @LDSHFLAGS@ @ARCHFLAGPO@
+@@ -117,6 +117,9 @@ LDSHFLAGSPO = @LDSHFLAGS@ @ARCHFLAGPO@
LDSHFLAGS32 = @LDSHFLAGS@ @ARCHFLAG32@
LDSHFLAGS64 = @LDSHFLAGS@ @ARCHFLAG64@
+PAM_NEEDS_LIBC = @PAM_NEEDS_LIBC@
++PAM_SMBPASS= @PAM_MOD@
+
WINBIND_PROGS = @WINBIND_TARGETS@
WINBIND_SPROGS = @WINBIND_STARGETS@
WINBIND_PAM_PROGS = @WINBIND_PAM_TARGETS@
-@@ -753,7 +755,7 @@ bin/libsmbclient.a: $(LIBSMBCLIENT_PICOB
+@@ -124,10 +127,10 @@ WINBIND_LPROGS = @WINBIND_LTARGETS@
+
+ SPROGS = bin/smbd bin/nmbd bin/swat
+ PROGS1 = bin/smbclient bin/smbspool bin/testparm bin/testprns bin/smbstatus bin/smbcontrol bin/tdbbackup bin/make_printerdef @RUNPROG@
+-PROGS2 = bin/smbpasswd bin/make_smbcodepage bin/rpcclient bin/make_unicodemap bin/smbcacls @PAM_MOD@ @PDBEDIT@
++PROGS2 = bin/smbpasswd bin/make_smbcodepage bin/rpcclient bin/make_unicodemap bin/smbcacls @PDBEDIT@
+ MPROGS = @MPROGS@
+ WPROGS = @WRAPPROG@ @WRAP@ @WRAP32@ @WRAP64@
+-LPROGS = $(WINBIND_PAM_PROGS) $(WINBIND_LPROGS)
++LPROGS = ${PAM_SMBPASS} $(WINBIND_PAM_PROGS) $(WINBIND_LPROGS)
+ PROGS = $(PROGS1) $(PROGS2) $(MPROGS) $(WPROGS) bin/nmblookup
+ TORTURE_PROGS = bin/smbtorture bin/msgtest bin/masktest bin/locktest bin/locktest2
+ SHLIBS = @LIBSMBCLIENT@
+@@ -465,7 +468,7 @@ TDBDUMP_OBJ = tdb/tdbdump.o $(TDBBASE_O
+ # now the rules...
+ ######################################################################
+
+-all : CHECK all-gettext-support $(SPROGS) $(PROGS) $(WINBIND_PROGS) $(WINBIND_SPROGS) $(LPROGS) $(BUILD_PROGS)
++all : CHECK all-gettext-support $(SPROGS) $(PROGS) $(SHLIBS) $(WINBIND_PROGS) $(WINBIND_SPROGS) $(LPROGS) $(BUILD_PROGS)
+
+ # The following "everything" is NOT needed except by Samba developers - so do not use this!
+ everything : CHECK all-gettext-support $(SPROGS) $(PROGS) $(SHLIBS) nsswitch smbwrapper smbtorture debug2html smbfilter $(BUILD_PROGS)
+@@ -744,8 +747,8 @@ bin/smbwrapper.64.@SHLIBEXT@: $(PICOBJS6
+
+ bin/libsmbclient.@SHLIBEXT@: $(LIBSMBCLIENT_PICOBJS) bin/.dummy
+ @echo Linking libsmbclient shared library $@
+- @$(SHLD) $(LDSHFLAGS) -o $@ $(LIBSMBCLIENT_PICOBJS) $(SOLIBS) \
+- @SONAMEFLAG@`basename $@`.$(LIBSMBCLIENT_MAJOR)
++ @$(SHLD) $(LDSHFLAGS) -o $@ $(LDFLAGS) $(LIBSMBCLIENT_PICOBJS) \
++ $(SOLIBS) @SONAMEFLAG@`basename $@`.$(LIBSMBCLIENT_MAJOR)
+
+ bin/libsmbclient.a: $(LIBSMBCLIENT_PICOBJS) bin/.dummy
+ @echo Linking libsmbclient non-shared library $@
+@@ -753,7 +756,7 @@ bin/libsmbclient.a: $(LIBSMBCLIENT_PICOB
bin/pam_smbpass.@SHLIBEXT@: $(PAM_SMBPASS_OBJ) bin/.dummy
@echo Linking shared library $@
@@ -20,7 +54,7 @@ $NetBSD: patch-aa,v 1.6 2004/06/05 13:16:35 taca Exp $
@SONAMEFLAG@`basename $@`
nsswitch/libnss_wins.@SHLIBEXT@: $(NSS_OBJ)
-@@ -777,7 +779,7 @@ nsswitch/libnss_winbind.@SHLIBEXT@: $(WI
+@@ -777,7 +780,7 @@ nsswitch/libnss_winbind.@SHLIBEXT@: $(WI
nsswitch/pam_winbind.@SHLIBEXT@: $(PAM_WINBIND_OBJ)
@echo Linking $@
@@ -29,3 +63,27 @@ $NetBSD: patch-aa,v 1.6 2004/06/05 13:16:35 taca Exp $
@SONAMEFLAG@`basename $@`
bin/wbinfo: $(WBINFO_OBJ) $(PARAM_OBJ) $(LIB_OBJ) $(NOPROTO_OBJ) \
+@@ -878,7 +881,7 @@ ipk-codepages-ja: $(BUILD_PROGS)
+ $(SHELL) $(srcdir)/script/mkipk.sh
+ -rm -rf $(IPKTMP)
+
+-install: installbin installman installscripts installcp installswat install-gettext-support
++install: installbin installman installscripts installcp installswat install-gettext-support @INSTALLCLIENTLIB@
+ # install: installbin installman installscripts installcp installswat install-gettext-support @INSTALLCLIENTLIB@
+
+ installdirs:
+@@ -916,11 +919,9 @@ installswat: installdirs
+ fi; done;
+
+ installclientlib: @LIBSMBCLIENT@
+- $(SHELL) $(srcdir)/install-sh -d -m $(INSTALLPERMS) ${prefix}/lib
+- -$(INSTALLCLIENTCMD_SH) @LIBSMBCLIENT_SHARED@ ${prefix}/lib
+- -$(INSTALLCLIENTCMD_A) @LIBSMBCLIENT_NON_SHARED@ ${prefix}/lib
+- $(SHELL) $(srcdir)/install-sh -d -m $(INSTALLPERMS) ${prefix}/include
+- -$(INSTALLCMD) include/libsmbclient.h ${prefix}/include
++ $(INSTALLCLIENTCMD_SH) @LIBSMBCLIENT_SHARED@ ${prefix}/lib
++ $(INSTALLCLIENTCMD_A) @LIBSMBCLIENT_NON_SHARED@ ${prefix}/lib
++ $(INSTALLCMD) include/libsmbclient.h ${prefix}/include
+
+ # revert to the previously installed version
+ revert:
diff --git a/net/ja-samba/patches/patch-ab b/net/ja-samba/patches/patch-ab
index 5de4011ecaf..fe966aa48eb 100644
--- a/net/ja-samba/patches/patch-ab
+++ b/net/ja-samba/patches/patch-ab
@@ -1,7 +1,16 @@
-$NetBSD: patch-ab,v 1.6 2004/06/05 13:16:35 taca Exp $
+$NetBSD: patch-ab,v 1.7 2005/06/19 18:38:40 taca Exp $
--- configure.in.orig 2004-01-22 20:20:32.000000000 +0900
+++ configure.in
+@@ -1077,7 +1077,7 @@ case "$host_os" in
+ PICFLAG="-KPIC" # Is this correct for SunOS
+ AC_DEFINE(STAT_ST_BLOCKSIZE,512)
+ ;;
+- *freebsd*) AC_DEFINE(FREEBSD)
++ *freebsd*|*dragonfly*) AC_DEFINE(FREEBSD)
+ AC_DEFINE(BSD44)
+ BLDSHARED="true"
+ LDSHFLAGS="-shared"
@@ -2352,6 +2352,10 @@ AC_ARG_WITH(pam,
# we can't build a pam module if we don't have pam.
AC_CHECK_LIB(pam, pam_get_data, [AC_DEFINE(HAVE_LIBPAM)])
@@ -13,3 +22,11 @@ $NetBSD: patch-ab,v 1.6 2004/06/05 13:16:35 taca Exp $
#################################################
# check for pam_smbpass support
AC_MSG_CHECKING(whether to use pam_smbpass)
+@@ -2717,6 +2721,7 @@ AC_ARG_WITH(libsmbclient,
+ yes)
+ if test $BLDSHARED = true; then
+ INSTALLCLIENTCMD_SH="\$(INSTALLCMD)"
++ INSTALLCLIENTCMD_A="\$(INSTALLCMD)"
+ LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
+ LIBSMBCLIENT_NON_SHARED=bin/libsmbclient.a
+ LIBSMBCLIENT=libsmbclient
diff --git a/net/ja-samba/patches/patch-ac b/net/ja-samba/patches/patch-ac
index cbfc248d05f..ce3ab51a967 100644
--- a/net/ja-samba/patches/patch-ac
+++ b/net/ja-samba/patches/patch-ac
@@ -1,7 +1,16 @@
-$NetBSD: patch-ac,v 1.6 2004/06/05 13:16:35 taca Exp $
+$NetBSD: patch-ac,v 1.7 2005/06/19 18:38:40 taca Exp $
--- configure.orig 2004-01-22 20:20:31.000000000 +0900
+++ configure
+@@ -16267,7 +16267,7 @@ _ACEOF
+ _ACEOF
+
+ ;;
+- *freebsd*) cat >>confdefs.h <<\_ACEOF
++ *freebsd*|*dragonfly*) cat >>confdefs.h <<\_ACEOF
+ #define FREEBSD 1
+ _ACEOF
+
@@ -21449,6 +21449,49 @@ echo "${ECHO_T}no" >&6
fi;
@@ -52,7 +61,15 @@ $NetBSD: patch-ac,v 1.6 2004/06/05 13:16:35 taca Exp $
#################################################
# check for a NISPLUS password database
echo "$as_me:$LINENO: checking whether to use NISPLUS SAM database" >&5
-@@ -26986,6 +27029,7 @@ s,@ROFF@,$ROFF,;t t
+@@ -21775,6 +21818,7 @@ if test "${with_libsmbclient+set}" = set
+ yes)
+ if test $BLDSHARED = true; then
+ INSTALLCLIENTCMD_SH="\$(INSTALLCMD)"
++ INSTALLCLIENTCMD_A="\$(INSTALLCMD)"
+ LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
+ LIBSMBCLIENT_NON_SHARED=bin/libsmbclient.a
+ LIBSMBCLIENT=libsmbclient
+@@ -26986,6 +27030,7 @@ s,@ROFF@,$ROFF,;t t
s,@DYNEXP@,$DYNEXP,;t t
s,@SHDYNEXP@,$SHDYNEXP,;t t
s,@KRBLIBS@,$KRBLIBS,;t t
diff --git a/net/ja-samba/patches/patch-ao b/net/ja-samba/patches/patch-ao
index e7f689dbd87..ebed943198e 100644
--- a/net/ja-samba/patches/patch-ao
+++ b/net/ja-samba/patches/patch-ao
@@ -1,10 +1,10 @@
-$NetBSD: patch-ao,v 1.1 2003/03/29 08:18:50 taca Exp $
+$NetBSD: patch-ao,v 1.2 2005/06/19 18:38:40 taca Exp $
Expand & in the gecos field to a capitalized login name.
---- lib/util_getent.c.orig Sat Feb 2 19:46:42 2002
-+++ lib/util_getent.c Sun Oct 13 21:37:56 2002
-@@ -155,6 +155,11 @@
+--- lib/util_getent.c.orig 2005-03-02 14:33:07.000000000 +0900
++++ lib/util_getent.c
+@@ -155,6 +155,11 @@ struct sys_pwent * getpwent_list(void)
struct sys_pwent *plist;
struct sys_pwent *pent;
struct passwd *pwd;
@@ -14,9 +14,9 @@ Expand & in the gecos field to a capitalized login name.
+ int buflen;
+#endif
- pent = (struct sys_pwent *) malloc(sizeof(struct sys_pwent));
+ pent = SMB_MALLOC_P(struct sys_pwent);
if (pent == NULL) {
-@@ -178,9 +183,38 @@
+@@ -178,9 +183,38 @@ struct sys_pwent * getpwent_list(void)
pent->pw_uid = pwd->pw_uid;
pent->pw_gid = pwd->pw_gid;
if (pwd->pw_gecos) {
@@ -42,10 +42,10 @@ Expand & in the gecos field to a capitalized login name.
+ *bp++ = *p;
+ }
+ *bp = '\0';
-+ if ((pent->pw_name = strdup(buf)) == NULL)
++ if ((pent->pw_name = SMB_STRDUP(buf)) == NULL)
+ goto err;
+#else
- if ((pent->pw_name = strdup(pwd->pw_gecos)) == NULL)
+ if ((pent->pw_name = SMB_STRDUP(pwd->pw_gecos)) == NULL)
goto err;
+#endif
}
@@ -53,5 +53,5 @@ Expand & in the gecos field to a capitalized login name.
+ gecos_done:
+#endif
if (pwd->pw_dir) {
- if ((pent->pw_name = strdup(pwd->pw_dir)) == NULL)
+ if ((pent->pw_name = SMB_STRDUP(pwd->pw_dir)) == NULL)
goto err;
diff --git a/net/ja-samba/patches/patch-ax b/net/ja-samba/patches/patch-ax
deleted file mode 100644
index 8ebdcc1efd0..00000000000
--- a/net/ja-samba/patches/patch-ax
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-ax,v 1.1 2004/10/03 16:16:39 taca Exp $
-
---- smbd/vfs.c.orig 2003-05-20 11:17:19.000000000 +0900
-+++ smbd/vfs.c
-@@ -790,7 +790,6 @@ BOOL reduce_name(connection_struct *conn
- *dir2 = *wd = *base_name = *newname = 0;
-
- if (widelinks) {
-- unix_clean_name(s);
- /* can't have a leading .. */
- if (strncmp(s,"..",2) == 0 && (s[2]==0 || s[2]=='/')) {
- DEBUG(3,("Illegal file name? (%s)\n",s));
diff --git a/net/ja-samba/patches/patch-ay b/net/ja-samba/patches/patch-ay
new file mode 100644
index 00000000000..45dfb49f3b9
--- /dev/null
+++ b/net/ja-samba/patches/patch-ay
@@ -0,0 +1,12 @@
+$NetBSD: patch-ay,v 1.1 2005/06/19 18:38:40 taca Exp $
+
+--- lib/util.c.orig 2005-03-02 14:33:07.000000000 +0900
++++ lib/util.c
+@@ -1925,6 +1925,7 @@ char *smb_xstrndup(const char *s, size_t
+ #if defined(PARANOID_MALLOC_CHECKER)
+ #ifdef strndup
+ #undef strndup
++ extern char *strndup(const char *, size_t);
+ #endif
+ #endif
+ char *s1 = strndup(s, n);
diff --git a/net/ja-samba/patches/patch-az b/net/ja-samba/patches/patch-az
new file mode 100644
index 00000000000..e45a77cc946
--- /dev/null
+++ b/net/ja-samba/patches/patch-az
@@ -0,0 +1,13 @@
+$NetBSD: patch-az,v 1.1 2005/06/19 18:38:40 taca Exp $
+
+--- nsswitch/pam_winbind.h.orig 2004-01-22 20:20:34.000000000 +0900
++++ nsswitch/pam_winbind.h
+@@ -25,7 +25,7 @@
+ #define PAM_SM_ACCOUNT
+ #define PAM_SM_PASSWORD
+
+-#if defined(SUNOS5) || defined(SUNOS4) || defined(HPUX) || defined(FREEBSD)
++#if defined(SUNOS5) || defined(SUNOS4) || defined(HPUX) || defined(FREEBSD) || defined(__NetBSD__)
+
+ /* Solaris always uses dynamic pam modules */
+ #if !defined(__FreeBSD__)
diff --git a/net/ja-samba/patches/patch-bh b/net/ja-samba/patches/patch-bh
new file mode 100644
index 00000000000..71c6dd8d0ef
--- /dev/null
+++ b/net/ja-samba/patches/patch-bh
@@ -0,0 +1,39 @@
+$NetBSD: patch-bh,v 1.1 2005/06/19 18:38:40 taca Exp $
+
+--- passdb/pdb_ldap.c.orig 2005-03-02 14:33:12.000000000 +0900
++++ passdb/pdb_ldap.c
+@@ -296,14 +296,14 @@ static int rebindproc (LDAP *ldap_struct
+ memset(*credp, '\0', strlen(*credp));
+ SAFE_FREE(*credp);
+ } else {
+- *whop = strdup(ldap_state->bind_dn);
++ *whop = SMB_STRDUP(ldap_state->bind_dn);
+ if (!*whop) {
+ return LDAP_NO_MEMORY;
+ }
+ DEBUG(5,("ldap_connect_system: Rebinding as \"%s\"\n",
+ whop));
+
+- *credp = strdup(ldap_secret);
++ *credp = SMB_STRDUP(ldap_secret);
+ if (!*credp) {
+ SAFE_FREE(*whop);
+ return LDAP_NO_MEMORY;
+@@ -517,7 +517,7 @@ static void make_a_mod (LDAPMod *** modl
+ }
+ mods[i]->mod_op = modop;
+ mods[i]->mod_values = NULL;
+- mods[i]->mod_type = strdup(attribute);
++ mods[i]->mod_type = SMB_STRDUP(attribute);
+ mods[i + 1] = NULL;
+ }
+
+@@ -533,7 +533,7 @@ static void make_a_mod (LDAPMod *** modl
+ DEBUG (0, ("make_a_mod: Memory allocation failure!\n"));
+ return;
+ }
+- mods[i]->mod_values[j] = strdup(value);
++ mods[i]->mod_values[j] = SMB_STRDUP(value);
+ mods[i]->mod_values[j + 1] = NULL;
+ }
+ *modlist = mods;