summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorjlam <jlam>2004-01-11 00:41:12 +0000
committerjlam <jlam>2004-01-11 00:41:12 +0000
commit497b953ccc901e5af0a124670b5e1a058a7fff2e (patch)
treed0930d3abc3d71cb10ffc2c18b000cbd8a027e59 /net
parent984ce45b6f50e3f125c723950e7a09f48c5358a9 (diff)
downloadpkgsrc-497b953ccc901e5af0a124670b5e1a058a7fff2e.tar.gz
Reimport net/samba as net/samba2. net/samba2 will continue to track the
2.x release of Samba, which net/samba will track post-2.x releases of Samba.
Diffstat (limited to 'net')
-rw-r--r--net/samba2/DESCR13
-rw-r--r--net/samba2/INSTALL24
-rw-r--r--net/samba2/MESSAGE.smbpasswd19
-rw-r--r--net/samba2/Makefile.common70
-rw-r--r--net/samba2/PLIST452
-rw-r--r--net/samba2/buildlink2.mk28
-rw-r--r--net/samba2/distinfo16
-rw-r--r--net/samba2/files/adduser.sh160
-rw-r--r--net/samba2/files/deluser.sh68
-rw-r--r--net/samba2/files/nmbd.sh30
-rw-r--r--net/samba2/files/samba.sh56
-rw-r--r--net/samba2/files/smbd.sh28
-rw-r--r--net/samba2/patches/patch-ab62
-rw-r--r--net/samba2/patches/patch-ac13
-rw-r--r--net/samba2/patches/patch-ad31
-rw-r--r--net/samba2/patches/patch-ag23
-rw-r--r--net/samba2/patches/patch-ah13
-rw-r--r--net/samba2/patches/patch-aj13
-rw-r--r--net/samba2/patches/patch-al17
-rw-r--r--net/samba2/patches/patch-ap57
-rw-r--r--net/samba2/patches/patch-aq56
-rw-r--r--net/samba2/patches/patch-ar16
-rw-r--r--net/samba2/patches/patch-as16
23 files changed, 1281 insertions, 0 deletions
diff --git a/net/samba2/DESCR b/net/samba2/DESCR
new file mode 100644
index 00000000000..2d8f2e0a13c
--- /dev/null
+++ b/net/samba2/DESCR
@@ -0,0 +1,13 @@
+Samba is a suite of programs which work together to allow clients to
+access to a server's filespace and printers via the SMB (Server
+Message Block) protocol.
+
+In practice, this means that you can redirect disks and printers to
+Unix disks and printers from Lan Manager clients, Windows for
+Workgroups 3.11 clients, Windows NT clients, Linux clients and OS/2
+clients. There is also a generic Unix client program supplied as part
+of the suite which allows Unix users to use an ftp-like interface to
+access filespace and printers on any other SMB servers. This gives the
+capability for these operating systems to behave much like a LAN
+Server or Windows NT Server machine, only with added functionality and
+flexibility designed to make life easier for administrators.
diff --git a/net/samba2/INSTALL b/net/samba2/INSTALL
new file mode 100644
index 00000000000..137ca7163bc
--- /dev/null
+++ b/net/samba2/INSTALL
@@ -0,0 +1,24 @@
+#!/bin/sh
+#
+# $NetBSD: INSTALL,v 1.1.1.1 2004/01/11 00:41:13 jlam Exp $
+
+SAMBA_LOCKDIR="@SAMBA_LOCKDIR@"
+SAMBA_PRIVATE="@SAMBA_PRIVATE@"
+
+case ${STAGE} in
+POST-INSTALL)
+ # Check for files in old "lock" directory.
+ if [ -e /var/run/samba ]
+ then
+ ${CAT} << EOF
+===========================================================================
+
+The location of the Samba cache directory has moved to ${SAMBA_LOCKDIR}.
+If you have any files under /var/run/samba, please move them into
+${SAMBA_LOCKDIR} and restart the SMB and NMB servers.
+
+===========================================================================
+EOF
+ fi
+ ;;
+esac
diff --git a/net/samba2/MESSAGE.smbpasswd b/net/samba2/MESSAGE.smbpasswd
new file mode 100644
index 00000000000..43383d77935
--- /dev/null
+++ b/net/samba2/MESSAGE.smbpasswd
@@ -0,0 +1,19 @@
+===========================================================================
+$NetBSD: MESSAGE.smbpasswd,v 1.1.1.1 2004/01/11 00:41:12 jlam Exp $
+
+ *===* SECURITY NOTES *===*
+
+The users' encrypted passwords are stored in
+
+ ${SAMBA_PRIVATE}/smbpasswd
+
+with owner ${ROOT_USER}, group ${ROOT_GROUP}, and file mode 0600.
+These encrypted passwords are _PASSWORD_EQUIVALENT_ from the viewpoint of
+the SMB protocol. Do _NOT_ weaken the permissions of this file unless
+there is a very good reason.
+
+Please note that even if you pkg_delete ${PKGNAME}, the smbpasswd file
+will remain on the system. If you don't intend to use this package
+anymore, then it is _STRONGLY_ recommended that you remove the smbpasswd
+file manually.
+===========================================================================
diff --git a/net/samba2/Makefile.common b/net/samba2/Makefile.common
new file mode 100644
index 00000000000..b36e31eb7f3
--- /dev/null
+++ b/net/samba2/Makefile.common
@@ -0,0 +1,70 @@
+# $NetBSD: Makefile.common,v 1.1.1.1 2004/01/11 00:41:12 jlam Exp $
+#
+# NOTE: This file is included by:
+#
+# net/samba/Makefile
+# security/pam-smbpass/Makefile
+# security/winbind/Makefile
+
+DISTNAME= samba-${SAMBA_DIST_VERS}
+SAMBA_DIST_VERS= 2.2.8a
+WRKSRC?= ${WRKDIR}/${DISTNAME}/source
+CATEGORIES?= net
+MASTER_SITES= ftp://ftp.samba.org/pub/samba/ \
+ ftp://ring.asahi-net.or.jp/pub/net/samba/ \
+ ftp://samba.anu.edu.au/pub/samba/ \
+ ftp://ftp.sunet.se/pub/unix/utilities/samba/
+COUNTRY_MIRRORS= au1 ca fi fr de it pl ru sg se us1 us6
+.for COUNTRY in ${COUNTRY_MIRRORS}
+MASTER_SITES+= ftp://${COUNTRY}.samba.org/pub/samba/
+.endfor
+EXTRACT_SUFX= .tar.bz2
+
+DISTINFO_FILE?= ${.CURDIR}/../../net/samba/distinfo
+PATCHDIR?= ${.CURDIR}/../../net/samba/patches
+
+GNU_CONFIGURE= # defined
+USE_LIBTOOL= # defined
+LTCONFIG_OVERRIDE= ${WRKSRC}/ltconfig
+
+.include "../../mk/bsd.prefs.mk"
+
+PKG_SYSCONFSUBDIR?= samba
+PKG_SYSCONFVAR= 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
+
+# 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/samba2/PLIST b/net/samba2/PLIST
new file mode 100644
index 00000000000..e57f7ab33cb
--- /dev/null
+++ b/net/samba2/PLIST
@@ -0,0 +1,452 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2004/01/11 00:41:13 jlam Exp $
+bin/findsmb
+bin/make_printerdef
+bin/make_smbcodepage
+bin/make_unicodemap
+bin/nmblookup
+${SAMBA_LDAP}bin/pdbedit
+bin/rpcclient
+bin/smbcacls
+bin/smbclient
+bin/smbcontrol
+bin/smbpasswd
+bin/smbspool
+bin/smbstatus
+bin/smbtar
+bin/tdbbackup
+bin/testparm
+bin/testprns
+etc/rc.d/nmbd
+etc/rc.d/samba
+etc/rc.d/smbd
+man/man1/findsmb.1
+man/man1/make_smbcodepage.1
+man/man1/make_unicodemap.1
+man/man1/nmblookup.1
+man/man1/rpcclient.1
+man/man1/smbcacls.1
+man/man1/smbclient.1
+man/man1/smbcontrol.1
+man/man1/smbsh.1
+man/man1/smbstatus.1
+man/man1/smbtar.1
+man/man1/testparm.1
+man/man1/testprns.1
+man/man1/wbinfo.1
+man/man5/lmhosts.5
+man/man5/smb.conf.5
+man/man5/smbpasswd.5
+man/man7/samba.7
+man/man8/nmbd.8
+man/man8/pdbedit.8
+man/man8/smbd.8
+man/man8/smbmnt.8
+man/man8/smbmount.8
+man/man8/smbpasswd.8
+man/man8/smbspool.8
+man/man8/smbumount.8
+man/man8/swat.8
+man/man8/winbindd.8
+sbin/mksmbpasswd
+sbin/nmbd
+sbin/smbd
+sbin/swat
+share/doc/samba/Application_Serving.txt
+share/doc/samba/BROWSING-Config.txt
+share/doc/samba/BROWSING.txt
+share/doc/samba/BUGS.txt
+share/doc/samba/CUPS-PrintingInfo.txt
+share/doc/samba/DHCP-Server-Configuration.txt
+share/doc/samba/DIAGNOSIS.txt
+share/doc/samba/DNIX.txt
+share/doc/samba/Faxing.txt
+share/doc/samba/GOTCHAS.txt
+share/doc/samba/HINTS.txt
+share/doc/samba/INSTALL.sambatar
+share/doc/samba/Imprints.txt
+share/doc/samba/Macintosh_Clients.txt
+share/doc/samba/NT4-Locking.reg
+share/doc/samba/NT4_PlainPassword.reg
+share/doc/samba/NetBIOS.txt
+share/doc/samba/PROFILES.txt
+share/doc/samba/Passwords.txt
+share/doc/samba/Printing.txt
+share/doc/samba/README.DCEDFS
+share/doc/samba/README.NOW
+share/doc/samba/README.jis
+share/doc/samba/README.sambatar
+share/doc/samba/Recent-FAQs.txt
+share/doc/samba/RoutedNetworks.txt
+share/doc/samba/SCO.txt
+share/doc/samba/SMBTAR.notes
+share/doc/samba/Samba-OpenSSL.txt
+share/doc/samba/Speed.txt
+share/doc/samba/Speed2.txt
+share/doc/samba/Tracing.txt
+share/doc/samba/UNIX-SMB.txt
+share/doc/samba/UNIX_SECURITY.txt
+share/doc/samba/Win2000_PlainPassword.reg
+share/doc/samba/Win95.txt
+share/doc/samba/Win95_PlainPassword.reg
+share/doc/samba/Win98_PlainPassword.reg
+share/doc/samba/Win9X-CacheHandling.reg
+share/doc/samba/WinME_PlainPassword.reg
+share/doc/samba/WinNT.txt
+share/doc/samba/WinXP_SignOrSeal.reg
+share/doc/samba/WindowsTerminalServer.reg
+share/doc/samba/announce
+share/doc/samba/cifsntdomain.txt
+share/doc/samba/security_level.txt
+share/examples/samba/LDAP/README
+share/examples/samba/LDAP/export_smbpasswd.pl
+share/examples/samba/LDAP/import_smbpasswd.pl
+share/examples/samba/LDAP/ldapchpasswd
+share/examples/samba/LDAP/ldapsync.pl
+share/examples/samba/LDAP/samba-nds.schema
+share/examples/samba/LDAP/samba-schema-netscapeds4.x
+share/examples/samba/LDAP/samba-schema-netscapeds5.x
+share/examples/samba/LDAP/samba-schema.IBMSecureWay
+share/examples/samba/LDAP/samba.schema
+share/examples/samba/LDAP/smbldap-tools/AUTHORS
+share/examples/samba/LDAP/smbldap-tools/CONTRIBUTORS
+share/examples/samba/LDAP/smbldap-tools/COPYING
+share/examples/samba/LDAP/smbldap-tools/ChangeLog
+share/examples/samba/LDAP/smbldap-tools/FILES
+share/examples/samba/LDAP/smbldap-tools/INFRASTRUCTURE
+share/examples/samba/LDAP/smbldap-tools/INSTALL
+share/examples/samba/LDAP/smbldap-tools/Makefile
+share/examples/samba/LDAP/smbldap-tools/NEWS
+share/examples/samba/LDAP/smbldap-tools/README
+share/examples/samba/LDAP/smbldap-tools/TODO
+share/examples/samba/LDAP/smbldap-tools/cgi/README
+share/examples/samba/LDAP/smbldap-tools/cgi/ldappass.cgi
+share/examples/samba/LDAP/smbldap-tools/mkntpwd/Makefile
+share/examples/samba/LDAP/smbldap-tools/mkntpwd/getopt.c
+share/examples/samba/LDAP/smbldap-tools/mkntpwd/getopt.h
+share/examples/samba/LDAP/smbldap-tools/mkntpwd/md4.c
+share/examples/samba/LDAP/smbldap-tools/mkntpwd/mkntpwd.c
+share/examples/samba/LDAP/smbldap-tools/mkntpwd/mkntpwd.h
+share/examples/samba/LDAP/smbldap-tools/mkntpwd/smbdes.c
+share/examples/samba/LDAP/smbldap-tools/smbldap-groupadd.pl
+share/examples/samba/LDAP/smbldap-tools/smbldap-groupdel.pl
+share/examples/samba/LDAP/smbldap-tools/smbldap-groupmod.pl
+share/examples/samba/LDAP/smbldap-tools/smbldap-groupshow.pl
+share/examples/samba/LDAP/smbldap-tools/smbldap-migrate-accounts.pl
+share/examples/samba/LDAP/smbldap-tools/smbldap-migrate-groups.pl
+share/examples/samba/LDAP/smbldap-tools/smbldap-passwd.pl
+share/examples/samba/LDAP/smbldap-tools/smbldap-populate.pl
+share/examples/samba/LDAP/smbldap-tools/smbldap-tools.spec
+share/examples/samba/LDAP/smbldap-tools/smbldap-useradd.pl
+share/examples/samba/LDAP/smbldap-tools/smbldap-userdel.pl
+share/examples/samba/LDAP/smbldap-tools/smbldap-usermod.pl
+share/examples/samba/LDAP/smbldap-tools/smbldap-usershow.pl
+share/examples/samba/LDAP/smbldap-tools/smbldap_conf.pm
+share/examples/samba/LDAP/smbldap-tools/smbldap_tools.pm
+share/examples/samba/README
+share/examples/samba/adduser.sh
+share/examples/samba/deluser.sh
+share/examples/samba/misc/convert_smbpasswd
+share/examples/samba/misc/extra_smbstatus
+share/examples/samba/misc/modify_samba_config.pl
+share/examples/samba/misc/swat.pl
+share/examples/samba/misc/wall.perl
+share/examples/samba/printer-accounting/README
+share/examples/samba/printer-accounting/acct-all
+share/examples/samba/printer-accounting/acct-sum
+share/examples/samba/printer-accounting/hp5-redir
+share/examples/samba/printer-accounting/lp-acct
+share/examples/samba/printer-accounting/printcap
+share/examples/samba/printing/smbprint
+share/examples/samba/printing/smbprint.newer
+share/examples/samba/printing/smbprint.old
+share/examples/samba/printing/smbprint.safer
+share/examples/samba/printing/smbprint.sysv
+share/examples/samba/simple/README
+share/examples/samba/simple/smb.conf
+share/examples/samba/smb.conf.default
+share/examples/samba/thoralf/smb.conf
+share/examples/samba/tridge/README
+share/examples/samba/tridge/smb.conf
+share/examples/samba/tridge/smb.conf.WinNT
+share/examples/samba/tridge/smb.conf.fjall
+share/examples/samba/tridge/smb.conf.lapland
+share/examples/samba/tridge/smb.conf.vittjokk
+share/examples/samba/validchars/msdos70.out
+share/examples/samba/validchars/nwdos70.out
+share/examples/samba/validchars/readme
+share/examples/samba/validchars/validchr.c
+share/examples/samba/validchars/validchr.com
+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/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
+share/samba/swat/help/Integrating-with-Windows.html
+share/samba/swat/help/NT_Security.html
+share/samba/swat/help/OS2-Client-HOWTO.html
+share/samba/swat/help/PAM-Authentication-And-Samba.html
+share/samba/swat/help/Samba-BDC-HOWTO.html
+share/samba/swat/help/Samba-HOWTO-Collection.html
+share/samba/swat/help/Samba-LDAP-HOWTO.html
+share/samba/swat/help/Samba-PDC-HOWTO.html
+share/samba/swat/help/UNIX_INSTALL.html
+share/samba/swat/help/cups.html
+share/samba/swat/help/findsmb.1.html
+share/samba/swat/help/lmhosts.5.html
+share/samba/swat/help/make_smbcodepage.1.html
+share/samba/swat/help/make_unicodemap.1.html
+share/samba/swat/help/msdfs_setup.html
+share/samba/swat/help/nmbd.8.html
+share/samba/swat/help/nmblookup.1.html
+share/samba/swat/help/pdbedit.8.html
+share/samba/swat/help/printer_driver2.html
+share/samba/swat/help/rpcclient.1.html
+share/samba/swat/help/samba.7.html
+share/samba/swat/help/smb.conf.5.html
+share/samba/swat/help/smbcacls.1.html
+share/samba/swat/help/smbclient.1.html
+share/samba/swat/help/smbcontrol.1.html
+share/samba/swat/help/smbd.8.html
+share/samba/swat/help/smbmnt.8.html
+share/samba/swat/help/smbmount.8.html
+share/samba/swat/help/smbpasswd.5.html
+share/samba/swat/help/smbpasswd.8.html
+share/samba/swat/help/smbsh.1.html
+share/samba/swat/help/smbspool.8.html
+share/samba/swat/help/smbstatus.1.html
+share/samba/swat/help/smbtar.1.html
+share/samba/swat/help/smbumount.8.html
+share/samba/swat/help/swat.8.html
+share/samba/swat/help/testparm.1.html
+share/samba/swat/help/testprns.1.html
+share/samba/swat/help/wbinfo.1.html
+share/samba/swat/help/welcome.html
+share/samba/swat/help/winbind.html
+share/samba/swat/help/winbindd.8.html
+share/samba/swat/images/globals.gif
+share/samba/swat/images/home.gif
+share/samba/swat/images/passwd.gif
+share/samba/swat/images/printers.gif
+share/samba/swat/images/samba.gif
+share/samba/swat/images/shares.gif
+share/samba/swat/images/status.gif
+share/samba/swat/images/viewconfig.gif
+share/samba/swat/images/wizard.gif
+share/samba/swat/include/footer.html
+share/samba/swat/include/header.html
+share/samba/swat/using_samba/appa_01.html
+share/samba/swat/using_samba/appa_02.html
+share/samba/swat/using_samba/appa_03.html
+share/samba/swat/using_samba/appa_04.html
+share/samba/swat/using_samba/appa_05.html
+share/samba/swat/using_samba/appb_01.html
+share/samba/swat/using_samba/appb_02.html
+share/samba/swat/using_samba/appb_03.html
+share/samba/swat/using_samba/appc_01.html
+share/samba/swat/using_samba/appd_01.html
+share/samba/swat/using_samba/appe_01.html
+share/samba/swat/using_samba/appf_01.html
+share/samba/swat/using_samba/ch01_01.html
+share/samba/swat/using_samba/ch01_02.html
+share/samba/swat/using_samba/ch01_03.html
+share/samba/swat/using_samba/ch01_04.html
+share/samba/swat/using_samba/ch01_05.html
+share/samba/swat/using_samba/ch01_06.html
+share/samba/swat/using_samba/ch01_07.html
+share/samba/swat/using_samba/ch01_08.html
+share/samba/swat/using_samba/ch02_01.html
+share/samba/swat/using_samba/ch02_02.html
+share/samba/swat/using_samba/ch02_03.html
+share/samba/swat/using_samba/ch02_04.html
+share/samba/swat/using_samba/ch02_05.html
+share/samba/swat/using_samba/ch02_06.html
+share/samba/swat/using_samba/ch03_01.html
+share/samba/swat/using_samba/ch03_02.html
+share/samba/swat/using_samba/ch03_03.html
+share/samba/swat/using_samba/ch04_01.html
+share/samba/swat/using_samba/ch04_02.html
+share/samba/swat/using_samba/ch04_03.html
+share/samba/swat/using_samba/ch04_04.html
+share/samba/swat/using_samba/ch04_05.html
+share/samba/swat/using_samba/ch04_06.html
+share/samba/swat/using_samba/ch04_07.html
+share/samba/swat/using_samba/ch04_08.html
+share/samba/swat/using_samba/ch05_01.html
+share/samba/swat/using_samba/ch05_02.html
+share/samba/swat/using_samba/ch05_03.html
+share/samba/swat/using_samba/ch05_04.html
+share/samba/swat/using_samba/ch05_05.html
+share/samba/swat/using_samba/ch06_01.html
+share/samba/swat/using_samba/ch06_02.html
+share/samba/swat/using_samba/ch06_03.html
+share/samba/swat/using_samba/ch06_04.html
+share/samba/swat/using_samba/ch06_05.html
+share/samba/swat/using_samba/ch06_06.html
+share/samba/swat/using_samba/ch07_01.html
+share/samba/swat/using_samba/ch07_02.html
+share/samba/swat/using_samba/ch07_03.html
+share/samba/swat/using_samba/ch08_01.html
+share/samba/swat/using_samba/ch08_02.html
+share/samba/swat/using_samba/ch08_03.html
+share/samba/swat/using_samba/ch08_04.html
+share/samba/swat/using_samba/ch08_05.html
+share/samba/swat/using_samba/ch08_06.html
+share/samba/swat/using_samba/ch08_07.html
+share/samba/swat/using_samba/ch09_01.html
+share/samba/swat/using_samba/ch09_02.html
+share/samba/swat/using_samba/ch09_03.html
+share/samba/swat/using_samba/figs/sam.0101.gif
+share/samba/swat/using_samba/figs/sam.0102.gif
+share/samba/swat/using_samba/figs/sam.0103.gif
+share/samba/swat/using_samba/figs/sam.0104.gif
+share/samba/swat/using_samba/figs/sam.0105.gif
+share/samba/swat/using_samba/figs/sam.0106.gif
+share/samba/swat/using_samba/figs/sam.0107.gif
+share/samba/swat/using_samba/figs/sam.0108.gif
+share/samba/swat/using_samba/figs/sam.0109.gif
+share/samba/swat/using_samba/figs/sam.0110.gif
+share/samba/swat/using_samba/figs/sam.0111.gif
+share/samba/swat/using_samba/figs/sam.0112.gif
+share/samba/swat/using_samba/figs/sam.0113.gif
+share/samba/swat/using_samba/figs/sam.0114.gif
+share/samba/swat/using_samba/figs/sam.0201.gif
+share/samba/swat/using_samba/figs/sam.0202.gif
+share/samba/swat/using_samba/figs/sam.0203.gif
+share/samba/swat/using_samba/figs/sam.0204.gif
+share/samba/swat/using_samba/figs/sam.0301.gif
+share/samba/swat/using_samba/figs/sam.0302.gif
+share/samba/swat/using_samba/figs/sam.0303.gif
+share/samba/swat/using_samba/figs/sam.0304.gif
+share/samba/swat/using_samba/figs/sam.0305.gif
+share/samba/swat/using_samba/figs/sam.0306.gif
+share/samba/swat/using_samba/figs/sam.0307.gif
+share/samba/swat/using_samba/figs/sam.0308.gif
+share/samba/swat/using_samba/figs/sam.0309.gif
+share/samba/swat/using_samba/figs/sam.0310.gif
+share/samba/swat/using_samba/figs/sam.0311.gif
+share/samba/swat/using_samba/figs/sam.0312.gif
+share/samba/swat/using_samba/figs/sam.0313.gif
+share/samba/swat/using_samba/figs/sam.0314.gif
+share/samba/swat/using_samba/figs/sam.0315.gif
+share/samba/swat/using_samba/figs/sam.0316.gif
+share/samba/swat/using_samba/figs/sam.0317.gif
+share/samba/swat/using_samba/figs/sam.0318.gif
+share/samba/swat/using_samba/figs/sam.0319.gif
+share/samba/swat/using_samba/figs/sam.0320.gif
+share/samba/swat/using_samba/figs/sam.0321.gif
+share/samba/swat/using_samba/figs/sam.0322.gif
+share/samba/swat/using_samba/figs/sam.0323.gif
+share/samba/swat/using_samba/figs/sam.0324.gif
+share/samba/swat/using_samba/figs/sam.0325.gif
+share/samba/swat/using_samba/figs/sam.0326.gif
+share/samba/swat/using_samba/figs/sam.0327.gif
+share/samba/swat/using_samba/figs/sam.0328.gif
+share/samba/swat/using_samba/figs/sam.0401.gif
+share/samba/swat/using_samba/figs/sam.0402.gif
+share/samba/swat/using_samba/figs/sam.0403.gif
+share/samba/swat/using_samba/figs/sam.0404.gif
+share/samba/swat/using_samba/figs/sam.0405.gif
+share/samba/swat/using_samba/figs/sam.0406.gif
+share/samba/swat/using_samba/figs/sam.0407.gif
+share/samba/swat/using_samba/figs/sam.0501.gif
+share/samba/swat/using_samba/figs/sam.0502.gif
+share/samba/swat/using_samba/figs/sam.0503.gif
+share/samba/swat/using_samba/figs/sam.0504.gif
+share/samba/swat/using_samba/figs/sam.0505.gif
+share/samba/swat/using_samba/figs/sam.0506.gif
+share/samba/swat/using_samba/figs/sam.0507.gif
+share/samba/swat/using_samba/figs/sam.0508.gif
+share/samba/swat/using_samba/figs/sam.0601.gif
+share/samba/swat/using_samba/figs/sam.0602.gif
+share/samba/swat/using_samba/figs/sam.0603.gif
+share/samba/swat/using_samba/figs/sam.0604.gif
+share/samba/swat/using_samba/figs/sam.0605.gif
+share/samba/swat/using_samba/figs/sam.0606.gif
+share/samba/swat/using_samba/figs/sam.0701.gif
+share/samba/swat/using_samba/figs/sam.0702.gif
+share/samba/swat/using_samba/figs/sam.0703.gif
+share/samba/swat/using_samba/figs/sam.0704.gif
+share/samba/swat/using_samba/figs/sam.0705.gif
+share/samba/swat/using_samba/figs/sam.0706.gif
+share/samba/swat/using_samba/figs/sam.0707.gif
+share/samba/swat/using_samba/figs/sam.0708.gif
+share/samba/swat/using_samba/figs/sam.0709.gif
+share/samba/swat/using_samba/figs/sam.0801.gif
+share/samba/swat/using_samba/figs/sam.0802.gif
+share/samba/swat/using_samba/figs/sam.0803.gif
+share/samba/swat/using_samba/figs/sam.0804.gif
+share/samba/swat/using_samba/figs/sam.0805.gif
+share/samba/swat/using_samba/figs/sam.0901.gif
+share/samba/swat/using_samba/figs/sam.0902.gif
+share/samba/swat/using_samba/figs/sam.0903.gif
+share/samba/swat/using_samba/figs/sam.0904.gif
+share/samba/swat/using_samba/figs/sam.0905.gif
+share/samba/swat/using_samba/figs/sam.aa01.gif
+share/samba/swat/using_samba/figs/sam.ab01.gif
+share/samba/swat/using_samba/figs/sam.ab02.gif
+share/samba/swat/using_samba/gifs/index.gif
+share/samba/swat/using_samba/gifs/samba.s.gif
+share/samba/swat/using_samba/gifs/txthome.gif
+share/samba/swat/using_samba/gifs/txtnexta.gif
+share/samba/swat/using_samba/gifs/txtpreva.gif
+share/samba/swat/using_samba/index.html
+share/samba/swat/using_samba/inx.html
+share/samba/swat/using_samba/licenseinfo.html
+share/samba/swat/using_samba/this_edition.html
+@dirrm share/doc/samba
+@dirrm share/examples/samba/LDAP/smbldap-tools/mkntpwd
+@dirrm share/examples/samba/LDAP/smbldap-tools/cgi
+@dirrm share/examples/samba/LDAP/smbldap-tools
+@dirrm share/examples/samba/LDAP
+@dirrm share/examples/samba/misc
+@dirrm share/examples/samba/printer-accounting
+@dirrm share/examples/samba/printing
+@dirrm share/examples/samba/simple
+@dirrm share/examples/samba/thoralf
+@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
+@dirrm share/samba/swat/using_samba/figs
+@dirrm share/samba/swat/using_samba/gifs
+@dirrm share/samba/swat/using_samba
+@dirrm share/samba/swat
+@dirrm share/samba
diff --git a/net/samba2/buildlink2.mk b/net/samba2/buildlink2.mk
new file mode 100644
index 00000000000..8d2f317e611
--- /dev/null
+++ b/net/samba2/buildlink2.mk
@@ -0,0 +1,28 @@
+# $NetBSD: buildlink2.mk,v 1.1.1.1 2004/01/11 00:41:13 jlam Exp $
+#
+# This Makefile fragment is included by packages that use samba.
+#
+# This file was created automatically using createbuildlink 2.6.
+#
+
+.if !defined(SAMBA_BUILDLINK2_MK)
+SAMBA_BUILDLINK2_MK= # defined
+
+BUILDLINK_PACKAGES+= samba
+BUILDLINK_DEPENDS.samba?= samba>=2.2.8anb6
+BUILDLINK_PKGSRCDIR.samba?= ../../net/samba2
+
+EVAL_PREFIX+= BUILDLINK_PREFIX.samba=samba
+BUILDLINK_PREFIX.samba_DEFAULT= ${LOCALBASE}
+
+.include "../../print/cups/buildlink2.mk"
+.include "../../security/PAM/buildlink2.mk"
+.include "../../databases/openldap/buildlink2.mk"
+.include "../../devel/readline/buildlink2.mk"
+.include "../../security/openssl/buildlink2.mk"
+
+BUILDLINK_TARGETS+= samba-buildlink
+
+samba-buildlink: _BUILDLINK_USE
+
+.endif # SAMBA_BUILDLINK2_MK
diff --git a/net/samba2/distinfo b/net/samba2/distinfo
new file mode 100644
index 00000000000..6897ddf4604
--- /dev/null
+++ b/net/samba2/distinfo
@@ -0,0 +1,16 @@
+$NetBSD: distinfo,v 1.1.1.1 2004/01/11 00:41:13 jlam Exp $
+
+SHA1 (samba-2.2.8a.tar.bz2) = f25ff456bf7ac58d32eb0209c15ce0b2fa6d7450
+Size (samba-2.2.8a.tar.bz2) = 4505672 bytes
+SHA1 (patch-aa) = 7f85ab121ffbcb67eb1f1c59f49245dda2eff44d
+SHA1 (patch-ab) = 8be47e3f277f191aff18f77d8ed5ef4d8903ec5f
+SHA1 (patch-ac) = cfde267ffe57046de18691f612e73ecdd1158d86
+SHA1 (patch-ad) = 4b475533e36668e55b5c57a53133f216f9e72ea3
+SHA1 (patch-ag) = e296e076c6bfe20b839f6f6be83873d7cfcc9d89
+SHA1 (patch-ah) = e87f2e393db68acc7028fe20d4772455379ad7aa
+SHA1 (patch-aj) = e2c5f7580a8c701b6bf35d0d3004f714f2c810cb
+SHA1 (patch-al) = 9507677d964044416802e91597c29310c61c9622
+SHA1 (patch-ap) = cc0b3d73d0c7de4cd46e66b0d66b2c3bbaddeb41
+SHA1 (patch-aq) = ea9cd9097cf91dd2b9f1acd9e6ff6f9445505774
+SHA1 (patch-ar) = e5b442fb7eb837bb2771ac71c73e6f95ae6fdfc2
+SHA1 (patch-as) = 019cd56e1a0f3c4517e1701e09d0a7cbd741df93
diff --git a/net/samba2/files/adduser.sh b/net/samba2/files/adduser.sh
new file mode 100644
index 00000000000..edca6e1fa3a
--- /dev/null
+++ b/net/samba2/files/adduser.sh
@@ -0,0 +1,160 @@
+#!/bin/sh
+#
+# $NetBSD: adduser.sh,v 1.1.1.1 2004/01/11 00:41:13 jlam Exp $
+#
+# This is an adduser script for NetBSD systems whose useradd(8) doesn't
+# accept "$" in the username.
+
+awkprog="@AWK@"
+catprog="@CAT@"
+mktempprog="@MKTEMP@"
+pwdmkdbprog="@PWD_MKDB@"
+rmprog="@RM@"
+
+progname=adduser
+
+usage() {
+ echo "Usage: $progname [-c comment] [-d homedir] [-n] [-r low..high]"
+ echo " [-s shell] -g gid name"
+ exit 1
+}
+
+isnum() {
+ case "$1" in
+ 0[0-9]*|*[!0-9]*)
+ return 1
+ ;;
+ esac
+ return 0
+}
+
+doit=""
+gid=""
+minuid=1000
+maxuid=60000
+comment=""
+homedir=""
+shell=/sbin/nologin
+
+while getopts c:d:g:nr:s: flag; do
+ case $flag in
+ c) comment="${OPTARG}" ;;
+ d) homedir="${OPTARG}" ;;
+ g) gid="${OPTARG}" ;;
+ n) doit=":" ;;
+ r) minuid=${OPTARG%%..*}; maxuid=${OPTARG##*..} ;;
+ s) shell="${OPTARG}" ;;
+ esac
+done
+shift `expr $OPTIND - 1`
+
+if [ $# -lt 1 ]; then
+ usage
+fi
+
+name="$1"
+if [ -z "$gid" ]; then
+ echo "$progname: \`-g gid' is a required option" 1>&2
+ exit 1
+fi
+if ! isnum "$gid"; then
+ echo "$progname: \`$gid' is not a valid gid" 1>&2
+ exit 1
+fi
+if ! isnum "$minuid"; then
+ echo "$progname: \`$minuid' is not a valid minimum uid" 1>&2
+ exit 1
+fi
+if ! isnum "$maxuid"; then
+ echo "$progname: \`$maxuid' is not a valid maximum uid" 1>&2
+ exit 1
+fi
+if [ $minuid -gt $maxuid ]; then
+ echo "$progname: \`$minuid..$maxuid' is not a valid range" 1>&2
+ exit 1
+fi
+case "$comment" in
+*:*)
+ echo "$progname: \`$comment' is not a valid comment" 1>&2
+ exit 1
+ ;;
+esac
+case "$homedir" in
+*:*)
+ echo "$progname: \`$homedir' is not a valid home directory" 1>&2
+ exit 1
+ ;;
+%*)
+ # This is an unsubstituted variable (probably %H in smbd).
+ # Silently change this to a proper default.
+ #
+ homedir="/nonexistent"
+ ;;
+esac
+case "$shell" in
+*:*)
+ echo "$progname: \`$shell' is not a valid shell" 1>&2
+ exit 1
+ ;;
+esac
+case "$name" in
+*:*)
+ echo "$progname: \`$name' is not a valid username" 1>&2
+ exit 1
+ ;;
+esac
+
+ptmp=`$mktempprog -q /etc/ptmp`
+case "$ptmp" in
+/etc/ptmp)
+ ;;
+*)
+ echo "$progname: can't create /etc/ptmp" 1>&2
+ exit 1
+ ;;
+esac
+
+if [ ! -f /etc/master.passwd ]; then
+ echo "$progname: /etc/master.passwd not found" 1>&2
+ $rmprog -f $ptmp
+ exit 1
+fi
+
+$catprog /etc/master.passwd >> $ptmp
+
+uid=` \
+ $awkprog -v minuid=$minuid -v maxuid=maxuid ' \
+ BEGIN { FS = ":" } \
+ { seen_uids[$3] = 1 } \
+ END { \
+ uid = minuid; \
+ while (uid <= maxuid) { \
+ if (uid in seen_uids) { \
+ uid++; \
+ continue; \
+ } \
+ print uid; \
+ exit; \
+ } \
+ print -1; \
+ }' $ptmp \
+`
+if [ $uid -lt 0 ]; then
+ echo "$progname: no uid can be allocated in $minuid..$maxuid" 1>&2
+ $rmprog -f $ptmp
+ exit 1
+fi
+
+case "${name}" in
+*$) : ${comment:=${name%%[$]*} samba machine account} ;;
+*) : ${comment:=${name} samba user} ;;
+esac
+entry="${name}:*:${uid}:${gid}::0:0:${comment}:${homedir}:${shell}"
+
+echo "$entry" >> $ptmp
+
+$doit $pwdmkdbprog -p -u "${name}" $ptmp
+rc=$?
+
+$rmprog -f $ptmp
+exit $rc
diff --git a/net/samba2/files/deluser.sh b/net/samba2/files/deluser.sh
new file mode 100644
index 00000000000..1b55c879e0c
--- /dev/null
+++ b/net/samba2/files/deluser.sh
@@ -0,0 +1,68 @@
+#!/bin/sh
+#
+# $NetBSD: deluser.sh,v 1.1.1.1 2004/01/11 00:41:13 jlam Exp $
+#
+# This is a deluser script for NetBSD systems whose userdel(8) doesn't
+# accept "$" in the username.
+
+awkprog="@AWK@"
+mktempprog="@MKTEMP@"
+pwdmkdbprog="@PWD_MKDB@"
+rmprog="@RM@"
+
+progname=deluser
+
+usage() {
+ echo "Usage: $progname [-n] name"
+ exit 1
+}
+
+doit=""
+
+while getopts n flag; do
+ case $flag in
+ n) doit=":" ;;
+ esac
+done
+shift `expr $OPTIND - 1`
+
+if [ $# -lt 1 ]; then
+ usage
+fi
+
+name="$1"
+
+case "$name" in
+*:*)
+ echo "$progname: \`$name' is not a valid user name" 1>&2
+ exit 1
+esac
+
+ptmp=`$mktempprog -q /etc/ptmp`
+case "$ptmp" in
+/etc/ptmp)
+ ;;
+*)
+ echo "$progname: can't create /etc/ptmp" 1>&2
+ exit 1
+ ;;
+esac
+
+if [ ! -f /etc/master.passwd ]; then
+ echo "$progname: /etc/master.passwd not found" 1>&2
+ $rmprog -f $ptmp
+ exit 1
+fi
+
+$awkprog -v name="${name}" ' \
+ BEGIN { FS = ":" } \
+ { \
+ if ($1 != name) \
+ print $0; \
+ }' /etc/master.passwd > $ptmp
+
+$doit $pwdmkdbprog -p $ptmp
+rc=$?
+
+$rmprog -f $ptmp
+exit $rc
diff --git a/net/samba2/files/nmbd.sh b/net/samba2/files/nmbd.sh
new file mode 100644
index 00000000000..0e11c4d8f8a
--- /dev/null
+++ b/net/samba2/files/nmbd.sh
@@ -0,0 +1,30 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: nmbd.sh,v 1.1.1.1 2004/01/11 00:41:13 jlam Exp $
+#
+# PROVIDE: nmbd
+# REQUIRE: DAEMON
+
+if [ -f /etc/rc.subr ]
+then
+ . /etc/rc.subr
+fi
+
+name="nmbd"
+rcvar=$name
+command="@PREFIX@/sbin/${name}"
+required_files="@SAMBA_ETCDIR@/smb.conf"
+extra_commands="reload"
+command_args="-D" # _must_ start as daemon from rc.d;
+ # add more flags through ${${name}_flags}
+
+reload_cmd=":" # avoid dumping debug output on SIGHUP
+
+if [ -f /etc/rc.subr ]
+then
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ @ECHO@ -n " ${name}"
+ ${command} ${nmbd_flags} ${command_args}
+fi
diff --git a/net/samba2/files/samba.sh b/net/samba2/files/samba.sh
new file mode 100644
index 00000000000..c5316a2906c
--- /dev/null
+++ b/net/samba2/files/samba.sh
@@ -0,0 +1,56 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: samba.sh,v 1.1.1.1 2004/01/11 00:41:13 jlam Exp $
+#
+# KEYWORD: nostart
+
+if [ -f /etc/rc.subr ]
+then
+ . /etc/rc.subr
+fi
+
+rcd_dir=`@DIRNAME@ $0`
+
+# NOTE: run_rc_command sets $rc_arg
+#
+forward_commands()
+{
+ # Backward compat with NetBSD <1.6:
+ [ -z "$rc_arg" ] && rc_arg=$_arg
+
+ for file in $COMMAND_LIST; do
+ $rcd_dir/$file $rc_arg
+ done
+}
+
+reverse_commands()
+{
+ # Backward compat with NetBSD <1.6:
+ [ -z "$rc_arg" ] && rc_arg=$_arg
+
+ REVCOMMAND_LIST=
+ for file in $COMMAND_LIST; do
+ REVCOMMAND_LIST="$file $REVCOMMAND_LIST"
+ done
+ for file in $REVCOMMAND_LIST; do
+ $rcd_dir/$file $rc_arg
+ done
+}
+
+COMMAND_LIST="nmbd smbd"
+
+name="samba"
+start_cmd="forward_commands"
+stop_cmd="reverse_commands"
+reload_cmd="forward_commands"
+status_cmd="forward_commands"
+extra_commands="reload status"
+
+if [ -f /etc/rc.subr ]
+then
+ run_rc_command "$1"
+else
+ @ECHO@ -n " ${name}"
+ _arg="$1"
+ ${start_cmd}
+fi
diff --git a/net/samba2/files/smbd.sh b/net/samba2/files/smbd.sh
new file mode 100644
index 00000000000..21c5491a8cb
--- /dev/null
+++ b/net/samba2/files/smbd.sh
@@ -0,0 +1,28 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: smbd.sh,v 1.1.1.1 2004/01/11 00:41:13 jlam Exp $
+#
+# PROVIDE: smbd
+# REQUIRE: DAEMON
+
+if [ -f /etc/rc.subr ]
+then
+ . /etc/rc.subr
+fi
+
+name="smbd"
+rcvar=$name
+command="@PREFIX@/sbin/${name}"
+required_files="@SAMBA_ETCDIR@/smb.conf"
+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
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ @ECHO@ -n " ${name}"
+ ${command} ${smbd_flags} ${command_args}
+fi
diff --git a/net/samba2/patches/patch-ab b/net/samba2/patches/patch-ab
new file mode 100644
index 00000000000..c4caa526b51
--- /dev/null
+++ b/net/samba2/patches/patch-ab
@@ -0,0 +1,62 @@
+$NetBSD: patch-ab,v 1.1.1.1 2004/01/11 00:41:13 jlam Exp $
+
+--- configure.orig Fri Feb 28 15:56:18 2003
++++ configure Sun Mar 16 09:01:58 2003
+@@ -12074,6 +12074,49 @@
+ fi
+
+
++echo $ac_n "checking for __libc_sched_setscheduler in -lc""... $ac_c" 1>&6
++echo "configure:11950: checking for __libc_sched_setscheduler in -lc" >&5
++ac_lib_var=`echo c'_'__libc_sched_setscheduler | sed 'y%./+-%__p_%'`
++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++else
++ ac_save_LIBS="$LIBS"
++LIBS="-lc $LIBS"
++cat > conftest.$ac_ext <<EOF
++#line 11958 "configure"
++#include "confdefs.h"
++/* Override any gcc2 internal prototype to avoid an error. */
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char __libc_sched_setscheduler();
++
++int main() {
++__libc_sched_setscheduler()
++; return 0; }
++EOF
++if { (eval echo configure:11969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_lib_$ac_lib_var=yes"
++else
++ echo "configure: failed program was:" >&5
++ cat conftest.$ac_ext >&5
++ rm -rf conftest*
++ eval "ac_cv_lib_$ac_lib_var=no"
++fi
++rm -f conftest*
++LIBS="$ac_save_LIBS"
++
++fi
++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ PAM_NEEDS_LIBC=
++else
++ echo "$ac_t""no" 1>&6
++PAM_NEEDS_LIBC=-lc
++fi
++
++
++
+ #################################################
+ # check for pam_smbpass support
+ echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
+@@ -14491,6 +14534,7 @@
+ s%@TERMLDFLAGS@%$TERMLDFLAGS%g
+ s%@ROFF@%$ROFF%g
+ s%@DYNEXP@%$DYNEXP%g
++s%@PAM_NEEDS_LIBC@%$PAM_NEEDS_LIBC%g
+ s%@LDAPLIBS@%$LDAPLIBS%g
+ s%@QUOTAOBJS@%$QUOTAOBJS%g
+ s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
diff --git a/net/samba2/patches/patch-ac b/net/samba2/patches/patch-ac
new file mode 100644
index 00000000000..412dca9223e
--- /dev/null
+++ b/net/samba2/patches/patch-ac
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.1.1.1 2004/01/11 00:41:13 jlam Exp $
+
+--- profile/profile.c.orig Wed Oct 9 22:27:22 2002
++++ profile/profile.c Fri Oct 18 13:02:32 2002
+@@ -23,7 +23,7 @@
+ #include "includes.h"
+
+ #ifdef WITH_PROFILE
+-#define IPC_PERMS ((SHM_R | SHM_W) | (SHM_R>>3) | (SHM_R>>6))
++#define IPC_PERMS ((S_IRUSR | S_IWUSR) | S_IRGRP | S_IROTH)
+ static int shm_id;
+ static BOOL read_only;
+
diff --git a/net/samba2/patches/patch-ad b/net/samba2/patches/patch-ad
new file mode 100644
index 00000000000..ae1dd5fd67b
--- /dev/null
+++ b/net/samba2/patches/patch-ad
@@ -0,0 +1,31 @@
+$NetBSD: patch-ad,v 1.1.1.1 2004/01/11 00:41:13 jlam Exp $
+
+--- Makefile.in.orig Fri Feb 28 15:56:06 2003
++++ Makefile.in Sun Mar 16 09:02:19 2003
+@@ -91,6 +91,8 @@
+ FLAGS = $(ISA) $(FLAGS5) $(PASSWD_FLAGS)
+ FLAGS32 = $(ISA32) $(FLAGS5) $(PASSWD_FLAGS)
+
++PAM_NEEDS_LIBC = @PAM_NEEDS_LIBC@
++
+ WINBIND_PROGS = @WINBIND_TARGETS@
+ WINBIND_SPROGS = @WINBIND_STARGETS@
+ WINBIND_PAM_PROGS = @WINBIND_PAM_TARGETS@
+@@ -658,7 +660,7 @@
+
+ bin/pam_smbpass.@SHLIBEXT@: $(PAM_SMBPASS_OBJ) bin/.dummy
+ @echo Linking shared library $@
+- $(SHLD) @LDSHFLAGS@ -o $@ $(PAM_SMBPASS_OBJ) $(LDFLAGS) -lpam $(DYNEXP) $(LIBS) $(LDAPLIBS) -lc \
++ $(SHLD) @LDSHFLAGS@ -o $@ $(PAM_SMBPASS_OBJ) $(LDFLAGS) -lpam $(DYNEXP) $(LIBS) $(LDAPLIBS) $(PAM_NEEDS_LIBC) \
+ @SONAMEFLAG@`basename $@`
+
+ nsswitch/libnss_wins.so: $(NSS_OBJ)
+@@ -682,7 +684,7 @@
+
+ nsswitch/pam_winbind.so: $(PAM_WINBIND_OBJ)
+ @echo Linking $@
+- @$(SHLD) @LDSHFLAGS@ -o $@ $(PAM_WINBIND_OBJ) \
++ @$(SHLD) @LDSHFLAGS@ -o $@ $(PAM_WINBIND_OBJ) $(LDFLAGS) $(DYNEXP) $(PAM_NEEDS_LIBC) \
+ @SONAMEFLAG@`basename $@`
+
+ bin/wbinfo: $(WBINFO_OBJ) $(PARAM_OBJ) $(LIB_OBJ) $(NOPROTO_OBJ) \
diff --git a/net/samba2/patches/patch-ag b/net/samba2/patches/patch-ag
new file mode 100644
index 00000000000..77ece0aa1b5
--- /dev/null
+++ b/net/samba2/patches/patch-ag
@@ -0,0 +1,23 @@
+$NetBSD: patch-ag,v 1.1.1.1 2004/01/11 00:41:13 jlam Exp $
+
+--- script/installbin.sh.orig Fri Jan 12 11:28:02 2001
++++ script/installbin.sh
+@@ -11,7 +11,7 @@
+ shift
+ shift
+
+-for d in $BASEDIR $BINDIR $LIBDIR $VARDIR $BASEDIR/private; do
++for d in $BASEDIR $BINDIR $LIBDIR $VARDIR; do
+ if [ ! -d $d ]; then
+ mkdir $d
+ if [ ! -d $d ]; then
+@@ -30,7 +30,9 @@
+ mv $BINDIR/$p2 $BINDIR/$p2.old
+ fi
+ cp $p $BINDIR/
++ strip $BINDIR/$p2
+ chmod $INSTALLPERMS $BINDIR/$p2
++ rm -f $BINDIR/$p2.old
+
+ # this is a special case, mount needs this in a specific location
+ if [ $p2 = smbmount ]; then
diff --git a/net/samba2/patches/patch-ah b/net/samba2/patches/patch-ah
new file mode 100644
index 00000000000..273ba5a9160
--- /dev/null
+++ b/net/samba2/patches/patch-ah
@@ -0,0 +1,13 @@
+$NetBSD: patch-ah,v 1.1.1.1 2004/01/11 00:41:13 jlam Exp $
+
+--- script/installcp.sh.orig Mon Dec 13 22:27:43 1999
++++ script/installcp.sh
+@@ -12,7 +12,7 @@
+ echo Installing codepage files in $CODEPAGEDIR
+ for d in $LIBDIR $CODEPAGEDIR; do
+ if [ ! -d $d ]; then
+-mkdir $d
++mkdir -p $d
+ if [ ! -d $d ]; then
+ echo Failed to make directory $d
+ exit 1
diff --git a/net/samba2/patches/patch-aj b/net/samba2/patches/patch-aj
new file mode 100644
index 00000000000..a3ef2a74ea4
--- /dev/null
+++ b/net/samba2/patches/patch-aj
@@ -0,0 +1,13 @@
+$NetBSD: patch-aj,v 1.1.1.1 2004/01/11 00:41:13 jlam Exp $
+
+--- script/installswat.sh.orig Mon Apr 16 10:34:11 2001
++++ script/installswat.sh
+@@ -10,7 +10,7 @@
+
+ for d in $SWATDIR $SWATDIR/help $SWATDIR/images $SWATDIR/include; do
+ if [ ! -d $d ]; then
+- mkdir $d
++ mkdir -p $d
+ if [ ! -d $d ]; then
+ echo Failed to make directory $d, does $USER have privileges?
+ exit 1
diff --git a/net/samba2/patches/patch-al b/net/samba2/patches/patch-al
new file mode 100644
index 00000000000..c19dc501c09
--- /dev/null
+++ b/net/samba2/patches/patch-al
@@ -0,0 +1,17 @@
+$NetBSD: patch-al,v 1.1.1.1 2004/01/11 00:41:13 jlam Exp $
+
+--- include/local.h.orig Wed Oct 9 22:27:21 2002
++++ include/local.h Fri Oct 18 13:04:36 2002
+@@ -169,10 +169,10 @@
+ * Default passwd chat script.
+ */
+
+-#define DEFAULT_PASSWD_CHAT "*new*password* %n\\n *new*password* %n\\n *changed*"
++#define DEFAULT_PASSWD_CHAT "*\\n*ew\\spassword* %n\\n *ew\\spassword* %n\\n *updating\\sthe\\sdatabase...\\npasswd:\\sdone\\n"
+
+ /* Minimum length of allowed password when changing UNIX password. */
+-#define MINPASSWDLENGTH 5
++#define MINPASSWDLENGTH 6
+
+ /* maximum ID number used for session control. This cannot be larger
+ than 62*62 for the current code */
diff --git a/net/samba2/patches/patch-ap b/net/samba2/patches/patch-ap
new file mode 100644
index 00000000000..207e1041f88
--- /dev/null
+++ b/net/samba2/patches/patch-ap
@@ -0,0 +1,57 @@
+$NetBSD: patch-ap,v 1.1.1.1 2004/01/11 00:41:13 jlam 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 @@
+ struct sys_pwent *plist;
+ struct sys_pwent *pent;
+ struct passwd *pwd;
++#ifdef BSD
++# define BUFLEN 1024
++ char *bp, *gecos, *p, buf[BUFLEN];
++ int buflen;
++#endif
+
+ pent = (struct sys_pwent *) malloc(sizeof(struct sys_pwent));
+ if (pent == NULL) {
+@@ -178,9 +183,38 @@
+ pent->pw_uid = pwd->pw_uid;
+ pent->pw_gid = pwd->pw_gid;
+ if (pwd->pw_gecos) {
++#ifdef BSD
++ gecos = pwd->pw_gecos;
++ if (*gecos == '*')
++ gecos++;
++ bp = buf;
++
++ /* copy gecos, interpolating & to be full name */
++ for (p = gecos; *p != '\0'; p++) {
++ if (bp >= &buf[BUFLEN - 1])
++ /* buffer overflow */
++ goto gecos_done;
++ if (*p == '&') {
++ /* interpolate full name */
++ snprintf(bp, BUFLEN - (bp - buf),
++ "%s", pwd->pw_name);
++ *bp = toupper(*bp);
++ bp += strlen(bp);
++ }
++ else
++ *bp++ = *p;
++ }
++ *bp = '\0';
++ if ((pent->pw_name = strdup(buf)) == NULL)
++ goto err;
++#else
+ if ((pent->pw_name = strdup(pwd->pw_gecos)) == NULL)
+ goto err;
++#endif
+ }
++#ifdef BSD
++ gecos_done:
++#endif
+ if (pwd->pw_dir) {
+ if ((pent->pw_name = strdup(pwd->pw_dir)) == NULL)
+ goto err;
diff --git a/net/samba2/patches/patch-aq b/net/samba2/patches/patch-aq
new file mode 100644
index 00000000000..80dbc5ed0be
--- /dev/null
+++ b/net/samba2/patches/patch-aq
@@ -0,0 +1,56 @@
+$NetBSD: patch-aq,v 1.1.1.1 2004/01/11 00:41:13 jlam Exp $
+
+Expand & in the gecos field to a capitalized login name.
+
+--- lib/system.c.orig Thu May 2 21:03:10 2002
++++ lib/system.c Sun Oct 13 21:36:59 2002
+@@ -773,6 +773,12 @@
+
+ static void copy_pwent(struct saved_pw *dst, struct passwd *pass)
+ {
++#ifdef BSD
++# define BUFLEN 1024
++ char *bp, *gecos, *p, buf[BUFLEN];
++ int buflen;
++#endif
++
+ memcpy((char *)&dst->pass, pass, sizeof(struct passwd));
+
+ fstrcpy(dst->pw_name, pass->pw_name);
+@@ -781,7 +787,36 @@
+ fstrcpy(dst->pw_passwd, pass->pw_passwd);
+ dst->pass.pw_passwd = dst->pw_passwd;
+
++#ifdef BSD
++ gecos = pass->pw_gecos;
++ if (*gecos == '*')
++ gecos++;
++ bp = buf;
++
++ /* copy gecos, interpolating & to be full name */
++ for (p = gecos; *p != '\0'; p++) {
++ if (bp >= &buf[BUFLEN - 1]) {
++ /* buffer overflow */
++ gecos = pass->pw_name;
++ goto gecos_done;
++ }
++ if (*p == '&') {
++ /* interpolate full name */
++ snprintf(bp, BUFLEN - (bp - buf), "%s", pass->pw_name);
++ *bp = toupper(*bp);
++ bp += strlen(bp);
++ }
++ else
++ *bp++ = *p;
++ }
++ *bp = '\0';
++ gecos = buf;
++
++ gecos_done:
++ fstrcpy(dst->pw_gecos, gecos);
++#else
+ fstrcpy(dst->pw_gecos, pass->pw_gecos);
++#endif
+ dst->pass.pw_gecos = dst->pw_gecos;
+
+ pstrcpy(dst->pw_dir, pass->pw_dir);
diff --git a/net/samba2/patches/patch-ar b/net/samba2/patches/patch-ar
new file mode 100644
index 00000000000..e27947aaf96
--- /dev/null
+++ b/net/samba2/patches/patch-ar
@@ -0,0 +1,16 @@
+$NetBSD: patch-ar,v 1.1.1.1 2004/01/11 00:41:13 jlam Exp $
+
+--- smbd/open.c.orig Fri Feb 28 15:56:20 2003
++++ smbd/open.c Sun Mar 16 09:03:17 2003
+@@ -979,8 +979,11 @@
+ fsp_open = open_file(fsp,conn,fname,psbuf,flags|flags2,mode,desired_access);
+
+ if (!fsp_open && (flags == O_RDWR) && (errno != ENOENT) && fcbopen) {
++ int saved_errno = errno;
+ if((fsp_open = open_file(fsp,conn,fname,psbuf,O_RDONLY,mode,desired_access)) == True)
+ flags = O_RDONLY;
++ else
++ errno = saved_errno;
+ }
+
+ if (!fsp_open) {
diff --git a/net/samba2/patches/patch-as b/net/samba2/patches/patch-as
new file mode 100644
index 00000000000..a809ae1c897
--- /dev/null
+++ b/net/samba2/patches/patch-as
@@ -0,0 +1,16 @@
+$NetBSD: patch-as,v 1.1.1.1 2004/01/11 00:41:13 jlam Exp $
+
+Fix DFS referrals for Windows XP and 2003 clients.
+http://lists.xsec.it/pipermail/samba-it/2003-April/000321.html
+
+--- smbd/trans2.c.orig Sun Apr 6 21:54:00 2003
++++ smbd/trans2.c Fri Sep 5 14:47:28 2003
+@@ -3041,7 +3041,7 @@
+ {
+ char *params = *pparams;
+ enum remote_arch_types ra_type = get_remote_arch();
+- BOOL NT_arch = ((ra_type == RA_WINNT) || (ra_type == RA_WIN2K));
++ BOOL NT_arch = ((ra_type == RA_WINNT) || (ra_type == RA_WIN2K) || (ra_type == RA_WINXP) || (ra_type == RA_WIN2K3));
+ pstring pathname;
+ int reply_size = 0;
+ int max_referral_level;