net-fs/samba: add missing files dir
authorKristian Fiskerstrand <kf@sumptuouscapital.com>
Sat, 24 Jan 2015 16:45:32 +0000 (17:45 +0100)
committerKristian Fiskerstrand <kf@sumptuouscapital.com>
Sat, 24 Jan 2015 16:45:32 +0000 (17:45 +0100)
net-fs/samba/files/3.6/lmhosts [new file with mode: 0644]
net-fs/samba/files/3.6/samba.confd [new file with mode: 0644]
net-fs/samba/files/3.6/samba.initd [new file with mode: 0644]
net-fs/samba/files/3.6/samba.pam [new file with mode: 0644]
net-fs/samba/files/3.6/smb.conf.default.patch [new file with mode: 0644]
net-fs/samba/files/3.6/smbusers [new file with mode: 0644]
net-fs/samba/files/3.6/swat.xinetd [new file with mode: 0644]
net-fs/samba/files/3.6/system-auth-winbind.pam [new file with mode: 0644]

diff --git a/net-fs/samba/files/3.6/lmhosts b/net-fs/samba/files/3.6/lmhosts
new file mode 100644 (file)
index 0000000..3e3428e
--- /dev/null
@@ -0,0 +1,2 @@
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/3.6/lmhosts,v 1.1 2011/06/30 15:50:28 dagger Exp $
+127.0.0.1 localhost
diff --git a/net-fs/samba/files/3.6/samba.confd b/net-fs/samba/files/3.6/samba.confd
new file mode 100644 (file)
index 0000000..1b329da
--- /dev/null
@@ -0,0 +1,28 @@
+#add "winbind" to the daemon_list if you also want winbind to start
+daemon_list="smbd nmbd"
+
+#----------------------------------------------------------------------------
+# Daemons calls: <daemon_name>_<command_option>
+#----------------------------------------------------------------------------
+my_service_name="samba"
+my_service_PRE="unset TMP TMPDIR"
+my_service_POST=""
+
+#----------------------------------------------------------------------------
+# Daemons calls: <daemon_name>_<command_option>
+#----------------------------------------------------------------------------
+smbd_start_options="-D"
+smbd_start="start-stop-daemon --start --exec /usr/sbin/smbd -- ${smbd_start_options}"
+smbd_stop="start-stop-daemon --stop --exec /usr/sbin/smbd"
+smbd_reload="killall -HUP smbd"
+
+nmbd_start_options="-D"
+nmbd_start="start-stop-daemon --start --exec /usr/sbin/nmbd -- ${nmbd_start_options}"
+nmbd_stop="start-stop-daemon --stop --exec /usr/sbin/nmbd"
+nmbd_reload="killall -HUP nmbd"
+
+winbind_start_options=""
+winbind_start="start-stop-daemon --start --exec /usr/sbin/winbindd -- ${winbind_start_options}"
+winbind_stop="start-stop-daemon --stop --exec /usr/sbin/winbindd"
+winbind_reload="killall -HUP winbindd"
+
diff --git a/net-fs/samba/files/3.6/samba.initd b/net-fs/samba/files/3.6/samba.initd
new file mode 100644 (file)
index 0000000..96bb94e
--- /dev/null
@@ -0,0 +1,60 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/3.6/samba.initd,v 1.4 2014/03/14 09:30:41 polynomial-c Exp $
+
+extra_started_commands="reload"
+piddir="/var/run/samba"
+
+depend() {
+       after slapd
+       need net
+       use cupsd
+}
+
+DAEMONNAME="${SVCNAME##samba.}"
+[ "${DAEMONNAME}" != "samba" ] && daemon_list=${DAEMONNAME}
+
+signal_do() {
+       local signal="$1"
+       [ -z "${signal}" ] && return 0
+
+       local result=0 last_result=0 daemon= cmd_exec=
+       for daemon in ${daemon_list} ; do
+               eval cmd_exec=\$${daemon}_${signal}
+               if [ -n "${cmd_exec}" ]; then
+                       ebegin "${my_service_name} -> ${signal}: ${daemon}"
+                       #echo ${cmd} '->' ${!cmd}
+                       ${cmd_exec} > /dev/null
+                       last_result=$?
+                       eend ${last_result}
+               fi
+               result=$(( ${result} + ${last_result} ))
+       done
+       return ${result}
+}
+
+mkdir_sambadirs() {
+       [ -d "${piddir}" ] || mkdir -p ${piddir}
+}
+
+start() {
+       ${my_service_PRE}
+       mkdir_sambadirs
+       signal_do start && return 0
+       
+       eerror "Error: starting services (see system logs)"
+       signal_do stop
+       return 1
+}
+stop() {
+       ${my_service_PRE}
+       if signal_do stop ; then
+           ${my_service_POST}
+           return 0
+       fi
+}
+reload() {
+       ${my_service_PRE}
+       signal_do reload
+}
diff --git a/net-fs/samba/files/3.6/samba.pam b/net-fs/samba/files/3.6/samba.pam
new file mode 100644 (file)
index 0000000..91beadd
--- /dev/null
@@ -0,0 +1,8 @@
+#%PAM-1.0
+# * pam_smbpass.so authenticates against the smbpasswd file
+# * changed Redhat's 'pam_stack' with 'include' for *BSD compatibility
+#    (Diego "Flameeyes" Petteno'): enable with pam>=0.78 only
+auth       required     pam_smbpass.so nodelay
+account    include      system-auth
+session    include      system-auth
+password   required     pam_smbpass.so nodelay smbconf=/etc/samba/smb.conf
diff --git a/net-fs/samba/files/3.6/smb.conf.default.patch b/net-fs/samba/files/3.6/smb.conf.default.patch
new file mode 100644 (file)
index 0000000..c2a9a72
--- /dev/null
@@ -0,0 +1,68 @@
+--- samba-3.6.0rc2/examples/smb.conf.default~  2011-06-07 19:13:47.000000000 +0100
++++ samba-3.6.0rc2/examples/smb.conf.default   2011-06-30 16:12:42.388102480 +0100
+@@ -63,7 +63,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/log.%m
+ # Put a capping on the size of the log files (in Kb).
+    max log size = 50
+@@ -81,7 +81,10 @@
+ # 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.
++# compatibility. tdbsam requires no further configuration. If you're 
++# migrating from < samba 3.4, you'll have to convert your old user 
++# passwords to the new backend with the command:
++# pdbedit -i smbpasswd:/var/lib/samba/private/smbpasswd -e
+ ;   passdb backend = tdbsam
+ # Using the following line enables you to customise your configuration
+@@ -89,7 +92,7 @@
+ # 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
++;   include = /etc/samba/smb.conf.%m
+ # Configure Samba to use multiple interfaces
+ # If you have multiple network interfaces then you must list them
+@@ -166,7 +169,7 @@
+ # Un-comment the following and create the netlogon directory for Domain Logons
+ ; [netlogon]
+ ;   comment = Network Logon Service
+-;   path = /usr/local/samba/lib/netlogon
++;   path = /var/lib/samba/netlogon
+ ;   guest ok = yes
+ ;   writable = no
+ ;   share modes = no
+@@ -175,7 +178,7 @@
+ # 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
++;    path = /var/lib/samba/profiles
+ ;    browseable = no
+ ;    guest ok = yes
+@@ -184,7 +187,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
+@@ -204,7 +207,7 @@
+ ;   comment = Public Stuff
+ ;   path = /home/samba
+ ;   public = yes
+-;   writable = no
++;   writable = yes
+ ;   printable = no
+ ;   write list = @staff
diff --git a/net-fs/samba/files/3.6/smbusers b/net-fs/samba/files/3.6/smbusers
new file mode 100644 (file)
index 0000000..b3c59f2
--- /dev/null
@@ -0,0 +1,7 @@
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/3.6/smbusers,v 1.1 2011/06/30 15:50:28 dagger Exp $
+
+# Syntax:
+#   Unix_name = SMB_name1 SMB_name2 ...
+
+root = Administrator admin
+nobody = guest pcguest smbguest
diff --git a/net-fs/samba/files/3.6/swat.xinetd b/net-fs/samba/files/3.6/swat.xinetd
new file mode 100644 (file)
index 0000000..55c7cff
--- /dev/null
@@ -0,0 +1,17 @@
+# default: off
+# description: SWAT is the Samba Web Admin Tool. Use swat \
+#             to configure your Samba server. To use SWAT, \
+#             connect to port 901 with your favorite web browser.
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/3.6/swat.xinetd,v 1.1 2011/06/30 15:50:28 dagger Exp $
+
+service swat
+{
+       port            = 901
+       socket_type     = stream
+       wait            = no
+       only_from       = localhost
+       user            = root
+       server          = /usr/sbin/swat
+       log_on_failure += USERID
+       disable         = yes
+}
diff --git a/net-fs/samba/files/3.6/system-auth-winbind.pam b/net-fs/samba/files/3.6/system-auth-winbind.pam
new file mode 100644 (file)
index 0000000..454b94d
--- /dev/null
@@ -0,0 +1,18 @@
+#%PAM-1.0
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/3.6/system-auth-winbind.pam,v 1.1 2011/06/30 15:50:28 dagger Exp $
+
+auth        required      pam_env.so
+auth        sufficient    pam_winbind.so
+auth        sufficient    pam_unix.so likeauth nullok use_first_pass
+auth        required      pam_deny.so
+
+account     sufficient    pam_winbind.so
+account     required      pam_unix.so
+
+password    required      pam_cracklib.so retry=3
+password    sufficient    pam_unix.so nullok use_authtok md5 shadow
+password    required      pam_deny.so
+
+session     required      pam_mkhomedir.so skel=/etc/skel/ umask=0022 
+session     required      pam_limits.so
+session     required      pam_unix.so