mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to be commit f1acef4a1c
)
This commit is contained in:
commit
da560b01ba
117
packaging/Mandrake/README.mandrake
Normal file
117
packaging/Mandrake/README.mandrake
Normal file
@ -0,0 +1,117 @@
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA1
|
||||
|
||||
The Mandrake samba spec file used for packaging for Mandrake and cooker
|
||||
is now also used by the makerpms.sh script, and you can pass any options
|
||||
that you would normally pass to rpm via the makerpms.sh script.
|
||||
|
||||
Note that only release after 8.1 support passing options using
|
||||
"--with <option>" syntax. The following options are available when
|
||||
building with the script:
|
||||
|
||||
- --with|--without ldap
|
||||
- --with|--without acl
|
||||
- --with|--without winbind
|
||||
- --with|--without wins
|
||||
- --with vscan
|
||||
Using "--with vscan" requires that you place a copy of the samba-vscan
|
||||
tarball (coverted to bz2 using bzme) from:
|
||||
http://prdownloads.sourceforge.net/openantivirus/samba-vscan-0.2.5a.tar.gz?download in your rpm source directory:
|
||||
|
||||
cp samba-vscan-0.2.5a.tar.gz `rpm --eval "%_sourcedir"`
|
||||
bzme `rpm --eval "%_sourcedir"`/samba-vscan-0.2.5a.tar.gz
|
||||
|
||||
When using "--with vscan" you will probably want to enable a virus scanner
|
||||
also:
|
||||
- --with fprot
|
||||
- --with kaspersky
|
||||
- --with mks
|
||||
- --with openantivirus
|
||||
- --with sophos
|
||||
- --with symantec
|
||||
- --with trend
|
||||
|
||||
You may need to do additional setup for your virus scanner to get this to
|
||||
work, please see ../../examples/VFS/<scanner>/INSTALL (after having started
|
||||
a build with "sh makerpms.sh --with vscan")
|
||||
|
||||
Note that only sophos has been tested with the spec, but the rest should work
|
||||
(after the preparation). Reports of working scanners are welcome, and please
|
||||
report any that do not work (preferably with a fix :-)).
|
||||
|
||||
So, to build ldap-enable RPMs for with antivirus support with sophos, but
|
||||
no acl support, use:
|
||||
sh makerpms.sh --with ldap --with vscan --with sophos --without acl
|
||||
|
||||
The same features can be enabled on Mandrake 7.2/8.0 by editing samba2.spec,
|
||||
and changing the 0 to 1 to enable the option:
|
||||
|
||||
%if %build_mdk80
|
||||
%define build_acl 0
|
||||
%define build_winbind 0
|
||||
%define build_wins 0
|
||||
%define build_ldap 0
|
||||
%endif
|
||||
|
||||
Similar sections exist for the virus scanning options.
|
||||
|
||||
(If you haven't rebuilt RPMs before, it is suggested that you take a
|
||||
brief look through http://www.linux-mandrake.com/howtos/mdk-rpm/,
|
||||
specifically sections 3.1 and 3.2)
|
||||
|
||||
The defaults for Mandrake 8.1 and 8.2 are shown below:
|
||||
%if %build_mdk82
|
||||
%define build_acl 1
|
||||
%define build_winbind 1
|
||||
%define build_wins 1
|
||||
%define build_ldap 0
|
||||
%endif
|
||||
|
||||
%if %build_mdk81
|
||||
%define build_acl 1
|
||||
%define build_winbind 0
|
||||
%define build_wins 0
|
||||
%define build_ldap 0
|
||||
%endif
|
||||
|
||||
Note that building with LDAP support will only allow you to use smbpasswd's
|
||||
stored in ldap, not in the local smbpasswd file. From 2.2.5 onwards in the
|
||||
2.2 tree, ldap-enable RPMs now carry an ldap modifier to indicate this (for
|
||||
example, samba-server becomes samba-server-ldap).
|
||||
|
||||
Building with acl requires that you have the acl development libraries.
|
||||
The libraries are standard on 8.1 and 8.2.
|
||||
ACLs can be used on Mandrake 8.0 with the updated kernel (to support XFS)
|
||||
if you install the RPMs available at
|
||||
http://ranger.dnsalias.com/mandrake/samba/RPMS/8.0/samba-2.2.1a_xfs/
|
||||
|
||||
Note that precompiled binaries of samba are also available on my site:
|
||||
http://ranger.dnsalias.com/mandrake/samba
|
||||
and that of Sylvestre Taburet:
|
||||
http://people.mandrakesoft.com/~staburet/samba/
|
||||
|
||||
If you have any problems with these RPMs, please send email to both
|
||||
bgmilne@cae.co.za and staburet@mandrakesoft.com
|
||||
|
||||
These RPMs are provided as-is, are not official, and can not be
|
||||
supported by Mandrakesoft. However, we will do our best to provide
|
||||
reliable and well-packaged RPMS, since we use them on our own servers
|
||||
and those of clients.
|
||||
|
||||
This file is signed with my gpg key, a copy of my public key is available
|
||||
at http://ranger.dnsalias.com/bgmilne.asc. The finger-print for this key
|
||||
follows:
|
||||
1024D/60D204A7 2919 E232 5610 A038 87B1 72D6 AC92 BA50 60D2 04A7
|
||||
|
||||
Recent posts by me on samba@samba.org have been signed with this key,
|
||||
in case you really want to verify who I am to some extent.
|
||||
|
||||
Buchan Milne
|
||||
18 June 2002
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v1.0.6 (GNU/Linux)
|
||||
|
||||
iD8DBQE9D2h3rJK6UGDSBKcRAhtJAKC0fVkIMETgRxccrwLBcKZKHllCIACeNcZ9
|
||||
bxGZSTOHs57ir3wFR+3s0XM=
|
||||
=ifKf
|
||||
-----END PGP SIGNATURE-----
|
34
packaging/Mandrake/makerpms-cvs.sh
Normal file
34
packaging/Mandrake/makerpms-cvs.sh
Normal file
@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
# makerpms-cvs.sh
|
||||
# A quick script to build RPMs from cvs to test packaging
|
||||
# Buchan Milne <bgmilne@cae.co.za>
|
||||
|
||||
[ $# -lt 1 ] && echo "Usage: $0 <Samba version>" && exit 1
|
||||
|
||||
VERSION=$1cvs
|
||||
RELEASE=`date +%Y%m%d`
|
||||
shift
|
||||
|
||||
# Replace PRELEASE and PVERSION with release number in all files ending with
|
||||
# .tmpl
|
||||
|
||||
FILES=$(find . -name "*.tmpl" -type f)
|
||||
|
||||
for i in $FILES;do
|
||||
NEW=$(echo $i|sed -e 's/\.tmpl//g');
|
||||
cat $i |sed -e 's/PVERSION/'$VERSION'/g; s/PRELEASE/'$RELEASE'/g'> $NEW ;
|
||||
done
|
||||
|
||||
#Change up three directories, rename directory to samba-$VERSION, change back
|
||||
#then run makerpms.sh
|
||||
|
||||
(
|
||||
CURRENT=$(pwd)
|
||||
cd $(dirname $(dirname $(dirname $CURRENT)))
|
||||
SAMBA_DIR=$(basename $(dirname $(dirname $CURRENT)))
|
||||
mv $SAMBA_DIR samba-$VERSION
|
||||
cd samba-$VERSION/packaging/Mandrake
|
||||
sh makerpms.sh $@
|
||||
cd $(dirname $(dirname $(dirname $CURRENT)))
|
||||
mv samba-$VERSION $SAMBA_DIR
|
||||
)
|
15
packaging/Mandrake/samba-2.2.0-buildroot.patch
Normal file
15
packaging/Mandrake/samba-2.2.0-buildroot.patch
Normal file
@ -0,0 +1,15 @@
|
||||
--- samba-2.2.0/source/script/installbin.sh Fri Jan 12 21:28:02 2001
|
||||
+++ samba-2.2.0/source/script/installbin.sh.207 Thu Apr 19 09:40:57 2001
|
||||
@@ -33,9 +33,9 @@
|
||||
chmod $INSTALLPERMS $BINDIR/$p2
|
||||
|
||||
# this is a special case, mount needs this in a specific location
|
||||
- if [ $p2 = smbmount ]; then
|
||||
- ln -sf $BINDIR/$p2 /sbin/mount.smbfs
|
||||
- fi
|
||||
+ #if [ $p2 = smbmount ]; then
|
||||
+ # ln -sf $BINDIR/$p2 /sbin/mount.smbfs
|
||||
+ #fi
|
||||
done
|
||||
|
||||
|
11
packaging/Mandrake/samba-2.2.0-gawk.patch
Normal file
11
packaging/Mandrake/samba-2.2.0-gawk.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- samba-2.2.0/source/script/convert_smbpasswd.gawk Thu Nov 5 04:50:17 1998
|
||||
+++ samba-2.2.0/source/script/convert_smbpasswd Thu Apr 19 08:43:44 2001
|
||||
@@ -7,7 +7,7 @@
|
||||
# with trying to work out how to get the seconds since 1970
|
||||
# in awk or the shell. JRA.
|
||||
#
|
||||
-nawk 'BEGIN {FS=":"}
|
||||
+gawk 'BEGIN {FS=":"}
|
||||
{
|
||||
if( $0 ~ "^#" ) {
|
||||
print $0
|
12
packaging/Mandrake/samba-2.2.5-gp-reloc-fix.patch
Normal file
12
packaging/Mandrake/samba-2.2.5-gp-reloc-fix.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -ur samba-2.2.5.orig/examples/VFS/Makefile.in samba-2.2.5/examples/VFS/Makefile.in
|
||||
--- samba-2.2.5.orig/examples/VFS/Makefile.in 2002-06-17 20:35:09.000000000 +0200
|
||||
+++ samba-2.2.5/examples/VFS/Makefile.in 2002-06-30 16:43:15.000000000 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
CC=@CC@
|
||||
LIBTOOL=@LIBTOOL@
|
||||
-CFLAGS=@CFLAGS@
|
||||
+CFLAGS=@CFLAGS@ -DPIC -fPIC
|
||||
LDFLAGS=@LDFLAGS@
|
||||
|
||||
VFS_OBJS=audit.so skel.so block/block.so recycle/recycle.so
|
11
packaging/Mandrake/samba-3.0-smbmount-sbin.patch
Normal file
11
packaging/Mandrake/samba-3.0-smbmount-sbin.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- samba-3.0alpha1/source/client/smbmount.c.orig Fri Nov 30 02:29:22 2001
|
||||
+++ samba-3.0alpha1/source/client/smbmount.c Thu Dec 6 00:48:57 2001
|
||||
@@ -468,7 +468,7 @@
|
||||
if (sys_fork() == 0) {
|
||||
char *smbmnt_path;
|
||||
|
||||
- asprintf(&smbmnt_path, "%s/smbmnt", dyn_BINDIR);
|
||||
+ asprintf(&smbmnt_path, "%s/smbmnt", dyn_SBINDIR);
|
||||
|
||||
if (file_exist(smbmnt_path, NULL)) {
|
||||
execv(smbmnt_path, args);
|
59
packaging/Mandrake/samba-print-pdf.sh
Normal file
59
packaging/Mandrake/samba-print-pdf.sh
Normal file
@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
# samba-print-pdf
|
||||
# This is a script which allows you to set up a virtual printer on samba
|
||||
# which will take the file (generated by a postscript filter on windows)
|
||||
# and turn it into a PDF, informing the user of where it is when it
|
||||
# is done
|
||||
#
|
||||
# Buchan Milne <bgmilne@cae.co.za> 20020723
|
||||
#
|
||||
# Arguments:
|
||||
# $1 = file (usually passed with %s from samba)
|
||||
# $2 = unix prefix to where to place the file (~%u should work)
|
||||
# $3 = windows prefix to the same location (\\%L\%u should work)
|
||||
# $4 = user/computer to send a notification to (%u or %m)
|
||||
# $5 = IP address of client (%I)
|
||||
|
||||
|
||||
PS2PDF=ps2pdf13
|
||||
OPTIONS="-dAutoFilterColorImages=false -sColorImageFilter=FlateEncode"
|
||||
INPUT=$1
|
||||
KEEP_PS=1
|
||||
PERMS=640
|
||||
INFILE=$(basename $INPUT)
|
||||
BASEFILE=pdf-service
|
||||
|
||||
#make a temp file to use for the output of the PDF
|
||||
OUTPUT=`mktemp -q $2/$BASEFILE-XXXXXX`
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "$0: Can't create temp file $2/$BASEFILE-XXXXXX, exiting..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
WIN_OUTPUT="$3\\`basename $OUTPUT`"
|
||||
|
||||
# create the PDF:
|
||||
$PS2PDF $OPTIONS $INPUT $OUTPUT.pdf >/dev/null 2>&1
|
||||
|
||||
# Generate a message to send to the user, and deal with the original file:
|
||||
MESSAGE=$(echo "Your PDF file has been created as $WIN_OUTPUT.pdf\n")
|
||||
|
||||
if [ $KEEP_PS ];then
|
||||
mv $INPUT $OUTPUT.ps
|
||||
MESSAGE=$(echo "$MESSAGE and your postscript file as $WIN_OUTPUT.ps")
|
||||
# Fix permissions on the generated files
|
||||
chmod $PERMS $OUTPUT.ps
|
||||
else
|
||||
rm -f $INPUT
|
||||
chmod $PERMS $OUTPUT.ps $OUTPUT.pdf
|
||||
# Fix permissions on the generated files
|
||||
fi
|
||||
|
||||
chmod $PERMS $OUTPUT.ps $OUTPUT.pdf
|
||||
|
||||
#Remove empty file from mktemp:
|
||||
rm -f $OUTPUT
|
||||
|
||||
# Send notification to user
|
||||
echo -e $MESSAGE|smbclient -M $4 -I $5 -U "PDF Generator" >/dev/null 2>&1
|
||||
|
15
packaging/Mandrake/samba-slapd-include.conf
Normal file
15
packaging/Mandrake/samba-slapd-include.conf
Normal file
@ -0,0 +1,15 @@
|
||||
# You should either include this file into your
|
||||
# /etc/openldap/slapd.conf, or add the contents (after editing), inside
|
||||
# the db definition your samba server will use.
|
||||
|
||||
|
||||
# Index the rid for samba:
|
||||
index rid eq
|
||||
|
||||
|
||||
# Basic samba acl:
|
||||
access to attrs=lmPassword,ntPassword
|
||||
by dn="cn=root,dc=mydomain,dc=com" write
|
||||
by dn="uid=root,ou=People,dc=mydomain,dc=com" write
|
||||
by * none
|
||||
|
15
packaging/Mandrake/smbmount-sbin.patch
Normal file
15
packaging/Mandrake/smbmount-sbin.patch
Normal file
@ -0,0 +1,15 @@
|
||||
+++ samba-2.2.1/source/client/smbmount.c Sun Apr 15 01:03:46 2001
|
||||
--- samba-2.2.1/source/client/smbmount.c.seb Mon Jun 11 14:26:23 2001
|
||||
@@ -484,9 +484,9 @@
|
||||
}
|
||||
|
||||
if (sys_fork() == 0) {
|
||||
- if (file_exist(BINDIR "/smbmnt", NULL)) {
|
||||
- execv(BINDIR "/smbmnt", args);
|
||||
- fprintf(stderr,"execv of %s failed. Error was %s.", BINDIR "/smbmnt", strerror(errno));
|
||||
+ if (file_exist(SBINDIR "/smbmnt", NULL)) {
|
||||
+ execv(SBINDIR "/smbmnt", args);
|
||||
+ fprintf(stderr,"execv of %s failed. Error was %s.", SBINDIR "/smbmnt", strerror(errno));
|
||||
} else {
|
||||
execvp("smbmnt", args);
|
||||
fprintf(stderr,"execvp of smbmnt failed. Error was %s.", strerror(errno) );
|
10
packaging/Mandrake/smbw.patch
Normal file
10
packaging/Mandrake/smbw.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- samba-2.0.0/source/smbwrapper/smbsh.in.orig Mon Oct 5 22:37:01 1998
|
||||
+++ samba-2.0.0/source/smbwrapper/smbsh.in Mon Oct 5 22:37:51 1998
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
|
||||
-SMBW_LIBDIR=${SMBW_LIBDIR-@builddir@/smbwrapper}
|
||||
+SMBW_LIBDIR=${SMBW_LIBDIR-/usr/bin}
|
||||
|
||||
if [ ! -f ${SMBW_LIBDIR}/smbwrapper.so ]; then
|
||||
echo You need to set LIBDIR in smbsh
|
BIN
packaging/Mandrake/swat_16.xpm.bz2
Normal file
BIN
packaging/Mandrake/swat_16.xpm.bz2
Normal file
Binary file not shown.
BIN
packaging/Mandrake/swat_32.xpm.bz2
Normal file
BIN
packaging/Mandrake/swat_32.xpm.bz2
Normal file
Binary file not shown.
BIN
packaging/Mandrake/swat_48.xpm.bz2
Normal file
BIN
packaging/Mandrake/swat_48.xpm.bz2
Normal file
Binary file not shown.
17
packaging/Mandrake/system-auth-winbind.pamd
Normal file
17
packaging/Mandrake/system-auth-winbind.pamd
Normal file
@ -0,0 +1,17 @@
|
||||
#%PAM-1.0
|
||||
|
||||
auth required /lib/security/pam_env.so
|
||||
auth sufficient /lib/security/pam_winbind.so
|
||||
auth sufficient /lib/security/pam_unix.so likeauth nullok use_first_pass
|
||||
auth required /lib/security/pam_deny.so
|
||||
|
||||
account sufficient /lib/security/pam_winbind.so
|
||||
account required /lib/security/pam_unix.so
|
||||
|
||||
password required /lib/security/pam_cracklib.so retry=3
|
||||
password sufficient /lib/security/pam_unix.so nullok use_authtok md5 shadow
|
||||
password required /lib/security/pam_deny.so
|
||||
|
||||
session required /lib/security/pam_mkhomedir.so skel=/etc/skel/ umask=0022
|
||||
session required /lib/security/pam_limits.so
|
||||
session required /lib/security/pam_unix.so
|
93
packaging/Mandrake/winbind.init
Normal file
93
packaging/Mandrake/winbind.init
Normal file
@ -0,0 +1,93 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# chkconfig: 345 81 45
|
||||
# description: Starts and stops the Samba winbind daemon to provide \
|
||||
# user and group information from a domain controller to linux.
|
||||
|
||||
# Source function library.
|
||||
if [ -f /etc/init.d/functions ] ; then
|
||||
. /etc/init.d/functions
|
||||
elif [ -f /etc/rc.d/init.d/functions ] ; then
|
||||
. /etc/rc.d/init.d/functions
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Source networking configuration.
|
||||
. /etc/sysconfig/network
|
||||
|
||||
# Check that networking is up.
|
||||
[ ${NETWORKING} = "no" ] && exit 0
|
||||
|
||||
# Check that smb.conf exists.
|
||||
[ -f /etc/samba/smb.conf ] || exit 0
|
||||
|
||||
RETVAL=0
|
||||
|
||||
|
||||
start() {
|
||||
echo -n "Starting Winbind services: "
|
||||
RETVAL=1
|
||||
if [ "`grep -i 'winbind uid' /etc/samba/smb.conf | egrep -v [\#\;]`" ]; then
|
||||
daemon winbindd
|
||||
RETVAL=$?
|
||||
else
|
||||
echo "Winbind is not configured in /etc/samba/smb.conf, not starting"
|
||||
fi
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/winbind || \
|
||||
RETVAL=1
|
||||
return $RETVAL
|
||||
}
|
||||
stop() {
|
||||
echo -n "Shutting down Winbind services: "
|
||||
RETVAL=1
|
||||
if [ "`grep -i 'winbind uid' /etc/samba/smb.conf | egrep -v [\#\;]`" ]; then
|
||||
killproc winbindd
|
||||
RETVAL=$?
|
||||
fi
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/winbind
|
||||
return $RETVAL
|
||||
}
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
reload() {
|
||||
export TMPDIR="/var/tmp"
|
||||
echo -n "Checking domain trusts: "
|
||||
killproc winbindd -HUP
|
||||
RETVAL=$?
|
||||
echo
|
||||
return $RETVAL
|
||||
}
|
||||
mdkstatus() {
|
||||
status winbindd
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart)
|
||||
restart
|
||||
;;
|
||||
reload)
|
||||
reload
|
||||
;;
|
||||
status)
|
||||
mdkstatus
|
||||
;;
|
||||
condrestart)
|
||||
[ -f /var/lock/subsys/winbind ] && restart || :
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|status|condrestart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
Loading…
Reference in New Issue
Block a user