summaryrefslogtreecommitdiff
path: root/net-fs
diff options
context:
space:
mode:
authorRobert Piasek <dagger@gentoo.org>2011-03-22 12:12:09 +0000
committerRobert Piasek <dagger@gentoo.org>2011-03-22 12:12:09 +0000
commit6fbe21b66374c53e9784a4f17d2ef5becb6dc948 (patch)
treec9de744ad912b3bc3d98c661d8aad5076cadc1f6 /net-fs
parentFix installation (diff)
downloaddagger-6fbe21b66374c53e9784a4f17d2ef5becb6dc948.tar.gz
dagger-6fbe21b66374c53e9784a4f17d2ef5becb6dc948.tar.bz2
dagger-6fbe21b66374c53e9784a4f17d2ef5becb6dc948.zip
Add Samba Traffic Analyzer V2 + tools
Diffstat (limited to 'net-fs')
-rw-r--r--net-fs/samba/Manifest27
-rw-r--r--net-fs/samba/files/3.5/lmhosts2
-rw-r--r--net-fs/samba/files/3.5/nsswitch.conf-winbind17
-rw-r--r--net-fs/samba/files/3.5/nsswitch.conf-wins17
-rw-r--r--net-fs/samba/files/3.5/samba-3.5.6-kerberos-dummy.patch30
-rw-r--r--net-fs/samba/files/3.5/samba.confd28
-rw-r--r--net-fs/samba/files/3.5/samba.initd59
-rw-r--r--net-fs/samba/files/3.5/samba.pam8
-rw-r--r--net-fs/samba/files/3.5/smb.conf.default271
-rw-r--r--net-fs/samba/files/3.5/smbusers7
-rw-r--r--net-fs/samba/files/3.5/swat.xinetd17
-rw-r--r--net-fs/samba/files/3.5/system-auth-winbind.pam18
-rw-r--r--net-fs/samba/files/samba-3.4.2-lib.tevent.python.mk6
-rw-r--r--net-fs/samba/files/samba4.initd31
-rw-r--r--net-fs/samba/metadata.xml30
-rw-r--r--net-fs/samba/samba-3.5.8.ebuild444
-rw-r--r--net-fs/smbtad/Manifest4
-rwxr-xr-xnet-fs/smbtad/files/smbtad.rc26
-rw-r--r--net-fs/smbtad/metadata.xml10
-rw-r--r--net-fs/smbtad/smbtad-1.2.2.ebuild36
-rw-r--r--net-fs/smbtatools/Manifest3
-rw-r--r--net-fs/smbtatools/metadata.xml10
-rw-r--r--net-fs/smbtatools/smbtatools-1.2.2.ebuild27
23 files changed, 1128 insertions, 0 deletions
diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest
new file mode 100644
index 0000000..254d121
--- /dev/null
+++ b/net-fs/samba/Manifest
@@ -0,0 +1,27 @@
+AUX 3.4/lmhosts 126 RMD160 c4ff63cf01158809311c97c768463826aa02127b SHA1 2d5be4b38357287050b25bbd9fdc3263801676ce SHA256 b4b9cad6cd728dac260f4716270bb5df09da5c84c76526ccbe6cccdb8818c56c
+AUX 3.4/nsswitch.conf-winbind 406 RMD160 7bbc3f7a4bdc4907bc45ad71fc0e17cc376d4e1e SHA1 0cd4966690d98802de94f0353ecf760c1a6d5245 SHA256 342657852ec465f78b1450a522211c2102ee07a65f8cb167a19ca5e277220867
+AUX 3.4/nsswitch.conf-wins 392 RMD160 bf1c0b6c3128be82a3f901eb3ef70d6d621df334 SHA1 2742757c188bfeae94d272eed66405e1a5417540 SHA256 508f76bc1abe15b49ef97b6033ae873f6d630bbcb99cd69b9babe55dc2554ea0
+AUX 3.4/samba.confd 1219 RMD160 88949f00ea94f14af751e53cf870b6481dc3770d SHA1 a92a63dbbf9f7079e9d7cf0e2e3d608594fe5d42 SHA256 a83004571c4bc37eeaeec8efa0fef4a20d9fc12ec30f2eb9dcc6098251205314
+AUX 3.4/samba.initd 1136 RMD160 a7e0c6f33108bdb992d1fca26d2cb5a5ee3c1073 SHA1 8738ef80ee0d0cfba10e2dd0d9a35bfce5c242d0 SHA256 c694ff997c9594a4766c3ccbd32103ccb8f3df68942f2cde9c85b6218e513acf
+AUX 3.4/samba.pam 397 RMD160 8f64b09e17e0c458a8156db3cc92a0413513e4fc SHA1 f39d48e07be8069885b51253c5b891a856b7b41e SHA256 86634f2d541370518d0958a73c04776ed5df2a3716ef128ff384459acce9cd38
+AUX 3.4/smb.conf.default 9660 RMD160 049024e0b489027a44e3ae7b03216ebba8a2d716 SHA1 00954aa58287ef49e9eb0f9f6a04dd509f8835f3 SHA256 8f4fc4d137a32f92b9bc1b64f76ea25a690881cf6f385b9ce9eb0c98f2b0b297
+AUX 3.4/smbusers 218 RMD160 6a8acc59ff824419c9f10db432ae8ed9d0ec5651 SHA1 5bad77d5e82f914b716722b4d5fa5126236b73ef SHA256 97562315c02ed571aca99ba857a1fab7550fa8dbbf3eebcb41157b2d5deb57b3
+AUX 3.4/swat.xinetd 527 RMD160 a4b3d8c6fef6417007fe17bba7737bf6c6821696 SHA1 706cfa524e14f16237f6f6a8039236b59e1beddc SHA256 f59fe771e6804296ac3a0a7c3ad88dd3ae2cd59b89c64af8924f6e0f2ad30cd0
+AUX 3.4/system-auth-winbind.pam 705 RMD160 f6275a470e06dc168cf39ef144ccc190901978ee SHA1 a8e4946fc4dd24b00b9ce7d8574795e987350462 SHA256 046ba3a997328eeeaffa65d662b90dc415a27c8a77f9e4402d2a979aace97dd7
+AUX 3.5/lmhosts 126 RMD160 485c480c5d3203e5f6c3d769ea36d04682a4ce39 SHA1 149e536986bddaf961d77e73f3bf04f39212333d SHA256 f959c6e6b4179de24b2268c13b7cd8a8e400e43d0852f91dfb8dc8e48f56f80e
+AUX 3.5/nsswitch.conf-winbind 406 RMD160 43175297fb2ca9e364a7e07e6b1f7cec367f36f5 SHA1 16c57e5ba8d07ecc50d0e1a93df5bc82c4063764 SHA256 c6d461204201143f874f460df35f7fbb2345f93ed0d6c20b280c15864011e893
+AUX 3.5/nsswitch.conf-wins 392 RMD160 58b135036c4a7ecab97bf532b35da3d50693c4bf SHA1 7945e42a4d72e4604678add14ecdbb9bde8e9894 SHA256 3dbd18dc82371ef6f427dea1f626ee027d9d7be86036e2e10991f52f7041b5c8
+AUX 3.5/samba-3.5.6-kerberos-dummy.patch 1660 RMD160 a1077508f2a6a7ec2c9fb14f563be1baacdee4ed SHA1 708299aefaa213269065328475e5580925ace548 SHA256 bcc2b4ad1a4ff92221b4620cb1cf2915db19c527fb28308db7ef633c0e1f596e
+AUX 3.5/samba.confd 1219 RMD160 88949f00ea94f14af751e53cf870b6481dc3770d SHA1 a92a63dbbf9f7079e9d7cf0e2e3d608594fe5d42 SHA256 a83004571c4bc37eeaeec8efa0fef4a20d9fc12ec30f2eb9dcc6098251205314
+AUX 3.5/samba.initd 1228 RMD160 a4c5502dc1234d18eb7810899e171987ad33262b SHA1 b1d6d1ff47e3d2c0f96dfb2743915404ae6d59c1 SHA256 691b7389b87a5b413487443e3569e95b99208bd8d9f7dfaf9d54b42a5fc2d41a
+AUX 3.5/samba.pam 397 RMD160 8f64b09e17e0c458a8156db3cc92a0413513e4fc SHA1 f39d48e07be8069885b51253c5b891a856b7b41e SHA256 86634f2d541370518d0958a73c04776ed5df2a3716ef128ff384459acce9cd38
+AUX 3.5/smb.conf.default 9660 RMD160 049024e0b489027a44e3ae7b03216ebba8a2d716 SHA1 00954aa58287ef49e9eb0f9f6a04dd509f8835f3 SHA256 8f4fc4d137a32f92b9bc1b64f76ea25a690881cf6f385b9ce9eb0c98f2b0b297
+AUX 3.5/smbusers 218 RMD160 a94e0928466c0ed7cfd3edd3ac88dd1c8725a987 SHA1 84518d8768048e497724c72f89c00e6223c6cdb6 SHA256 ed24f121813aff4b8e79c99317f4f9dfde9246d150d7718f0fa60babb8b9dca1
+AUX 3.5/swat.xinetd 527 RMD160 8b2364e6fda8cecc75feef8129347ebc545ecc43 SHA1 98f94bc638ffb68d6fb35745aebbf0c63d4135ce SHA256 7919926945c9a7a28446280ea477aed2d7d3506372a03cbea96b446a8fa39aa4
+AUX 3.5/system-auth-winbind.pam 705 RMD160 666533e99283449d60a97fd4fcd704d72212b871 SHA1 a1fe11d7a4f7501c938c03121e4ad950c515f75e SHA256 eca81593dc1b3e2be19bba7a128d71474243216a7783ed788320ca51cf6ea6c7
+AUX samba-3.4.2-lib.tevent.python.mk 177 RMD160 3ed0264790f5ce15106528cd485c83611f6ebeb5 SHA1 ab048fb7ba236621d82cc305ce85d129d38d32a8 SHA256 3eab52d42a0cbc070d011a131f9a56f4b3da10b2791fec514948fd8d2d013153
+AUX samba4.initd 634 RMD160 0d1028c3520102a7a2c4a7dd73723b66295db740 SHA1 cf2e0bcdb1783f1fb2ed256442f051b98ad70d64 SHA256 df553df5cfb8d8305566accd62bff23dac4772ad4a2eb7d3b1328a5651113cad
+DIST samba-3.5.8.tar.gz 30721269 RMD160 02703bbaf7d7e7b9786a2228fe6085143c99251a SHA1 ffb71de38442eee14aafb44f819671354dc5cce9 SHA256 331e3f2806edcad853b48f4b1e653367ad9a6ce1ab5ed486c03a6bf614882796
+DIST smb_traffic_analyzer_v2.diff.bz2 12226 RMD160 82f6d443d289253a184e5f5dda17d865cb79b2b5 SHA1 1dd5100447cb827aacb8bb18bf88b7b10955a38c SHA256 1bae7eafbe8ac2382313d5ab9d43d73ba64b63a714f0f588516952d476fb868d
+EBUILD samba-3.5.8.ebuild 12950 RMD160 651a12149c4d3d46e7033d3b9ea9f416b0c93131 SHA1 aaf9e8f1e0744fe0b8365bcf70bece5cf79e7442 SHA256 6b046c6e05a17c3c92ca8d5d55011fa72244ba569aabb494a7c7d5384ae200c8
+MISC metadata.xml 1435 RMD160 cbeae62707473b88127daa6170e8ca58861ef38b SHA1 32ff9e4f94646cc85bca64f208ea19faae1e2075 SHA256 bdff2271efdf94275d1a6096c48407c0372e088b10f85f19b989b18d50c2a5f0
diff --git a/net-fs/samba/files/3.5/lmhosts b/net-fs/samba/files/3.5/lmhosts
new file mode 100644
index 0000000..80e7175
--- /dev/null
+++ b/net-fs/samba/files/3.5/lmhosts
@@ -0,0 +1,2 @@
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/3.5/lmhosts,v 1.1 2010/03/01 16:19:54 patrick Exp $
+127.0.0.1 localhost
diff --git a/net-fs/samba/files/3.5/nsswitch.conf-winbind b/net-fs/samba/files/3.5/nsswitch.conf-winbind
new file mode 100644
index 0000000..a95258d
--- /dev/null
+++ b/net-fs/samba/files/3.5/nsswitch.conf-winbind
@@ -0,0 +1,17 @@
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/3.5/nsswitch.conf-winbind,v 1.1 2010/03/01 16:19:54 patrick Exp $
+passwd: files winbind
+group: files winbind
+
+hosts: files dns
+networks: files dns
+
+services: db files
+protocols: db files
+rpc: db files
+ethers: db files
+netmasks: files
+netgroup: files
+bootparams: files
+
+automount: files
+aliases: files
diff --git a/net-fs/samba/files/3.5/nsswitch.conf-wins b/net-fs/samba/files/3.5/nsswitch.conf-wins
new file mode 100644
index 0000000..2ca2490
--- /dev/null
+++ b/net-fs/samba/files/3.5/nsswitch.conf-wins
@@ -0,0 +1,17 @@
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/3.5/nsswitch.conf-wins,v 1.1 2010/03/01 16:19:54 patrick Exp $
+passwd: files
+group: files
+
+hosts: files dns wins
+networks: files dns
+
+services: db files
+protocols: db files
+rpc: db files
+ethers: db files
+netmasks: files
+netgroup: files
+bootparams: files
+
+automount: files
+aliases: files
diff --git a/net-fs/samba/files/3.5/samba-3.5.6-kerberos-dummy.patch b/net-fs/samba/files/3.5/samba-3.5.6-kerberos-dummy.patch
new file mode 100644
index 0000000..ef76aff
--- /dev/null
+++ b/net-fs/samba/files/3.5/samba-3.5.6-kerberos-dummy.patch
@@ -0,0 +1,30 @@
+diff -NrU5 samba-3.5.6.original/source3/include/krb5_protos.h samba-3.5.6/source3/include/krb5_protos.h
+--- samba-3.5.6.original/source3/include/krb5_protos.h 2010-10-07 10:41:16.000000000 -0600
++++ samba-3.5.6/source3/include/krb5_protos.h 2010-12-23 11:01:09.000000000 -0600
+@@ -86,15 +86,10 @@
+ const char *name,
+ krb5_principal *principal);
+ bool smb_krb5_principal_compare_any_realm(krb5_context context,
+ krb5_const_principal princ1,
+ krb5_const_principal princ2);
+-int cli_krb5_get_ticket(const char *principal, time_t time_offset,
+- DATA_BLOB *ticket, DATA_BLOB *session_key_krb5,
+- uint32 extra_ap_opts, const char *ccname,
+- time_t *tgs_expire,
+- const char *impersonate_princ_s);
+ krb5_error_code smb_krb5_renew_ticket(const char *ccache_string, const char *client_string, const char *service_string, time_t *expire_time);
+ krb5_error_code kpasswd_err_to_krb5_err(krb5_error_code res_code);
+ krb5_error_code smb_krb5_gen_netbios_krb5_address(smb_krb5_addresses **kerb_addr);
+ krb5_error_code smb_krb5_free_addresses(krb5_context context, smb_krb5_addresses *addr);
+ NTSTATUS krb5_to_nt_status(krb5_error_code kerberos_error);
+@@ -144,5 +139,10 @@
+ krb5_creds **creds_p);
+ char *smb_krb5_principal_get_realm(krb5_context context,
+ krb5_principal principal);
+ #endif /* HAVE_KRB5 */
+
++int cli_krb5_get_ticket(const char *principal, time_t time_offset,
++ DATA_BLOB *ticket, DATA_BLOB *session_key_krb5,
++ uint32 extra_ap_opts, const char *ccname,
++ time_t *tgs_expire,
++ const char *impersonate_princ_s);
diff --git a/net-fs/samba/files/3.5/samba.confd b/net-fs/samba/files/3.5/samba.confd
new file mode 100644
index 0000000..8ef8d73
--- /dev/null
+++ b/net-fs/samba/files/3.5/samba.confd
@@ -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 --oknodo --exec /usr/sbin/winbindd"
+winbind_reload="killall -HUP winbindd"
+
diff --git a/net-fs/samba/files/3.5/samba.initd b/net-fs/samba/files/3.5/samba.initd
new file mode 100644
index 0000000..a1a2fae
--- /dev/null
+++ b/net-fs/samba/files/3.5/samba.initd
@@ -0,0 +1,59 @@
+#!/sbin/runscript
+# Copyright 1999-2010 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.5/samba.initd,v 1.2 2010/12/20 20:35:07 vostorga Exp $
+
+opts="reload"
+
+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 /var/run/samba ] || mkdir -p /var/run/samba
+}
+
+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.5/samba.pam b/net-fs/samba/files/3.5/samba.pam
new file mode 100644
index 0000000..91beadd
--- /dev/null
+++ b/net-fs/samba/files/3.5/samba.pam
@@ -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.5/smb.conf.default b/net-fs/samba/files/3.5/smb.conf.default
new file mode 100644
index 0000000..4c9a4a6
--- /dev/null
+++ b/net-fs/samba/files/3.5/smb.conf.default
@@ -0,0 +1,271 @@
+# 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 = /var/log/samba/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 = /etc/samba/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
+
+# 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
+
+# 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 = /var/lib/samba/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 = /var/lib/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 = 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
+
+
diff --git a/net-fs/samba/files/3.5/smbusers b/net-fs/samba/files/3.5/smbusers
new file mode 100644
index 0000000..51b8dda
--- /dev/null
+++ b/net-fs/samba/files/3.5/smbusers
@@ -0,0 +1,7 @@
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/3.5/smbusers,v 1.1 2010/03/01 16:19:54 patrick Exp $
+
+# Syntax:
+# Unix_name = SMB_name1 SMB_name2 ...
+
+root = Administrator admin
+nobody = guest pcguest smbguest
diff --git a/net-fs/samba/files/3.5/swat.xinetd b/net-fs/samba/files/3.5/swat.xinetd
new file mode 100644
index 0000000..13b3ee2
--- /dev/null
+++ b/net-fs/samba/files/3.5/swat.xinetd
@@ -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.5/swat.xinetd,v 1.1 2010/03/01 16:19:54 patrick 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.5/system-auth-winbind.pam b/net-fs/samba/files/3.5/system-auth-winbind.pam
new file mode 100644
index 0000000..b58dcf6
--- /dev/null
+++ b/net-fs/samba/files/3.5/system-auth-winbind.pam
@@ -0,0 +1,18 @@
+#%PAM-1.0
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/3.5/system-auth-winbind.pam,v 1.1 2010/03/01 16:19:54 patrick 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
diff --git a/net-fs/samba/files/samba-3.4.2-lib.tevent.python.mk b/net-fs/samba/files/samba-3.4.2-lib.tevent.python.mk
new file mode 100644
index 0000000..3a03755
--- /dev/null
+++ b/net-fs/samba/files/samba-3.4.2-lib.tevent.python.mk
@@ -0,0 +1,6 @@
+[PYTHON::pytevent]
+LIBRARY_REALNAME = tevent.$(SHLIBEXT)
+PRIVATE_DEPENDENCIES = LIBTEVENT PYTALLOC LIBSAMBA-UTIL LIBREPLACE
+
+pytevent_OBJ_FILES = $(libteventsrcdir)/pytevent.o
+
diff --git a/net-fs/samba/files/samba4.initd b/net-fs/samba/files/samba4.initd
new file mode 100644
index 0000000..f7b8ff7
--- /dev/null
+++ b/net-fs/samba/files/samba4.initd
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/samba4.initd,v 1.1 2010/02/28 16:03:04 patrick Exp $
+
+opts="reload"
+
+description="The samba daemon init script"
+description_reload="Reloads the samba daemon"
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting samba"
+ start-stop-daemon --start --exec /usr/sbin/samba
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping samba"
+ start-stop-daemon --stop --pidfile /var/run/samba/samba.pid
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading samba"
+ killall -HUP samba
+ eend $?
+}
diff --git a/net-fs/samba/metadata.xml b/net-fs/samba/metadata.xml
new file mode 100644
index 0000000..3289e14
--- /dev/null
+++ b/net-fs/samba/metadata.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>samba</herd>
+<maintainer>
+ <email>samba@gentoo.org</email>
+ <name>Samba Team</name>
+</maintainer>
+<longdescription>
+Samba is an Open Source/Free Software suite that provides seamless file and print services to SMB/CIFS clients. Integration with various accounting and antivirus backends. License: GNU General Public License.
+</longdescription>
+<use>
+ <flag name="ads">Enable Active Directory support</flag>
+ <flag name="swat">Enables support for swat configuration gui</flag>
+ <flag name="winbind">Enables support for the winbind auth daemon</flag>
+ <flag name="client">Enables the client part</flag>
+ <flag name="server">Enables the server part</flag>
+ <flag name="netapi">Enable building of netapi bits</flag>
+ <flag name="tools">Enable extra tools</flag>
+ <flag name="dso">Enable dso support</flag>
+ <flag name="addns">Enable AD DNS integration</flag>
+ <flag name="aio">Enable asynchronous IO support</flag>
+ <flag name="cluster">Enable support for clustering</flag>
+ <flag name="ldb">Enable the ldb tools</flag>
+ <flag name="quota">Enables support for user quotas</flag>
+ <flag name="smbclient">Enable smbclient tool</flag>
+ <flag name="smbsharemodes">Enable special smb share modes (?) </flag>
+ <flag name="smbtav2">Enable Samba Traffic Analyzer version 2 </flag>
+</use>
+</pkgmetadata>
diff --git a/net-fs/samba/samba-3.5.8.ebuild b/net-fs/samba/samba-3.5.8.ebuild
new file mode 100644
index 0000000..2270871
--- /dev/null
+++ b/net-fs/samba/samba-3.5.8.ebuild
@@ -0,0 +1,444 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/samba-3.5.8.ebuild,v 1.2 2011/03/15 16:01:17 scarabeus Exp $
+
+EAPI="2"
+
+inherit pam confutils versionator multilib eutils
+
+MY_PV=${PV/_/}
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Library bits of the samba network filesystem"
+HOMEPAGE="http://www.samba.org/"
+SRC_URI="mirror://samba/${P}.tar.gz
+ http://dev.gentoo.org/~dagger/files/smb_traffic_analyzer_v2.diff.bz2"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="acl addns ads +aio avahi caps +client cluster cups debug doc examples fam
+ ldap ldb +netapi pam quota +readline +server +smbclient smbsharemodes smbtav2
+ swat syslog winbind"
+
+DEPEND="dev-libs/popt
+ !net-fs/samba-client
+ !net-fs/samba-libs
+ !net-fs/samba-server
+ !net-fs/cifs-utils
+ sys-libs/talloc
+ sys-libs/tdb
+ virtual/libiconv
+ ads? ( virtual/krb5 sys-fs/e2fsprogs
+ client? ( sys-apps/keyutils ) )
+ avahi? ( net-dns/avahi )
+ caps? ( sys-libs/libcap )
+ client? ( !net-fs/mount-cifs
+ dev-libs/iniparser )
+ cluster? ( >=dev-db/ctdb-1.0.114_p1 )
+ cups? ( net-print/cups )
+ debug? ( dev-libs/dmalloc )
+ fam? ( virtual/fam )
+ ldap? ( net-nds/openldap )
+ pam? ( virtual/pam
+ winbind? ( dev-libs/iniparser )
+ )
+ readline? ( >=sys-libs/readline-5.2 )
+ syslog? ( virtual/logger )"
+
+RDEPEND="${DEPEND}"
+
+# Disable tests since we don't want to build that much here
+RESTRICT="test"
+
+SBINPROGS=""
+BINPROGS=""
+KRBPLUGIN=""
+PLUGINEXT=".so"
+SHAREDMODS=""
+
+S="${WORKDIR}/${MY_P}/source3"
+
+# TODO:
+# - enable iPrint on Prefix/OSX and Darwin?
+# - selftest-prefix? selftest?
+# - AFS?
+
+CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
+
+pkg_setup() {
+ if use server ; then
+ SBINPROGS="${SBINPROGS} bin/smbd bin/nmbd"
+ BINPROGS="${BINPROGS} bin/testparm bin/smbstatus bin/smbcontrol bin/pdbedit
+ bin/profiles bin/sharesec bin/eventlogadm"
+
+ use smbtav2 && BINPROGS="${BINPROGS} bin/smbta-util"
+ use swat && SBINPROGS="${SBINPROGS} bin/swat"
+ use winbind && SBINPROGS="${SBINPROGS} bin/winbindd"
+ use ads && use winbind && KRBPLUGIN="${KRBPLUGIN} bin/winbind_krb5_locator"
+ fi
+
+ if use client ; then
+ BINPROGS="${BINPROGS} bin/smbclient bin/net bin/smbget bin/smbtree
+ bin/nmblookup bin/smbpasswd bin/rpcclient bin/smbcacls bin/smbcquotas
+ bin/ntlm_auth"
+
+ use ads && SBINPROGS="${SBINPROGS} bin/cifs.upcall"
+ fi
+
+ use cups && BINPROGS="${BINPROGS} bin/smbspool"
+ use ldb && BINPROGS="${BINPROGS} bin/ldbedit bin/ldbsearch bin/ldbadd bin/ldbdel bin/ldbmodify bin/ldbrename";
+
+ if use winbind ; then
+ BINPROGS="${BINPROGS} bin/wbinfo"
+ SHAREDMODS="${SHAREDMODS}idmap_rid,idmap_hash"
+ use ads && SHAREDMODS="${SHAREDMODS},idmap_ad"
+ use ldap && SHAREDMODS="${SHAREDMODS},idmap_ldap,idmap_adex"
+ fi
+
+ if use winbind &&
+ [[ $(tc-getCC)$ == *gcc* ]] &&
+ [[ $(gcc-major-version)$(gcc-minor-version) -lt 43 ]]
+ then
+ eerror "It is a known issue that ${P} will not build with "
+ eerror "winbind use flag enabled when using gcc < 4.3 ."
+ eerror "Please use at least the latest stable gcc version."
+ die "Using sys-devel/gcc < 4.3 with winbind use flag."
+ fi
+
+ confutils_use_depend_all ads ldap
+ confutils_use_depend_all swat server
+}
+
+src_prepare() {
+ cp "${FILESDIR}/samba-3.4.2-lib.tevent.python.mk" "../lib/tevent/python.mk"
+
+ # ensure that winbind has correct ldflags (QA notice)
+ sed -i \
+ -e 's|LDSHFLAGS="|LDSHFLAGS="\\${LDFLAGS} |g' \
+ configure || die "sed failed"
+
+ epatch "${CONFDIR}"/${PN}-3.5.6-kerberos-dummy.patch
+ use smbtav2 && cd "${WORKDIR}/${P}" && epatch "${WORKDIR}"/smb_traffic_analyzer_v2.diff
+}
+
+src_configure() {
+ local myconf
+
+ # Filter out -fPIE
+ [[ ${CHOST} == *-*bsd* ]] && myconf="${myconf} --disable-pie"
+
+ # Upstream refuses to make this configurable
+ use caps && export ac_cv_header_sys_capability_h=yes || export ac_cv_header_sys_capability_h=no
+
+ # use_with doesn't accept 2 USE-flags
+ if use client && use ads ; then
+ myconf="${myconf} --with-cifsupcall"
+ else
+ myconf="${myconf} --without-cifsupcall"
+ fi
+
+ # Notes:
+ # - automount is only needed in conjunction with NIS and we don't have that
+ # anymore => LDAP?
+ # - --without-dce-dfs and --without-nisplus-home can't be passed to configure but are disabled by default
+ econf ${myconf} \
+ --with-piddir=/var/run/samba \
+ --sysconfdir=/etc/samba \
+ --localstatedir=/var \
+ $(use_enable debug developer) \
+ --enable-largefile \
+ --enable-socket-wrapper \
+ --enable-nss-wrapper \
+ $(use_enable swat) \
+ $(use_enable debug dmalloc) \
+ $(use_enable cups) \
+ --disable-iprint \
+ $(use_enable fam) \
+ --enable-shared-libs \
+ --disable-dnssd \
+ $(use_enable avahi) \
+ --with-fhs \
+ --with-privatedir=/var/lib/samba/private \
+ --with-rootsbindir=/var/cache/samba \
+ --with-lockdir=/var/cache/samba \
+ --with-swatdir=/usr/share/doc/${PF}/swat \
+ --with-configdir=/etc/samba \
+ --with-logfilebase=/var/log/samba \
+ --with-pammodulesdir=$(getpam_mod_dir) \
+ --without-afs \
+ --without-fake-kaserver \
+ --without-vfs-afsacl \
+ $(use_with ldap) \
+ $(use_with ads) \
+ $(use_with ads krb5 /usr) \
+ $(use_with ads dnsupdate) \
+ --without-automount \
+ $(use_with client cifsmount) \
+ $(use_with client cifsumount) \
+ $(use_with pam) \
+ $(use_with pam pam_smbpass) \
+ $(use_with syslog) \
+ $(use_with quota quotas) \
+ $(use_with quota sys-quotas) \
+ --without-utmp \
+ --without-lib{talloc,tdb} \
+ $(use_with netapi libnetapi) \
+ $(use_with smbclient libsmbclient) \
+ $(use_with smbsharemodes libsmbsharemodes) \
+ $(use_with addns libaddns) \
+ $(use_with cluster ctdb /usr) \
+ $(use_with cluster cluster-support) \
+ $(use_with acl acl-support) \
+ $(use_with aio aio-support) \
+ --with-sendfile-support \
+ $(use_with winbind) \
+ --with-shared-modules=${SHAREDMODS} \
+ --without-included-popt \
+ --without-included-iniparser
+}
+
+src_compile() {
+ # compile libs
+ if use addns ; then
+ einfo "make addns library"
+ emake libaddns || die "emake libaddns failed"
+ fi
+ if use netapi ; then
+ einfo "make netapi library"
+ emake libnetapi || die "emake libnetapi failed"
+ fi
+ if use smbclient ; then
+ einfo "make smbclient library"
+ emake libsmbclient || die "emake libsmbclient failed"
+ fi
+ if use smbsharemodes ; then
+ einfo "make smbsharemodes library"
+ emake libsmbsharemodes || die "emake libsmbsharemodes failed"
+ fi
+
+ # compile modules
+ emake modules || die "building modules failed"
+
+ # compile pam moudles
+ if use pam ; then
+ einfo "make pam modules"
+ emake pam_modules || die "emake pam_modules failed";
+ fi
+
+ # compile winbind nss modules
+ if use winbind ; then
+ einfo "make nss modules"
+ emake nss_modules || die "emake nss_modules failed";
+ fi
+
+ # compile utilities
+ if [ -n "${BINPROGS}" ] ; then
+ einfo "make binprogs"
+ emake ${BINPROGS} || die "emake binprogs failed";
+ fi
+ if [ -n "${SBINPROGS}" ] ; then
+ einfo "make sbinprogs"
+ emake ${SBINPROGS} || die "emake sbinprogs failed";
+ fi
+
+ if [ -n "${KRBPLUGIN}" ] ; then
+ einfo "make krbplugin"
+ emake ${KRBPLUGIN}${PLUGINEXT} || die "emake krbplugin failed";
+ fi
+
+ if use client ; then
+ einfo "make {,u}mount.cifs"
+ emake bin/{,u}mount.cifs || die "emake {,u}mount.cifs failed"
+ fi
+}
+
+src_install() {
+ # install libs
+ if use addns ; then
+ einfo "install addns library"
+ emake installlibaddns DESTDIR="${D}" || die "emake install libaddns failed"
+ fi
+ if use netapi ; then
+ einfo "install netapi library"
+ emake installlibnetapi DESTDIR="${D}" || die "emake install libnetapi failed"
+ fi
+ if use smbclient ; then
+ einfo "install smbclient library"
+ emake installlibsmbclient DESTDIR="${D}" || die "emake install libsmbclient failed"
+ fi
+ if use smbsharemodes ; then
+ einfo "install smbsharemodes library"
+ emake installlibsmbsharemodes DESTDIR="${D}" || die "emake install libsmbsharemodes failed"
+ fi
+
+ # install modules
+ emake installmodules DESTDIR="${D}" || die "installing modules failed"
+
+ if use pam ; then
+ einfo "install pam modules"
+ emake installpammodules DESTDIR="${D}" || die "emake installpammodules failed"
+
+ if use winbind ; then
+ newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind
+ doman ../docs/manpages/pam_winbind.8
+ fi
+
+ newpamd "${CONFDIR}/samba.pam" samba
+ dodoc pam_smbpass/README
+ fi
+
+ # Nsswitch extensions. Make link for wins and winbind resolvers
+ if use winbind ; then
+ einfo "install libwbclient"
+ emake installlibwbclient DESTDIR="${D}" || die "emake installlibwbclient failed"
+ dolib.so ../nsswitch/libnss_wins.so
+ dosym libnss_wins.so /usr/$(get_libdir)/libnss_wins.so.2
+ dolib.so ../nsswitch/libnss_winbind.so
+ dosym libnss_winbind.so /usr/$(get_libdir)/libnss_winbind.so.2
+ einfo "install libwbclient related manpages"
+ doman ../docs/manpages/idmap_rid.8
+ doman ../docs/manpages/idmap_hash.8
+ if use ldap ; then
+ doman ../docs/manpages/idmap_adex.8
+ doman ../docs/manpages/idmap_ldap.8
+ fi
+ if use ads ; then
+ doman ../docs/manpages/idmap_ad.8
+ fi
+ fi
+
+ # install binaries
+ insinto /usr
+ for prog in ${SBINPROGS} ; do
+ dosbin ${prog} || die "installing ${prog} failed"
+ doman ../docs/manpages/${prog/bin\/}* || die "doman failed"
+ done
+
+ for prog in ${BINPROGS} ; do
+ dobin ${prog} || die "installing ${prog} failed"
+ doman ../docs/manpages/${prog/bin\/}* || die "doman failed"
+ done
+
+ # install krbplugin
+ if [ -n "${KRBPLUGIN}" ] ; then
+ if has_version app-crypt/mit-krb5 ; then
+ insinto /usr/$(get_libdir)/krb5/plugins/libkrb5
+ doins ${KRBPLUGIN}${PLUGINEXT} || die "installing
+ ${KRBPLUGIN}${PLUGINEXT} failed"
+ elif has_version app-crypt/heimdal ; then
+ insinto /usr/$(get_libdir)/plugin/krb5
+ doins ${KRBPLUGIN}${PLUGINEXT} || die "installing
+ ${KRBPLUGIN}${PLUGINEXT} failed"
+ fi
+ insinto /usr
+ for prog in ${KRBPLUGIN} ; do
+ doman ../docs/manpages/${prog/bin\/}* || die "doman failed"
+ done
+ fi
+
+ # install server components
+ if use server ; then
+ doman ../docs/manpages/vfs* ../docs/manpages/samba.7
+
+ diropts -m0700
+ keepdir /var/lib/samba/private
+
+ diropts -m1777
+ keepdir /var/spool/samba
+
+ diropts -m0755
+ keepdir /var/{cache,log}/samba
+ keepdir /var/lib/samba/{netlogon,profiles}
+ keepdir /var/lib/samba/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC,X64,IA64,COLOR}
+ keepdir /usr/$(get_libdir)/samba/{auth,pdb,rpc,idmap,nss_info,gpext}
+
+ newconfd "${CONFDIR}/samba.confd" samba
+ newinitd "${CONFDIR}/samba.initd" samba
+
+ insinto /etc/samba
+ doins "${CONFDIR}"/{smbusers,lmhosts}
+
+ if use ldap ; then
+ insinto /etc/openldap/schema
+ doins ../examples/LDAP/samba.schema
+ fi
+
+ if use swat ; then
+ insinto /etc/xinetd.d
+ newins "${CONFDIR}/swat.xinetd" swat
+ script/installswat.sh "${D}" "${ROOT}/usr/share/doc/${PF}/swat" "${S}" \
+ || die "installing swat failed"
+ fi
+
+ dodoc ../MAINTAINERS ../README* ../Roadmap ../WHATSNEW.txt ../docs/THANKS
+ fi
+
+ # install client files ({u,}mount.cifs into /)
+ if use client ; then
+ into /
+ dosbin bin/{u,}mount.cifs || die "u/mount.cifs not around"
+ doman ../docs/manpages/{u,}mount.cifs.8 || die "can't create man pages"
+ fi
+
+ # install the spooler to cups
+ if use cups ; then
+ dosym /usr/bin/smbspool $(cups-config --serverbin)/backend/smb
+ fi
+
+ # install misc files
+ insinto /etc/samba
+ doins "${CONFDIR}"/smb.conf.default
+ doman ../docs/manpages/smb.conf.5
+
+ insinto /usr/"$(get_libdir)"/samba
+ doins ../codepages/{valid.dat,upcase.dat,lowcase.dat}
+
+ # install docs
+ if use doc ; then
+ dohtml -r ../docs/htmldocs/*
+ dodoc ../docs/*.pdf
+ fi
+
+ # install examples
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+
+ if use smbclient ; then
+ doins -r ../examples/libsmbclient
+ fi
+
+ if use winbind ; then
+ doins -r ../examples/pam_winbind ../examples/nss
+ fi
+
+ if use server ; then
+ cd ../examples
+ doins -r auth autofs dce-dfs LDAP logon misc pdb \
+ perfcounter printer-accounting printing scripts tridge \
+ validchars VFS
+ fi
+ fi
+
+ # Remove empty installation directories
+ rmdir --ignore-fail-on-non-empty \
+ "${D}/usr/$(get_libdir)/samba" \
+ "${D}/usr"/{sbin,bin} \
+ "${D}/usr/share"/{man,locale,} \
+ "${D}/var"/{run,lib/samba/private,lib/samba,lib,cache/samba,cache,} \
+ # || die "tried to remove non-empty dirs, this seems like a bug in the ebuild"
+}
+
+pkg_postinst() {
+ elog "The default value of 'wide links' has been changed to 'no' in samba 3.5"
+ elog "to avoid an insecure default configuration"
+ elog "('wide links = yes' and 'unix extensions = yes'). For more details,"
+ elog "please see http://www.samba.org/samba/news/symlink_attack.html ."
+ elog ""
+ elog "An EXPERIMENTAL implementation of the SMB2 protocol has been added."
+ elog "SMB2 can be enabled by setting 'max protocol = smb2'. SMB2 is a new "
+ elog "implementation of the SMB protocol used by Windows Vista and higher"
+ elog ""
+ elog "For further information make sure to read the release notes at"
+ elog "http://samba.org/samba/history/${P}.html and "
+ elog "http://samba.org/samba/history/${PN}-3.5.0.html"
+}
diff --git a/net-fs/smbtad/Manifest b/net-fs/smbtad/Manifest
new file mode 100644
index 0000000..14bbbae
--- /dev/null
+++ b/net-fs/smbtad/Manifest
@@ -0,0 +1,4 @@
+AUX smbtad.rc 505 RMD160 b17e1ba2ff6ed6a8d9f7798947e0ccc3941afe83 SHA1 624803ed152269676555c1b6c31d39e6c0041fac SHA256 ad23ecc435b04f6231d02e2ffbb64562258973c64759df81259d1a72be9f8e2e
+DIST smbtad-1.2.2.tar.bz2 974152 RMD160 a0a1a522b42c49744c306fac12eb18832278a278 SHA1 c4142599b8717ee2dccc5b3246b0e5349cbce5de SHA256 0260d1631cb23c02b1e0749a14c14cf1e3814fe75307c2b6d45cea1ac63c0353
+EBUILD smbtad-1.2.2.ebuild 699 RMD160 627d550d823024868c4f61d457be453a54d7110a SHA1 a5aa416b5fb2a1132ef3b043eb761ce1c77eff2a SHA256 fc03b73320c573c9340ddea2b08e5844f5ca991b37f65bff7558ccd050e06cf6
+MISC metadata.xml 255 RMD160 1c9298d0fe62750cff79fe233f2e47f2e6480afd SHA1 57c7211b8b5aa3f740b460e589372689527c8f1f SHA256 58843cfadfa89386817b7abe70a82c9ef010fdc324f7c56865579369480cca81
diff --git a/net-fs/smbtad/files/smbtad.rc b/net-fs/smbtad/files/smbtad.rc
new file mode 100755
index 0000000..9849ee4
--- /dev/null
+++ b/net-fs/smbtad/files/smbtad.rc
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+CONFFILE=/etc/conf.d/${SVCNAME}.conf
+PIDFILE=/var/run/${SVCNAME}.pid
+
+depend() {
+ before samba
+ use dns logger
+}
+
+start() {
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --quiet \
+ --exec /usr/bin/"${SVCNAME}" \
+ -- -c "${CONFFILE}"
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --name "${SVCNAME}"
+ eend ${?}
+}
diff --git a/net-fs/smbtad/metadata.xml b/net-fs/smbtad/metadata.xml
new file mode 100644
index 0000000..f10786a
--- /dev/null
+++ b/net-fs/smbtad/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>no-herd</herd>
+ <maintainer>
+ <email>dagger@gentoo.org</email>
+ <name>Robert Piasek</name>
+ </maintainer>
+</pkgmetadata>
+
diff --git a/net-fs/smbtad/smbtad-1.2.2.ebuild b/net-fs/smbtad/smbtad-1.2.2.ebuild
new file mode 100644
index 0000000..a5fdd87
--- /dev/null
+++ b/net-fs/smbtad/smbtad-1.2.2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="4"
+inherit cmake-utils
+
+DESCRIPTION="Data receiver of the SMB Traffic Analyzer project"
+HOMEPAGE="http://github.com/hhetter/smbtad"
+SRC_URI="http://morelias.org/smbta/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+DEPEND="dev-util/cmake"
+
+RDEPEND="net-fs/samba[smbtav2]"
+
+DOCS="README AUTHORS"
+
+src_configure() {
+ mycmakeargs="${mycmakeargs} \
+ $(cmake-utils_use debug DEBUG)"
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ newinitd "${FILESDIR}"/smbtad.rc smbtad
+ newconfd dist/smbtad.conf_example smbtad.conf
+
+}
diff --git a/net-fs/smbtatools/Manifest b/net-fs/smbtatools/Manifest
new file mode 100644
index 0000000..7bf43cb
--- /dev/null
+++ b/net-fs/smbtatools/Manifest
@@ -0,0 +1,3 @@
+DIST smbtatools-1.2.2.tar.bz2 1347531 RMD160 ae60dcf2a1aeca29776166b5e89d37ee69eac4d5 SHA1 d36a04e447c4ac13061bfd6160c7be983e39c2fe SHA256 a0c54a6cac034274c065ba41c39be1bc873d7ce4c8552cc59c064010ba66260b
+EBUILD smbtatools-1.2.2.ebuild 588 RMD160 66e8b6df156d2db0002abf69ce7544c6910e018b SHA1 3bc51edd806357fcac48e544f9b27b0c8bf8f765 SHA256 bb2f9df733adbe792163c67b5786fdaf6bf5df9577ea55ad775ae7297ed53eff
+MISC metadata.xml 255 RMD160 1c9298d0fe62750cff79fe233f2e47f2e6480afd SHA1 57c7211b8b5aa3f740b460e589372689527c8f1f SHA256 58843cfadfa89386817b7abe70a82c9ef010fdc324f7c56865579369480cca81
diff --git a/net-fs/smbtatools/metadata.xml b/net-fs/smbtatools/metadata.xml
new file mode 100644
index 0000000..f10786a
--- /dev/null
+++ b/net-fs/smbtatools/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>no-herd</herd>
+ <maintainer>
+ <email>dagger@gentoo.org</email>
+ <name>Robert Piasek</name>
+ </maintainer>
+</pkgmetadata>
+
diff --git a/net-fs/smbtatools/smbtatools-1.2.2.ebuild b/net-fs/smbtatools/smbtatools-1.2.2.ebuild
new file mode 100644
index 0000000..404dd47
--- /dev/null
+++ b/net-fs/smbtatools/smbtatools-1.2.2.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="4"
+inherit cmake-utils
+
+DESCRIPTION="Tools for configuration and query of SMB Traffic Analyzer"
+HOMEPAGE="http://github.com/hhetter/smbtatools"
+SRC_URI="http://morelias.org/smbta/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+DEPEND="dev-util/cmake"
+RDEPEND="net-fs/smbtad"
+
+DOCS="doc/smbta-guide.html doc/gfx/*.png"
+
+src_configure() {
+ mycmakeargs="${mycmakeargs} \
+ $(cmake-utils_use debug DEBUG)"
+
+ cmake-utils_src_configure
+}