aboutsummaryrefslogtreecommitdiffstats
path: root/net/samba
diff options
context:
space:
mode:
authordwcjr <dwcjr@FreeBSD.org>2002-05-10 21:42:18 +0800
committerdwcjr <dwcjr@FreeBSD.org>2002-05-10 21:42:18 +0800
commit4d85fe9df6bbd4c203de4ceda7d7d1c0339016ce (patch)
tree7d1d8e4290d7716f68e596c4e85eb2aefbceb421 /net/samba
parent56fa099e32de96a1bace16ec4c582276cff7acc2 (diff)
downloadfreebsd-ports-gnome-4d85fe9df6bbd4c203de4ceda7d7d1c0339016ce.tar.gz
freebsd-ports-gnome-4d85fe9df6bbd4c203de4ceda7d7d1c0339016ce.tar.zst
freebsd-ports-gnome-4d85fe9df6bbd4c203de4ceda7d7d1c0339016ce.zip
Re-enable recycle bin support
Update default smb.conf to deal with new parameters Fix VFS bug in samba Rename patch to avoid confusion PR: 37888 Submitted by: hetzels@westbend.net
Diffstat (limited to 'net/samba')
-rw-r--r--net/samba/Makefile48
-rw-r--r--net/samba/files/README.FreeBSD12
-rw-r--r--net/samba/files/patch-aa4
-rw-r--r--net/samba/files/patch-ae4
-rw-r--r--net/samba/files/patch-aj4
-rw-r--r--net/samba/files/patch-ba42
-rw-r--r--net/samba/files/patch-source-include-includes.h (renamed from net/samba/files/patch-include-includes.h)4
-rw-r--r--net/samba/files/smb.conf.default21
-rw-r--r--net/samba/pkg-plist3
9 files changed, 119 insertions, 23 deletions
diff --git a/net/samba/Makefile b/net/samba/Makefile
index 06e0ce20d0e7..f12bb5a14de7 100644
--- a/net/samba/Makefile
+++ b/net/samba/Makefile
@@ -7,6 +7,7 @@
PORTNAME= samba
PORTVERSION= 2.2.4
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= ftp://ftp.samba.org/pub/samba/%SUBDIR%/ \
ftp://samba.anu.edu.au/pub/samba/%SUBDIR%/ \
@@ -19,12 +20,32 @@ MAINTAINER= dwcjr@FreeBSD.org
USE_BZIP2= YES
+.if defined(WITH_AUDIT) || defined(WITH_RECYCLE)
+USE_GMAKE= YES
+.endif
+
+AUDIT= "@comment "
+RECYCLE= "@comment "
+LIBSAMBA= "@comment "
+
+.if defined(WITH_AUDIT)
+AUDIT= ""
+LIBSAMBA= ""
+.endif
+
+.if defined(WITH_RECYCLE)
+RECYCLE= ""
+LIBSAMBA= ""
+.endif
+
# directories
VARDIR= /var
SAMBA_SPOOL= ${VARDIR}/spool/samba
SAMBA_LOGDIR= ${VARDIR}/log
SAMBA_PRIVATE= ${PREFIX}/private
SAMBA_CONFDIR= ${PREFIX}/etc
+SAMBA_VFSDIR= ${PREFIX}/lib/samba
+
# sample files
STARTUP_SCRIPT= ${PREFIX}/etc/rc.d/samba.sh.sample
SAMPLE_CONFIG= ${SAMBA_CONFDIR}/smb.conf.default
@@ -89,6 +110,7 @@ CONFIGURE_ARGS+= --with-acl-support
.endif
WRKSRC= ${WRKDIR}/${DISTNAME}/source
+PATCH_WRKSRC= ${WRKDIR}/${DISTNAME}
MAN1= findsmb.1 make_smbcodepage.1 rpcclient.1 make_unicodemap.1 \
nmblookup.1 smbcacls.1 smbclient.1 smbcontrol.1 \
@@ -101,9 +123,34 @@ MAN8= nmbd.8 pdbedit.8 smbd.8 smbmnt.8 smbmount.8 \
SED_PLIST= ${SED} -e 's!${PREFIX}!%D!g'
+PLIST_SUB= AUDIT=${AUDIT} \
+ RECYCLE=${RECYCLE} \
+ LIBSAMBA=${LIBSAMBA}
+
+.if defined(WITH_RECYCLE) || defined(WITH_AUDIT)
+post-build:
+ cd ${WRKDIR}/${DISTNAME}/examples/VFS; \
+ ${GMAKE}
+.endif
+
post-install:
+.if defined(WITH_AUDIT) || defined(WITH_RECYCLE)
+ @test -d ${SAMBA_VFSDIR} || ${MKDIR} ${SAMBA_VFSDIR}
+.if defined(WITH_AUDIT)
+ ${INSTALL_PROGRAM) ${WRKDIR}/${DISTNAME}/examples/VFS/audit.so ${SAMBA_VFSDIR}
+.endif
+.if defined(WITH_RECYCLE)
+ ${INSTALL_PROGRAM} ${WRKDIR}/${DISTNAME}/examples/VFS/recycle.so ${SAMBA_VFSDIR}
+.endif
+.endif
${MKDIR} ${PREFIX}/share/examples/samba
${CP} -rp ${WRKDIR}/${DISTNAME}/examples/* ${PREFIX}/share/examples/samba
+.if defined(WITH_AUDIT) || defined(WITH_RECYCLE)
+ @${RM} -rf ${PREFIX}/share/examples/samba/VFS/.libs
+ @for file in Makefile.orig audit.o audit.so recycle.o recycle.so skel.o skel.so ; do \
+ ${RM} ${PREFIX}/share/examples/samba/VFS/$${file} ; \
+ done
+.endif
@if [ ! -f ${STARTUP_SCRIPT} ]; then \
${ECHO} "Installing ${STARTUP_SCRIPT} startup file." ; \
${INSTALL_SCRIPT} ${FILESDIR}/samba.sh.sample \
@@ -114,6 +161,7 @@ post-install:
${SED} -e 's!%%SAMBA_SPOOL%%!${SAMBA_SPOOL}!' \
-e 's!%%SAMBA_LOGDIR%%!${SAMBA_LOGDIR}!' \
-e 's!%%SAMBA_CONFDIR%%!${SAMBA_CONFDIR}!' \
+ -e 's!%%SAMBA_VFSDIR%%!${SAMBA_VFSDIR}!' \
${FILESDIR}/smb.conf.default \
> ${SAMPLE_CONFIG} ; \
fi
diff --git a/net/samba/files/README.FreeBSD b/net/samba/files/README.FreeBSD
index 67cc86c58cb2..c1703e5297a7 100644
--- a/net/samba/files/README.FreeBSD
+++ b/net/samba/files/README.FreeBSD
@@ -10,12 +10,10 @@ See document files in /usr/local/share/doc/samba and example config files in
FreeBSD Samba ports for localization and encrypt passwords support are no
longer provided because these supports have been integrated into the
-original distribution since 1.9.18. If you're Western European or Japanese
-Windows users, please set "client code page" parameter in smb.conf (1.9.18
-does not support Chinese Windows. If you want to use Chinese samba, please
-use chinese/samba port). See smb.conf.sample for details. If you want to
-use NT4+SP3 or Win95+updates clients, set "encrypt passwords" parameter to
-yes and use smbpasswd [username] to use /usr/local/private/smbpasswd for
-authentication.
+original distribution since 1.9.18. If you're Western European, Japanese,
+or Chinese Windows users, please set "client code page" parameter in smb.conf.
+See smb.conf.sample for details. If you want to use NT4+SP3 or Win95+updates
+clients, set "encrypt passwords" parameter to yes and use smbpasswd [username]
+to use /usr/local/private/smbpasswd for authentication.
FreeBSD SAMBA ports maintainer: Tatsumi Hosokawa <hosokawa@jp.FreeBSD.org>
diff --git a/net/samba/files/patch-aa b/net/samba/files/patch-aa
index dfd076d598a6..4ebb6d292903 100644
--- a/net/samba/files/patch-aa
+++ b/net/samba/files/patch-aa
@@ -1,5 +1,5 @@
---- Makefile.in.orig Thu May 2 20:02:26 2002
-+++ Makefile.in Fri May 3 10:04:22 2002
+--- source/Makefile.in.orig Thu May 2 20:02:26 2002
++++ source/Makefile.in Fri May 3 10:04:22 2002
@@ -51,7 +51,7 @@
CONFIGFILE = $(CONFIGDIR)/smb.conf
LMHOSTSFILE = $(CONFIGDIR)/lmhosts
diff --git a/net/samba/files/patch-ae b/net/samba/files/patch-ae
index e735b5794be1..705e8cd6acc9 100644
--- a/net/samba/files/patch-ae
+++ b/net/samba/files/patch-ae
@@ -1,5 +1,5 @@
---- script/convert_smbpasswd.orig Thu Nov 5 02:50:17 1998
-+++ script/convert_smbpasswd Tue Oct 16 17:19:10 2001
+--- source/script/convert_smbpasswd.orig Thu Nov 5 02:50:17 1998
++++ source/script/convert_smbpasswd Tue Oct 16 17:19:10 2001
@@ -7,7 +7,7 @@
# with trying to work out how to get the seconds since 1970
# in awk or the shell. JRA.
diff --git a/net/samba/files/patch-aj b/net/samba/files/patch-aj
index 8804493c38df..88f6c60d7ad0 100644
--- a/net/samba/files/patch-aj
+++ b/net/samba/files/patch-aj
@@ -1,5 +1,5 @@
---- include/local.h.orig Fri Jul 6 03:01:26 2001
-+++ include/local.h Tue Oct 16 17:20:36 2001
+--- source/include/local.h.orig Fri Jul 6 03:01:26 2001
++++ source/include/local.h Tue Oct 16 17:20:36 2001
@@ -176,10 +176,10 @@
* Default passwd chat script.
*/
diff --git a/net/samba/files/patch-ba b/net/samba/files/patch-ba
index 5cdf212300ad..35130d168337 100644
--- a/net/samba/files/patch-ba
+++ b/net/samba/files/patch-ba
@@ -1,6 +1,40 @@
---- configure.in.orig Wed Feb 6 20:56:47 2002
-+++ configure.in Wed Mar 13 12:42:20 2002
-@@ -1792,7 +1792,7 @@
+--- source/configure.in.orig Thu May 2 20:02:46 2002
++++ source/configure.in Thu May 9 02:29:20 2002
+@@ -498,9 +498,23 @@
+ ############################################
+ # we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the new VFS code
+ AC_CHECK_FUNCS(dlopen)
++case "$host_os" in
++ *bsd*)
++ AC_CHECK_LIB(c, dlopen, [LIBS="$LIBS -lc";
++ AC_DEFINE(HAVE_DLOPEN)])
++ ;;
++esac
+ if test x"$ac_cv_func_dlopen" = x"no"; then
+- AC_CHECK_LIB(dl, dlopen, [LIBS="$LIBS -ldl";
+- AC_DEFINE(HAVE_DLOPEN)])
++ case "$host_os" in
++ *bsd*)
++ AC_CHECK_LIB(c, dlopen, [LIBS="$LIBS -lc";
++ AC_DEFINE(HAVE_DLOPEN)])
++ ;;
++ *)
++ AC_CHECK_LIB(dl, dlopen, [LIBS="$LIBS -ldl";
++ AC_DEFINE(HAVE_DLOPEN)])
++ ;;
++ esac
+ fi
+ # dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
+
+@@ -870,6 +884,7 @@
+ ;;
+ *bsd*) BLDSHARED="true"
+ LDSHFLAGS="-shared"
++ DYNEXP="-Wl,--export-dynamic"
+ SONAMEFLAG="-Wl,-soname,"
+ PICFLAG="-fPIC"
+ AC_DEFINE(STAT_ST_BLOCKSIZE,512)
+@@ -1868,7 +1883,7 @@
yes)
AC_MSG_RESULT(yes)
AC_DEFINE(KRB5_AUTH)
@@ -9,7 +43,7 @@
CFLAGS="$CFLAGS -I$withval/include"
LDFLAGS="$LDFLAGS -L$withval/lib"
;;
-@@ -1966,7 +1966,7 @@
+@@ -2042,7 +2057,7 @@
yes)
AC_MSG_RESULT(yes)
AC_DEFINE(WITH_LDAP_SAM)
diff --git a/net/samba/files/patch-include-includes.h b/net/samba/files/patch-source-include-includes.h
index f426392920b2..9596eee19536 100644
--- a/net/samba/files/patch-include-includes.h
+++ b/net/samba/files/patch-source-include-includes.h
@@ -1,5 +1,5 @@
---- include/includes.h.orig Sat Oct 13 17:09:21 2001
-+++ include/includes.h Fri Jan 11 22:12:06 2002
+--- source/include/includes.h.orig Sat Oct 13 17:09:21 2001
++++ source/include/includes.h Fri Jan 11 22:12:06 2002
@@ -27,6 +27,11 @@
#include "local.h"
diff --git a/net/samba/files/smb.conf.default b/net/samba/files/smb.conf.default
index ef0d65a03705..d1730f32c249 100644
--- a/net/samba/files/smb.conf.default
+++ b/net/samba/files/smb.conf.default
@@ -58,9 +58,17 @@
# Security mode. Most people will want user level security. See
# security_level.txt for details.
security = user
+
# Use password server option only with security = server
+# The argument list may include:
+# password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
+# or to auto-locate the domain controller/s
+# password server = *
; password server = <NT-Server-Name>
+# Note: Do NOT use the now deprecated option of "domain controller"
+# This option is no longer implemented.
+
# You may wish to use password encryption. Please read
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
# Do not enable this option unless you have read those documents
@@ -73,6 +81,8 @@
# Most people will find that this option gives better performance.
# See speed.txt and the manual pages for details
+# You may want to add the following on a Linux system:
+# SO_RCVBUF=8192 SO_SNDBUF=8192
socket options = TCP_NODELAY
# Configure Samba to use multiple interfaces
@@ -98,10 +108,6 @@
# and gives it a slightly higher chance of winning the election
; preferred master = yes
-# Use only if you have an NT server on your network that has been
-# configured at install time to be a primary domain controller.
-; domain controller = <NT-Domain-Controller-SMBName>
-
# Enable this if you want Samba to be a domain logon server for
# Windows95 workstations.
; domain logons = yes
@@ -174,6 +180,10 @@
comment = Home Directories
browseable = no
writeable = yes
+# Un-comment the following two lines to add a recycle bin facility to a samba share
+# NOTE: It currently doesn't work with the [homes] virtual share, use a regular share instead
+; vfs object = %%SAMBA_VFSDIR%%/recycle.so
+; vfs options= recycle=.recycle
# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
@@ -265,6 +275,9 @@
; only guest = yes
; writeable = yes
; printable = no
+# Un-comment the following two lines to add a recycle bin facility to a samba share
+; vfs object = %%SAMBA_VFSDIR%%/recycle.so
+; vfs options= recycle=.recycle
# The following two entries demonstrate how to share a directory so that two
# users can place files there that will be owned by the specific users. In this
diff --git a/net/samba/pkg-plist b/net/samba/pkg-plist
index 73920b98c4be..407ffe5a8f0a 100644
--- a/net/samba/pkg-plist
+++ b/net/samba/pkg-plist
@@ -49,6 +49,8 @@ etc/codepages/unicode_map.ISO8859-9
etc/codepages/unicode_map.KOI8-R
etc/rc.d/samba.sh.sample
etc/smb.conf.default
+%%AUDIT%%lib/samba/audit.so
+%%RECYCLE%%lib/samba/recycle.so
sbin/nmbd
sbin/smbd
sbin/swat
@@ -480,3 +482,4 @@ share/swat/using_samba/this_edition.html
%%PORTDOCS%%@dirrm share/doc/samba/faq
%%PORTDOCS%%@dirrm share/doc/samba
@dirrm etc/codepages
+%%LIBSAMBA%%@dirrm lib/samba