summaryrefslogtreecommitdiff
path: root/net/samba36/files
diff options
context:
space:
mode:
Diffstat (limited to 'net/samba36/files')
-rw-r--r--net/samba36/files/README.FreeBSD32
-rw-r--r--net/samba36/files/patch-lib__replace__system__wait.h21
-rw-r--r--net/samba36/files/patch-lib__tevent__tevent_signal.c11
-rw-r--r--net/samba36/files/patch-nsswitch__pam_winbind.c52
-rw-r--r--net/samba36/files/patch-nsswitch__winbind_nss_freebsd.c100
-rw-r--r--net/samba36/files/patch-nsswitch__wins_freebsd.c82
-rw-r--r--net/samba36/files/patch-source3__Makefile.in62
-rw-r--r--net/samba36/files/patch-source3__configure.in210
-rw-r--r--net/samba36/files/patch-source3__include__includes.h24
-rw-r--r--net/samba36/files/patch-source3__lib__fault.c164
-rw-r--r--net/samba36/files/patch-source3__lib__system.c19
-rw-r--r--net/samba36/files/patch-source3__m4__aclocal.m4163
-rw-r--r--net/samba36/files/patch-source3__modules__vfs_shadow_copy2.c127
-rw-r--r--net/samba36/files/patch-source3__smbd__quotas.c19
-rw-r--r--net/samba36/files/patch-source3__smbd__statvfs.c64
-rw-r--r--net/samba36/files/patch-source3__utils__net.c18
-rw-r--r--net/samba36/files/patch-source3__utils__net_time.c19
-rw-r--r--net/samba36/files/pkg-message.in7
-rw-r--r--net/samba36/files/samba.in198
-rw-r--r--net/samba36/files/sernet.patch67
-rw-r--r--net/samba36/files/smb.conf.sample.in306
21 files changed, 0 insertions, 1765 deletions
diff --git a/net/samba36/files/README.FreeBSD b/net/samba36/files/README.FreeBSD
deleted file mode 100644
index 6070b61c81b7..000000000000
--- a/net/samba36/files/README.FreeBSD
+++ /dev/null
@@ -1,32 +0,0 @@
-If you want to run this port:
-
-1. Copy /usr/local/etc/smb.conf.default to /usr/local/etc/smb.conf and edit
- it.
-2. Put string 'samba_enable="YES"' into your /etc/rc.conf.
-3. Run '/usr/local/etc/rc.d/samba start' or reboot.
-
-This port doesn't create 'smbpasswd' file automatically anymore. Users
-are encouraged to use 'tdbsam' backend instead:
-
- [global]
- passdb backend = tdbsam, smbpasswd
-
-You can use pdbedit to migrate accounts from 'smbpasswd' to 'tdbsam',
-see the Samba3-HOWTO-Collection.
-
-You still can create 'smbpasswd' file with the supplied 'make_smbpasswd'
-script:
-
- cat /etc/passwd | grep -v "^#" | make_smbpasswd > smbpasswd
- chmod 600 smbpasswd
-
-But the usage of it is deprecated.
-
-See document files in /usr/local/share/doc/samba and example config files in
-/usr/local/share/examples/samba for details.
-
-This port doesn't come anymore with the IDEALX Samba LDAP management tools.
-They are a separate port now, net/smbldap-tools. Please, install it, if you
-are going to use Samba LDAP back end.
-
-FreeBSD Samba3 port maintainer: Timur I. Bakeyev <timur@FreeBSD.org>
diff --git a/net/samba36/files/patch-lib__replace__system__wait.h b/net/samba36/files/patch-lib__replace__system__wait.h
deleted file mode 100644
index 3cfa995371b3..000000000000
--- a/net/samba36/files/patch-lib__replace__system__wait.h
+++ /dev/null
@@ -1,21 +0,0 @@
---- ./lib/replace/system/wait.h.orig 2010-04-01 15:26:22.000000000 +0200
-+++ ./lib/replace/system/wait.h 2010-04-23 01:08:35.000000000 +0200
-@@ -32,6 +32,18 @@
-
- #include <signal.h>
-
-+#ifndef SIGRTMIN
-+# ifdef NSIG
-+# define SIGRTMIN (NSIG+1)
-+# else
-+# define SIGRTMIN 33
-+# endif
-+#endif
-+
-+#ifndef SIGRTMAX
-+#define SIGRTMAX (SIGRTMIN+64)
-+#endif
-+
- #ifndef SIGCLD
- #define SIGCLD SIGCHLD
- #endif
diff --git a/net/samba36/files/patch-lib__tevent__tevent_signal.c b/net/samba36/files/patch-lib__tevent__tevent_signal.c
deleted file mode 100644
index d62b2e6eec8d..000000000000
--- a/net/samba36/files/patch-lib__tevent__tevent_signal.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./lib/tevent/tevent_signal.c.orig 2010-04-01 15:26:22.000000000 +0200
-+++ ./lib/tevent/tevent_signal.c 2010-04-23 01:08:35.000000000 +0200
-@@ -30,7 +30,7 @@
- #include "tevent_internal.h"
- #include "tevent_util.h"
-
--#define TEVENT_NUM_SIGNALS 64
-+#define TEVENT_NUM_SIGNALS (SIGRTMAX+1)
-
- /* maximum number of SA_SIGINFO signals to hold in the queue.
- NB. This *MUST* be a power of 2, in order for the ring buffer
diff --git a/net/samba36/files/patch-nsswitch__pam_winbind.c b/net/samba36/files/patch-nsswitch__pam_winbind.c
deleted file mode 100644
index 9c32da334bd8..000000000000
--- a/net/samba36/files/patch-nsswitch__pam_winbind.c
+++ /dev/null
@@ -1,52 +0,0 @@
---- ./nsswitch/pam_winbind.c.orig 2011-08-09 13:17:47.000000000 +0200
-+++ ./nsswitch/pam_winbind.c 2011-09-06 23:23:18.000000000 +0200
-@@ -163,7 +163,6 @@
- }
- #endif
-
--
- /*
- * Work around the pam API that has functions with void ** as parameters
- * These lead to strict aliasing warnings with gcc.
-@@ -173,14 +172,20 @@
- const void *_item)
- {
- const void **item = (const void **)_item;
-- return pam_get_item(pamh, item_type, item);
-+ return pam_get_item((pam_handle_t *)pamh, item_type, item);
- }
-+
- static int _pam_get_data(const pam_handle_t *pamh,
- const char *module_data_name,
- const void *_data)
- {
-+#if PAM_GET_DATA_ARG3_CONST_VOID_PP
- const void **data = (const void **)_data;
-- return pam_get_data(pamh, module_data_name, data);
-+ return pam_get_data((pam_handle_t *)pamh, module_data_name, data);
-+#else
-+ void **data = (void **)_data;
-+ return pam_get_data((pam_handle_t *)pamh, module_data_name, data);
-+#endif
- }
-
- /* some syslogging */
-@@ -311,7 +316,7 @@
- if (item_type != 0) {
- pam_get_item(ctx->pamh, item_type, &data);
- } else {
-- pam_get_data(ctx->pamh, key, &data);
-+ _pam_get_data(ctx->pamh, key, &data);
- }
- if (data != NULL) {
- const char *type = (item_type != 0) ? "ITEM" : "DATA";
-@@ -2835,8 +2840,7 @@
- ret = PAM_USER_UNKNOWN;
- goto out;
- case 0:
-- pam_get_data(pamh, PAM_WINBIND_NEW_AUTHTOK_REQD,
-- (const void **)&tmp);
-+ _pam_get_data(pamh, PAM_WINBIND_NEW_AUTHTOK_REQD, &tmp);
- if (tmp != NULL) {
- ret = atoi((const char *)tmp);
- switch (ret) {
diff --git a/net/samba36/files/patch-nsswitch__winbind_nss_freebsd.c b/net/samba36/files/patch-nsswitch__winbind_nss_freebsd.c
deleted file mode 100644
index 103059a96790..000000000000
--- a/net/samba36/files/patch-nsswitch__winbind_nss_freebsd.c
+++ /dev/null
@@ -1,100 +0,0 @@
---- ./nsswitch/winbind_nss_freebsd.c.orig 2012-10-02 08:24:41.000000000 +0000
-+++ ./nsswitch/winbind_nss_freebsd.c 2013-03-13 09:40:37.285778609 +0000
-@@ -5,6 +5,7 @@
- routines against Samba winbind/Windows NT Domain
-
- Copyright (C) Aaron Collins 2003
-+ Copyright (C) Timur I. Bakeyev 2013
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
-@@ -53,6 +54,9 @@
- NSS_METHOD_PROTOTYPE(__nss_compat_getpwent_r);
- NSS_METHOD_PROTOTYPE(__nss_compat_setpwent);
- NSS_METHOD_PROTOTYPE(__nss_compat_endpwent);
-+NSS_METHOD_PROTOTYPE(__nss_compat_endpwent);
-+
-+NSS_METHOD_PROTOTYPE(__freebsd_getgroupmembership);
-
- static ns_mtab methods[] = {
- { NSDB_GROUP, "getgrnam_r", __nss_compat_getgrnam_r, _nss_winbind_getgrnam_r },
-@@ -60,6 +64,7 @@
- { NSDB_GROUP, "getgrent_r", __nss_compat_getgrent_r, _nss_winbind_getgrent_r },
- { NSDB_GROUP, "setgrent", __nss_compat_setgrent, _nss_winbind_setgrent },
- { NSDB_GROUP, "endgrent", __nss_compat_endgrent, _nss_winbind_endgrent },
-+{ NSDB_GROUP, "getgroupmembership", __freebsd_getgroupmembership, NULL },
-
- { NSDB_PASSWD, "getpwnam_r", __nss_compat_getpwnam_r, _nss_winbind_getpwnam_r },
- { NSDB_PASSWD, "getpwuid_r", __nss_compat_getpwuid_r, _nss_winbind_getpwuid_r },
-@@ -69,6 +74,71 @@
-
- };
-
-+/* Taken from libc */
-+static int
-+gr_addgid(gid_t gid, gid_t *groups, int maxgrp, int *grpcnt)
-+{
-+ int ret, dupc;
-+
-+ /* skip duplicates */
-+ for (dupc = 0; dupc < MIN(maxgrp, *grpcnt); dupc++) {
-+ if (groups[dupc] == gid)
-+ return 1;
-+ }
-+
-+ ret = 1;
-+ if (*grpcnt < maxgrp) /* add this gid */
-+ groups[*grpcnt] = gid;
-+ else
-+ ret = 0;
-+
-+ (*grpcnt)++;
-+
-+ return ret;
-+}
-+
-+/*
-+ rv = _nsdispatch(NULL, dtab, NSDB_GROUP, "getgroupmembership",
-+ defaultsrc, uname, agroup, groups, maxgrp, grpcnt);
-+*/
-+
-+int
-+__freebsd_getgroupmembership(void *retval, void *mdata, va_list ap)
-+{
-+ const char *uname = va_arg(ap, const char *);
-+ gid_t group = va_arg(ap, gid_t);
-+ gid_t *groups = va_arg(ap, gid_t *);
-+ int maxgrp = va_arg(ap, int);
-+ int *groupc = va_arg(ap, int *);
-+
-+ NSS_STATUS ret;
-+ long int lcount, lsize;
-+ int i, errnop;
-+ gid_t *tmpgroups;
-+
-+ /* Can be realloc() inside _nss_winbind_initgroups_dyn() */
-+ if ((tmpgroups=calloc(maxgrp, sizeof(gid_t))) == NULL) {
-+ errno = ENOMEM;
-+ return NS_TRYAGAIN;
-+ }
-+
-+ lcount = 0;
-+ lsize = maxgrp;
-+ /* insert primary membership(possibly already there) */
-+ gr_addgid(group, groups, maxgrp, groupc);
-+ /* Don't limit number of groups, we want to know total size */
-+ ret = _nss_winbind_initgroups_dyn(uname, group, &lcount, &lsize,
-+ &tmpgroups, 0, &errnop);
-+ if (ret == NSS_STATUS_SUCCESS) {
-+ /* lcount potentially can be bigger than maxgrp, so would groupc */
-+ for (i = 0; i < lcount; i++)
-+ gr_addgid(tmpgroups[i], groups, maxgrp, groupc);
-+ }
-+ free(tmpgroups);
-+ /* Let following nsswitch backend(s) add more groups(?) */
-+ return NSS_STATUS_NOTFOUND;
-+}
-+
- ns_mtab *
- nss_module_register(const char *source, unsigned int *mtabsize,
- nss_module_unregister_fn *unreg)
diff --git a/net/samba36/files/patch-nsswitch__wins_freebsd.c b/net/samba36/files/patch-nsswitch__wins_freebsd.c
deleted file mode 100644
index e0f837760482..000000000000
--- a/net/samba36/files/patch-nsswitch__wins_freebsd.c
+++ /dev/null
@@ -1,82 +0,0 @@
---- ./nsswitch/wins_freebsd.c.orig 2010-04-23 01:08:35.000000000 +0200
-+++ ./nsswitch/wins_freebsd.c 2010-04-23 01:08:35.000000000 +0200
-@@ -0,0 +1,79 @@
-+/*
-+ Unix SMB/CIFS implementation.
-+
-+ Copyright (C) Timur I. Bakeyev 2007
-+
-+ This library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Library General Public
-+ License as published by the Free Software Foundation; either
-+ version 2 of the License, or (at your option) any later version.
-+
-+ This library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Library General Public License for more details.
-+
-+ You should have received a copy of the GNU Library General Public
-+ License along with this library; if not, write to the
-+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-+ Boston, MA 02111-1307, USA.
-+*/
-+
-+#include "winbind_client.h"
-+
-+NSS_STATUS _nss_wins_gethostbyname2_r(const char *name, int af, struct hostent *he,
-+ char *buffer, size_t buflen, int *h_errnop);
-+
-+NSS_METHOD_PROTOTYPE(__nss_wins_freebsd_gethostbyname2_r);
-+
-+static ns_mtab methods[] =
-+{
-+ { NSDB_HOSTS, "getaddrinfo", NULL, NULL },
-+ { NSDB_HOSTS, "ghbyname", NULL, NULL },
-+ { NSDB_HOSTS, "ghbyaddr", NULL, NULL },
-+ { NSDB_HOSTS, "gethostbyaddr_r", NULL, NULL },
-+ { NSDB_HOSTS, "gethostbyname2_r", __nss_wins_freebsd_gethostbyname2_r, _nss_wins_gethostbyname2_r },
-+ { NSDB_HOSTS, "getnetbyname_r", NULL, NULL },
-+ { NSDB_HOSTS, "getnetbyaddr_r", NULL, NULL },
-+ { NSDB_HOSTS, "gethostbyname", NULL, NULL },
-+ { NSDB_HOSTS, "gethostbyaddr", NULL, NULL },
-+ { NSDB_HOSTS, "getnetbyname", NULL, NULL },
-+ { NSDB_HOSTS, "getnetbyaddr", NULL, NULL }
-+};
-+
-+int
-+__nss_wins_freebsd_gethostbyname2_r(void *retval, void *mdata, va_list ap)
-+{
-+ int (*fn)(const char *, int, struct hostent *, char *, size_t, int *);
-+ const char *hostname;
-+ int af;
-+ struct hostent *he;
-+ char *buffer;
-+ size_t buflen;
-+ int *h_errnop;
-+ enum nss_status status;
-+
-+ fn = mdata;
-+ hostname = va_arg(ap, const char *);
-+ af = va_arg(ap, int);
-+ he = va_arg(ap, struct hostent *);
-+ buffer = va_arg(ap, char *);
-+ buflen = va_arg(ap, size_t);
-+ h_errnop = va_arg(ap, int *);
-+
-+ status = fn(hostname, af, he, buffer, buflen, h_errnop);
-+ status = __nss_compat_result(status, *h_errnop);
-+ if (status == NS_SUCCESS)
-+ *(struct hostent **)retval = he;
-+
-+ return (status);
-+}
-+
-+ns_mtab *
-+nss_module_register(const char *source __unused, unsigned int *mtabsize,
-+ nss_module_unregister_fn *unreg)
-+{
-+ *mtabsize = sizeof(methods) / sizeof(methods[0]);
-+ *unreg = NULL;
-+ return (methods);
-+}
diff --git a/net/samba36/files/patch-source3__Makefile.in b/net/samba36/files/patch-source3__Makefile.in
deleted file mode 100644
index 084dd93c0b10..000000000000
--- a/net/samba36/files/patch-source3__Makefile.in
+++ /dev/null
@@ -1,62 +0,0 @@
---- ./source3/Makefile.in.orig 2013-06-19 07:35:24.000000000 +0000
-+++ ./source3/Makefile.in 2013-06-30 04:26:08.399888796 +0000
-@@ -151,7 +151,7 @@
- # These can be overridden by command line switches (see smbd(8))
- # or in smb.conf (see smb.conf(5))
- LOGFILEBASE = @logfilebase@
--CONFIGFILE = $(CONFIGDIR)/smb.conf
-+CONFIGFILE = $(CONFIGDIR)/%%SAMBA_CONFIG%%
- LMHOSTSFILE = $(CONFIGDIR)/lmhosts
- NCALRPCDIR = @ncalrpcdir@
-
-@@ -1305,8 +1305,8 @@
- $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) \
- $(LIBNDR_GEN_OBJ0)
-
--WINBIND_WINS_NSS_OBJ = ../nsswitch/wins.o $(PARAM_OBJ) \
-- $(LIB_NONSMBD_OBJ) $(LIBSMB_ERR_OBJ) $(LIBNMB_OBJ)
-+WINBIND_WINS_NSS_OBJ = ../nsswitch/wins.o @WINBIND_WINS_NSS_EXTRA_OBJS@ \
-+ $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(LIBSMB_ERR_OBJ) $(LIBNMB_OBJ)
-
- PAM_SMBPASS_OBJ_0 = pam_smbpass/pam_smb_auth.o pam_smbpass/pam_smb_passwd.o \
- pam_smbpass/pam_smb_acct.o pam_smbpass/support.o ../lib/util/asn1.o
-@@ -1623,6 +1623,7 @@
-
- .SUFFIXES:
- .SUFFIXES: .c .o .lo
-+.SUFFIXES: .h .h.gch
-
- .PHONY: showflags SHOWFLAGS
-
-@@ -1684,6 +1685,9 @@
- $(COMPILE_CC) >/dev/null 2>&1
- @BROKEN_CC@ -mv `echo $@ | sed 's%^.*/%%g'` $@
-
-+.h.h.gch:
-+ @echo Compiling $*.h
-+
- PRECOMPILED_HEADER = $(builddir)/include/includes.h.gch
-
- # this adds support for precompiled headers. To use it, install a snapshot
-@@ -2856,9 +2860,9 @@
- $(LDAP_LIBS) $(KRB5LIBS) $(LIBS) $(LIBTALLOC_LIBS) $(LIBTEVENT_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS) \
- @SONAMEFLAG@`basename $@`@NSSSONAMEVERSIONSUFFIX@
-
--bin/winbind_krb5_locator.@SHLIBEXT@: $(BINARY_PREREQS) $(WINBIND_KRB5_LOCATOR_OBJ) $(LIBWBCLIENT)
-+bin/winbind_krb5_locator.@SHLIBEXT@: $(BINARY_PREREQS) $(WINBIND_KRB5_LOCATOR_OBJ) $(LIBTALLOC) $(LIBWBCLIENT)
- @echo "Linking $@"
-- @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_KRB5_LOCATOR_OBJ) $(LIBWBCLIENT_LIBS) $(KRB5LIBS) \
-+ @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_KRB5_LOCATOR_OBJ) $(LIBTALLOC_LIBS) $(LIBWBCLIENT_LIBS) $(KRB5LIBS) \
- $(LIBREPLACE_LIBS) @SONAMEFLAG@`basename $@`
-
- bin/pam_winbind.@SHLIBEXT@: $(BINARY_PREREQS) $(PAM_WINBIND_OBJ) $(LIBTALLOC) $(LIBTEVENT) $(LIBWBCLIENT)
-@@ -3215,7 +3219,8 @@
- @echo "Linking shared library $@"
- @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_SMBPASS_OBJ) $(LIBCLI_LDAP_NDR_OBJ) -lpam $(DYNEXP) \
- $(LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
-- $(LIBTALLOC_LIBS) $(LIBTEVENT_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS)
-+ $(LIBTALLOC_LIBS) $(LIBTEVENT_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) \
-+ @SONAMEFLAG@`basename $@`
-
- bin/tdbbackup@EXEEXT@: $(BINARY_PREREQS) $(TDBBACKUP_OBJ) $(LIBTALLOC) $(LIBTDB)
- @echo Linking $@
diff --git a/net/samba36/files/patch-source3__configure.in b/net/samba36/files/patch-source3__configure.in
deleted file mode 100644
index 30a50f9ade93..000000000000
--- a/net/samba36/files/patch-source3__configure.in
+++ /dev/null
@@ -1,210 +0,0 @@
---- ./source3/configure.in.orig 2013-01-18 10:41:08.000000000 +0000
-+++ ./source3/configure.in 2013-01-30 01:24:19.349878982 +0000
-@@ -864,9 +864,13 @@
- AC_PATH_PROG(CUPS_CONFIG, cups-config)
-
- if test "x$CUPS_CONFIG" != x; then
-+ ac_save_PRINT_CPPFLAGS=$CPPFLAGS
-+ ac_save_PRINT_LDFLAGS=$LDFLAGS
-
-- ac_save_LDFLAGS=$LDFLAGS
- ac_save_PRINT_LIBS=$PRINT_LIBS
-+ CPPFLAGS="$CPPFLAGS `$CUPS_CONFIG --cflags`"
-+ LDFLAGS="$LDFLAGS `$CUPS_CONFIG --ldflags`"
-+
- AC_CHECK_HEADERS(cups/cups.h cups/language.h)
-
- if test x"$ac_cv_header_cups_cups_h" = xyes -a \
-@@ -875,7 +879,7 @@
- # underlinked. With cups-config --libs we pull in unwanted and unneeded
- # dendencies including thread libraries - use cups-config only if really
- # required.
-- AC_CHECK_LIB_EXT(cups, ac_save_PRINT_LIBS , httpConnect,
-+ AC_CHECK_LIB_EXT(cups, ac_save_PRINT_LIBS, httpConnect,
- [PRINT_LIBS="$ac_save_PRINT_LIBS -lcups"],
- [AC_MSG_WARN([your cups library doesn't link with -lcups alone, it might be underlinked.]) ;
- PRINT_LIBS="$ac_save_PRINT_LIBS `$CUPS_CONFIG --libs`"])
-@@ -885,10 +889,10 @@
- AC_CHECK_LIB_EXT(cups, PRINT_LIBS, httpConnectEncrypt)
- else
- AC_MSG_WARN([cups-config around but cups-devel not installed])
-- CFLAGS=$ac_save_CFLAGS
-- LDFLAGS=$ac_save_LDFLAGS
- PRINT_LIBS=$ac_save_PRINT_LIBS
- fi
-+ CPPFLAGS=$ac_save_PRINT_CPPFLAGS
-+ LDFLAGS=$ac_save_PRINT_LDFLAGS
-
- elif test x"$enable_cups" = x"yes"; then
- AC_MSG_ERROR(Cups support required but cups-config not located. Make sure cups-devel related files are installed.)
-@@ -1845,7 +1849,7 @@
- fi
-
- if test x"$BLDSHARED" = x"true" ; then
-- LDFLAGS="$LDFLAGS -L./bin"
-+ LDFLAGS="-L./bin $LDFLAGS"
- fi
-
- AC_MSG_RESULT($BLDSHARED)
-@@ -1976,9 +1980,6 @@
- AC_MSG_CHECKING([PICFLAG])
- AC_MSG_RESULT([$PICFLAG])
-
--AC_MSG_CHECKING([NSSSONAMEVERSIONSUFFIX])
--AC_MSG_RESULT([$NSSSONAMEVERSIONSUFFIX])
--
- AC_CACHE_CHECK([whether building shared libraries actually works],
- [ac_cv_shlib_works],[
- # try building a trivial shared library
-@@ -4656,15 +4657,51 @@
- x"$ac_cv_header_pam_pam_modules_h" = x"no" ; then
- if test x"${try_pam}" = x"yes";then
- AC_MSG_ERROR([--with-pam=yes but pam_modules.h not found])
-- fi
-+ fi
- create_pam_modules=no
-- fi
-+ fi
-
- if test x"$use_pam" = x"yes"; then
-- AC_DEFINE(WITH_PAM,1,[Whether to include PAM support])
-+ AC_DEFINE(WITH_PAM,1,[Whether to include PAM support])
- AC_DEFINE(HAVE_LIBPAM,1,[Whether libpam is available])
- AUTH_LIBS="$AUTH_LIBS $PAM_LIBS"
-- with_pam_for_crypt=yes
-+ with_pam_for_crypt=yes
-+
-+ AC_VERIFY_C_PROTOTYPE(
-+ [int pam_get_data(const pam_handle_t *pamh, const char *module_data_name, const void **data)],
-+ [return 0;],
-+ [AC_DEFINE(PAM_GET_DATA_ARG3_CONST_VOID_PP, 1, [Whether pam_get_data 3 argument is a const pointer to pointer])],
-+ [
-+ dnl Old OpenPAM declaration
-+ AC_VERIFY_C_PROTOTYPE(
-+ [int pam_get_data(pam_handle_t *pamh, const char *module_data_name, void **data)],
-+ [return 0;],
-+ [AC_DEFINE(PAM_GET_DATA_ARG3_VOID_PP, 1, [Whether pam_get_data 3 argument is a void pointer to pointer])],
-+ [], [
-+ #include <sys/types.h>
-+ #if HAVE_SECURITY_PAM_APPL_H
-+ #include <security/pam_appl.h>
-+ #endif
-+ #if HAVE_PAM_PAM_APPL_H
-+ #include <pam/pam_appl.h>
-+ #endif
-+ #if HAVE_SECURITY_PAM_MODULES_H
-+ #include <security/pam_modules.h>
-+ #endif
-+ ]
-+ )],[
-+ #include <sys/types.h>
-+ #if HAVE_SECURITY_PAM_APPL_H
-+ #include <security/pam_appl.h>
-+ #endif
-+ #if HAVE_PAM_PAM_APPL_H
-+ #include <pam/pam_appl.h>
-+ #endif
-+ #if HAVE_SECURITY_PAM_MODULES_H
-+ #include <security/pam_modules.h>
-+ #endif
-+ ]
-+ )
-
- if test x"$create_pam_modules" = x"yes"; then
- AC_DEFINE(WITH_PAM_MODULES,1,[Whether to include PAM MODULES support])
-@@ -4674,7 +4711,7 @@
- AC_CHECK_HEADERS(pam/pam_ext.h pam/_pam_macros.h)
- AC_CHECK_FUNC_EXT(pam_vsyslog,$PAM_LIBS)
- else
-- AC_MSG_WARN([PAM support detected but PAM MODULES support is missing])
-+ AC_MSG_WARN([PAM support detected but PAM MODULES support is missing])
- fi
- fi
- AC_MSG_CHECKING(whether to use PAM support)
-@@ -5877,7 +5914,7 @@
-
- AC_MSG_CHECKING(for aio_suspend)
- AC_LINK_IFELSE([#include <aio.h>
--int main() { struct aiocb a; struct timespec t; return aio_suspend(&a, 1, &t); }],
-+int main() { struct aiocb *a[[1]]; struct timespec t; return aio_suspend((const struct aiocb**)&a, 1, &t); }],
- [AC_DEFINE(HAVE_AIO_SUSPEND, 1, [Have aio_suspend]) AC_MSG_RESULT(yes)],
- [AC_MSG_RESULT(no)])
- fi
-@@ -6336,12 +6373,13 @@
- NSSSONAMEVERSIONSUFFIX=".2"
- WINBIND_NSS_EXTRA_OBJS="../nsswitch/winbind_nss_linux.o"
- ;;
-- *freebsd[[5-9]]*)
-+ *freebsd*)
- # FreeBSD winbind client is implemented as a wrapper around
- # the Linux version.
- NSSSONAMEVERSIONSUFFIX=".1"
- WINBIND_NSS_EXTRA_OBJS="../nsswitch/winbind_nss_freebsd.o \
- ../nsswitch/winbind_nss_linux.o"
-+ WINBIND_WINS_NSS_EXTRA_OBJS="../nsswitch/wins_freebsd.o"
- WINBIND_NSS="../nsswitch/nss_winbind.$SHLIBEXT"
- WINBIND_WINS_NSS="../nsswitch/nss_wins.$SHLIBEXT"
- ;;
-@@ -6488,10 +6526,14 @@
- AC_MSG_RESULT(no$winbind_no_reason)
- fi
-
-+AC_MSG_CHECKING([NSSSONAMEVERSIONSUFFIX])
-+AC_MSG_RESULT([$NSSSONAMEVERSIONSUFFIX])
-+
- AC_SUBST(WINBIND_NSS)
- AC_SUBST(WINBIND_WINS_NSS)
- AC_SUBST(WINBIND_NSS_LDSHFLAGS)
- AC_SUBST(WINBIND_NSS_EXTRA_OBJS)
-+AC_SUBST(WINBIND_WINS_NSS_EXTRA_OBJS)
- AC_SUBST(NSSSONAMEVERSIONSUFFIX)
-
- AC_SUBST(WINBIND_KRB5_LOCATOR)
-@@ -6810,13 +6852,21 @@
- # Start
- AC_CHECK_FUNC(getmntent)
-
--AC_CHECK_HEADERS(sys/statfs.h)
-+AC_CHECK_HEADERS(sys/statfs.h sys/mount.h)
-
- AC_MSG_CHECKING([vfs_fileid: checking for statfs() and struct statfs.f_fsid)])
- AC_CACHE_VAL(vfsfileid_cv_statfs,[
- AC_TRY_RUN([
- #include <sys/types.h>
-+ #ifdef HAVE_SYS_PARAM_H
-+ #include <sys/param.h>
-+ #endif
-+ #ifdef HAVE_SYS_MOUNT_H
-+ #include <sys/mount.h>
-+ #endif
-+ #ifdef HAVE_SYS_STATFS_H
- #include <sys/statfs.h>
-+ #endif
- int main(void)
- {
- struct statfs fsd;
-@@ -7116,6 +7166,16 @@
- LIBS="$LIBS -ldmalloc"
- fi
-
-+AC_ARG_ENABLE(dmalloc, [AS_HELP_STRING([--enable-dmalloc], [Enable heap debugging [default=no]])])
-+
-+if test "x$enable_dmalloc" = xyes
-+then
-+ AC_DEFINE(ENABLE_DMALLOC, 1, [Define to turn on dmalloc debugging])
-+ AC_DEFINE(DMALLOC_FUNC_CHECK, 1,
-+ [Define to check invariants around some common functions])
-+ LIBS="$LIBS -ldmalloc"
-+fi
-+
- dnl Remove -L/usr/lib/? from LDFLAGS and LIBS
- LIB_REMOVE_USR_LIB(LDFLAGS)
- LIB_REMOVE_USR_LIB(LIBS)
-@@ -7164,6 +7224,7 @@
- AC_SUBST(SMBD_LIBS)
-
- CFLAGS="${CFLAGS} \$(FLAGS)"
-+CFLAGS="${CFLAGS} -I%%LOCALBASE%%/include"
- CFLAGS="${CFLAGS} -D_SAMBA_BUILD_=3"
-
- # If we had to expand the includes, make tsure the output file is moved back
diff --git a/net/samba36/files/patch-source3__include__includes.h b/net/samba36/files/patch-source3__include__includes.h
deleted file mode 100644
index 2f6978cafb50..000000000000
--- a/net/samba36/files/patch-source3__include__includes.h
+++ /dev/null
@@ -1,24 +0,0 @@
---- ./source3/include/includes.h.orig 2011-08-09 13:17:47.000000000 +0200
-+++ ./source3/include/includes.h 2011-10-04 00:34:33.000000000 +0200
-@@ -161,6 +161,10 @@
- #include <sys/uio.h>
- #endif
-
-+#ifdef HAVE_SYS_SYSCTL_H
-+#include <sys/sysctl.h>
-+#endif
-+
- #if HAVE_LANGINFO_H
- #include <langinfo.h>
- #endif
-@@ -548,10 +552,6 @@
- #define SIGCLD SIGCHLD
- #endif
-
--#ifndef SIGRTMIN
--#define SIGRTMIN NSIG
--#endif
--
- #if defined(HAVE_PUTPRPWNAM) && defined(AUTH_CLEARTEXT_SEG_CHARS)
- #define OSF1_ENH_SEC 1
- #endif
diff --git a/net/samba36/files/patch-source3__lib__fault.c b/net/samba36/files/patch-source3__lib__fault.c
deleted file mode 100644
index c6525d30442f..000000000000
--- a/net/samba36/files/patch-source3__lib__fault.c
+++ /dev/null
@@ -1,164 +0,0 @@
---- ./source3/lib/fault.c.orig 2010-04-01 15:26:22.000000000 +0200
-+++ ./source3/lib/fault.c 2010-04-23 01:08:35.000000000 +0200
-@@ -26,6 +26,10 @@
- #endif
-
-
-+#ifdef HAVE_SYS_SYSCTL_H
-+#include <sys/sysctl.h>
-+#endif
-+
- #ifdef HAVE_SYS_PRCTL_H
- #include <sys/prctl.h>
- #endif
-@@ -144,52 +148,93 @@
- * before dump_core() calls abort.
- */
- #if (defined(FREEBSD) && defined(HAVE_SYSCTLBYNAME))
--static char *get_freebsd_corepath(void)
-+/*
-+ * Expand the name described in corefilename, using name, uid, and pid.
-+ * corefilename is a printf-like string, with three format specifiers:
-+ * %N name of process ("name")
-+ * %P process id (pid)
-+ * %U user id (uid)
-+ * For example, "%N.core" is the default; they can be disabled completely
-+ * by using "/dev/null", or all core files can be stored in "/cores/%U/%N-%P".
-+ */
-+static char *get_freebsd_corepath(const char *name)
- {
-- char *tmp_corepath = NULL;
-- char *end = NULL;
-- size_t len = 128;
-+ TALLOC_CTX *tmp_ctx;
-+ char format[MAXPATHLEN];
-+ char *freebsd_corepath = NULL, *buffer = NULL;
-+ char *start, *end;
-+ size_t len;
- int ret;
-
-- /* Loop with increasing sizes so we don't allocate too much. */
-- do {
-- if (len > 1024) {
-- goto err_out;
-- }
--
-- tmp_corepath = (char *)talloc_realloc(NULL, tmp_corepath,
-- char, len);
-- if (!tmp_corepath) {
-- return NULL;
-- }
--
-- ret = sysctlbyname("kern.corefile", tmp_corepath, &len, NULL,
-- 0);
-- if (ret == -1) {
-- if (errno != ENOMEM) {
-- DEBUG(0, ("sysctlbyname failed getting "
-- "kern.corefile %s\n",
-- strerror(errno)));
-- goto err_out;
-- }
--
-- /* Not a large enough array, try a bigger one. */
-- len = len << 1;
-- }
-- } while (ret == -1);
--
-+ len = sizeof(format);
-+ /* Read format string */
-+ if((ret = sysctlbyname("kern.corefile", format, &len, NULL, 0)) == -1) {
-+ return NULL;
-+ }
- /* Strip off the common filename expansion */
-- if ((end = strrchr_m(tmp_corepath, '/'))) {
-+ if ((end=strrchr_m(format, '/')) != NULL) {
- *end = '\0';
- }
-+ /* Core file is relative to the cwd */
-+ if(!format[0] || format[0] != '/') {
-+ return NULL;
-+ }
-
-- return tmp_corepath;
--
-- err_out:
-- if (tmp_corepath) {
-- talloc_free(tmp_corepath);
-+ if((tmp_ctx = talloc_new(NULL)) == NULL) {
-+ DEBUG(0, ("talloc_new failed\n"));
-+ return NULL;
- }
-- return NULL;
-+ if((buffer = talloc_strdup(tmp_ctx, "")) == NULL) {
-+ DEBUG(0, ("talloc_strdup: Out of memory!\n"));
-+ goto failed;
-+ }
-+ /* Parse format string and expand variables */
-+ start = format;
-+ while((end=strchr_m(start, '%')) != NULL) {
-+ /* Copy part of the string without format arguments */
-+ if(end != start) {
-+ buffer = talloc_strndup_append_buffer(buffer, start, end - start);
-+ if(buffer == NULL) {
-+ DEBUG(0, ("talloc_strdup: Out of memory!\n"));
-+ goto failed;
-+ }
-+ }
-+ start = end + 1;
-+ switch (*start) {
-+ case '%':
-+ buffer = talloc_strdup_append_buffer(buffer, "%%");
-+ break;
-+ case 'N': /* process name */
-+ buffer = talloc_asprintf_append_buffer(buffer, "%s", name);
-+ break;
-+ case 'P': /* process id */
-+ buffer = talloc_asprintf_append_buffer(buffer, "%u", getpid());
-+ break;
-+ case 'U': /* user id */
-+ buffer = talloc_asprintf_append_buffer(buffer, "%u", getuid());
-+ break;
-+ default:
-+ DEBUG(0,(
-+ "Unknown format character %c in "
-+ "corename `%s'\n", *start, format));
-+ }
-+ if(buffer == NULL) {
-+ DEBUG(0, ("talloc_asprintf_append_buffer: Out of memory!\n"));
-+ goto failed;
-+ }
-+ start++;
-+ }
-+ /* Copy remaining part, if any */
-+ if((buffer = talloc_strdup_append_buffer(buffer, start)) == NULL) {
-+ DEBUG(0, ("talloc_strdup_append_buffer: Out of memory!\n"));
-+ goto failed;
-+ }
-+ /* Duplicate assembled string in the unattached contenxt */
-+ freebsd_corepath = talloc_strdup(NULL, buffer);
-+failed:
-+ TALLOC_FREE(tmp_ctx);
-+
-+ return freebsd_corepath;
- }
- #endif
-
-@@ -248,8 +293,7 @@
- {
- #if (defined(FREEBSD) && defined(HAVE_SYSCTLBYNAME))
- char *tmp_corepath = NULL;
-- tmp_corepath = get_freebsd_corepath();
--
-+ tmp_corepath = get_freebsd_corepath(progname);
- /* If this has been set correctly, we're done. */
- if (tmp_corepath) {
- return tmp_corepath;
-@@ -327,7 +371,7 @@
- SAFE_FREE(logbase);
- }
-
-- void dump_core(void)
-+void dump_core(void)
- {
- static bool called;
-
diff --git a/net/samba36/files/patch-source3__lib__system.c b/net/samba36/files/patch-source3__lib__system.c
deleted file mode 100644
index c2f1b0635e80..000000000000
--- a/net/samba36/files/patch-source3__lib__system.c
+++ /dev/null
@@ -1,19 +0,0 @@
---- ./source3/lib/system.c.orig 2011-08-09 13:17:47.000000000 +0200
-+++ ./source3/lib/system.c 2011-10-13 23:38:02.000000000 +0200
-@@ -2586,14 +2586,14 @@
- }
-
- /*******************************************************************
-- An aio_fsync wrapper that will deal with 64-bit sizes.
-+ An aio_suspend wrapper that will deal with 64-bit sizes.
- ********************************************************************/
-
- int sys_aio_suspend(const SMB_STRUCT_AIOCB * const cblist[], int n, const struct timespec *timeout)
- {
- #if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_AIOCB64) && defined(HAVE_AIO_SUSPEND64)
- return aio_suspend64(cblist, n, timeout);
--#elif defined(HAVE_AIO_FSYNC)
-+#elif defined(HAVE_AIO_SUSPEND)
- return aio_suspend(cblist, n, timeout);
- #else
- errno = ENOSYS;
diff --git a/net/samba36/files/patch-source3__m4__aclocal.m4 b/net/samba36/files/patch-source3__m4__aclocal.m4
deleted file mode 100644
index 357dcf2e8366..000000000000
--- a/net/samba36/files/patch-source3__m4__aclocal.m4
+++ /dev/null
@@ -1,163 +0,0 @@
---- ./source3/m4/aclocal.m4.orig 2012-09-14 08:12:09.000000000 +0000
-+++ ./source3/m4/aclocal.m4 2012-10-20 13:13:36.975802862 +0000
-@@ -385,7 +385,7 @@
- ac_new_flags=""
- for i in [$]$1; do
- case [$]i in
-- -I/usr/include|-I/usr/include/) ;;
-+ -I/usr/include|-I/usr/include/|-I%%LOCALBASE%%/include/|-I%%LOCALBASE%%/include) f=1;;
- *) ac_new_flags="[$]ac_new_flags [$]i" ;;
- esac
- done
-@@ -437,104 +437,81 @@
- dnl those with the standalone portable libiconv installed).
- AC_MSG_CHECKING(for iconv in $1)
- jm_cv_func_iconv="no"
-+ jm_cv_include=""
- jm_cv_lib_iconv=""
-- jm_cv_giconv=no
-+ jm_cv_giconv="no"
- jm_save_LIBS="$LIBS"
-
-- dnl Check for include in giconv.h but no lib needed
-- if test "$jm_cv_func_iconv" != yes; then
-- AC_TRY_LINK([#include <stdlib.h>
-+ dnl Check for include in funny place but no lib needed
-+ if test "$jm_cv_func_iconv" != yes; then
-+ AC_TRY_LINK([#include <stdlib.h>
- #include <giconv.h>],
- [iconv_t cd = iconv_open("","");
- iconv(cd,NULL,NULL,NULL,NULL);
- iconv_close(cd);],
-- jm_cv_func_iconv=yes
-- jm_cv_include="giconv.h"
-- jm_cv_giconv="yes"
-- jm_cv_lib_iconv="")
-+ jm_cv_func_iconv=yes
-+ jm_cv_include="giconv.h"
-+ jm_cv_lib_iconv=""
-+ jm_cv_giconv="yes")
-
-- dnl Standard iconv.h include, lib in glibc or libc ...
-- if test "$jm_cv_func_iconv" != yes; then
-- AC_TRY_LINK([#include <stdlib.h>
-+ dnl Standard iconv.h include, lib in glibc or libc ...
-+ if test "$jm_cv_func_iconv" != yes; then
-+ AC_TRY_LINK([#include <stdlib.h>
- #include <iconv.h>],
-- [iconv_t cd = iconv_open("","");
-+ [iconv_t cd = iconv_open("","");
- iconv(cd,NULL,NULL,NULL,NULL);
- iconv_close(cd);],
-- jm_cv_include="iconv.h"
-- jm_cv_func_iconv=yes
-- jm_cv_lib_iconv="")
--
-- dnl Include in giconv.h, libgiconv needed to link
-- if test "$jm_cv_func_iconv" != yes; then
-- jm_save_LIBS="$LIBS"
-- LIBS="$LIBS -lgiconv"
-- AC_TRY_LINK([#include <stdlib.h>
-+ jm_cv_func_iconv=yes
-+ jm_cv_include="iconv.h"
-+ jm_cv_lib_iconv="")
-+
-+ dnl Include in giconv.h, libgiconv needed to link
-+ if test "$jm_cv_func_iconv" != yes; then
-+ jm_save_LIBS="$LIBS"
-+ LIBS="$LIBS -lgiconv"
-+ AC_TRY_LINK([#include <stdlib.h>
- #include <giconv.h>],
-- [iconv_t cd = iconv_open("","");
-+ [iconv_t cd = iconv_open("","");
- iconv(cd,NULL,NULL,NULL,NULL);
- iconv_close(cd);],
-- jm_cv_lib_iconv=yes
- jm_cv_func_iconv=yes
- jm_cv_include="giconv.h"
-- jm_cv_giconv=yes
-- jm_cv_lib_iconv="giconv")
-+ jm_cv_lib_iconv="giconv"
-+ jm_cv_giconv=yes)
-
-- LIBS="$jm_save_LIBS"
-+ LIBS="$jm_save_LIBS"
-
-- dnl Include in iconv.h, libiconv needed to link
-- if test "$jm_cv_func_iconv" != yes; then
-- jm_save_LIBS="$LIBS"
-- LIBS="$LIBS -liconv"
-- AC_TRY_LINK([#include <stdlib.h>
-+ dnl Include in iconv.h, libiconv needed to link
-+ if test "$jm_cv_func_iconv" != yes; then
-+ jm_save_LIBS="$LIBS"
-+ LIBS="$LIBS -liconv"
-+ AC_TRY_LINK([#include <stdlib.h>
- #include <iconv.h>],
-- [iconv_t cd = iconv_open("","");
-- iconv(cd,NULL,NULL,NULL,NULL);
-- iconv_close(cd);],
-- jm_cv_include="iconv.h"
-- jm_cv_func_iconv=yes
-- jm_cv_lib_iconv="iconv")
-- LIBS="$jm_save_LIBS"
--
-- dnl Include in biconv.h, libbiconv needed to link
-- if test "$jm_cv_func_iconv" != yes; then
-- jm_save_LIBS="$LIBS"
-- LIBS="$LIBS -lbiconv"
-- AC_TRY_LINK([#include <stdlib.h>
--#include <biconv.h>],
-- [iconv_t cd = iconv_open("","");
-- iconv(cd,NULL,NULL,NULL,NULL);
-- iconv_close(cd);],
-- jm_cv_lib_iconv=yes
-- jm_cv_func_iconv=yes
-- jm_cv_include="biconv.h"
-- jm_cv_biconv=yes
-- jm_cv_lib_iconv="biconv")
-+ [iconv_t cd = iconv_open("","");
-+ iconv(cd,NULL,NULL,NULL,NULL);
-+ iconv_close(cd);],
-+ jm_cv_func_iconv=yes
-+ jm_cv_include="iconv.h"
-+ jm_cv_lib_iconv="iconv")
-
-- LIBS="$jm_save_LIBS"
-- fi
-- fi
-+ LIBS="$jm_save_LIBS"
-+ fi
-+ fi
- fi
- fi
-- fi
-- if test "$jm_cv_func_iconv" = yes; then
-- if test "$jm_cv_giconv" = yes; then
-- AC_DEFINE(HAVE_GICONV, 1, [What header to include for iconv() function: giconv.h])
-- AC_MSG_RESULT(yes)
-- ICONV_FOUND=yes
-- else
-- if test "$jm_cv_biconv" = yes; then
-- AC_DEFINE(HAVE_BICONV, 1, [What header to include for iconv() function: biconv.h])
-- AC_MSG_RESULT(yes)
-- ICONV_FOUND=yes
-+ if test "$jm_cv_func_iconv" = yes; then
-+ if test "$jm_cv_giconv" = yes; then
-+ AC_DEFINE(HAVE_GICONV, 1, [What header to include for iconv() function: giconv.h])
-+ AC_MSG_RESULT(yes)
-+ ICONV_FOUND=yes
- else
- AC_DEFINE(HAVE_ICONV, 1, [What header to include for iconv() function: iconv.h])
- AC_MSG_RESULT(yes)
- ICONV_FOUND=yes
- fi
-+ else
-+ AC_MSG_RESULT(no)
- fi
-- else
-- AC_MSG_RESULT(no)
-- fi
- ])
-
- AC_DEFUN(rjs_CHARSET,[
diff --git a/net/samba36/files/patch-source3__modules__vfs_shadow_copy2.c b/net/samba36/files/patch-source3__modules__vfs_shadow_copy2.c
deleted file mode 100644
index d4eeedb6345e..000000000000
--- a/net/samba36/files/patch-source3__modules__vfs_shadow_copy2.c
+++ /dev/null
@@ -1,127 +0,0 @@
---- ./source3/modules/vfs_shadow_copy2.c.orig 2012-10-19 03:37:47.475803452 +0000
-+++ ./source3/modules/vfs_shadow_copy2.c 2012-10-19 03:39:42.665808023 +0000
-@@ -237,7 +237,7 @@
- if (shadow_copy2_match_name(fname, &gmt_start)) { \
- char *name2; \
- rtype ret; \
-- name2 = convert_shadow2_name(handle, fname, gmt_start); \
-+ name2 = convert_shadow2_name(handle, fname, gmt_start, True); \
- if (name2 == NULL) { \
- errno = EINVAL; \
- return eret; \
-@@ -258,7 +258,7 @@
- char *name2; \
- char *smb_base_name_tmp = NULL; \
- rtype ret; \
-- name2 = convert_shadow2_name(handle, smb_fname->base_name, gmt_start); \
-+ name2 = convert_shadow2_name(handle, smb_fname->base_name, gmt_start, True); \
- if (name2 == NULL) { \
- errno = EINVAL; \
- return eret; \
-@@ -285,7 +285,7 @@
- if (shadow_copy2_match_name(fname, &gmt_start)) { \
- char *name2; \
- NTSTATUS ret; \
-- name2 = convert_shadow2_name(handle, fname, gmt_start); \
-+ name2 = convert_shadow2_name(handle, fname, gmt_start, True); \
- if (name2 == NULL) { \
- errno = EINVAL; \
- return eret; \
-@@ -409,7 +409,8 @@
- convert a filename from a share relative path, to a path in the
- snapshot directory
- */
--static char *convert_shadow2_name(vfs_handle_struct *handle, const char *fname, const char *gmt_path)
-+static char *convert_shadow2_name(vfs_handle_struct *handle, const char *fname,
-+ const char *gmt_path, const bool incl_rel)
- {
- TALLOC_CTX *tmp_ctx = talloc_new(handle->data);
- const char *snapdir, *relpath, *baseoffset, *basedir;
-@@ -486,11 +487,13 @@
- if (*relpath == '/') relpath++;
- if (*baseoffset == '/') baseoffset++;
-
-- ret = talloc_asprintf(handle->data, "%s/%s/%s/%s",
-+ ret = talloc_asprintf(handle->data, "%s/%s%s%s%s%s",
- snapdir,
- snapshot,
-+ *baseoffset ? "/" : "",
- baseoffset,
-- relpath);
-+ *relpath ? "/" : "",
-+ incl_rel ? relpath : "");
- DEBUG(6,("convert_shadow2_name: '%s' -> '%s'\n", fname, ret));
- talloc_free(tmp_ctx);
- return ret;
-@@ -687,68 +690,17 @@
- static const char *shadow_copy2_connectpath(struct vfs_handle_struct *handle,
- const char *fname)
- {
-- TALLOC_CTX *tmp_ctx;
-- const char *snapdir, *baseoffset, *basedir, *gmt_start;
-- size_t baselen;
-+ const char *gmt_start;
- char *ret;
-
- DEBUG(10, ("shadow_copy2_connectpath called with %s\n", fname));
-
- if (!shadow_copy2_match_name(fname, &gmt_start)) {
-- return handle->conn->connectpath;
-- }
--
-- /*
-- * We have to create a real temporary context because we have
-- * to put our result on talloc_tos(). Thus we can't use a
-- * talloc_stackframe() here.
-- */
-- tmp_ctx = talloc_new(talloc_tos());
--
-- fname = shadow_copy2_normalise_path(tmp_ctx, fname, gmt_start);
-- if (fname == NULL) {
-- TALLOC_FREE(tmp_ctx);
-- return NULL;
-- }
--
-- snapdir = shadow_copy2_find_snapdir(tmp_ctx, handle);
-- if (snapdir == NULL) {
-- DEBUG(2,("no snapdir found for share at %s\n",
-- handle->conn->connectpath));
-- TALLOC_FREE(tmp_ctx);
-- return NULL;
-+ return SMB_VFS_NEXT_CONNECTPATH(handle, fname);
- }
-
-- basedir = shadow_copy2_find_basedir(tmp_ctx, handle);
-- if (basedir == NULL) {
-- DEBUG(2,("no basedir found for share at %s\n",
-- handle->conn->connectpath));
-- TALLOC_FREE(tmp_ctx);
-- return NULL;
-- }
--
-- baselen = strlen(basedir);
-- baseoffset = handle->conn->connectpath + baselen;
--
-- /* some sanity checks */
-- if (strncmp(basedir, handle->conn->connectpath, baselen) != 0 ||
-- (handle->conn->connectpath[baselen] != 0
-- && handle->conn->connectpath[baselen] != '/')) {
-- DEBUG(0,("shadow_copy2_connectpath: basedir %s is not a "
-- "parent of %s\n", basedir,
-- handle->conn->connectpath));
-- TALLOC_FREE(tmp_ctx);
-- return NULL;
-- }
--
-- if (*baseoffset == '/') baseoffset++;
--
-- ret = talloc_asprintf(talloc_tos(), "%s/%.*s/%s",
-- snapdir,
-- GMT_NAME_LEN, fname,
-- baseoffset);
-+ ret = convert_shadow2_name(handle, fname, gmt_start, False);
- DEBUG(6,("shadow_copy2_connectpath: '%s' -> '%s'\n", fname, ret));
-- TALLOC_FREE(tmp_ctx);
- return ret;
- }
-
diff --git a/net/samba36/files/patch-source3__smbd__quotas.c b/net/samba36/files/patch-source3__smbd__quotas.c
deleted file mode 100644
index be4d6b9a9fe9..000000000000
--- a/net/samba36/files/patch-source3__smbd__quotas.c
+++ /dev/null
@@ -1,19 +0,0 @@
---- ./source3/smbd/quotas.c.orig 2010-04-01 15:26:22.000000000 +0200
-+++ ./source3/smbd/quotas.c 2010-04-23 01:08:35.000000000 +0200
-@@ -1235,6 +1235,7 @@
- if (!cutstr)
- return False;
-
-+ memset(&D, '\0', sizeof(D));
- memset(cutstr, '\0', len+1);
- host = strncat(cutstr,mnttype, sizeof(char) * len );
- DEBUG(5,("nfs_quotas: looking for mount on \"%s\"\n", cutstr));
-@@ -1243,7 +1244,7 @@
- args.gqa_pathp = testpath+1;
- args.gqa_uid = uid;
-
-- DEBUG(5,("nfs_quotas: Asking for host \"%s\" rpcprog \"%i\" rpcvers \"%i\" network \"%s\"\n", host, RQUOTAPROG, RQUOTAVERS, "udp"));
-+ DEBUG(5,("nfs_quotas: Asking for host \"%s\" rpcprog \"%lu\" rpcvers \"%lu\" network \"%s\"\n", host, RQUOTAPROG, RQUOTAVERS, "udp"));
-
- if ((clnt = clnt_create(host, RQUOTAPROG, RQUOTAVERS, "udp")) == NULL) {
- ret = False;
diff --git a/net/samba36/files/patch-source3__smbd__statvfs.c b/net/samba36/files/patch-source3__smbd__statvfs.c
deleted file mode 100644
index aa24d18ddc32..000000000000
--- a/net/samba36/files/patch-source3__smbd__statvfs.c
+++ /dev/null
@@ -1,64 +0,0 @@
---- ./source3/smbd/statvfs.c.orig 2010-04-01 15:26:22.000000000 +0200
-+++ ./source3/smbd/statvfs.c 2010-04-23 01:08:35.000000000 +0200
-@@ -3,6 +3,7 @@
- VFS API's statvfs abstraction
- Copyright (C) Alexander Bokovoy 2005
- Copyright (C) Steve French 2005
-+ Copyright (C) Timur I. Bakeyev 2005
- Copyright (C) James Peach 2006
-
- This program is free software; you can redistribute it and/or modify
-@@ -49,9 +50,42 @@
- }
- return result;
- }
--#endif
-+#elif defined(FREEBSD)
-+static int bsd_statvfs(const char *path, vfs_statvfs_struct *statbuf)
-+{
-+ struct statfs statfs_buf;
-+ int result;
-+
-+ result = statfs(path, &statfs_buf);
-+ if(result != 0) {
-+ return result;
-+ }
-+
-+ statbuf->OptimalTransferSize = statfs_buf.f_iosize;
-+ statbuf->BlockSize = statfs_buf.f_bsize;
-+ statbuf->TotalBlocks = statfs_buf.f_blocks;
-+ statbuf->BlocksAvail = statfs_buf.f_bfree;
-+ statbuf->UserBlocksAvail = statfs_buf.f_bavail;
-+ statbuf->TotalFileNodes = statfs_buf.f_files;
-+ statbuf->FreeFileNodes = statfs_buf.f_ffree;
-+ statbuf->FsIdentifier =
-+ (((uint64_t)statfs_buf.f_fsid.val[0]<<32) & 0xffffffff00000000LL) | (uint64_t)statfs_buf.f_fsid.val[1];
-+ /* Try to extrapolate some of the fs flags into the
-+ * capabilities
-+ */
-+ statbuf->FsCapabilities =
-+ FILE_CASE_SENSITIVE_SEARCH | FILE_CASE_PRESERVED_NAMES;
-+ if(statfs_buf.f_flags & MNT_ACLS)
-+ statbuf->FsCapabilities |= FILE_PERSISTENT_ACLS;
-+ if(statfs_buf.f_flags & MNT_QUOTA)
-+ statbuf->FsCapabilities |= FILE_VOLUME_QUOTAS;
-+ if(statfs_buf.f_flags & MNT_RDONLY)
-+ statbuf->FsCapabilities |= FILE_READ_ONLY_VOLUME;
-
--#if defined(DARWINOS)
-+ return 0;
-+}
-+
-+#elif defined(DARWINOS)
-
- #include <sys/attr.h>
-
-@@ -137,6 +171,8 @@
- {
- #if defined(LINUX) && defined(HAVE_FSID_INT)
- return linux_statvfs(path, statbuf);
-+#elif defined(FREEBSD)
-+ return bsd_statvfs(path, statbuf);
- #elif defined(DARWINOS)
- return darwin_statvfs(path, statbuf);
- #else
diff --git a/net/samba36/files/patch-source3__utils__net.c b/net/samba36/files/patch-source3__utils__net.c
deleted file mode 100644
index aa4853a7624e..000000000000
--- a/net/samba36/files/patch-source3__utils__net.c
+++ /dev/null
@@ -1,18 +0,0 @@
---- ./source3/utils/net.c.orig 2013-01-29 08:49:31.000000000 +0000
-+++ ./source3/utils/net.c 2013-01-31 15:04:24.069877314 +0000
-@@ -898,8 +898,13 @@
- set_global_myname(c->opt_requester_name);
- }
-
-- if (!c->opt_user_name && getenv("LOGNAME")) {
-- c->opt_user_name = getenv("LOGNAME");
-+ if (!c->opt_user_name) {
-+ if(getenv("LOGNAME"))
-+ c->opt_user_name = getenv("LOGNAME");
-+ else
-+ d_fprintf(stderr,
-+ _("Environment LOGNAME is not defined."
-+ " Trying anonymous access.\n"));
- }
-
- if (!c->opt_workgroup) {
diff --git a/net/samba36/files/patch-source3__utils__net_time.c b/net/samba36/files/patch-source3__utils__net_time.c
deleted file mode 100644
index 6c6ce7614652..000000000000
--- a/net/samba36/files/patch-source3__utils__net_time.c
+++ /dev/null
@@ -1,19 +0,0 @@
---- ./source3/utils/net_time.c.orig 2010-04-01 15:26:22.000000000 +0200
-+++ ./source3/utils/net_time.c 2010-04-23 01:08:35.000000000 +0200
-@@ -87,10 +87,15 @@
- if (!tm) {
- return "unknown";
- }
--
-+#if defined(FREEBSD)
-+ return talloc_asprintf(talloc_tos(), "%02d%02d%02d%02d%02d.%02d",
-+ tm->tm_year + 1900, tm->tm_mon+1, tm->tm_mday,
-+ tm->tm_hour, tm->tm_min, tm->tm_sec);
-+#else
- return talloc_asprintf(talloc_tos(), "%02d%02d%02d%02d%04d.%02d",
- tm->tm_mon+1, tm->tm_mday, tm->tm_hour,
- tm->tm_min, tm->tm_year + 1900, tm->tm_sec);
-+#endif
- }
-
- int net_time_usage(struct net_context *c, int argc, const char **argv)
diff --git a/net/samba36/files/pkg-message.in b/net/samba36/files/pkg-message.in
deleted file mode 100644
index 98866a899ff7..000000000000
--- a/net/samba36/files/pkg-message.in
+++ /dev/null
@@ -1,7 +0,0 @@
-===============================================================================
-Samba3 *package* now doesn't include ADS support due the portability problems
-with Kerberos5 libraries on different installations. You need to compile the
-port yourself to get this functionality.
-
-For additional hints and directions, please, look into the README.FreeBSD file.
-===============================================================================
diff --git a/net/samba36/files/samba.in b/net/samba36/files/samba.in
deleted file mode 100644
index 98c2ca75a3d7..000000000000
--- a/net/samba36/files/samba.in
+++ /dev/null
@@ -1,198 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-
-# PROVIDE: nmbd smbd
-%%WINBIND%%# PROVIDE: winbindd
-# REQUIRE: NETWORKING SERVERS DAEMON ldconfig resolv
-%%CUPS%%# REQUIRE: cupsd
-# BEFORE: LOGIN
-# KEYWORD: shutdown
-#
-# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
-# to enable this service:
-#
-#samba_enable="YES"
-# You can disable/enable any of the Samba daemons by specifying:
-#nmbd_enable="NO"
-#smbd_enable="NO"
-%%WINBIND%%# You need to enable winbindd separately, by adding:
-%%WINBIND%%#winbindd_enable="YES"
-#
-# Configuration file can be set with:
-#samba_config="%%SAMBA_CONFDIR%%/%%SAMBA_CONFIG%%"
-#
-
-. /etc/rc.subr
-
-name="samba"
-rcvar=samba_enable
-# Custom commands
-extra_commands="reload status"
-start_precmd="samba_start_precmd"
-start_cmd="samba_cmd"
-stop_cmd="samba_cmd"
-status_cmd="samba_cmd"
-restart_precmd="samba_checkconfig"
-reload_precmd="samba_checkconfig"
-reload_cmd="samba_reload_cmd"
-rcvar_cmd="samba_rcvar_cmd"
-# Defaults
-samba_config_default="%%SAMBA_CONFDIR%%/%%SAMBA_CONFIG%%"
-testparm_command="%%PREFIX%%/bin/testparm"
-smbcontrol_command="%%PREFIX%%/bin/smbcontrol"
-samba_parm="${testparm_command} -s -v --parameter-name"
-pid_extra=
-#
-samba_daemons="nmbd smbd"
-%%WINBIND%%samba_daemons="${samba_daemons} winbindd"
-
-samba_checkconfig() {
- echo -n "Performing sanity check on Samba configuration: "
- if ${testparm_command} -s ${samba_config:+"${samba_config}"} >/dev/null 2>&1; then #"
- echo "OK"
- else
- echo "FAILED"
- return 1
- fi
- return 0
-}
-
-samba_start_precmd() {
- # Make sure rundir exists
- if [ ! -d "%%SAMBA_RUNDIR%%" -a ! -e "%%SAMBA_RUNDIR%%" ]; then
- install -m 0755 -d "%%SAMBA_RUNDIR%%"
- fi
- # XXX: Never delete winbindd_idmap, winbindd_cache and group_mapping
- if [ -n "${samba_lockdir}" -a -d "${samba_lockdir}" ]; then
- echo -n "Removing stale Samba tdb files: "
- for file in brlock.tdb browse.dat connections.tdb gencache.tdb \
- locking.tdb messages.tdb namelist.debug sessionid.tdb \
- unexpected.tdb
- do
- rm "${samba_lockdir}/${file}" </dev/null 2>/dev/null && echo -n '.'
- done
- echo " done"
- fi
-}
-
-samba_rcvar_cmd() {
- local name rcvar
- rcvar=${name}_enable
- # Prevent recursive calling
- unset "${rc_arg}_cmd" "${rc_arg}_precmd" "${rc_arg}_postcmd"
- # Check master variable
- run_rc_command "${_rc_prefix}${rc_arg}" ${rc_extra_args}
- # Check dependent variables
- for name in ${samba_daemons}; do
- # XXX
- rcvars=''; v=''
- rcvar=${name}_enable
- run_rc_command "${_rc_prefix}${rc_arg}" ${rc_extra_args}
- done
-}
-
-samba_reload_cmd() {
- local name rcvar command pidfile force_run
- # Prevent recursive calling
- unset "${rc_arg}_cmd" "${rc_arg}_precmd" "${rc_arg}_postcmd"
- # Ignore rcvar and run command
- if [ -n "${_rc_prefix}" -a "${_rc_prefix}" = "one" ] || [ -n "${rc_force}" ] || [ -n "${rc_fast}" ]; then
- force_run=yes
- fi
- # Apply to all daemons
- for name in ${samba_daemons}; do
- rcvar=${name}_enable
- command="%%PREFIX%%/sbin/${name}"
- pidfile="%%SAMBA_RUNDIR%%/${name}${pid_extra}.pid"
- # Daemon should be enabled and running
- if ( [ -n "${rcvar}" ] && checkyesno "${rcvar}" ) || [ -n "$force_run" ]; then
- if [ -n "$(check_pidfile "${pidfile}" "${command}")" ]; then
- debug "reloading ${name} configuration"
- echo "Reloading ${name}."
- # XXX: Hack with pid_extra
- ${smbcontrol_command} "${name}${pid_extra}" 'reload-config' ${command_args} >/dev/null 2>&1
- fi
- fi
- done
-}
-
-samba_cmd() {
- local name rcvar rcvars v command pidfile samba_daemons result force_run
- # Prevent recursive calling
- unset "${rc_arg}_cmd" "${rc_arg}_precmd" "${rc_arg}_postcmd"
- # Stop processes in the reverse order
- if [ "${rc_arg}" = "stop" ] ; then
- samba_daemons=$(reverse_list ${samba_daemons})
- fi
- # Ignore rcvar and run command
- if [ -n "${_rc_prefix}" -a "${_rc_prefix}" = "one" ] || [ -n "${rc_force}" ] || [ -n "${rc_fast}" ]; then
- force_run=yes
- fi
- # Assume success
- result=0
- # Apply to all daemons
- for name in ${samba_daemons}; do
- # XXX
- rcvars=''; v=''
- rcvar=${name}_enable
- command="%%PREFIX%%/sbin/${name}"
- pidfile="%%SAMBA_RUNDIR%%/${name}${pid_extra}.pid"
- # Daemon should be enabled and running
- if ( [ -n "${rcvar}" ] && checkyesno "${rcvar}" ) || [ -n "$force_run" ]; then
- run_rc_command "${_rc_prefix}${rc_arg}" ${rc_extra_args}
- # If any of the commands failed, take it as a global result
- result=$((${result} || $?))
- fi
- done
- return ${result}
-}
-
-samba_config_init() {
- local name
- # Load configuration
- load_rc_config "${name}"
- for name in ${samba_daemons}; do
- load_rc_config "${name}"
- done
- # Location of the config
- samba_config=${samba_config="${samba_config_default}"} #"
- # XXX: Hack to work around name change of pid file with non-default config
- if [ -n "${samba_config}" -a "${samba_config}" != "${samba_config_default}" ]; then
- pid_extra="-$(basename "${samba_config}")"
- fi
- # Defaults
- samba_enable=${samba_enable:=NO}
- # Setup dependent variables
- if [ -n "${rcvar}" ] && checkyesno "${rcvar}"; then
- nmbd_enable=${nmbd_enable=YES}
- smbd_enable=${smbd_enable=YES}
- fi
- nmbd_enable=${nmbd_enable:=NO}
- smbd_enable=${smbd_enable:=NO}
-%%WINBIND%% # Winbindd
-%%WINBIND%% if [ -z "${winbind_enable}" ]; then
-%%WINBIND%% samba_idmap=$(${samba_parm} 'idmap uid' "${samba_config}" 2>/dev/null)
-%%WINBIND%% # Check that winbindd is actually configured
-%%WINBIND%% if [ -n "${samba_idmap}" ]; then
-%%WINBIND%% winbindd_enable="YES"
-%%WINBIND%% fi
-%%WINBIND%% winbindd_enable=${winbindd_enable:=NO}
-%%WINBIND%% fi
-}
-
-# Load configuration variables
-samba_config_init
-# Where is the lockdir
-samba_lockdir=$(${samba_parm} 'lock directory' "${samba_config}" 2>/dev/null)
-# Common flags
-command_args=${samba_config:+-s "${samba_config}"} #"
-nmbd_flags=${nmbd_flags="-D"}
-smbd_flags=${smbd_flags="-D"}
-%%WINBIND%%winbindd_flags=${winbindd_flags=''}
-# Requirements
-required_files="${samba_config}"
-required_dirs="${samba_lockdir}"
-
-run_rc_command "$1"
diff --git a/net/samba36/files/sernet.patch b/net/samba36/files/sernet.patch
deleted file mode 100644
index 566315409a5a..000000000000
--- a/net/samba36/files/sernet.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-samba3-3.4-honor-all-loopback-ips.patch
-samba3.6-veto-speedup.patch
-
-commit b6afe7ef236a454d8a6abf104b8846f817378f73
-Author: Björn Jacke <bj@sernet.de>
-Date: Thu Oct 15 02:02:30 2009 +0200
-
- util: cope the all loopback addresses IPv4 knows
-
- The fact that we just recogniced 127.0.0.1 as loopback IP address and not the
- rest of the 127.0.0.0/8 IP address range we used the lo interface for sending
- packages even though we should send them to some more physical interface. This
- way we ended up with failing WINS registration and so on like in #6348.
- On the lo interface sendto() returned "Invalid Argument" (EINVAL).
-
-diff --git a/lib/util/util_net.c b/lib/util/util_net.c
-index 0ce495e..0511a28 100644
---- a/lib/util/util_net.c
-+++ b/lib/util/util_net.c
-@@ -353,13 +353,11 @@
- }
-
- /**
-- * Check if an IPv7 is 127.0.0.1
-+ * Check if an IPv4 is in IN_LOOPBACKNET (127.0.0.0/8)
- */
- bool is_loopback_ip_v4(struct in_addr ip)
- {
-- struct in_addr a;
-- a.s_addr = htonl(INADDR_LOOPBACK);
-- return(ip.s_addr == a.s_addr);
-+ return ((ntohl(ip.s_addr) & IN_CLASSA_NET) == (IN_LOOPBACKNET << IN_CLASSA_NSHIFT));
- }
-
- /**
-From 944f10760f1bd0e839e08f1204b68e9c06617cf1 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bj=C3=B6rn=20Jacke?= <bj@sernet.de>
-Date: Thu, 19 Apr 2012 13:33:50 +0200
-Subject: [PATCH] s3: speed up reply when vetoed files are being accessed
-
-one usecase of this fast-path is when non-existing files are being tried to be
-opened that are vetoed anyway. With this modification we look if the pattern is
-vetoed first and immediately tell the client that the file doesn't exist
-instead of searching for it in the first place and later on say we don't have
-it regardless.
----
- source3/smbd/filename.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
-index b2ed239..67138e7 100644
---- a/source3/smbd/filename.c
-+++ b/source3/smbd/filename.c
-@@ -1284,6 +1284,13 @@ NTSTATUS filename_convert(TALLOC_CTX *ctx,
-
- *pp_smb_fname = NULL;
-
-+ status = check_veto_path(conn, name_in);
-+ if (!NT_STATUS_IS_OK(status)) {
-+ DEBUG(10,("file %s matches veto path - fast path returning %s\n",
-+ name_in, nt_errstr(status)));
-+ return status;
-+ }
-+
- status = resolve_dfspath_wcard(ctx, conn,
- dfs_path,
- name_in,
diff --git a/net/samba36/files/smb.conf.sample.in b/net/samba36/files/smb.conf.sample.in
deleted file mode 100644
index 4c7e56dbdf55..000000000000
--- a/net/samba36/files/smb.conf.sample.in
+++ /dev/null
@@ -1,306 +0,0 @@
-# This is the main Samba configuration file. You should read the
-# smb.conf(5) manual page in order to understand the options listed
-# here. Samba has a huge number of configurable options (perhaps too
-# many!) most of which are not shown in this example
-#
-# For a step to step guide on installing, configuring and using samba,
-# read the Samba-HOWTO-Collection. This may be obtained from:
-# http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
-#
-# Many working examples of smb.conf files can be found in the
-# Samba-Guide which is generated daily and can be downloaded from:
-# http://www.samba.org/samba/docs/Samba-Guide.pdf
-#
-# Any line which starts with a ; (semi-colon) or a # (hash)
-# is a comment and is ignored. In this example we will use a #
-# for commentry and a ; for parts of the config file that you
-# may wish to enable
-#
-# NOTE: Whenever you modify this file you should run the command "testparm"
-# to check that you have not made any basic syntactic errors.
-#
-#======================= Global Settings =====================================
-[global]
-
-# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
- workgroup = MYGROUP
-
-# server string is the equivalent of the NT Description field
- server string = Samba Server
-
-# Security mode. Defines in which mode Samba will operate. Possible
-# values are share, user, server, domain and ads. Most people will want
-# user level security. See the Samba-HOWTO-Collection for details.
- security = user
-
-# This option is important for security. It allows you to restrict
-# connections to machines which are on your local network. The
-# following example restricts access to two C class networks and
-# the "loopback" interface. For more examples of the syntax see
-# the smb.conf man page
-; hosts allow = 192.168.1. 192.168.2. 127.
-
-# If you want to automatically load your printer list rather
-# than setting them up individually then you'll need this
- load printers = yes
-
-# you may wish to override the location of the printcap file
-; printcap name = /etc/printcap
-
-# on SystemV system setting printcap name to lpstat should allow
-# you to automatically obtain a printer list from the SystemV spool
-# system
-; printcap name = lpstat
-
-# It should not be necessary to specify the print system type unless
-# it is non-standard. Currently supported print systems include:
-# bsd, cups, sysv, plp, lprng, aix, hpux, qnx
-; printing = cups
-
-# Uncomment this if you want a guest account, you must add this to /etc/passwd
-# otherwise the user "nobody" is used
-; guest account = pcguest
-
-# this tells Samba to use a separate log file for each machine
-# that connects
- log file = %%SAMBA_LOGDIR%%/log.%m
-
-# Put a capping on the size of the log files (in Kb).
- max log size = 50
-
-# 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>
-
-# Use the realm option only with security = ads
-# Specifies the Active Directory realm the host is part of
-; realm = MY_REALM
-
-# Backend to store user information in. New installations should
-# use either tdbsam or ldapsam. smbpasswd is available for backwards
-# compatibility. tdbsam requires no further configuration.
-; passdb backend = tdbsam
-
-# Using the following line enables you to customise your configuration
-# on a per machine basis. The %m gets replaced with the netbios name
-# of the machine that is connecting.
-# Note: Consider carefully the location in the configuration file of
-# this line. The included file is read at that point.
-; include = %%SAMBA_CONFDIR%%/smb.conf.%m
-
-# Most people will find that this option gives better performance.
-# See the chapter 'Samba performance issues' in the Samba HOWTO Collection
-# and the manual pages for details.
-# You may want to add the following on a Linux system:
-; socket options = SO_RCVBUF=8192 SO_SNDBUF=8192
-
-# Configure Samba to use multiple interfaces
-# If you have multiple network interfaces then you must list them
-# here. See the man page for details.
-; interfaces = 192.168.12.2/24 192.168.13.2/24
-
-# Browser Control Options:
-# set local master to no if you don't want Samba to become a master
-# browser on your network. Otherwise the normal election rules apply
-; local master = no
-
-# OS Level determines the precedence of this server in master browser
-# elections. The default value should be reasonable
-; os level = 33
-
-# Domain Master specifies Samba to be the Domain Master Browser. This
-# allows Samba to collate browse lists between subnets. Don't use this
-# if you already have a Windows NT domain controller doing this job
-; domain master = yes
-
-# Preferred Master causes Samba to force a local browser election on startup
-# and gives it a slightly higher chance of winning the election
-; preferred master = yes
-
-# Enable this if you want Samba to be a domain logon server for
-# Windows95 workstations.
-; domain logons = yes
-
-# if you enable domain logons then you may want a per-machine or
-# per user logon script
-# run a specific logon batch file per workstation (machine)
-; logon script = %m.bat
-# run a specific logon batch file per username
-; logon script = %U.bat
-
-# Where to store roving profiles (only for Win95 and WinNT)
-# %L substitutes for this servers netbios name, %U is username
-# You must uncomment the [Profiles] share below
-; logon path = \\%L\Profiles\%U
-
-# Windows Internet Name Serving Support Section:
-# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
-; wins support = yes
-
-# WINS Server - Tells the NMBD components of Samba to be a WINS Client
-# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
-; wins server = w.x.y.z
-
-# WINS Proxy - Tells Samba to answer name resolution queries on
-# behalf of a non WINS capable client, for this to work there must be
-# at least one WINS Server on the network. The default is NO.
-; wins proxy = yes
-
-# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
-# via DNS nslookups. The default is NO.
- dns proxy = no
-
-# Charset settings
-; display charset = koi8-r
-; unix charset = koi8-r
-; dos charset = cp866
-
-# Use extended attributes to store file modes
-; store dos attributes = yes
-; map hidden = no
-; map system = no
-; map archive = no
-
-# Use inherited ACLs for directories
-; nt acl support = yes
-; inherit acls = yes
-; map acl inherit = yes
-
-# These scripts are used on a domain controller or stand-alone
-# machine to add or delete corresponding unix accounts
-; add user script = /usr/sbin/useradd %u
-; add group script = /usr/sbin/groupadd %g
-; add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
-; delete user script = /usr/sbin/userdel %u
-; delete user from group script = /usr/sbin/deluser %u %g
-; delete group script = /usr/sbin/groupdel %g
-
-
-#============================ Share Definitions ==============================
-[homes]
- comment = Home Directories
- browseable = no
- writable = yes
-
-# Un-comment the following and create the netlogon directory for Domain Logons
-; [netlogon]
-; comment = Network Logon Service
-; path = /usr/local/samba/lib/netlogon
-; guest ok = yes
-; writable = no
-; share modes = no
-
-
-# Un-comment the following to provide a specific roving profile share
-# the default is to use the user's home directory
-;[Profiles]
-; path = /usr/local/samba/profiles
-; browseable = no
-; guest ok = yes
-
-
-# NOTE: If you have a BSD-style print system there is no need to
-# specifically define each individual printer
-[printers]
- comment = All Printers
- path = %%SAMBA_SPOOL%%
- browseable = no
-# Set public = yes to allow user 'guest account' to print
- guest ok = no
- writable = no
- printable = yes
-
-# This one is useful for people to share files
-;[tmp]
-; comment = Temporary file space
-; path = /tmp
-; read only = no
-; public = yes
-
-# A publicly accessible directory, but read only, except for people in
-# the "staff" group
-;[public]
-; comment = Public Stuff
-; path = /home/samba
-; public = yes
-; writable = yes
-; printable = no
-; write list = @staff
-
-# Other examples.
-#
-# A private printer, usable only by fred. Spool data will be placed in fred's
-# home directory. Note that fred must have write access to the spool directory,
-# wherever it is.
-;[fredsprn]
-; comment = Fred's Printer
-; valid users = fred
-; path = /homes/fred
-; printer = freds_printer
-; public = no
-; writable = no
-; printable = yes
-
-# A private directory, usable only by fred. Note that fred requires write
-# access to the directory.
-;[fredsdir]
-; comment = Fred's Service
-; path = /usr/somewhere/private
-; valid users = fred
-; public = no
-; writable = yes
-; printable = no
-
-# a service which has a different directory for each machine that connects
-# this allows you to tailor configurations to incoming machines. You could
-# also use the %U option to tailor it by user name.
-# The %m gets replaced with the machine name that is connecting.
-;[pchome]
-; comment = PC Directories
-; path = /usr/pc/%m
-; public = no
-; writable = yes
-
-# A publicly accessible directory, read/write to all users. Note that all files
-# created in the directory by users will be owned by the default user, so
-# any user with access can delete any other user's files. Obviously this
-# directory must be writable by the default user. Another user could of course
-# be specified, in which case all files would be owned by that user instead.
-;[public]
-; path = /usr/somewhere/else/public
-; public = yes
-; only guest = yes
-; writable = yes
-; printable = no
-
-# 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
-# setup, the directory should be writable by both users and should have the
-# sticky bit set on it to prevent abuse. Obviously this could be extended to
-# as many users as required.
-;[myshare]
-; comment = Mary's and Fred's stuff
-; path = /usr/somewhere/shared
-; valid users = mary fred
-; public = no
-; writable = yes
-; printable = no
-; create mask = 0765
-;
-
-# This is a DRAFT sample configuration for the ACLs on the ZFS partition.
-#
-; nt acl support = yes
-; inherit acls = no
-; map acl inherit = yes
-;
-;[zpool]
-; path = /tank/zpool
-; unix extensions = no
-; vfs objects = zfsacl
-; nfs4:mode = special
-; nfs4:acedup = merge
-; nfs4:chown = yes