summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Andreetta <satya@gentoo.org>2004-06-11 14:30:14 +0000
committerChristian Andreetta <satya@gentoo.org>2004-06-11 14:30:14 +0000
commit290e4519dcd68f262cb40704c50ef9021f9d81b1 (patch)
tree9f62a8036c69a27acd07bb08a4fd0ca46e2fab59 /net-fs/samba
parentnew version on cpan (Manifest recommit) (diff)
downloadgentoo-2-290e4519dcd68f262cb40704c50ef9021f9d81b1.tar.gz
gentoo-2-290e4519dcd68f262cb40704c50ef9021f9d81b1.tar.bz2
gentoo-2-290e4519dcd68f262cb40704c50ef9021f9d81b1.zip
version bump. initscripts. bug resolution feast :)
Diffstat (limited to 'net-fs/samba')
-rw-r--r--net-fs/samba/ChangeLog10
-rw-r--r--net-fs/samba/Manifest57
-rw-r--r--net-fs/samba/files/digest-samba-3.0.4-r13
-rw-r--r--net-fs/samba/files/samba-3.0.4-python-setup.patch31
-rw-r--r--net-fs/samba/files/samba-3.0.4.patch223
-rw-r--r--net-fs/samba/files/samba-conf27
-rw-r--r--net-fs/samba/files/samba-init58
-rw-r--r--net-fs/samba/samba-3.0.4-r1.ebuild369
8 files changed, 723 insertions, 55 deletions
diff --git a/net-fs/samba/ChangeLog b/net-fs/samba/ChangeLog
index b56cb24b047d..9ca1adbf2eed 100644
--- a/net-fs/samba/ChangeLog
+++ b/net-fs/samba/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-fs/samba
# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v 1.77 2004/05/12 05:18:38 randy Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v 1.78 2004/06/11 14:30:14 satya Exp $
+
+*samba-3.0.4-r1 (11 Jun 2004)
+
+ 11 Jun 2004; Christian Andreetta <satya@gentoo.org> samba-3.0.4-r1.ebuild,
+ files/samba-3.0.4-python-setup.patch, files/samba-3.0.4.patch,
+ files/samba-init files/samba-conf:
+ version bump. new initscripts. _very_ nice group work for bug #48871,
+ which resolves 30151, 31208, 36465, 38190, 41796, 42557, 49463 also.
12 May 2004; Michael McCabe <randy@gentoo.org> samba-3.0.2a-r2.ebuild:
Added s390 keywords
diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest
index f0e09747d55b..5232272827aa 100644
--- a/net-fs/samba/Manifest
+++ b/net-fs/samba/Manifest
@@ -1,39 +1,34 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-MD5 4f5c98efbdd3b13219907edb0d6a7d4a ChangeLog 15940
-MD5 9dc4a618b56b5e6b4386523dd9c869c9 metadata.xml 373
-MD5 70172eea79bd0ccb6f357d1dba8803a2 samba-3.0.1-r1.ebuild 11339
+MD5 40a97e9c14932d6b84bf0a23d58f9d2a samba-3.0.4-r1.ebuild 10960
+MD5 c59ae5e5ce4891972b2a6d61dd3fc455 samba-3.0.1-r1.ebuild 11338
MD5 8dc040986a2a1db5e79dbfe3d2d72010 samba-3.0.2a-r2.ebuild 12185
+MD5 fefe05636e5aa6a807660051d6658cf1 ChangeLog 16293
+MD5 9dc4a618b56b5e6b4386523dd9c869c9 metadata.xml 373
+MD5 88b5abd8e04f84a7507ab35555f305b7 files/winbind-init 490
+MD5 fcebd975211fecf647f6cecf26ba5c96 files/samba-3.0.4.patch 8086
+MD5 d57ae3d7c51d488034f992de323e52b8 files/swat.xinetd 524
+MD5 20997c75e29fec20efbb2cd6695cd3a9 files/recycle.conf 776
+MD5 9e78d5e97b1c5f85d9c21636d1f234a4 files/smbldap_conf.pm 7092
+MD5 cbaa5a39d9bd67b13f8131b426a4256b files/samba-2.2.5-gp-reloc-fix.patch 431
+MD5 c78caa4193cd606b58c158c57b5adbd7 files/nsswitch.conf-wins 389
+MD5 41d1e48b5dad9851c75524baa07fb08d files/samba-conf 1231
+MD5 70e234c2bf3520d9276f8d9c7f99158d files/samba-init 868
MD5 fd2382184b6a07e63cb07ff26b578fd2 files/config-svc-smbd+nmbd 784
-MD5 b610fd35d7a0a9de510e31d85345d14a files/lmhosts 124
MD5 f402c2c4103f4c13ac3cc5fa165940db files/nonroot-bind.diff 757
MD5 5d3129a0f6bcbec6ec91d217881a34e1 files/nsswitch.conf-winbind 298
-MD5 092f8dd0b4f6f5da13ce2daafb534978 files/nsswitch.conf-wins 390
-MD5 20997c75e29fec20efbb2cd6695cd3a9 files/recycle.conf 776
-MD5 cbaa5a39d9bd67b13f8131b426a4256b files/samba-2.2.5-gp-reloc-fix.patch 431
-MD5 8289eda694b35875eec6df5cc3f50c86 files/samba-2.2.6-libresolv.patch 540
-MD5 60e527174c1b2c53126dbbedb3cae0f7 files/samba-2.2.8-statfs.patch 209
+MD5 a41862c288faa798030dc2178787113a files/lmhosts 123
MD5 516ca38dfc67b7cd7356f93ad2cf75b9 files/samba-3.0.0-python-setup.patch 767
-MD5 934e6115a71e2969b6d3f9dac091f52a files/samba-init 882
-MD5 9560b7e29d3a65db029fc1800e84abcc files/samba-pdb_ldap-exop.patch 3921
-MD5 9faccd0fa1bfb58b4ffa0e9dd01e1ec6 files/samba-slapd-include.conf 497
-MD5 a4597c467bc5322bfba790e526867ae0 files/samba-svc 982
-MD5 b6cdc1468e45f92f19873e0c6c5b6e94 files/samba.pam 332
-MD5 2a8e771c143fc19819c4b6bd022f12ed files/smb.conf.example 16181
-MD5 8c1f1e3655e12b85102ce257f3efad62 files/smb.conf.example-samba3 20762
-MD5 cf9aae0d1cf55f47d1434f6bf1cee52e files/smbldap_conf.pm 7093
-MD5 3721b81198a029319546e6ef56e5c493 files/smbusers 202
-MD5 ba636412fdffb621dcd28e79fb247d7c files/swat.xinetd 525
-MD5 ce5400ed75143be061711d2c1d51a081 files/system-auth-winbind 867
-MD5 d95c7a841071087246ef23a1f72b890f files/winbind-init 491
+MD5 b1c06dac56317d21e489e1d57b676e7c files/smb.conf.example 16180
+MD5 06fd0037fa556fa476fcf51c9311c609 files/samba-slapd-include.conf 496
+MD5 60e527174c1b2c53126dbbedb3cae0f7 files/samba-2.2.8-statfs.patch 209
MD5 f3a4b3b0a8162ae87779846d7e6adbbf files/digest-samba-3.0.1-r1 202
+MD5 a86336201c2eced7a6e5a5138514e2f7 files/digest-samba-3.0.4-r1 203
+MD5 8c1f1e3655e12b85102ce257f3efad62 files/smb.conf.example-samba3 20762
+MD5 9560b7e29d3a65db029fc1800e84abcc files/samba-pdb_ldap-exop.patch 3921
+MD5 6f854f1d9edcfc32c4379c0f90c91c93 files/smbusers 201
+MD5 5b90f114bd4f12bee1e9e7db2c3a34f9 files/system-auth-winbind 866
MD5 990fe15ff8a0e79f39069fff6475536d files/samba-3.0.2a-smbprint.patch 1224
+MD5 d487b34533f59d3a1a1c38717d3d221e files/samba-svc 981
+MD5 b6cdc1468e45f92f19873e0c6c5b6e94 files/samba.pam 332
MD5 89ef79072e3e08e4caada278e2c3b280 files/digest-samba-3.0.2a-r2 204
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.9.8 (GNU/Linux)
-
-iD8DBQFAyLsiHTu7gpaalycRAgBdAJ9qIo1JvygKiAgBo8tdr0pU+AqUDACglSDY
-We8fyPvdAtW9LE5tp8tq9Ic=
-=tACu
------END PGP SIGNATURE-----
+MD5 de43ff30dd5f1431590fd62a997e71b4 files/samba-3.0.4-python-setup.patch 833
+MD5 8289eda694b35875eec6df5cc3f50c86 files/samba-2.2.6-libresolv.patch 540
diff --git a/net-fs/samba/files/digest-samba-3.0.4-r1 b/net-fs/samba/files/digest-samba-3.0.4-r1
new file mode 100644
index 000000000000..ca2f2b880262
--- /dev/null
+++ b/net-fs/samba/files/digest-samba-3.0.4-r1
@@ -0,0 +1,3 @@
+MD5 0156265c1e95ac662deef386f615504f samba-3.0.4.tar.gz 15046252
+MD5 5f173d549014985d681478897135915b samba-vscan-0.3.5.tar.bz2 161982
+MD5 34ef159fc49a2c30ff27b481dc8e1215 smbldap-tools-0.8.4.tgz 286290
diff --git a/net-fs/samba/files/samba-3.0.4-python-setup.patch b/net-fs/samba/files/samba-3.0.4-python-setup.patch
new file mode 100644
index 000000000000..55de92bb585a
--- /dev/null
+++ b/net-fs/samba/files/samba-3.0.4-python-setup.patch
@@ -0,0 +1,31 @@
+--- source/python/setup.py 2004-04-04 09:37:15.000000000 +0200
++++ source/python/setup.py.new 2004-05-09 12:38:43.196926688 +0200
+@@ -50,16 +50,25 @@
+ libraries = []
+ library_dirs = []
+
++next_is_path = 0
+ for lib in string.split(samba_libs):
+- if lib[0:2] == "-l":
++ if next_is_path <> 0:
++ library_dirs.append(lib);
++ next_is_path = 0;
++ continue
++ if lib == "-Wl,-rpath":
++ next_is_path = 1;
++ continue
++ elif lib[0:2] == "-l":
+ libraries.append(lib[2:])
+ continue
+- if lib[0:2] == "-L":
++ elif lib[0:2] == "-L":
+ library_dirs.append(lib[2:])
+ continue
+- if lib[0:2] == "-W":
++ elif lib[0:2] == "-W":
+ # Skip linker flags
+ continue
++
+ print "Unknown entry '%s' in $LIBS variable passed to setup.py" % lib
+ sys.exit(1)
+
diff --git a/net-fs/samba/files/samba-3.0.4.patch b/net-fs/samba/files/samba-3.0.4.patch
new file mode 100644
index 000000000000..8d67df280e16
--- /dev/null
+++ b/net-fs/samba/files/samba-3.0.4.patch
@@ -0,0 +1,223 @@
+##################################################################
+# Recommended patchset for Samba 3.0.4
+#
+# This patchset fixes the following bugs:
+# * BUG 1315 - wbinfo -t unsuccessful on 3.0.4
+# * BUG 1319 - Cannot write to a share with write-list users
+# * BUG 1345 - Macromedia Homesite cannot connect anymore
+# after upgrade to 3.0.4
+#
+# Please refer to https://bugzilla.samba.org/ for specific
+# details regarding the actual bug reports.
+##################################################################
+
+
+Index: source/rpc_client/cli_pipe.c
+===================================================================
+--- source/rpc_client/cli_pipe.c (revision 842)
++++ source/rpc_client/cli_pipe.c (working copy)
+@@ -332,13 +332,24 @@
+ if (cli->pipe_auth_flags & AUTH_PIPE_NETSEC) {
+ RPC_AUTH_NETSEC_CHK chk;
+
+- if (auth_len != RPC_AUTH_NETSEC_CHK_LEN) {
++ if ( (auth_len != RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN)
++ && (auth_len != RPC_AUTH_NETSEC_SIGN_ONLY_CHK_LEN) )
++ {
+ DEBUG(0,("rpc_auth_pipe: wrong schannel auth len %d\n", auth_len));
+ return False;
+ }
+
+- if (!smb_io_rpc_auth_netsec_chk("schannel_auth_sign",
+- &chk, &auth_verf, 0)) {
++ /* can't seal with no nonce */
++ if ( (cli->pipe_auth_flags & AUTH_PIPE_SEAL)
++ && (auth_len != RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN) )
++ {
++ DEBUG(0,("rpc_auth_pipe: sealing not supported with schannel auth len %d\n", auth_len));
++ return False;
++ }
++
++
++ if (!smb_io_rpc_auth_netsec_chk("schannel_auth_sign", auth_len, &chk, &auth_verf, 0))
++ {
+ DEBUG(0, ("rpc_auth_pipe: schannel unmarshalling "
+ "RPC_AUTH_NETSECK_CHK failed\n"));
+ return False;
+@@ -918,7 +929,7 @@
+ auth_len = RPC_AUTH_NTLMSSP_CHK_LEN;
+ }
+ if (cli->pipe_auth_flags & AUTH_PIPE_NETSEC) {
+- auth_len = RPC_AUTH_NETSEC_CHK_LEN;
++ auth_len = RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN;
+ }
+ auth_hdr_len = RPC_HDR_AUTH_LEN;
+ }
+@@ -1034,8 +1045,9 @@
+ /* write auth footer onto the packet */
+
+ parse_offset_marker = prs_offset(&sec_blob);
+- if (!smb_io_rpc_auth_netsec_chk("", &verf,
+- &sec_blob, 0)) {
++ if (!smb_io_rpc_auth_netsec_chk("", RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN,
++ &verf, &sec_blob, 0))
++ {
+ prs_mem_free(&sec_blob);
+ return False;
+ }
+Index: source/smbd/filename.c
+===================================================================
+--- source/smbd/filename.c (revision 842)
++++ source/smbd/filename.c (working copy)
+@@ -137,6 +137,10 @@
+ if (!*name) {
+ name[0] = '.';
+ name[1] = '\0';
++ if (SMB_VFS_STAT(conn,name,&st) == 0) {
++ *pst = st;
++ }
++ DEBUG(5,("conversion finished %s -> %s\n",orig_path, name));
+ return(True);
+ }
+
+Index: source/smbd/uid.c
+===================================================================
+--- source/smbd/uid.c (revision 842)
++++ source/smbd/uid.c (working copy)
+@@ -189,20 +189,26 @@
+
+ snum = SNUM(conn);
+
++ if ((vuser) && !check_user_ok(conn, vuser, snum)) {
++ DEBUG(2,("change_to_user: SMB user %s (unix user %s, vuid %d) not permitted access to share %s.\n",
++ vuser->user.smb_name, vuser->user.unix_name, vuid, lp_servicename(snum)));
++ return False;
++ }
++
+ if (conn->force_user) /* security = share sets this too */ {
+ uid = conn->uid;
+ gid = conn->gid;
+ current_user.groups = conn->groups;
+ current_user.ngroups = conn->ngroups;
+ token = conn->nt_user_token;
+- } else if ((vuser) && check_user_ok(conn, vuser, snum)) {
++ } else if (vuser) {
+ uid = conn->admin_user ? 0 : vuser->uid;
+ gid = vuser->gid;
+ current_user.ngroups = vuser->n_groups;
+ current_user.groups = vuser->groups;
+ token = vuser->nt_user_token;
+ } else {
+- DEBUG(2,("change_to_user: Invalid vuid used %d or vuid not permitted access to share.\n",vuid));
++ DEBUG(2,("change_to_user: Invalid vuid used %d in accessing share %s.\n",vuid, lp_servicename(snum) ));
+ return False;
+ }
+
+Index: source/rpc_server/srv_pipe.c
+===================================================================
+--- source/rpc_server/srv_pipe.c (revision 842)
++++ source/rpc_server/srv_pipe.c (working copy)
+@@ -124,7 +124,7 @@
+ if(p->ntlmssp_auth_validated) {
+ data_space_available -= (RPC_HDR_AUTH_LEN + RPC_AUTH_NTLMSSP_CHK_LEN);
+ } else if(p->netsec_auth_validated) {
+- data_space_available -= (RPC_HDR_AUTH_LEN + RPC_AUTH_NETSEC_CHK_LEN);
++ data_space_available -= (RPC_HDR_AUTH_LEN + RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN);
+ }
+
+ /*
+@@ -177,8 +177,8 @@
+ } else if (p->netsec_auth_validated) {
+ p->hdr.frag_len = RPC_HEADER_LEN + RPC_HDR_RESP_LEN +
+ data_len + ss_padding_len +
+- RPC_HDR_AUTH_LEN + RPC_AUTH_NETSEC_CHK_LEN;
+- p->hdr.auth_len = RPC_AUTH_NETSEC_CHK_LEN;
++ RPC_HDR_AUTH_LEN + RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN;
++ p->hdr.auth_len = RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN;
+ } else {
+ p->hdr.frag_len = RPC_HEADER_LEN + RPC_HDR_RESP_LEN + data_len;
+ p->hdr.auth_len = 0;
+@@ -309,7 +309,8 @@
+ SENDER_IS_ACCEPTOR,
+ &verf, data, data_len + ss_padding_len);
+
+- smb_io_rpc_auth_netsec_chk("", &verf, &outgoing_pdu, 0);
++ smb_io_rpc_auth_netsec_chk("", RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN,
++ &verf, &outgoing_pdu, 0);
+
+ p->netsec_auth.seq_num++;
+ }
+@@ -1339,7 +1340,7 @@
+
+ auth_len = p->hdr.auth_len;
+
+- if (auth_len != RPC_AUTH_NETSEC_CHK_LEN) {
++ if (auth_len != RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN) {
+ DEBUG(0,("Incorrect auth_len %d.\n", auth_len ));
+ return False;
+ }
+@@ -1384,7 +1385,9 @@
+ return False;
+ }
+
+- if(!smb_io_rpc_auth_netsec_chk("", &netsec_chk, rpc_in, 0)) {
++ if(!smb_io_rpc_auth_netsec_chk("", RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN,
++ &netsec_chk, rpc_in, 0))
++ {
+ DEBUG(0,("failed to unmarshal RPC_AUTH_NETSEC_CHK.\n"));
+ return False;
+ }
+Index: source/rpc_parse/parse_rpc.c
+===================================================================
+--- source/rpc_parse/parse_rpc.c (revision 842)
++++ source/rpc_parse/parse_rpc.c (working copy)
+@@ -1189,7 +1189,8 @@
+ /*******************************************************************
+ reads or writes an RPC_AUTH_NETSEC_CHK structure.
+ ********************************************************************/
+-BOOL smb_io_rpc_auth_netsec_chk(const char *desc, RPC_AUTH_NETSEC_CHK * chk,
++BOOL smb_io_rpc_auth_netsec_chk(const char *desc, int auth_len,
++ RPC_AUTH_NETSEC_CHK * chk,
+ prs_struct *ps, int depth)
+ {
+ if (chk == NULL)
+@@ -1198,10 +1199,19 @@
+ prs_debug(ps, depth, desc, "smb_io_rpc_auth_netsec_chk");
+ depth++;
+
+- prs_uint8s(False, "sig ", ps, depth, chk->sig, sizeof(chk->sig));
+- prs_uint8s(False, "seq_num", ps, depth, chk->seq_num, sizeof(chk->seq_num));
+- prs_uint8s(False, "packet_digest", ps, depth, chk->packet_digest, sizeof(chk->packet_digest));
+- prs_uint8s(False, "confounder", ps, depth, chk->confounder, sizeof(chk->confounder));
++ if ( !prs_uint8s(False, "sig ", ps, depth, chk->sig, sizeof(chk->sig)) )
++ return False;
++
++ if ( !prs_uint8s(False, "seq_num", ps, depth, chk->seq_num, sizeof(chk->seq_num)) )
++ return False;
++
++ if ( !prs_uint8s(False, "packet_digest", ps, depth, chk->packet_digest, sizeof(chk->packet_digest)) )
++ return False;
++
++ if ( auth_len == RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN ) {
++ if ( !prs_uint8s(False, "confounder", ps, depth, chk->confounder, sizeof(chk->confounder)) )
++ return False;
++ }
+
+ return True;
+ }
+Index: source/include/rpc_dce.h
+===================================================================
+--- source/include/rpc_dce.h (revision 842)
++++ source/include/rpc_dce.h (working copy)
+@@ -63,8 +63,10 @@
+ #define NETSEC_AUTH_TYPE 0x44
+ #define NETSEC_SIGN_SIGNATURE { 0x77, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00 }
+ #define NETSEC_SEAL_SIGNATURE { 0x77, 0x00, 0x7a, 0x00, 0xff, 0xff, 0x00, 0x00 }
+-#define RPC_AUTH_NETSEC_CHK_LEN 0x20
+
++#define RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN 0x20
++#define RPC_AUTH_NETSEC_SIGN_ONLY_CHK_LEN 0x18
++
+ /* The 7 here seems to be required to get Win2k not to downgrade us
+ to NT4. Actually, anything other than 1ff would seem to do... */
+ #define NETLOGON_NEG_AUTH2_FLAGS 0x000701ff
diff --git a/net-fs/samba/files/samba-conf b/net-fs/samba/files/samba-conf
new file mode 100644
index 000000000000..62324db674a4
--- /dev/null
+++ b/net-fs/samba/files/samba-conf
@@ -0,0 +1,27 @@
+daemon_list="smbd nmbd winbind"
+
+#----------------------------------------------------------------------------
+# 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 --quiet --exec /usr/sbin/smbd -- ${smbd_start_options}"
+smbd_stop="start-stop-daemon --stop --quiet --pidfile /var/run/samba/smbd.pid"
+smbd_reload="killall -HUP smbd"
+
+nmbd_start_options="-D"
+nmbd_start="start-stop-daemon --start --quiet --exec /usr/sbin/nmbd -- ${nmbd_start_options}"
+nmbd_stop="start-stop-daemon --stop --quiet --pidfile /var/run/samba/nmbd.pid"
+nmbd_reload="killall -HUP nmbd"
+
+winbind_start_options=""
+winbind_start="start-stop-daemon --start --quiet --exec /usr/sbin/winbindd -- ${winbind_start_options}"
+winbind_stop="start-stop-daemon --stop --quiet --oknodo --exec /usr/sbin/winbindd"
+winbind_reload="killall -HUP winbindd"
+
diff --git a/net-fs/samba/files/samba-init b/net-fs/samba/files/samba-init
index f8c38384776b..61080d9333fa 100644
--- a/net-fs/samba/files/samba-init
+++ b/net-fs/samba/files/samba-init
@@ -1,7 +1,7 @@
#!/sbin/runscript
-# Copyright 1999-2004 Gentoo Technologies, Inc.
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/samba-init,v 1.4 2004/03/04 19:25:50 vapier Exp $
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/samba-init,v 1.5 2004/06/11 14:30:14 satya Exp $
opts="${opts} reload"
@@ -10,29 +10,41 @@ depend() {
use cupsd
}
+function signal_do {
+ local signal
+ signal="$1"
+ if [ -n "${signal}" ]; then
+ result=0
+ last_result=0
+ for daemon in ${daemon_list}
+ do
+ cmd=${daemon}_${signal}
+ cmd_exec="${!cmd}"
+ 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
+ fi
+ return ${result}
+}
start() {
- ebegin "Starting samba"
- start-stop-daemon --start --quiet --exec /usr/sbin/smbd
- result=$?
- start-stop-daemon --start --quiet --exec /usr/sbin/nmbd
- result=$(( $result + $? ))
- eend $result
+ ${my_service_PRE}
+ signal_do start
+ eend $?
}
-
stop() {
- ebegin "Stopping samba"
- start-stop-daemon --stop --quiet --pidfile /var/run/samba/smbd.pid
- result=$?
- start-stop-daemon --stop --quiet --pidfile /var/run/samba/nmbd.pid
- result=$(( $result + $? ))
- eend $result
+ ${my_service_PRE}
+ signal_do stop
+ ${my_service_POST}
+ eend $?
}
-
reload() {
- ebegin "Reloading samba"
- killall -HUP smbd &>/dev/null
- result=$?
- killall -HUP nmbd &>/dev/null
- result=$(( $result + $? ))
- eend $result
+ ${my_service_PRE}
+ signal_do reload
+ eend $?
}
diff --git a/net-fs/samba/samba-3.0.4-r1.ebuild b/net-fs/samba/samba-3.0.4-r1.ebuild
new file mode 100644
index 000000000000..aefa88de701f
--- /dev/null
+++ b/net-fs/samba/samba-3.0.4-r1.ebuild
@@ -0,0 +1,369 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/samba-3.0.4-r1.ebuild,v 1.1 2004/06/11 14:30:14 satya Exp $
+
+inherit eutils
+
+IUSE="kerberos mysql postgres xml xml2 acl cups ldap pam readline python doc"
+IUSE="${IUSE} oav"
+
+DESCRIPTION="SAMBA is a suite of SMB and CIFS client/server programs for UNIX"
+HOMEPAGE="http://www.samba.org/
+ http://www.openantivirus.org/projects.php
+ http://samba.idealx.org"
+
+SMBLDAP_TOOLS_VER=0.8.4
+VSCAN_VER=0.3.5
+VSCAN_MODS="oav sophos fprotd fsav trend icap mksd kavp clamav nai"
+
+_CVS="-${PV/_/}"
+S=${WORKDIR}/${PN}${_CVS}
+
+SRC_URI="mirror://samba/${PN}${_CVS}.tar.gz
+ oav? mirror://sourceforge/openantivirus/${PN}-vscan-${VSCAN_VER}.tar.bz2
+ ldap? http://samba.idealx.org/dist/smbldap-tools-${SMBLDAP_TOOLS_VER}.tgz"
+
+_COMMON_DEPS="dev-libs/popt
+ readline? sys-libs/readline
+ ldap? ( kerberos? ( virtual/krb5 ) )
+ mysql? ( dev-db/mysql sys-libs/zlib )
+ postgres? ( dev-db/postgresql sys-libs/zlib )
+ xml? ( dev-libs/libxml2 sys-libs/zlib )
+ xml2? ( dev-libs/libxml2 sys-libs/zlib )
+ acl? sys-apps/acl
+ cups? net-print/cups
+ ldap? net-nds/openldap
+ pam? sys-libs/pam
+ python? dev-lang/python"
+DEPEND="sys-devel/autoconf
+ >=sys-apps/sed-4
+ ${_COMMON_DEPS}"
+#IDEALX scripts are now using Net::LDAP
+RDEPEND="ldap? dev-perl/perl-ldap ${_COMMON_DEPS}"
+
+KEYWORDS="~x86 ~ppc ~sparc ~mips ~hppa ~amd64 ~ia64 ~alpha"
+LICENSE="GPL-2"
+SLOT="0"
+
+src_unpack() {
+ local i
+ unpack ${A} || die
+ cd ${S} || die
+
+ # Clean up CVS
+ find . -name .cvsignore | xargs rm -f
+ find . -name CVS | xargs rm -rf
+
+ # Add patch(es)
+ # This patchset fixes Samba bugs #1315, #1319 and #1345
+ # courtesy of Gerald Carter (jerry@samba.org)
+ epatch ${FILESDIR}/samba-3.0.4.patch
+
+ #Next one is from eger@cc.gatech.edu :)
+ epatch ${FILESDIR}/samba-3.0.4-python-setup.patch || die
+ #Fix for bug #27858
+ if [ "${ARCH}" = "sparc" -o "${ARCH}" = "ppc" ]
+ then
+ cd ${S}/source/include
+ epatch ${FILESDIR}/samba-2.2.8-statfs.patch
+ fi
+ #Bug #36200; sys-kernel/linux-headers dependent
+ sed -i -e 's:#define LINUX_QUOTAS_2:#define LINUX_QUOTAS_1:' \
+ -e 's:<linux/quota.h>:<sys/quota.h>:' \
+ ${S}/source/smbd/quotas.c
+
+ # For clean docs packaging sake.
+ rm -rf ${S}/examples.bin
+ cp -a ${S}/examples ${S}/examples.bin
+
+ # Prep samba-vscan source.
+ use oav && cp -a ${WORKDIR}/${PN}-vscan-${VSCAN_VER} ${S}/examples.bin/VFS
+
+ cd ${S}/source
+ echo "Running autoconf ..."
+ autoconf || die
+}
+
+src_compile() {
+ local i
+ local myconf
+ local mymods
+
+ #this is deprecated...
+ #mymods="nisplussam"
+ use xml || use xml2 && mymods="xml,${mymods}"
+ use mysql && mymods="mysql,${mymods}"
+ use postgres && mymods="pgsql,${mymods}"
+
+ [ -n "${mymods}" ] && myconf="--with-expsam=${mymods}"
+
+ use acl \
+ && myconf="${myconf} --with-acl-support" \
+ || myconf="${myconf} --without-acl-support"
+
+ use pam \
+ && myconf="${myconf} --with-pam --with-pam_smbpass" \
+ || myconf="${myconf} --without-pam --without-pam_smbpass"
+
+ use cups \
+ && myconf="${myconf} --enable-cups" \
+ || myconf="${myconf} --disable-cups"
+
+ use ldap \
+ && myconf="${myconf} --with-ldap" \
+ || myconf="${myconf} --without-ldap"
+ #this is for old samba 2.x compat
+ #myconf="${myconf} --with-ldapsam"
+ myconf="${myconf} --without-ldapsam"
+
+ if [ "${ARCH}" != "amd64" ]
+ then
+ use kerberos && use ldap \
+ && myconf="${myconf} --with-ads" \
+ || myconf="${myconf} --without-ads"
+ else
+ myconf="${myconf} --without-ads"
+ fi
+
+ use python \
+ && myconf="${myconf} --with-python=yes" \
+ || myconf="${myconf} --with-python=no"
+
+ use readline \
+ && myconf="${myconf} --with-readline" \
+ || myconf="${myconf} --without-readline"
+
+ einfo "\$myconf is: $myconf"
+
+ #default_{static,shared}_modules|source/configure
+ #/usr/lib/samba/auth/............. AUTH_MODULES
+ #/usr/lib/samba/charset/ CHARSET_MODULES
+ #/usr/lib/samba/pdb/.............. PDB_MODULES
+ #/usr/lib/samba/rpc/ RPC_MODULES
+ #/usr/lib/samba/vfs/.............. VFS_MODULES|source/Makefile
+ #/usr/lib/samba/lowcase.dat
+ #/usr/lib/samba/upcase.dat
+ #/usr/lib/samba/valid.dat
+
+ cd source
+ ./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib \
+ --with-swatdir=/usr/share/doc/${PF}/swat \
+ --localstatedir=/var \
+ --with-piddir=/var/run/samba \
+ --with-lockdir=/var/cache/samba \
+ --with-logfilebase=/var/log/samba \
+ --sysconfdir=/etc/samba \
+ --with-configdir=/etc/samba \
+ --with-privatedir=/etc/samba/private \
+ \
+ --enable-static \
+ --enable-shared \
+ --with-manpages-langs=en \
+ --without-spinlocks \
+ --with-libsmbclient \
+ --with-automount \
+ --with-smbmount \
+ --with-winbind \
+ --with-quotas \
+ --with-syslog \
+ --with-idmap \
+ --host=${CHOST} \
+ ${myconf} || die
+
+ # Show install dirs
+ einfo "Dir conf:"
+ make showlayout
+
+ # Subshell make: some headers are to be compiled in sequence even for a
+ # parallel make
+ make proto
+
+ # Compile main SAMBA pieces.
+ make everything || die "SAMBA pieces"
+ make rpctorture || ewarn "rpctorture didnt build"
+
+ # Build mount.cifs
+ cd ${S}/source
+ gcc ${CFLAGS} client/mount.cifs.c -o bin/mount.cifs
+ assert "mount.cifs compile problem"
+
+ # Build selected samba-vscan plugins.
+ if use oav
+ then
+ cd ${S}/examples.bin/VFS/${PN}-vscan-${VSCAN_VER}
+ ./configure
+ assert "bad ${PN}-vscan-${VSCAN_VER} ./configure"
+ # Do not use the Makefiles in the sub directories, use the Makefile
+ # generated by .configure in the top-level samba-vscan directory
+ # - suggested by Rainer Link, samba-vscan maintainer
+ make ${VSCAN_MODS}
+ fi
+
+ # Build mkntpasswd from the smbldap-tools.
+ if use ldap
+ then
+ cd ${WORKDIR}/smbldap-tools-${SMBLDAP_TOOLS_VER}
+ tar --no-same-owner -zxf mkntpwd.tar.gz
+ cd mkntpwd
+ VISUAL="" make || die "mkntpwd compile problem"
+ fi
+}
+
+src_install() {
+ local extra_bins="debug2html smbfilter talloctort mount.cifs"
+ #smbsh editreg
+ extra_bins="${extra_bins} smbtorture msgtest masktest locktest \
+ locktest2 nsstest vfstest rpctorture"
+
+ cd ${S}/source
+ make DESTDIR=${D} install-everything
+
+ # Extra binary files, testing/torture progs
+ exeinto /usr/bin
+ for i in ${extra_bins}
+ do
+ [ -x ${S}/source/bin/${i} ] && doexe ${S}/source/bin/${i} && \
+ einfo "Extra binaries: ${i}"
+ done
+ # Installing these setuid-root allows users to (un)mount smbfs/cifs.
+ fperms 4111 /usr/bin/smbumount
+ fperms 4111 /usr/bin/smbmnt
+ fperms 4111 /usr/bin/mount.cifs
+ # Nsswitch extensions. Make link for wins and winbind resolvers.
+ exeinto /lib
+ for i in wins winbind
+ do
+ doexe ${S}/source/nsswitch/libnss_${i}.so
+ ( cd ${D}/lib; ln -s libnss_${i}.so libnss_${i}.so.2 )
+ done
+ exeinto /lib/security
+ doexe ${S}/source/nsswitch/pam_winbind.so
+ use pam && doexe ${S}/source/bin/pam_smbpass.so
+
+ # Links
+ # link /usr/bin/smbmount to /sbin/mount.smbfs which allows it
+ # to work transparently with the standard 'mount' command..
+ dodir /sbin
+ dosym /usr/bin/smbmount /sbin/mount.smbfs
+ dosym /usr/bin/mount.cifs /sbin/mount.cifs
+ # make the smb backend symlink for cups printing support..
+ if use cups; then
+ dodir /usr/lib/cups/backend
+ dosym /usr/bin/smbspool /usr/lib/cups/backend/smb
+ fi
+
+ # Install IDEALX scripts for LDAP backend administration.
+ if use ldap; then
+ # corrections as per bug #41796
+ cd ${WORKDIR}/smbldap-tools-${SMBLDAP_TOOLS_VER}
+ exeinto /usr/share/samba/scripts ; doexe smbldap-*
+ exeinto /usr/sbin ; doexe mkntpwd/mkntpwd
+ exeinto /etc/samba ; doexe smbldap_tools.pm
+ insinto /etc/smbldap-tools ; doins *.conf
+ fperms 644 /etc/smbldap-tools/smbldap.conf
+ fperms 600 /etc/smbldap-tools/smbldap_bind.conf
+ eval `perl '-V:installarchlib'`
+ dodir ${installarchlib}
+ #dosym /etc/samba/smbldap_conf.pm ${installarchlib}
+ #dosym /etc/samba/smbldap_conf.pm /usr/share/samba/scripts
+ dosym /etc/samba/smbldap_tools.pm ${installarchlib}
+ dosym /etc/samba/smbldap_tools.pm /usr/share/samba/scripts
+ fi
+
+ # VFS plugin modules
+ if use oav
+ then
+ exeinto /usr/lib/vfs
+ doexe ${S}/examples.bin/VFS/${PN}-vscan-${VSCAN_VER}/vscan-*.so
+ fi
+
+ # Python extensions.
+ if use python
+ then
+ cd ${S}/source
+ python python/setup.py install --root=${D} || die
+ fi
+
+ # General config files.
+ insinto /etc
+ insinto /etc/samba
+ doins ${FILESDIR}/smbusers
+ newins ${FILESDIR}/smb.conf.example-samba3 smb.conf.example
+ doins ${FILESDIR}/lmhosts
+ doins ${FILESDIR}/recycle.conf
+ insinto /etc/pam.d
+ newins ${FILESDIR}/samba.pam samba
+ doins ${FILESDIR}/system-auth-winbind
+ insinto /etc/xinetd.d
+ newins ${FILESDIR}/swat.xinetd swat
+ exeinto /etc/init.d; newexe ${FILESDIR}/samba-init samba
+ insinto /etc/conf.d; newins ${FILESDIR}/samba-conf samba
+ if use ldap; then
+ insinto /etc/openldap/schema
+ doins ${S}/examples/LDAP/samba.schema
+ fi
+
+ # Docs
+ docinto ""
+ dodoc ${S}/COPYING ${S}/Manifest ${S}/README ${S}/Roadmap ${S}/WHATSNEW.txt
+ docinto examples
+ dodoc ${FILESDIR}/nsswitch.conf-{wins,winbind}
+ cp -a ${S}/examples/* ${D}/usr/share/doc/${PF}/examples
+ if use oav; then
+ docinto ${PN}-vscan-${VSCAN_VER}
+ cd ${WORKDIR}/${PN}-vscan-${VSCAN_VER}
+ dodoc AUTHORS COPYING ChangeLog FAQ INSTALL NEWS README TODO
+ dodoc */*.conf
+ fi
+ if use ldap; then
+ docinto smbldap-tools-${SMBLDAP_TOOLS_VER}
+ cd ${WORKDIR}/smbldap-tools-${SMBLDAP_TOOLS_VER}
+ dodoc CONTRIBUTORS COPYING ChangeLog FILES INFRA INSTALL README TODO
+ fi
+ if [ -z "`use doc`" ]; then
+ rm -rf ${D}/usr/share/doc/${PF}/swat/help/{guide,howto,devel}
+ rm -rf ${D}/usr/share/doc/${PF}/swat/using_samba
+ fi
+ chown -R root:root ${D}/usr/share/doc/${PF}
+ # man, info
+ gzip --recursive ${D}/usr/man
+}
+
+pkg_postinst() {
+ # touch /etc/samba/smb.conf so that people installing samba just
+ # to mount smb shares don't get annoying warnings all the time..
+ [ ! -e ${ROOT}/etc/samba/smb.conf ] && touch ${ROOT}/etc/samba/smb.conf
+
+ # empty dirs..
+ install -m0700 -o root -g root -d ${ROOT}/etc/samba/private
+ install -m1777 -o root -g root -d ${ROOT}/var/spool/samba
+ install -m0755 -o root -g root -d ${ROOT}/var/log/samba
+ install -m0755 -o root -g root -d ${ROOT}/var/log/samba3
+ install -m0755 -o root -g root -d ${ROOT}/var/run/samba
+ install -m0755 -o root -g root -d ${ROOT}/var/cache/samba
+ install -m0755 -o root -g root -d ${ROOT}/var/lib/samba/{netlogon,profiles}
+ install -m0755 -o root -g root -d \
+ ${ROOT}/var/lib/samba/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC}
+
+ ewarn ""
+ ewarn "If you are upgrading from a Samba version prior to 3.0.2, and you"
+ ewarn "use Samba's password database, you must run the following command:"
+ ewarn ""
+ ewarn " pdbedit --force-initialized-passwords"
+ ewarn ""
+ if use ldap; then
+ ewarn "If you are upgrading from prior to 3.0.2, and you are using LDAP"
+ ewarn "for Samba authentication, you must check the sambaPwdLastSet"
+ ewarn "attribute on all accounts, and ensure it is not 0."
+ einfo ""
+ einfo "WARNING: the smbldap-tools conf file location has changed to"
+ einfo " /etc/smbldap-tools"
+ einfo "reconfiguration will be necessary."
+ einfo ""
+ einfo "WARNING: the names of the scripts in /usr/shared/samba/scripts"
+ einfo "have changed. Please update your /etc/samba/smb.conf."
+ einfo ""
+ fi
+}