summaryrefslogtreecommitdiffstats
path: root/testing/source
diff options
context:
space:
mode:
Diffstat (limited to 'testing/source')
-rw-r--r--testing/source/samba/doinst.sh42
-rw-r--r--testing/source/samba/rc.samba48
-rwxr-xr-xtesting/source/samba/samba.SlackBuild257
-rw-r--r--testing/source/samba/samba.libsmbclient.h.ffmpeg.compat.diff10
-rw-r--r--testing/source/samba/samba.url2
-rw-r--r--testing/source/samba/slack-desc19
-rw-r--r--testing/source/samba/smb.conf.default223
-rw-r--r--testing/source/samba/smb.conf.default.orig223
-rw-r--r--testing/source/samba/smb.conf.diff29
9 files changed, 853 insertions, 0 deletions
diff --git a/testing/source/samba/doinst.sh b/testing/source/samba/doinst.sh
new file mode 100644
index 000000000..ff09d3161
--- /dev/null
+++ b/testing/source/samba/doinst.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname ${NEW})/$(basename ${NEW} .new)"
+ if [ -e ${OLD} ]; then
+ cp -a ${OLD} ${NEW}.incoming
+ cat ${NEW} > ${NEW}.incoming
+ mv ${NEW}.incoming ${NEW}
+ fi
+ config ${NEW}
+}
+
+config etc/samba/lmhosts.new
+preserve_perms etc/rc.d/rc.samba.new
+
+# Commented out 2014-09-15 just in case we do need to change this.
+## This won't be needed. The point here is to preserve the permissions of the existing
+## file, if there is one. I don't see major new development happening in rc.samba... ;-)
+#rm -f etc/rc.d/rc.samba.new
+
+# Since /etc/samba/private/ has moved to /var/lib/samba/private, migrate any
+# important files if possible:
+if [ -d etc/samba/private -a -d var/lib/samba/private ]; then
+ for file in etc/samba/private/* ; do
+ if [ -r "$file" -a ! -r "var/lib/samba/private/$(basename $file)" ]; then
+ mv "$file" var/lib/samba/private
+ fi
+ done
+ # Might as well try to eliminate this directory, since it should be empty:
+ rmdir etc/samba/private 1> /dev/null 2> /dev/null
+fi
diff --git a/testing/source/samba/rc.samba b/testing/source/samba/rc.samba
new file mode 100644
index 000000000..5b98b879c
--- /dev/null
+++ b/testing/source/samba/rc.samba
@@ -0,0 +1,48 @@
+#!/bin/sh
+#
+# /etc/rc.d/rc.samba
+#
+# Start/stop/restart the Samba SMB file/print server.
+#
+# To make Samba start automatically at boot, make this
+# file executable: chmod 755 /etc/rc.d/rc.samba
+#
+
+samba_start() {
+ if [ -x /usr/sbin/smbd -a -x /usr/sbin/nmbd -a -r /etc/samba/smb.conf ]; then
+ mkdir -p /var/run/samba
+ echo "Starting Samba: /usr/sbin/smbd -D"
+ /usr/sbin/smbd -D
+ echo " /usr/sbin/nmbd -D"
+ /usr/sbin/nmbd -D
+ elif [ ! -r /etc/samba/smb.conf ]; then
+ echo "ERROR: cannot start Samba since /etc/samba/smb.conf does not exist"
+ fi
+}
+
+samba_stop() {
+ killall smbd nmbd
+}
+
+samba_restart() {
+ samba_stop
+ sleep 2
+ samba_start
+}
+
+case "$1" in
+'start')
+ samba_start
+ ;;
+'stop')
+ samba_stop
+ ;;
+'restart')
+ samba_restart
+ ;;
+*)
+ # Default is "start", for backwards compatibility with previous
+ # Slackware versions. This may change to a 'usage' error someday.
+ samba_start
+esac
+
diff --git a/testing/source/samba/samba.SlackBuild b/testing/source/samba/samba.SlackBuild
new file mode 100755
index 000000000..099c1079f
--- /dev/null
+++ b/testing/source/samba/samba.SlackBuild
@@ -0,0 +1,257 @@
+#!/bin/bash
+
+# Copyright 2008, 2009, 2010, 2012, 2013, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Modified 2012 by Eric Hameleers <alien at slackware.com> for ARM port.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PKGNAM=samba
+VERSION=${VERSION:-$(echo samba-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-2}
+
+# This option may be set to "heimdal" or "mit".
+# Upstream considers the use of MIT Kerberos for provisioning an AD DC
+# to be experimental (for now), and recommends using the bundled Heimdal.
+KERBEROS=${KERBEROS:-heimdal}
+
+if [ "$KERBEROS" = "mit" ]; then
+ KERB_OPTIONS="--with-system-mitkrb5 --with-experimental-mit-ad-dc"
+elif [ "$KERBEROS" = "heimdal" ]; then
+ # Please note that this perl module will be required: https://metacpan.org/pod/JSON
+ KERB_OPTIONS="--bundled-libraries=heimdal"
+fi
+
+if [ -e $CWD/machine.conf ]; then
+ . $CWD/machine.conf ]
+elif [ -e /etc/slackbuild/machine.conf ]; then
+ . /etc/slackbuild/machine.conf ]
+else
+ # Automatically determine the architecture we're building on:
+ if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+ fi
+ # Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
+ if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ fi
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
+
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-samba
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf samba-$VERSION
+tar xvf $CWD/samba-$VERSION.tar.?z || exit 1
+cd samba-$VERSION || exit 1
+
+# Add time.h to libsmbclient.h for ffmpeg compatibility:
+zcat $CWD/samba.libsmbclient.h.ffmpeg.compat.diff.gz | patch -p1 --verbose || exit 1
+
+if [ ! -d source3/lib/cmdline ]; then
+ ( cd source3/lib
+ mkdir cmdline
+ cd cmdline
+ ln -sf ../../../source3/include/popt_common.h . )
+fi
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \+ -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \+
+
+# Choose correct options depending on whether PAM is installed:
+if [ -L /lib${LIBDIRSUFFIX}/libpam.so.? ]; then
+ PAM_OPTIONS="--with-pam --with-pammodulesdir=/lib${LIBDIRSUFFIX}/security"
+ unset SHADOW_OPTIONS
+else
+ unset PAM_OPTIONS
+ SHADOW_OPTIONS="--without-pam"
+fi
+
+# Some of these options could be auto-detected, but declaring them
+# here doesn't hurt and helps document what features we're trying to
+# build in.
+#
+# LDFLAGS are needed to avoid problems with missing symbols.
+LDFLAGS="-Wl,--no-as-needed" \
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --enable-fhs \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --includedir=/usr/include \
+ --bindir=/usr/bin \
+ --sbindir=/usr/sbin \
+ --mandir=/usr/man \
+ --sysconfdir=/etc \
+ --with-configdir=/etc/samba \
+ --with-piddir=/var/run \
+ --with-privatedir=/var/lib/samba/private \
+ --with-privatelibdir=/usr/lib${LIBDIRSUFFIX} \
+ --with-modulesdir=/usr/lib${LIBDIRSUFFIX} \
+ --with-lockdir=/var/cache/samba \
+ --with-logfilebase=/var/log/samba \
+ --localstatedir=/var \
+ --enable-cups \
+ --with-acl-support \
+ --with-automount \
+ --with-quotas \
+ --with-syslog \
+ --with-utmp \
+ --with-winbind \
+ --with-ldap \
+ --with-ads \
+ --without-fam \
+ $KERB_OPTIONS \
+ $PAM_OPTIONS \
+ $SHADOW_OPTIONS \
+ --build=$TARGET || exit 1
+ # Gives errors:
+ #--builtin-libraries=replace,ccan \
+
+# Build with waf directly so that multiple jobs work.
+# Script lifted from "./configure".
+PREVPATH=$(dirname $0)
+WAF=./buildtools/bin/waf
+# using JOBS=1 gives maximum compatibility with
+# systems like AIX which have broken threading in python
+JOBS=$(echo $NUMJOBS | tr -dc '0-9')
+export JOBS
+# Make sure we don't have any library preloaded.
+unset LD_PRELOAD
+# Make sure we get stable hashes
+PYTHONHASHSEED=1
+export PYTHONHASHSEED
+cd . || exit 1
+${PYTHON:=python3} $WAF build "$@" || exit 1
+cd $PREVPATH
+
+mkdir -p \
+ $PKG/usr/doc/samba-$VERSION \
+ $PKG/var/spool/samba \
+ $PKG/var/log/samba \
+ $PKG/var/lib/samba/private \
+ $PKG/var/cache/samba
+chmod 700 $PKG/var/lib/samba/private
+chmod 1777 $PKG/var/spool/samba
+
+# Again, use waf directly to allow multithreading:
+#make install DESTDIR=$PKG || exit 1
+DESTDIR=$PKG
+export DESTDIR
+${PYTHON:=python3} $WAF install "$@" || exit 1
+
+# Install the smbprint script:
+install -m0744 packaging/printing/smbprint $PKG/usr/bin/smbprint
+
+# Add a sample config file:
+cat $CWD/smb.conf.default > $PKG/etc/samba/smb.conf-sample
+
+# Setup a default lmhosts file:
+echo "127.0.0.1 localhost" > $PKG/etc/samba/lmhosts.new
+
+if [ ! -r $PKG/usr/bin/smbget ]; then
+ rm -f $PKG/usr/share/man/man1/smbget.1
+fi
+
+# We'll add rc.samba to the init directory, but chmod 644 so that it doesn't
+# start by default:
+mkdir -p $PKG/etc/rc.d
+cat $CWD/rc.samba > $PKG/etc/rc.d/rc.samba.new
+chmod 644 $PKG/etc/rc.d/rc.samba.new
+
+mv $PKG/usr/share/man $PKG/usr
+gzip -9 $PKG/usr/man/man?/*.?
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# PAM related stuff we don't use:
+rm -r $PKG/usr/share/locale
+rm -f $PKG/usr/man/man8/pam*
+
+cp -a \
+ COPYING* MAINTAINERS Manifest PFIF.txt README* \
+ Read-Manifest-Now Roadmap WHATSNEW.txt docs examples \
+ $PKG/usr/doc/samba-$VERSION
+# These are installed elsewhere:
+rm -rf $PKG/usr/doc/samba-$VERSION/docs/htmldocs \
+ $PKG/usr/doc/samba-$VERSION/docs/manpages
+# Empty now?
+rmdir $PKG/usr/doc/samba-$VERSION/docs 2> /dev/null
+# I'm sorry, but when all this info is included in HTML, adding 7MB worth of
+# PDF files just to have extra artwork is more fluff than I'll agree to.
+rm -f $PKG/usr/doc/samba-$VERSION/docs/*.pdf
+# Also redundant also:
+rm -rf $PKG/usr/doc/samba-$VERSION/docs/docbook
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+cat << EOF
+
+*** Be sure the package contains:
+
+drwxr-xr-x 2 root root 4096 May 3 15:46 /var/cache/samba/
+drwx------ 2 root root 1024 Mar 12 13:21 /var/lib/samba/private
+drwxr-xr-x 2 root root 48 Aug 29 13:06 /var/log/samba/
+drwxrwxrwt 2 root root 1024 Mar 12 13:21 /var/spool/samba/
+
+EOF
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/samba-$VERSION-$ARCH-$BUILD.txz
diff --git a/testing/source/samba/samba.libsmbclient.h.ffmpeg.compat.diff b/testing/source/samba/samba.libsmbclient.h.ffmpeg.compat.diff
new file mode 100644
index 000000000..11a4411f8
--- /dev/null
+++ b/testing/source/samba/samba.libsmbclient.h.ffmpeg.compat.diff
@@ -0,0 +1,10 @@
+--- ./source3/include/libsmbclient.h.orig 2018-07-12 03:23:36.000000000 -0500
++++ ./source3/include/libsmbclient.h 2019-02-06 14:36:16.499779599 -0600
+@@ -79,6 +79,7 @@
+ #include <stdint.h>
+ #include <fcntl.h>
+ #include <utime.h>
++#include <time.h>
+
+ #define SMBC_BASE_FD 10000 /* smallest file descriptor returned */
+
diff --git a/testing/source/samba/samba.url b/testing/source/samba/samba.url
new file mode 100644
index 000000000..4f011ee0b
--- /dev/null
+++ b/testing/source/samba/samba.url
@@ -0,0 +1,2 @@
+https://download.samba.org/pub/samba/stable/samba-4.17.5.tar.gz
+https://download.samba.org/pub/samba/stable/samba-4.17.5.tar.asc
diff --git a/testing/source/samba/slack-desc b/testing/source/samba/slack-desc
new file mode 100644
index 000000000..5080fd6cb
--- /dev/null
+++ b/testing/source/samba/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+samba: samba (CIFS file and print server)
+samba:
+samba: Samba is a CIFS file and print server for CIFS clients. It allows
+samba: you to make file space or printers on a Samba host available to CIFS
+samba: clients (such as PCs running Windows).
+samba:
+samba: If you have any Windows file servers, you may be able to replace them
+samba: or supplement them with Samba. One of Samba's big strengths is
+samba: integration, so you can use it to tie together your Linux hosts and
+samba: Windows PC clients.
+samba:
diff --git a/testing/source/samba/smb.conf.default b/testing/source/samba/smb.conf.default
new file mode 100644
index 000000000..45d6f10f5
--- /dev/null
+++ b/testing/source/samba/smb.conf.default
@@ -0,0 +1,223 @@
+# 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: LINUX2
+ workgroup = MYGROUP
+
+# server string is the equivalent of the NT Description field
+ server string = Samba Server
+
+# Server role. Defines in which mode Samba will operate. Possible
+# values are "standalone server", "member server", "classic primary
+# domain controller", "classic backup domain controller", "active
+# directory domain controller".
+#
+# Most people will want "standalone server" or "member server".
+# Running as "active directory domain controller" will require first
+# running "samba-tool domain provision" to wipe databases and create a
+# new domain.
+ server role = standalone server
+
+# 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.
+
+# 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 = /var/log/samba.%m
+
+# Put a capping on the size of the log files (in Kb).
+ max log size = 50
+
+# Specifies the Kerberos or 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 = /usr/local/samba/lib/smb.conf.%m
+
+# 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
+
+# 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
+
+# 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 = /var/spool/samba
+ 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 = no
+; 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
+
+
diff --git a/testing/source/samba/smb.conf.default.orig b/testing/source/samba/smb.conf.default.orig
new file mode 100644
index 000000000..2f2072090
--- /dev/null
+++ b/testing/source/samba/smb.conf.default.orig
@@ -0,0 +1,223 @@
+# 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
+
+# Server role. Defines in which mode Samba will operate. Possible
+# values are "standalone server", "member server", "classic primary
+# domain controller", "classic backup domain controller", "active
+# directory domain controller".
+#
+# Most people will want "standalone server" or "member server".
+# Running as "active directory domain controller" will require first
+# running "samba-tool domain provision" to wipe databases and create a
+# new domain.
+ server role = standalone server
+
+# 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.
+
+# 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 = /usr/local/samba/var/log.%m
+
+# Put a capping on the size of the log files (in Kb).
+ max log size = 50
+
+# Specifies the Kerberos or 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 = /usr/local/samba/lib/smb.conf.%m
+
+# 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
+
+# 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
+
+# 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 = /usr/spool/samba
+ 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 = no
+; 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
+
+
diff --git a/testing/source/samba/smb.conf.diff b/testing/source/samba/smb.conf.diff
new file mode 100644
index 000000000..73688a8ac
--- /dev/null
+++ b/testing/source/samba/smb.conf.diff
@@ -0,0 +1,29 @@
+--- smb.conf.default.orig 2017-01-11 01:55:14.000000000 -0600
++++ smb.conf.default 2017-03-23 14:18:05.114503416 -0500
+@@ -22,7 +22,7 @@
+ #======================= Global Settings =====================================
+ [global]
+
+-# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
++# workgroup = NT-Domain-Name or Workgroup-Name, eg: LINUX2
+ workgroup = MYGROUP
+
+ # server string is the equivalent of the NT Description field
+@@ -52,7 +52,7 @@
+
+ # this tells Samba to use a separate log file for each machine
+ # that connects
+- log file = /usr/local/samba/var/log.%m
++ log file = /var/log/samba.%m
+
+ # Put a capping on the size of the log files (in Kb).
+ max log size = 50
+@@ -136,7 +136,7 @@
+ # specifically define each individual printer
+ [printers]
+ comment = All Printers
+- path = /usr/spool/samba
++ path = /var/spool/samba
+ browseable = no
+ # Set public = yes to allow user 'guest account' to print
+ guest ok = no