summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
Diffstat (limited to 'packaging')
-rw-r--r--packaging/Caldera/OpenLinux/.cvsignore6
-rw-r--r--packaging/Caldera/OpenLinux/README.Public9
-rw-r--r--packaging/Caldera/OpenLinux/README.home15
-rw-r--r--packaging/Caldera/OpenLinux/README.profiles10
-rwxr-xr-xpackaging/Caldera/OpenLinux/findsmb141
-rw-r--r--packaging/Caldera/OpenLinux/makerpms.sh.tmpl42
-rw-r--r--packaging/Caldera/OpenLinux/samba-3.0.0.pre-install.patch12
-rw-r--r--packaging/Caldera/OpenLinux/samba.daemon6
-rwxr-xr-xpackaging/Caldera/OpenLinux/samba.init62
-rwxr-xr-xpackaging/Caldera/OpenLinux/samba.init-lsb108
-rw-r--r--packaging/Caldera/OpenLinux/samba.logrotate12
-rw-r--r--packaging/Caldera/OpenLinux/samba.pam11
-rw-r--r--packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl506
-rw-r--r--packaging/Caldera/OpenLinux/samba2.spec.tmpl484
-rw-r--r--packaging/Caldera/OpenLinux/samba3.spec.tmpl314
-rw-r--r--packaging/Caldera/OpenLinux/smb.conf51
-rw-r--r--packaging/Caldera/OpenLinux/smb.conf.sample315
-rwxr-xr-xpackaging/Caldera/OpenLinux/smbadduser.perl146
-rwxr-xr-xpackaging/Caldera/OpenLinux/smbprint77
-rw-r--r--packaging/Caldera/OpenLinux/smbusers3
-rwxr-xr-xpackaging/Caldera/OpenLinux/updatesmbpasswd.perl10
-rwxr-xr-xpackaging/Caldera/OpenServer/Clean22
-rwxr-xr-xpackaging/Caldera/OpenServer/Compile48
-rwxr-xr-xpackaging/Caldera/OpenServer/Configure73
-rwxr-xr-xpackaging/Caldera/OpenServer/Install156
-rwxr-xr-xpackaging/Caldera/OpenServer/Makevol10
-rwxr-xr-xpackaging/Caldera/OpenServer/Package13
-rw-r--r--packaging/Caldera/OpenServer/README44
-rwxr-xr-xpackaging/Caldera/OpenServer/findsmb141
-rwxr-xr-xpackaging/Caldera/OpenServer/pkg/Clean3
-rwxr-xr-xpackaging/Caldera/OpenServer/pkg/Install1
-rwxr-xr-xpackaging/Caldera/OpenServer/pkg/MakeSSO25
-rwxr-xr-xpackaging/Caldera/OpenServer/pkg/Packem15
-rwxr-xr-xpackaging/Caldera/OpenServer/pkg/Remove16
-rw-r--r--packaging/Caldera/OpenServer/pkg/cdmt.config34
-rwxr-xr-xpackaging/Caldera/OpenServer/pkg/cntl/ccs108
-rw-r--r--packaging/Caldera/OpenServer/pkg/input/Samba.cmpnt25
-rw-r--r--packaging/Caldera/OpenServer/pkg/input/Samba.pkg1905
-rw-r--r--packaging/Caldera/OpenServer/pkg/input/Samba.prd6
-rw-r--r--packaging/Caldera/OpenServer/samba-2.2-osr5.patch29
-rw-r--r--packaging/Caldera/OpenServer/smb.conf291
-rwxr-xr-xpackaging/Caldera/OpenServer/smb.init76
-rwxr-xr-xpackaging/Caldera/OpenServer/smbadduser73
-rwxr-xr-xpackaging/Caldera/OpenServer/smbprint77
-rw-r--r--packaging/Caldera/OpenServer/smbusers3
-rwxr-xr-xpackaging/Caldera/UnixWare/Clean22
-rwxr-xr-xpackaging/Caldera/UnixWare/Compile52
-rwxr-xr-xpackaging/Caldera/UnixWare/Configure67
-rwxr-xr-xpackaging/Caldera/UnixWare/Install146
-rwxr-xr-xpackaging/Caldera/UnixWare/Makepkg10
-rwxr-xr-xpackaging/Caldera/UnixWare/Package40
-rw-r--r--packaging/Caldera/UnixWare/README54
-rwxr-xr-xpackaging/Caldera/UnixWare/findsmb141
-rw-r--r--packaging/Caldera/UnixWare/pkg/admin1
-rw-r--r--packaging/Caldera/UnixWare/pkg/pkginfo10
-rwxr-xr-xpackaging/Caldera/UnixWare/pkg/postinstall56
-rwxr-xr-xpackaging/Caldera/UnixWare/pkg/postremove30
-rw-r--r--packaging/Caldera/UnixWare/pkg/prototype310
-rw-r--r--packaging/Caldera/UnixWare/samba-2.2-uw7-prototype.patch11
-rw-r--r--packaging/Caldera/UnixWare/samba-2.2-uw7.patch200
-rw-r--r--packaging/Caldera/UnixWare/smb.conf291
-rwxr-xr-xpackaging/Caldera/UnixWare/smb.init76
-rwxr-xr-xpackaging/Caldera/UnixWare/smbadduser73
-rwxr-xr-xpackaging/Caldera/UnixWare/smbprint77
-rw-r--r--packaging/Caldera/UnixWare/smbusers3
-rw-r--r--packaging/Digital/Instructions55
-rw-r--r--packaging/Digital/PackageDate1
-rw-r--r--packaging/Digital/Packager2
-rw-r--r--packaging/Digital/Packaging-instructions14
-rwxr-xr-xpackaging/Digital/package-prep30
-rwxr-xr-xpackaging/Digital/samba.init34
-rwxr-xr-xpackaging/Digital/setup.sh24
-rw-r--r--packaging/Digital/skeleton.tarbin0 -> 30720 bytes
-rw-r--r--packaging/Example/Instructions41
-rw-r--r--packaging/Example/PackageDate1
-rw-r--r--packaging/Example/Packager1
-rw-r--r--packaging/Example/Packaging-instructions16
-rwxr-xr-xpackaging/Example/package-prep51
-rwxr-xr-xpackaging/Example/samba.init34
-rwxr-xr-xpackaging/Example/setup.sh27
-rw-r--r--packaging/Example/skeleton.tarbin0 -> 30720 bytes
-rw-r--r--packaging/LSB/README6
-rw-r--r--packaging/LSB/lsb-samba.spec100
-rwxr-xr-xpackaging/LSB/samba.sh80
-rw-r--r--packaging/LSB/samba.xinetd15
-rw-r--r--packaging/LSB/smb.conf290
-rw-r--r--packaging/Mandrake/.cvsignore2
-rw-r--r--packaging/Mandrake/README11
-rw-r--r--packaging/Mandrake/empty.patch0
-rwxr-xr-xpackaging/Mandrake/findsmb141
-rw-r--r--packaging/Mandrake/makerpms.sh.tmpl16
-rw-r--r--packaging/Mandrake/samba.log15
-rw-r--r--packaging/Mandrake/samba.pamd5
-rw-r--r--packaging/Mandrake/samba.xinetd15
-rw-r--r--packaging/Mandrake/samba2.spec.tmpl300
-rw-r--r--packaging/Mandrake/smb.conf320
-rwxr-xr-xpackaging/Mandrake/smb.init93
-rwxr-xr-xpackaging/Mandrake/smbprint77
-rw-r--r--packaging/Mandrake/smbusers3
-rw-r--r--packaging/PHT/TurboLinux/.cvsignore3
-rw-r--r--packaging/PHT/TurboLinux/README11
-rwxr-xr-xpackaging/PHT/TurboLinux/findsmb141
-rw-r--r--packaging/PHT/TurboLinux/makerpms.sh.tmpl14
-rw-r--r--packaging/PHT/TurboLinux/samba.log11
-rw-r--r--packaging/PHT/TurboLinux/samba.pamd11
-rw-r--r--packaging/PHT/TurboLinux/samba2.spec.tmpl502
-rw-r--r--packaging/PHT/TurboLinux/smb.conf291
-rwxr-xr-xpackaging/PHT/TurboLinux/smb.init49
-rwxr-xr-xpackaging/PHT/TurboLinux/smbadduser73
-rwxr-xr-xpackaging/PHT/TurboLinux/smbprint77
-rw-r--r--packaging/PHT/TurboLinux/smbusers3
-rw-r--r--packaging/PHT/TurboLinux/smbw.patch10
-rw-r--r--packaging/README38
-rw-r--r--packaging/README.UnixWare6
-rw-r--r--packaging/RedHat/.cvsignore6
-rw-r--r--packaging/RedHat/README11
-rwxr-xr-xpackaging/RedHat/findsmb141
-rw-r--r--packaging/RedHat/makerpms.sh.tmpl38
-rw-r--r--packaging/RedHat/samba.log11
-rw-r--r--packaging/RedHat/samba.pamd4
-rw-r--r--packaging/RedHat/samba.pamd.stack6
-rw-r--r--packaging/RedHat/samba.xinetd15
-rw-r--r--packaging/RedHat/samba2.spec.tmpl458
-rw-r--r--packaging/RedHat/smb.conf290
-rwxr-xr-xpackaging/RedHat/smb.init49
-rwxr-xr-xpackaging/RedHat/smbprint77
-rw-r--r--packaging/RedHat/smbusers3
-rw-r--r--packaging/SGI/.cvsignore8
-rw-r--r--packaging/SGI/README44
-rwxr-xr-xpackaging/SGI/findsmb141
-rwxr-xr-xpackaging/SGI/idb.pl374
-rwxr-xr-xpackaging/SGI/inetd.sh37
-rwxr-xr-xpackaging/SGI/inst.msg31
-rw-r--r--packaging/SGI/legal_notice.html53
-rwxr-xr-xpackaging/SGI/mkman18
-rwxr-xr-xpackaging/SGI/mkprintcap.sh15
-rwxr-xr-xpackaging/SGI/mkrelease.sh125
-rw-r--r--packaging/SGI/printcap5
-rw-r--r--packaging/SGI/relnotes.html233
-rwxr-xr-xpackaging/SGI/removeswat.sh25
-rw-r--r--packaging/SGI/samba.config1
-rw-r--r--packaging/SGI/samba.rc43
-rw-r--r--packaging/SGI/sambalp157
-rw-r--r--packaging/SGI/smb.conf124
-rw-r--r--packaging/SGI/smbpasswd1
-rw-r--r--packaging/SGI/smbprint54
-rwxr-xr-xpackaging/SGI/spec.pl91
-rwxr-xr-xpackaging/SGI/startswat.sh29
-rw-r--r--packaging/Solaris/README18
-rw-r--r--packaging/Solaris/copyright1
-rw-r--r--packaging/Solaris/i.swat44
-rw-r--r--packaging/Solaris/inetd.conf.master1
-rwxr-xr-xpackaging/Solaris/makepkg.sh185
-rw-r--r--packaging/Solaris/pkg-specs/pkginfo12
-rw-r--r--packaging/Solaris/pkginfo.master12
-rw-r--r--packaging/Solaris/postinstall21
-rw-r--r--packaging/Solaris/preremove12
-rw-r--r--packaging/Solaris/prototype.master52
-rw-r--r--packaging/Solaris/r.swat16
-rw-r--r--packaging/Solaris/request17
-rwxr-xr-xpackaging/Solaris/samba.server.master48
-rw-r--r--packaging/Solaris/services1
-rw-r--r--packaging/SuSE/5.2/samba-1.9.18p5.dif234
-rw-r--r--packaging/SuSE/5.2/samba.spec119
-rw-r--r--packaging/SuSE/7.1/samba-2.2.0-alpha0.dif224
-rw-r--r--packaging/SuSE/7.1/samba.pamd3
-rw-r--r--packaging/SuSE/7.1/samba.spec381
-rwxr-xr-xpackaging/bin/update-pkginfo20
168 files changed, 14403 insertions, 0 deletions
diff --git a/packaging/Caldera/OpenLinux/.cvsignore b/packaging/Caldera/OpenLinux/.cvsignore
new file mode 100644
index 00000000000..062afa2b04f
--- /dev/null
+++ b/packaging/Caldera/OpenLinux/.cvsignore
@@ -0,0 +1,6 @@
+convertsmbpasswd.perl
+make_smbpasswd.perl
+makerpms.sh
+samba2.spec
+samba2.spec-lsb
+samba3.spec
diff --git a/packaging/Caldera/OpenLinux/README.Public b/packaging/Caldera/OpenLinux/README.Public
new file mode 100644
index 00000000000..00f41f37382
--- /dev/null
+++ b/packaging/Caldera/OpenLinux/README.Public
@@ -0,0 +1,9 @@
+This directory is exported to any windows computer, if the daemon
+"SMB server processes (samba)" is started and the distributed
+configuration is used. So be careful about any data you put into
+this directory.
+
+The default configuration restricts the access rights to read only
+access.
+
+2000-03-13, Klaus Singvogel, Caldera (Deutschland) GmbH.
diff --git a/packaging/Caldera/OpenLinux/README.home b/packaging/Caldera/OpenLinux/README.home
new file mode 100644
index 00000000000..5a893eb0e12
--- /dev/null
+++ b/packaging/Caldera/OpenLinux/README.home
@@ -0,0 +1,15 @@
+This directory $HOME/Samba is exported to any windows computer, if
+the daemon "SMB server processes (samba)" is started and the distributed
+configuration is used. So be careful about the data you put into this
+directory.
+
+Note: Only the user of this account can connect to this share. The
+shares name is equal to the users Linux account, e.g.
+\\your_linuxmachine\\your_linuxaccount
+
+If you want to have the files public accessible use the public browseable
+share instead. It's currently /srv/samba/Public, but have a look at file
+/etc/samba.d/smb.conf to get the latest name.
+
+
+2000-03-13, Klaus Singvogel, Caldera (Deutschland) GmbH.
diff --git a/packaging/Caldera/OpenLinux/README.profiles b/packaging/Caldera/OpenLinux/README.profiles
new file mode 100644
index 00000000000..b629e10966b
--- /dev/null
+++ b/packaging/Caldera/OpenLinux/README.profiles
@@ -0,0 +1,10 @@
+This directory is used to store the roaming Profiles of your Windows
+users. For more information install the package samba-doc and read the
+file /usr/share/doc/packages/samba-2.0.7/docs/textdocs/DOMAIN.txt
+
+The default configuration sets the access rights to read/write for
+anyone. If you see a problem in this, disable the Profiles support in
+your samba configuration: either edit file /etc/samba.d/smb.conf or
+use swat (http://localhost:901/).
+
+2000-03-13, Klaus Singvogel, Caldera (Deutschland) GmbH.
diff --git a/packaging/Caldera/OpenLinux/findsmb b/packaging/Caldera/OpenLinux/findsmb
new file mode 100755
index 00000000000..986c2481779
--- /dev/null
+++ b/packaging/Caldera/OpenLinux/findsmb
@@ -0,0 +1,141 @@
+#!/usr/bin/perl
+#
+# Prints info on all smb responding machines on a subnet.
+# This script needs to be run on a machine without nmbd running and be
+# run as root to get correct info from WIN95 clients.
+#
+# syntax:
+# findsmb [subnet broadcast address]
+#
+# with no agrument it will list machines on the current subnet
+#
+# There will be a "+" in front of the workgroup name for machines that are
+# local master browsers for that workgroup. There will be an "*" in front
+# of the workgroup name for machines that are the domain master browser for
+# that workgroup.
+#
+
+$SAMBABIN = "/usr/bin";
+
+for ($i = 0; $i < 2; $i++) { # test for -d option and broadcast address
+ $_ = shift;
+ if (m/-d|-D/) {
+ $DEBUG = 1;
+ } else {
+ if ($_) {
+ $BCAST = "-B $_";
+ }
+ }
+}
+
+sub ipsort # do numeric sort on last field of IP address
+{
+ @t1 = split(/\./,$a);
+ @t2 = split(/\./,$b);
+ @t1[3] <=> @t2[3];
+}
+
+# look for all machines that respond to a name lookup
+
+open(NMBLOOKUP,"$SAMBABIN/nmblookup $BCAST '*'|") ||
+ die("Can't run nmblookup '*'.\n");
+
+# get rid of all lines that are not a response IP address,
+# strip everything but IP address and sort by last field in address
+
+@ipaddrs = sort ipsort grep(s/ \*<00>.*$//,<NMBLOOKUP>);
+
+# print header info
+
+print "\nIP ADDR NETBIOS NAME WORKGROUP/OS/VERSION $BCAST\n";
+print "---------------------------------------------------------------------\n";
+
+foreach $ip (@ipaddrs) # loop through each IP address found
+{
+ $ip =~ s/\n//; # strip newline from IP address
+
+# find the netbios names registered by each machine
+
+ open(NMBLOOKUP,"$SAMBABIN/nmblookup -r -A $ip|") ||
+ die("Can't get nmb name list.\n");
+ @nmblookup = <NMBLOOKUP>;
+ close NMBLOOKUP;
+
+# get the first <00> name
+
+ @name = grep(/<00>/,@nmblookup);
+ $_ = @name[0];
+ if ($_) { # we have a netbios name
+ if (/GROUP/) { # is it a group name
+ ($name, $aliases, $type, $length, @addresses) =
+ gethostbyaddr(pack('C4',split('\.',$ip)),2);
+ if (! $name) { # could not get name
+ $name = "unknown nis name";
+ }
+ } else {
+ /(\S+)/;
+ $name = $1;
+ }
+
+# do an smbclient command on the netbios name.
+
+ open(SMB,"$SAMBABIN/smbclient -N -L $name -I $ip -U% |") ||
+ die("Can't do smbclient command.\n");
+ @smb = <SMB>;
+ close SMB;
+
+ if ($DEBUG) { # if -d flag print results of nmblookup and smbclient
+ print "===============================================================\n";
+ print @nmblookup;
+ print @smb;
+ }
+
+# look for the OS= string
+
+ @info = grep(/OS=/,@smb);
+ $_ = @info[0];
+ if ($_) { # we found response
+ s/Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter
+
+ } else { # no OS= string in response (WIN95 client)
+
+# for WIN95 clients get workgroup name from nmblookup response
+ @name = grep(/<00> - <GROUP>/,@nmblookup);
+ $_ = @name[0];
+ if ($_) {
+ /(\S+)/;
+ $_ = "[$1]";
+ } else {
+ $_ = "Unknown Workgroup";
+ }
+ }
+
+# see if machine registered a local master browser name
+ if (grep(/<1d>/,@nmblookup)) {
+ $master = '+'; # indicate local master browser
+ if (grep(/<1b>/,@nmblookup)) { # how about domain master browser?
+ $master = '*'; # indicate domain master browser
+ }
+ } else {
+ $master = ' '; # not a browse master
+ }
+
+# line up info in 3 columns
+
+ print "$ip".' 'x(16-length($ip))."$name".' 'x(14-length($name))."$master"."$_\n";
+
+ } else { # no netbios name found
+# try getting the host name
+ ($name, $aliases, $type, $length, @addresses) =
+ gethostbyaddr(pack('C4',split('\.',$ip)),2);
+ if (! $name) { # could not get name
+ $name = "unknown nis name";
+ }
+ if ($DEBUG) { # if -d flag print results of nmblookup
+ print "===============================================================\n";
+ print @nmblookup;
+ }
+ print "$ip".' 'x(16-length($ip))."$name\n";
+ }
+}
+
diff --git a/packaging/Caldera/OpenLinux/makerpms.sh.tmpl b/packaging/Caldera/OpenLinux/makerpms.sh.tmpl
new file mode 100644
index 00000000000..e7ba1d96230
--- /dev/null
+++ b/packaging/Caldera/OpenLinux/makerpms.sh.tmpl
@@ -0,0 +1,42 @@
+#!/bin/sh
+# Copyright (C) 1998 John H Terpstra, 2000 Klaus Singvogel
+#
+SPECDIR=${SPECDIR:-/usr/src/OpenLinux/SPECS}
+SRCDIR=${SRCDIR:-/usr/src/OpenLinux/SOURCES}
+USERID=`id -u`
+GRPID=`id -g`
+devel=0;
+old=0;
+
+# Do some argument parsing...
+if [ z$1 = z"devel" ]; then
+ devel=1;
+ shift
+fi
+if [ z$1 = z"old" ]; then
+ old=1;
+ shift
+fi
+
+# Start preparing the packages...
+if [ $devel -ne 0 ]; then
+ ( cd ../../../.. ; chown -R ${USERID}.${GRPID} samba; mv samba samba-PVERSION )
+ ( cd ../../../.. ; tar czvf ${SRCDIR}/samba-PVERSION.tar.gz samba-PVERSION; mv samba-PVERSION samba )
+else
+ ( cd ../../../.. ; chown -R ${USERID}.${GRPID} samba-PVERSION )
+ ( cd ../../../.. ; tar czvf ${SRCDIR}/samba-PVERSION.tar.gz samba-PVERSION )
+fi
+
+cp -af *.spec *.spec-lsb $SPECDIR
+for src in *.patch; do
+ trg=`echo $src | sed 's;xxxxxx;PVERSION;'`
+ cp -a $src $SRCDIR/$trg
+done
+
+# Start building the package
+cd $SPECDIR
+if [ $old -eq 0 ]; then
+mv -f samba2.spec samba2.spec-nonlsb
+ln -f samba2.spec-lsb samba2.spec
+fi
+rpm -ba -v samba2.spec
diff --git a/packaging/Caldera/OpenLinux/samba-3.0.0.pre-install.patch b/packaging/Caldera/OpenLinux/samba-3.0.0.pre-install.patch
new file mode 100644
index 00000000000..f6571a2763e
--- /dev/null
+++ b/packaging/Caldera/OpenLinux/samba-3.0.0.pre-install.patch
@@ -0,0 +1,12 @@
+--- samba/source/script/installbin.sh.orig Mon Dec 13 14:27:43 1999
++++ samba/source/script/installbin.sh Fri Jun 16 15:06:13 2000
+@@ -34,7 +34,8 @@
+
+ # this is a special case, mount needs this in a specific location
+ if [ $p2 = smbmount ]; then
+- ln -sf $BINDIR/$p2 /sbin/mount.smbfs
++ cp -p $BINDIR/$p2 /sbin/mount.smbfs
++ ln -s /sbin/mount.smbfs $BINDIR/$p2
+ fi
+ done
+
diff --git a/packaging/Caldera/OpenLinux/samba.daemon b/packaging/Caldera/OpenLinux/samba.daemon
new file mode 100644
index 00000000000..96683702f5d
--- /dev/null
+++ b/packaging/Caldera/OpenLinux/samba.daemon
@@ -0,0 +1,6 @@
+IDENT=samba
+DESCRIPTIVE="SMB server processes (samba)"
+CONFIGURED="no"
+ONBOOT="no"
+OPTIONS_SMB="-D"
+OPTIONS_NMB="-D"
diff --git a/packaging/Caldera/OpenLinux/samba.init b/packaging/Caldera/OpenLinux/samba.init
new file mode 100755
index 00000000000..1b830a1da3d
--- /dev/null
+++ b/packaging/Caldera/OpenLinux/samba.init
@@ -0,0 +1,62 @@
+#!/bin/sh
+#
+# description: Starts and stops the Samba smbd and nmbd daemons
+# used to provide SMB network services.
+
+NAME_S=smbd
+DAEMON_S=/usr/sbin/$NAME_S
+NAME_N=nmbd
+DAEMON_N=/usr/sbin/$NAME_N
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# Source networking configuration.
+. /etc/sysconfig/network
+
+# See how we were called.
+case "$1" in
+ start)
+ [ -e $SVIlock ] && exit 1
+ [ ${NETWORKING} = "no" ] && exit 2
+ [ -x $DAEMON_S -a -x $DAEMON_N ] || exit 2
+
+ #[ "$CONFIGURED" != "no" -a "$CONFIGURED" != "false" ] || {
+ SVIemptyConfig /etc/samba.d/smb.conf && {
+ echo "$DESCRIPTIVE: not configured! Skipped..."
+ exit 2
+ }
+
+ echo -n "Starting $IDENT: "
+ ssd -S -n $NAME_S -x $DAEMON_S -- $OPTIONS_SMB
+ ssd -S -n $NAME_N -x $DAEMON_N -- $OPTIONS_NMB
+
+ echo "."
+ touch $SVIlock
+ ;;
+
+ stop)
+ [ -e $SVIlock ] || exit 0
+
+ echo -n "Stopping $IDENT: "
+ ssd -K -p /var/lock/samba.d/$NAME_N.pid -n $NAME_N #-x $DAEMON_N
+ ssd -K -p /var/lock/samba.d/$NAME_S.pid -n $NAME_S #-x $DAEMON_S
+
+ echo "."
+ rm -f $SVIlock
+ ;;
+
+ restart)
+ echo -n "Restarting $IDENT: "
+ $0 stop
+ $0 start
+ exit $?
+ ;;
+
+ *)
+ echo "Usage: $SVIscript {start|restart|stop}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/packaging/Caldera/OpenLinux/samba.init-lsb b/packaging/Caldera/OpenLinux/samba.init-lsb
new file mode 100755
index 00000000000..f14eef648fa
--- /dev/null
+++ b/packaging/Caldera/OpenLinux/samba.init-lsb
@@ -0,0 +1,108 @@
+#!/bin/bash
+#
+#
+### BEGIN INIT INFO
+# Provides: $samba
+# Required-Start: $network
+# Required-Stop: $network
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Description: samba
+# Starts and stops the Samba smbd and nmbd daemons
+# used to provide SMB network services.
+### END INIT INFO
+#
+# Written by Miquel van Smoorenburg <miquels@drinkel.ow.org>.
+# Modified for Debian GNU/Linux by Ian Murdock <imurdock@gnu.ai.mit.edu>.
+# Modified for OpenLinux by Raymund Will <ray@caldera.de>
+# Adapted for samba by Klaus Singvogel <klaus@caldera.de>
+
+NAME_S=smbd
+DAEMON_S=/usr/sbin/$NAME_S
+NAME_N=nmbd
+DAEMON_N=/usr/sbin/$NAME_N
+
+# Source function library (and set vital variables).
+. @SVIdir@/functions
+
+status() {
+ [ -e $1 ] || return 3; # lock / pid file doesn't exist, seems to be stopped
+
+ i=`cat "$1"`
+ state=`egrep '^State' /proc/$i/status 2>/dev/null| sed 's#.* \(.\).*#\1#'`
+ if [ x$state = x -o x$state = xZ ]; then
+ return 2 # no such process (or zombie) --> dead
+ fi
+ return 0 # seems to be up and running
+}
+
+case "$1" in
+ start)
+ [ ! -e $SVIlock ] || exit 0
+ [ -x $DAEMON_S -a -x $DAEMON_N ] || exit 5
+ SVIemptyConfig /etc/samba.d/smb.conf && exit 6
+
+ echo -n "Starting $SVIsubsys services: "
+ ssd -S -n $NAME_S -x $DAEMON_S -- $OPTIONS_SMB
+ ssd -S -n $NAME_N -x $DAEMON_N -- $OPTIONS_NMB
+ ret=$?
+
+ echo "."
+ touch $SVIlock
+ ;;
+
+ stop)
+ [ -e $SVIlock ] || exit 0
+
+ echo -n "Stopping $SVIsubsys services: "
+ ssd -K -p /var/lock/samba.d/$NAME_N.pid -n $NAME_N #-x $DAEMON_N
+ ssd -K -p /var/lock/samba.d/$NAME_S.pid -n $NAME_S #-x $DAEMON_S
+
+ ret=$?
+
+ echo "."
+ rm -f $SVIlock
+ ;;
+
+ force-reload)
+ [ -e $SVIlock ] || exit 0
+ $0 restart
+ ret=$?
+ ;;
+
+ reload)
+ echo -n "Reloading $SVIsubsys service configuration: "
+ # nmbd has no config file to reload
+ ssd -K --signal 1 -p /var/lock/samba.d/$NAME_S.pid -n $NAME_S #-x $DAEMON_S
+ ret=$?
+ echo "."
+ ;;
+
+ restart)
+ $0 stop
+ $0 start
+ ret=$?
+ ;;
+
+ status)
+ echo -n "Checking status of $SVIsubsys service: "
+ status /var/lock/samba.d/$NAME_N.pid
+ ret=$?
+ if [ $ret -eq 0 ]; then
+ echo -n "$NAME_N "
+ status /var/lock/samba.d/$NAME_S.pid
+ ret=$?
+ [ $ret -eq 0 ] && echo -n "$NAME_S"
+ fi
+ echo "."
+ ;;
+
+ *)
+ echo "Usage: $SVIscript {start|stop|restart|force-reload|reload|status}"
+ ret=2
+ ;;
+
+esac
+
+exit $ret
+
diff --git a/packaging/Caldera/OpenLinux/samba.logrotate b/packaging/Caldera/OpenLinux/samba.logrotate
new file mode 100644
index 00000000000..46611f83d8f
--- /dev/null
+++ b/packaging/Caldera/OpenLinux/samba.logrotate
@@ -0,0 +1,12 @@
+/var/log/samba.d/nmbd {
+ postrotate
+ /usr/bin/killall -HUP nmbd
+ endscript
+}
+
+/var/log/samba.d/smbd {
+ postrotate
+ /usr/bin/killall -HUP smbd
+ endscript
+}
+
diff --git a/packaging/Caldera/OpenLinux/samba.pam b/packaging/Caldera/OpenLinux/samba.pam
new file mode 100644
index 00000000000..225ab724ec9
--- /dev/null
+++ b/packaging/Caldera/OpenLinux/samba.pam
@@ -0,0 +1,11 @@
+#%PAM-1.0
+#[For version 1.0 syntax, the above header is optional]
+#
+# The PAM configuration file for the `samba' service
+#
+auth required /lib/security/pam_pwdb.so nullok nodelay # shadow audit
+# auth required /lib/security/pam_smbpass.so nodelay
+account required /lib/security/pam_pwdb.so audit nodelay
+session required /lib/security/pam_pwdb.so nodelay
+password required /lib/security/pam_pwdb.so # shadow md5
+#password required /lib/security/pam_smbpass.so nodelay smbconf=/etc/samba.d/smb.conf
diff --git a/packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl b/packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl
new file mode 100644
index 00000000000..7a2b921dd58
--- /dev/null
+++ b/packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl
@@ -0,0 +1,506 @@
+%define Version PVERSION
+%define date PRELEASE
+%define Vendor Caldera
+%define Dist OpenLinux
+%define EtcSamba /etc/samba.d
+%define LSBservedir /srv/samba
+
+Name : samba
+Version : %{Version}
+Release : %{date}
+Group : Server/Network
+
+Summary : Samba SMB client and server.
+Summary(de) : Samba SMB Client und Server.
+Summary(es) : Cliente y servidor SMB Samba.
+Summary(fr) : Client et serveur SMB Samba.
+Summary(it) : Client e server SMB.
+Summary(pt) : Cliente e servidor SMB Samba.
+
+Copyright : Andrew Tridgell, John H Terpstra; GPL Version 2
+Packager : Klaus Singvogel <klaus@caldera.de>
+#Icon : Caldera-daemon.gif
+URL : http://samba.org/samba
+
+Requires : libpam >= 0.66, SysVinit-scripts >= 1.04-6
+
+
+BuildRoot : /tmp/%{Name}-%{Version}
+
+Source: ftp://ftp.samba.org/pub/samba/%{Name}-%{Version}.tar.gz
+#Patch0: %{Name}-%{Version}-smbmount.patch
+#Patch1: %{Name}-%{Version}-install.patch
+#Patch2: %{Name}-%{Version}-smbconf.patch
+
+%Package doc
+Group : Server/Network
+
+Summary : Documentation on SAMBA.
+Summary(de) : Die Dokumentation für Samba.
+Summary(es) : Documentation de SAMBA.
+Summary(fr) : Documentation pour Samba.
+Summary(it) : Documentazione su SAMBA.
+Summary(pt) : Documentação sobre o SAMBA.
+
+%Package -n smbfs
+Group : System/Network
+
+Summary : Mount and unmount commands for SMB filesystems (smbfs).
+Summary(de) : Mount und unmount für SMB-Dateisysteme (smbfs).
+Summary(es) : Comandos de montaje y desmontaje de sistemas de ficheros SMB (smbfs).
+Summary(fr) : Commandes pour le montage et le démontage des systèmes de fichiers SMB (smbfs).
+Summary(it) : Comandi per montare e smontare i file system SMB (smbfs).
+Summary(pt) : Comandos mount e unmount para o sistema de ficheiros SMB (smbfs).
+
+%Package -n swat
+Group : Administration/Network
+Requires : setup >= 2.0-2, tcp_wrappers, netkit-base >= 0.17-5
+
+Summary : Samba Web Administration Tool.
+Summary(de) : Das Samba Web Administrationstool.
+Summary(es) : Utilidad de administración Samba.
+Summary(fr) : Outil d'administration Internet pour Samba.
+Summary(it) : Strumento per l'amministrazione di Samba via Web.
+Summary(pt) : Ferramenta Web de administração de Samba (Samba Web Administration Tool).
+
+
+%Description
+Samba provides an SMB server which can be used to provide network
+services to SMB (sometimes called "Lan Manager") clients, including
+various versions of MS Windows, OS/2, and other Linux machines.
+
+%Description -l de
+Samba stellt einen SMB Server zur Verfügung, mit dem Netzwerkdienste für SMB
+(auch "Lan Manager" genannt) Clients bereitgestellt werden können. Dies
+schließt verschiedene Versionen von MS Windows, OS/2 und andere Linux
+Maschinen ein.
+
+%Description -l es
+Samba dispone de un servidor SMB que puede utilizarse para proporcionar
+servicios de red a clientes SMB (a veces conocido como "Lan Manager"),
+incluyendo varias versiones de MS Windows, OS/2 y otras máquinas Linux.
+
+%Description -l fr
+Samba fournit un serveur SMB qui peut être utilisé pour fournir des services
+de réseau aux clients SMB (parfois appelés "Lan Manager"), comportant
+diverses versions de MS Windows, OS/2 et d'autres machines Linux.
+
+%Description -l it
+Samba fornisce un server SMB che può essere usato per fornire servizi
+di rete a client SMB (talvolta chiamato "Lan Manager"), comprese varie
+versioni di MS Windows, OS/2 e altre macchine Linux.
+
+%Description -l pt
+O Samba fornece um servidor de SMB que pode ser usado para fornecer serviços de
+rede aos clientes de SMB (denominado por vezes como "Lan Manager"), incluindo
+várias versões do Windows, OS/2 e outras máquinas Linux.
+
+%Description doc
+This package contains extensive SAMBA documentation, including a FAQ,
+comprehensive usage documentation, and a number of examples.
+
+%Description -l de doc
+Dieses Paket enthält eine ausführliche SAMBA Dokumentation, inklusive
+einer FAQ, umfassender Gebrauchsdokumentation und einer Reihe von
+Beispielen.
+
+%Description -l es doc
+Este paquete contiene una extensa documentación sobre SAMBA, incluyendo
+FAQ (Preguntas de Uso Frecuente), documentación sobre el uso y algunos
+ejemplos.
+
+%Description -l fr doc
+Ce paquetage contient une documentation complète sur Samba, y compris
+une FAQ détaillée de son utilisation et un certain nombre d'exemples.
+
+%Description -l it doc
+Questo pacchetto contiene la documentazione su SAMBA tra cui una FAQ
+una esaustiva documentazione d'uso e un certo numero di esempi.
+
+%Description -l pt doc
+Este pacote contém alguma documentação extensa sobre o SAMBA, incluindo a FAQ,
+alguma documentação compreensiva sobre a utilização e alguns exemplos.
+
+%Description -n smbfs
+This package includes the tools necessary to mount filesystems from
+SMB servers.
+
+%Description -l de -n smbfs
+Dieses Paket enthält die nötigen Tools, um Dateisysteme von SMB-Servern
+zu mounten.
+
+%Description -l es -n smbfs
+este paqeute incluye las herramientas necesarias para montar sistemas de
+ficheros de servidores SMB.
+
+%Description -l fr -n smbfs
+Ce paquetage contient les outils nécessaires pour monter des systèmes
+de fichiers sur des serveurs SMB.
+
+%Description -l it -n smbfs
+Questo pacchetto contiene gli strumenti necessari per montare filesystem
+da server SMB.
+
+%Description -l pt -n smbfs
+Este pacote contém as ferramentas necessárias para montar sistema de
+ficheiros de servidores SMB.
+
+%Description -n swat
+SWAT allows a Samba administrator to configure the complex smb.conf
+file via a Web browser. It also provides links to all the configurable
+options in the smb.conf file allowing an administrator to easily look
+up the effects of any change.
+
+%Description -l de -n swat
+Mit SWAT kann ein Samba-Administrator die komplexe smb.conf
+Datei mit Hilfe eines Web-Browsers konfigurieren. Es stellt auch Links zu
+allen konfigurierbaren Optionen in der smb.conf Datei bereit, wodurch ein
+Administrator die Auswirkungen einer Änderung leicht nachvollziehen kann.
+
+%Description -l es -n swat
+SWAT permite a un administrador de Samba configurar el complejo fichero
+smb.conf mediante una navegador web. También proporciona enlaces a todas las
+opciones configurables en el fichero smb.conf, permitiendo al administrador
+comprobar fácilmente los efectos de cualquier cambio.
+
+%Description -l fr -n swat
+SWAT permet à un administrateur Samba de configurer le fichier smb.conf
+complexe via un navigateur Web. Il fournit également des liens d'aide pour
+toutes les options configurables dans le fichier smb.conf permettant à un
+administrateur de consulter aisément les effets d'une modification.
+
+%Description -l it -n swat
+SWAT permette ad un amministratore Samba di configurare il complesso file
+smb.conf attraverso un browser Web. SWAT ha anche dei link di aiuto per
+tutte le opzioni di configurazione del file smb.conf.
+
+%Description -l pt -n swat
+O SWAT permite a um administrador de Samba configurar o complexo ficheiro
+smb.conf através de uma interface Web. Fornece também referências para
+todas as opções configuraveis no smb.conf, permitindo a um admnistrador
+verificar rapidamente o efeite de qualquer alteração.
+
+
+%Prep
+%setup
+#%patch0 -p1
+#%patch1 -p1
+#%patch2 -p1
+
+# instead of patch (to help configuration) ... ;^)
+%{fixUP} -vbT source/Makefile.in -e '
+ s:we don.t use sbindir because we want:if you want : +
+ s:(the previous releases of Samba):$1, please use: +
+ s:(SBINDIR\s*=\s*\@)b:# ./configure --sbindir=\\\$(BINDIR)\n${1}sb: +
+ s:/log\.(\S+):/log/samba.d/${1}d: +
+ s:(PASSWD_PROGRAM\s*=\s*)(/bin):$1/usr$2:
+'
+# s:^(LIBS\s*=):AUTH_$1: +
+# s:((CLIENT|CUPS|NMBD|SMBD|SWAT|RPCCLIENT|SMBPASSWD|STATUS|TESTPRNS|TESTPARM)_OBJ\) )(\$\(LDF):$1\$(AUTH_LIBS) $3:
+
+for i in {cvs.,change-}log; do [ ! -f ../$i ] || mv ../$i source; done
+
+mv swat/help/welcome.html docs
+%{fixUP} -vT docs -e '
+ s:/usr/local/samba/bin/(smb(client|run)):/usr/bin/$1:g +
+ s:/usr/local/samba/bin/((s|n)mbd|swat|smbstatus):/usr/sbin/$1:g +
+ s:/usr/local/samba/var/locks:/var/lock/samba.d: +
+ s:/usr/local/samba/(var|lib)/log:/var/log/samba.d/smb: +
+ s:/usr/local/samba/swat:/usr/share/samba/swat:g +
+ s:/usr/local/samba/lib:%{EtcSamba}:g +
+ s:/usr/local/samba/printers:/var/spool/samba:g +
+ s:/usr/local/samba/private/smbpasswd:/usr/bin/smbpasswd:g +
+ s:/usr/local/samba/netlogon:%{LSBservedir}/netlogon:g;
+'
+mv docs/welcome.html swat/help
+for i in docs/*/smb.conf.5*; do
+ %{fixUP} -vT $i -e '
+ s:users\.map:smbusers:g +
+ s:SAMBA_INSTALL_DIRECTORY/lib:%{EtcSamba}: +
+ s:None \(set in compile\)\.:(see above).: +
+ s:/usr/local/:/usr/:g;
+ '
+done
+%{fixUP} -vT docs/textdocs/Faxing.txt -e '
+ s:/usr/local/etc/:/etc/: +
+ s:/usr/local/:/usr/:;
+'
+# ENCRYPTION.txt is gone.
+%{fixUP} -vT docs/docbook/projdoc/ENCRYPTION.sgml -e '
+ s:/usr/local/samba/private:%{EtcSamba}:g +
+ s:mksmbpasswd.sh:mksmbpasswd:g +
+ s:the Samba source directory:/usr/bin:;
+'
+
+%{fixUP} -vT docs/htmldocs/make_smbcodepage.1.html -e '
+ s:/usr/local/samba:/usr/bin/:g;
+'
+for i in htmldocs/DOMAIN_MEMBER.html htmldocs/Samba-HOWTO-Collection.html \
+ htmldocs/samba-pdc-faq.html htmldocs/samba-pdc-howto.html \
+ htmldocs/smbclient.1.html htmldocs/smbd.8.html \
+ docbook/projdoc/DOMAIN_MEMBER.sgml docbook/projdoc/DOMAIN_MEMBER.sgml \
+ docbook/faq/samba-pdc-faq.sgml docbook/howto/samba-pdc-howto.sgml \
+ docbook/manpages/smbclient.1.sgml docbook/manpages/smbd.8.sgml \
+ docbook/projdoc/ENCRYPTION.sgml manpages/smbclient.1 manpages/smbd.8 ; do
+%{fixUP} -vT docs/$i -e '
+ s:/usr/local/samba/private/FOREST.SLEEPY.SID:/var/lock/samba.d/FOREST.SLEEPY.SID: +
+ s:/usr/local/samba/private:/usr/bin:g +
+ s:/usr/local/samba/bin:/usr/bin:g +
+ s:/usr/local/sbin:/usr/sbin:g +
+ s:/usr/local/src/samba:/usr/src/samba:g ;'
+done
+%{fixUP} -vT docs/docbook/manpages/make_smbcodepage.1.sgml -e '
+ s:/usr/local/samba:/usr/bin:g ;
+'
+%{fixUP} -vT docs/htmldocs/samba-pdc-faq.html -e '
+ s:/usr/local/src:/usr/src:g ;
+'
+# End of DirtyHack(TM)
+
+
+%Build
+cd source
+autoreconf
+
+CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" ./configure \
+ --with-fhs \
+ --prefix='$(DESTDIR)/usr' \
+ --localstatedir='$(DESTDIR)/var' \
+ --libdir='$(DESTDIR)%{EtcSamba}' \
+ --with-privatedir='$(LIBDIR)' \
+ --with-lockdir='$(DESTDIR)/var/lock/samba.d' \
+ --with-swatdir='$(DESTDIR)/usr/share/swat' \
+ --with-sambabook='$(DESTDIR)/usr/share/swat/using_samba' \
+ --with-configdir='$(DESTDIR)'%{EtcSamba} \
+ --with-codepagedir='$(DESTDIR)'/usr/share/samba/codepages \
+ --without-smbwrapper \
+ --with-smbmount \
+ --with-pam \
+ --with-pam_smbpass \
+ --with-netatalk \
+ --with-quotas \
+ --with-utmp \
+ --with-syslog
+
+make LOGFILEBASE=/var/log/samba.d all nsswitch/libnss_wins.so debug2html bin/smbspool
+
+
+%Install
+%{mkDESTDIR}
+VVS=packaging/%{Vendor}/%{Dist}
+
+mkdir -p $DESTDIR/etc/{{logrotate,pam}.d,sysconfig/daemons}
+mkdir -p $DESTDIR/var/{lo{ck,g}/samba.d,spool/samba}
+mkdir -p $DESTDIR/usr/share/swat/using_samba/{gifs,figs}
+mkdir -p $DESTDIR/lib/security
+mkdir -p $DESTDIR/%{LSBservedir}/{netlogon,profiles,Public}
+mkdir -p $DESTDIR/etc/skel/Samba
+mkdir -p $DESTDIR/usr/share/samba/codepages/src $DESTDIR/sbin
+mkdir -p $DESTDIR/%{SVIdir}
+
+make LOGFILEBASE=/var/log/samba.d -C source install
+
+strip $DESTDIR/usr/bin/smb{mnt,umount}
+#mv $DESTDIR/usr/bin/{make,add,conv}* $DESTDIR/usr/bin
+
+cp -p source/codepages/codepage_def.??? $DESTDIR/usr/share/samba/codepages/src
+
+# Install the nsswitch library extension file
+install -m 755 source/nsswitch/libnss_wins.so $DESTDIR/lib/libnss_wins.so.2.0
+# Make link for wins resolver
+ln -s libnss_wins.so.2.0 $DESTDIR/lib/libnss_wins.so.2
+ln -s libnss_wins.so.2.0 $DESTDIR/lib/libnss_wins.so
+
+# install -m 755 source/nsswitch/libnss_winbind.so $DESTDIR/lib/libnss_winbind.so.2.0
+# # Make link for winbind resolver
+# ln -s libnss_winbind.so.2.0 $DESTDIR/lib/libnss_winbind.so.2
+# ln -s libnss_winbind.so.2.0 $DESTDIR/lib/libnss_winbind.so
+
+# install -m 755 source/nsswitch/pam_winbind.so $DESTDIR/lib/security
+
+# install -m 755 source/bin/wbinfo $DESTDIR/usr/bin
+
+install -m 755 source/bin/debug2html $DESTDIR/usr/sbin/debug2html
+
+#lsb: cp -p $VVS/samba.init $DESTDIR/etc/rc.d/init.d/samba
+ln -s /etc/rc.d/init.d/samba $DESTDIR/usr/sbin
+
+cp -p $VVS/smb.conf.sample $DESTDIR%{EtcSamba}/smb.conf.sample
+cp -p $VVS/smb.conf $DESTDIR%{EtcSamba}/smb.conf
+cp -p $VVS/smbusers $DESTDIR%{EtcSamba}
+cp -p $VVS/smbprint $DESTDIR/usr/bin
+#cp -p $VVS/smbadduser.perl $DESTDIR/usr/bin/smbadduser
+#cp -p $VVS/make_smbpasswd.perl $DESTDIR/usr/bin/make_smbpasswd
+#cp -p $VVS/convertsmbpasswd.perl $DESTDIR/usr/bin/convertsmbpasswd
+#cp -p $VVS/updatesmbpasswd.perl $DESTDIR/usr/bin/updatesmbpasswd
+cp -p $VVS/findsmb $DESTDIR/usr/bin
+cp -p $VVS/samba.daemon $DESTDIR/etc/sysconfig/daemons/samba
+cp -p $VVS/samba.pam $DESTDIR/etc/pam.d/samba
+cp -p $VVS/samba.logrotate $DESTDIR/etc/logrotate.d/samba
+cp -p $VVS/README.home $DESTDIR/etc/skel/Samba/README.txt
+cp -p $VVS/README.Public $DESTDIR/%{LSBservedir}/Public/README.txt
+cp -p $VVS/README.profiles $DESTDIR/%{LSBservedir}/profiles/README.txt
+
+# Add PAM smbpass facility
+mv $DESTDIR/usr/bin/pam_smbpass.so $DESTDIR/lib/security
+
+install -m 755 $VVS/samba.init-lsb $DESTDIR/%{SVIdir}/%{Name}
+
+for f in testparm testprns; do
+ ln -s $f $DESTDIR/usr/bin/smb$f
+ ln -s $f.1 $DESTDIR/usr/man/man1/smb$f.1
+done
+#ln -s make_smbcodepage $DESTDIR/usr/bin/mksmbcodepage
+#ln -s make_smbpasswd $DESTDIR/usr/bin/mksmbpasswd
+#ln -sf convert_smbpasswd $DESTDIR/usr/bin/convertsmbpasswd
+ln -s ../usr/bin/smbmnt $DESTDIR/sbin/mount.smbfs
+
+
+cat <<-'EoH' > $DESTDIR%{EtcSamba}/lmhosts
+ 127.0.0.1 localhost
+EoH
+
+# lsb has new way of inetd configuration
+mkdir -p $DESTDIR%{NKinetdir}
+cat <<EoI >$DESTDIR%{NKinetdir}/swat
+swat stream tcp nowait.400 root /usr/sbin/tcpd swat
+EoI
+
+# -------------------- Documentation -------------------------------
+DOCD="$DESTDIR/%{_defaultdocdir}/samba-%{Version}"; mkdir -p $DOCD
+ln -sf ../Copyrights/GPL-2.0 $DOCD/COPYING
+#cp -p README README-smbmount Manifest Read-Manifest-Now $DOCD
+cp -p README Manifest Read-Manifest-Now $DOCD
+cp -p WHATSNEW.txt Roadmap $DOCD
+cp -a docs examples $DOCD
+
+mv $DOCD/docs/htmldocs/wfw_slip.htm $DOCD/docs/wfw_slip.html
+
+rm -rf $DOCD/docs/{htmldocs,manpages,yodldocs}
+rm -rf $DOCD/examples/{svr4-startup,printing}
+rm -rf $DOCD/CVS $DOCD/*/CVS $DOCD/*/*/CVS $DOCD/*/*/*/CVS
+
+cp -p swat/README $DOCD/README.swat
+
+# This is the O'Reily Samba Book - on-line
+for i in docs/htmldocs/using_samba/*.html
+do
+install -m644 $i $DESTDIR/usr/share/swat/using_samba
+done
+for i in docs/htmldocs/using_samba/figs/*.gif
+do
+install -m644 $i $DESTDIR/usr/share/swat/using_samba/figs
+done
+for i in docs/htmldocs/using_samba/gifs/*.gif
+do
+install -m644 $i $DESTDIR/usr/share/swat/using_samba/gifs
+done
+
+# -------------------- Fixing final pathes -------------------------------
+
+%{fixUP} -T $DESTDIR/%{SVIdir} -e 's:\@SVIdir\@:%{SVIdir}:'
+%{fixUP} -vT $DOCD/examples -e 's:/usr/local/bin/:/usr/bin/:g;'
+%{fixUP} -vT $DESTDIR/%{EtcSamba} -e 's:\@samba_home\@:%{LSBservedir}:'
+
+%{fixManPages}
+
+%{mkLists} -c samba
+cat << 'EOF' | %{mkLists} -d samba
+Samba base
+%{LSBservedir} config-IGNORED
+^/(etc|var|home|tmp) config-IGNORED
+swat swat
+%{_defaultdocdir}/samba-[^/]+/$ base
+%{_defaultdocdir}/samba- doc
+tmp IGNORED
+man IGNORED
+lib/security IGNORED
+/src/$ IGNORED
+/usr/private/$ IGNORED
+@default@
+EOF
+cat << 'EOF' | %{mkLists} -f -a samba
+\.old$ IGNORED
+Samba/README.txt base
+^/etc config-IGNORED
+%{_defaultdocdir}/samba-[^/]+/(COPYING|README$) base
+libnss_wins.* base
+pam_smbpass.so base
+%{_defaultdocdir}/samba-[^/]+/(COPYING|README$) base
+%{_defaultdocdir}/samba- doc
+smb(mount|mnt|umount) smbfs
+mount.smbfs smbfs
+swat swat
+@default@
+EOF
+
+
+%Clean
+%{rmDESTDIR}
+
+
+%Post
+/usr/lib/LSB/init-install %{Name}
+
+
+%Post -n swat
+%{NKinetdReload}
+perl -pi -e '$s=1 if /^swat/;
+ print "swat:ALL EXCEPT 127.0.0.1\n" if eof && ! $s' /etc/hosts.deny
+
+
+%PostUn
+test "$1" = "0" || exit 0
+/usr/lib/LSB/init-remove %{Name}
+# We want to remove the browse.dat and wins.dat files so they can not
+# interfer with a new version of samba!
+rm -f /var/lock/samba/browse.dat
+rm -f /var/lock/samba/{brlock,connections,locking,messages}.tdb
+if [ -e /var/lock/samba.d/namelist.debug ]; then
+ rm -f /var/lock/samba.d/namelist.debug
+fi
+rm -f /var/lock/samba/unexpected.tdb
+rm -f /var/lock/samba/{smbd,nmbd}.pid
+
+# Note: We MUST keep:
+# winbindd_*, sshare_info*, printing*, ntdrivers*
+
+
+%PostUn -n swat
+#$no lsb: lisa --inetd disable swat $1
+test "$1" = "0" || exit 0
+%{SVIdir}/inet reload
+[ -x /usr/sbin/swat ]||perl -ni -e '/^swat\s*\:/||print' /etc/hosts.deny
+
+
+%Files -f files-samba-base
+%defattr(-,root,root)
+%config %attr(0755,root,root) %{SVIdir}/samba
+%config %attr(644,root,root) /etc/sysconfig/daemons/samba
+%config %attr(644,root,root) /etc/pam.d/samba
+%config %attr(644,root,root) /etc/logrotate.d/samba
+%config %attr(-,root,root) %{EtcSamba}
+%dir %attr(755,root,root) /var/lock/samba.d
+%dir %attr(755,root,root) /var/log/samba.d
+%dir %attr(1777,root,root) /var/spool/samba
+%dir %attr(755,root,root) %{LSBservedir}
+%dir %attr(755,root,root) %{LSBservedir}/netlogon
+%dir %attr(755,root,root) %{LSBservedir}/profiles
+%dir %attr(755,root,root) %{LSBservedir}/Public
+
+
+%Files doc -f files-samba-doc
+%defattr(-,root,root)
+
+
+%Files -n smbfs -f files-samba-smbfs
+%defattr(-,root,root)
+
+
+%Files -n swat -f files-samba-swat
+%defattr(-,root,root)
+%config %attr(644,root,root) %{NKinetdir}/swat
+
+%ChangeLog
+* Mon Jan 01 1997 ...
+$Id: samba2.spec-lsb.tmpl,v 1.3 2001/06/01 12:33:16 jerry Exp $
diff --git a/packaging/Caldera/OpenLinux/samba2.spec.tmpl b/packaging/Caldera/OpenLinux/samba2.spec.tmpl
new file mode 100644
index 00000000000..738b8c41e3d
--- /dev/null
+++ b/packaging/Caldera/OpenLinux/samba2.spec.tmpl
@@ -0,0 +1,484 @@
+%define Version PVERSION
+%define date PRELEASE
+%define Vendor Caldera
+%define Dist OpenLinux
+%define EtcSamba /etc/samba.d
+%define _defaultdocdir /usr/doc
+%define LSBservedir /srv/samba
+
+Name : samba
+Version : %{Version}
+Release : %{date}
+Group : Server/Network
+
+Summary : Samba SMB client and server.
+Summary(de) : Samba SMB Client und Server.
+Summary(es) : Cliente y servidor SMB Samba.
+Summary(fr) : Client et serveur SMB Samba.
+Summary(it) : Client e server SMB.
+Summary(pt) : Cliente e servidor SMB Samba.
+
+Copyright : Andrew Tridgell, John H Terpstra; GPL Version 2
+Packager : Klaus Singvogel <klaus@caldera.de>
+#Icon : Caldera-daemon.gif
+URL : http://samba.org/samba
+
+Requires : libpam >= 0.66, SysVinit-scripts >= 1.04-6
+
+
+BuildRoot : /tmp/%{Name}-%{Version}
+
+Source: ftp://ftp.samba.org/pub/samba/%{Name}-%{Version}.tar.gz
+#Patch0: %{Name}-%{Version}-smbmount.patch
+#Patch1: %{Name}-%{Version}-install.patch
+#Patch2: %{Name}-%{Version}-smbconf.patch
+
+
+%Package doc
+Group : Server/Network
+
+Summary : Documentation on SAMBA.
+Summary(de) : Die Dokumentation für Samba.
+Summary(es) : Documentation de SAMBA.
+Summary(fr) : Documentation pour Samba.
+Summary(it) : Documentazione su SAMBA.
+Summary(pt) : Documentação sobre o SAMBA.
+
+
+%Package -n smbfs
+Group : System/Network
+
+Summary : Mount and unmount commands for SMB filesystems (smbfs).
+Summary(de) : Mount und unmount für SMB-Dateisysteme (smbfs).
+Summary(es) : Comandos de montaje y desmontaje de sistemas de ficheros SMB (smbfs).
+Summary(fr) : Commandes pour le montage et le démontage des systèmes de fichiers SMB (smbfs).
+Summary(it) : Comandi per montare e smontare i file system SMB (smbfs).
+Summary(pt) : Comandos mount e unmount para o sistema de ficheiros SMB (smbfs).
+
+
+
+%Package -n swat
+Group : Administration/Network
+Requires : setup >= 2.0-2, tcp_wrappers
+
+Summary : Samba Web Administration Tool.
+Summary(de) : Das Samba Web Administrationstool.
+Summary(es) : Utilidad de administración Samba.
+Summary(fr) : Outil d'administration Internet pour Samba.
+Summary(it) : Strumento per l'amministrazione di Samba via Web.
+Summary(pt) : Ferramenta Web de administração de Samba (Samba Web Administration Tool).
+
+
+%Description
+Samba provides an SMB server which can be used to provide network
+services to SMB (sometimes called "Lan Manager") clients, including
+various versions of MS Windows, OS/2, and other Linux machines.
+
+%Description -l de
+Samba stellt einen SMB Server zur Verfügung, mit dem Netzwerkdienste für SMB
+(auch "Lan Manager" genannt) Clients bereitgestellt werden können. Dies
+schließt verschiedene Versionen von MS Windows, OS/2 und andere Linux
+Maschinen ein.
+
+%Description -l es
+Samba dispone de un servidor SMB que puede utilizarse para proporcionar
+servicios de red a clientes SMB (a veces conocido como "Lan Manager"),
+incluyendo varias versiones de MS Windows, OS/2 y otras máquinas Linux.
+
+%Description -l fr
+Samba fournit un serveur SMB qui peut être utilisé pour fournir des services
+de réseau aux clients SMB (parfois appelés "Lan Manager"), comportant
+diverses versions de MS Windows, OS/2 et d'autres machines Linux.
+
+%Description -l it
+Samba fornisce un server SMB che può essere usato per fornire servizi
+di rete a client SMB (talvolta chiamato "Lan Manager"), comprese varie
+versioni di MS Windows, OS/2 e altre macchine Linux.
+
+%Description -l pt
+O Samba fornece um servidor de SMB que pode ser usado para fornecer serviços de
+rede aos clientes de SMB (denominado por vezes como "Lan Manager"), incluindo
+várias versões do Windows, OS/2 e outras máquinas Linux.
+
+%Description doc
+This package contains extensive SAMBA documentation, including a FAQ,
+comprehensive usage documentation, and a number of examples.
+
+%Description -l de doc
+Dieses Paket enthält eine ausführliche SAMBA Dokumentation, inklusive
+einer FAQ, umfassender Gebrauchsdokumentation und einer Reihe von
+Beispielen.
+
+%Description -l es doc
+Este paquete contiene una extensa documentación sobre SAMBA, incluyendo
+FAQ (Preguntas de Uso Frecuente), documentación sobre el uso y algunos
+ejemplos.
+
+%Description -l fr doc
+Ce paquetage contient une documentation complète sur Samba, y compris
+une FAQ détaillée de son utilisation et un certain nombre d'exemples.
+
+%Description -l it doc
+Questo pacchetto contiene la documentazione su SAMBA tra cui una FAQ
+una esaustiva documentazione d'uso e un certo numero di esempi.
+
+%Description -l pt doc
+Este pacote contém alguma documentação extensa sobre o SAMBA, incluindo a FAQ,
+alguma documentação compreensiva sobre a utilização e alguns exemplos.
+
+%Description -n smbfs
+This package includes the tools necessary to mount filesystems from
+SMB servers.
+
+%Description -l de -n smbfs
+Dieses Paket enthält die nötigen Tools, um Dateisysteme von SMB-Servern
+zu mounten.
+
+%Description -l es -n smbfs
+este paqeute incluye las herramientas necesarias para montar sistemas de
+ficheros de servidores SMB.
+
+%Description -l fr -n smbfs
+Ce paquetage contient les outils nécessaires pour monter des systèmes
+de fichiers sur des serveurs SMB.
+
+%Description -l it -n smbfs
+Questo pacchetto contiene gli strumenti necessari per montare filesystem
+da server SMB.
+
+%Description -l pt -n smbfs
+Este pacote contém as ferramentas necessárias para montar sistema de
+ficheiros de servidores SMB.
+
+%Description -n swat
+SWAT allows a Samba administrator to configure the complex smb.conf
+file via a Web browser. It also provides links to all the configurable
+options in the smb.conf file allowing an administrator to easily look
+up the effects of any change.
+
+%Description -l de -n swat
+Mit SWAT kann ein Samba-Administrator die komplexe smb.conf
+Datei mit Hilfe eines Web-Browsers konfigurieren. Es stellt auch Links zu
+allen konfigurierbaren Optionen in der smb.conf Datei bereit, wodurch ein
+Administrator die Auswirkungen einer Änderung leicht nachvollziehen kann.
+
+%Description -l es -n swat
+SWAT permite a un administrador de Samba configurar el complejo fichero
+smb.conf mediante una navegador web. También proporciona enlaces a todas las
+opciones configurables en el fichero smb.conf, permitiendo al administrador
+comprobar fácilmente los efectos de cualquier cambio.
+
+%Description -l fr -n swat
+SWAT permet à un administrateur Samba de configurer le fichier smb.conf
+complexe via un navigateur Web. Il fournit également des liens d'aide pour
+toutes les options configurables dans le fichier smb.conf permettant à un
+administrateur de consulter aisément les effets d'une modification.
+
+%Description -l it -n swat
+SWAT permette ad un amministratore Samba di configurare il complesso file
+smb.conf attraverso un browser Web. SWAT ha anche dei link di aiuto per
+tutte le opzioni di configurazione del file smb.conf.
+
+%Description -l pt -n swat
+O SWAT permite a um administrador de Samba configurar o complexo ficheiro
+smb.conf através de uma interface Web. Fornece também referências para
+todas as opções configuraveis no smb.conf, permitindo a um admnistrador
+verificar rapidamente o efeite de qualquer alteração.
+
+
+%Prep
+%setup
+#%patch0 -p1
+#%patch1 -p1
+#%patch2 -p1
+
+# instead of patch (to help configuration) ... ;^)
+%{fixUP} -vbT source/Makefile.in -e '
+ s:we don.t use sbindir because we want:if you want : +
+ s:(the previous releases of Samba):$1, please use: +
+ s:(SBINDIR\s*=\s*\@)b:# ./configure --sbindir=\\\$(BINDIR)\n${1}sb: +
+ s:/log\.(\S+):/log/samba.d/${1}d: +
+ s:(PASSWD_PROGRAM\s*=\s*)(/bin):$1/usr$2:
+'
+# s:^(LIBS\s*=):AUTH_$1: +
+# s:((CLIENT|CUPS|NMBD|SMBD|SWAT|RPCCLIENT|SMBPASSWD|STATUS|TESTPRNS|TESTPARM)_OBJ\) )(\$\(LDF):$1\$(AUTH_LIBS) $3:
+
+for i in {cvs.,change-}log; do [ ! -f ../$i ] || mv ../$i source; done
+
+mv swat/help/welcome.html docs
+%{fixUP} -vT docs -e '
+ s:/usr/local/samba/bin/(smb(client|run)):/usr/bin/$1:g +
+ s:/usr/local/samba/bin/((s|n)mbd|swat|smbstatus):/usr/sbin/$1:g +
+ s:/usr/local/samba/var/locks:/var/lock/samba.d: +
+ s:/usr/local/samba/(var|lib)/log:/var/log/samba.d/smb: +
+ s:/usr/local/samba/swat:/usr/share/samba/swat:g +
+ s:/usr/local/samba/lib:%{EtcSamba}:g +
+ s:/usr/local/samba/printers:/var/spool/samba:g +
+ s:/usr/local/samba/private/smbpasswd:/usr/bin/smbpasswd:g +
+ s:/usr/local/samba/netlogon:%{LSBservedir}/netlogon:g;
+'
+mv docs/welcome.html swat/help
+for i in docs/*/smb.conf.5*; do
+ %{fixUP} -vT $i -e '
+ s:users\.map:smbusers:g +
+ s:SAMBA_INSTALL_DIRECTORY/lib:%{EtcSamba}: +
+ s:None \(set in compile\)\.:(see above).: +
+ s:/usr/local/:/usr/:g;
+ '
+done
+%{fixUP} -vT docs/textdocs/Faxing.txt -e '
+ s:/usr/local/etc/:/etc/: +
+ s:/usr/local/:/usr/:;
+'
+%{fixUP} -vT docs/docbook/projdoc/ENCRYPTION.sgml -e '
+ s:/usr/local/samba/private:%{EtcSamba}:g +
+ s:mksmbpasswd.sh:mksmbpasswd:g +
+ s:the Samba source directory:/usr/bin:;
+'
+%{fixUP} -vT docs/htmldocs/make_smbcodepage.1.html -e '
+ s:/usr/local/samba:/usr/bin/:g;
+'
+for i in htmldocs/DOMAIN_MEMBER.html htmldocs/Samba-HOWTO-Collection.html \
+ htmldocs/samba-pdc-faq.html htmldocs/samba-pdc-howto.html \
+ htmldocs/smbclient.1.html htmldocs/smbd.8.html \
+ docbook/projdoc/DOMAIN_MEMBER.sgml htmldocs/DOMAIN_MEMBER.html \
+ docbook/faq/samba-pdc-faq.sgml docbook/howto/samba-pdc-howto.sgml \
+ docbook/manpages/smbclient.1.sgml docbook/manpages/smbd.8.sgml \
+ docbook/projdoc/ENCRYPTION.sgml manpages/smbclient.1 manpages/smbd.8 ; do
+%{fixUP} -vT docs/$i -e '
+ s:/usr/local/samba/private/FOREST.SLEEPY.SID:/var/lock/samba.d/FOREST.SLEEPY.SID: +
+ s:/usr/local/samba/private:/usr/bin:g +
+ s:/usr/local/samba/bin:/usr/bin:g +
+ s:/usr/local/sbin:/usr/sbin:g +
+ s:/usr/local/src/samba:/usr/src/samba:g ;'
+done
+%{fixUP} -vT docs/docbook/manpages/make_smbcodepage.1.sgml -e '
+ s:/usr/local/samba:/usr/bin:g ;
+'
+%{fixUP} -vT docs/htmldocs/samba-pdc-faq.html -e '
+ s:/usr/local/src:/usr/src:g ;
+'
+# End of DirtyHack(TM)
+
+
+%Build
+cd source
+autoreconf
+
+CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" ./configure \
+ --prefix='$(DESTDIR)/usr' \
+ --localstatedir='$(DESTDIR)/var' \
+ --libdir='$(DESTDIR)%{EtcSamba}' \
+ --with-privatedir='$(LIBDIR)' \
+ --with-lockdir='$(DESTDIR)/var/lock/samba.d' \
+ --with-swatdir='$(DESTDIR)/usr/share/swat' \
+ --with-swatdir='$(DESTDIR)/usr/share/swat' \
+ --with-sambabook='$(DESTDIR)/usr/share/swat/using_samba' \
+ --with-configdir='$(DESTDIR)'%{EtcSamba} \
+ --with-codepagedir='$(DESTDIR)'/usr/share/samba/codepages \
+ --without-smbwrapper \
+ --with-smbmount \
+ --with-pam \
+ --with-pam_smbpass \
+ --with-netatalk \
+ --with-quotas \
+ --with-syslog \
+ --with-utmp
+
+make LOGFILEBASE=/var/log/samba.d all
+make LOGFILEBASE=/var/log/samba.d nsswitch/libnss_wins.so
+make LOGFILEBASE=/var/log/samba.d smbfilter debug2html
+make LOGFILEBASE=/var/log/samba.d bin/smbspool
+
+
+%Install
+%{mkDESTDIR}
+VVS=packaging/%{Vendor}/%{Dist}
+
+mkdir -p $DESTDIR/etc/{{rc.d/init,logrotate,pam}.d,sysconfig/daemons,skel/Samba}
+mkdir -p $DESTDIR/var/{lo{ck,g}/samba.d,spool/samba}
+mkdir -p $DESTDIR/usr/share/swat/using_samba/{gifs,figs}
+mkdir -p $DESTDIR/lib/security
+mkdir -p $DESTDIR/%{LSBservedir}/{netlogon,profiles,Public}
+mkdir -p $DESTDIR/usr/share/samba/codepages/src $DESTDIR/sbin
+
+make -C source install
+make LOGFILEBASE=/var/log/samba.d -C source install
+
+strip $DESTDIR/usr/bin/smb{mnt,umount}
+#mv $DESTDIR/usr/bin/{make,add,conv}* $DESTDIR/usr/sbin
+
+cp -p source/codepages/codepage_def.??? $DESTDIR/usr/share/samba/codepages/src
+
+# Install the nsswitch library extension file
+install -m 755 source/nsswitch/libnss_wins.so $DESTDIR/lib/libnss_wins.so.2.0
+# Make link for wins resolver
+ln -s libnss_wins.so.2.0 $DESTDIR/lib/libnss_wins.so.2
+ln -s libnss_wins.so.2.0 $DESTDIR/lib/libnss_wins.so
+
+# install -m 755 source/nsswitch/libnss_winbind.so $DESTDIR/lib/libnss_winbind.so.2.0
+# # Make link for winbind resolver
+# ln -s libnss_winbind.so.2.0 $DESTDIR/lib/libnss_winbind.so.2
+# ln -s libnss_winbind.so.2.0 $DESTDIR/lib/libnss_winbind.so
+
+# install -m 755 source/nsswitch/pam_winbind.so $DESTDIR/lib/security
+
+# install -m 755 source/bin/wbinfo $DESTDIR/usr/bin
+
+for f in debug2html smbfilter smbspool; do
+ install -m 755 source/bin/$f $DESTDIR/usr/sbin/$f
+done
+
+cp -p $VVS/samba.init $DESTDIR/etc/rc.d/init.d/samba
+ln -s /etc/rc.d/init.d/samba $DESTDIR/usr/sbin
+
+cp -p $VVS/smb.conf.sample $DESTDIR%{EtcSamba}/smb.conf.sample
+cp -p $VVS/smb.conf $DESTDIR%{EtcSamba}/smb.conf
+cp -p $VVS/smbusers $DESTDIR%{EtcSamba}
+cp -p $VVS/smbprint $DESTDIR/usr/bin
+#cp -p $VVS/smbadduser.perl $DESTDIR/usr/bin/smbadduser
+#cp -p $VVS/make_smbpasswd.perl $DESTDIR/usr/bin/make_smbpasswd
+#cp -p $VVS/convertsmbpasswd.perl $DESTDIR/usr/bin/convertsmbpasswd
+#cp -p $VVS/updatesmbpasswd.perl $DESTDIR/usr/bin/updatesmbpasswd
+cp -p $VVS/findsmb $DESTDIR/usr/bin
+cp -p $VVS/samba.daemon $DESTDIR/etc/sysconfig/daemons/samba
+cp -p $VVS/samba.pam $DESTDIR/etc/pam.d/samba
+cp -p $VVS/samba.logrotate $DESTDIR/etc/logrotate.d/samba
+cp -p $VVS/README.home $DESTDIR/etc/skel/Samba/README.txt
+cp -p $VVS/README.Public $DESTDIR/%{LSBservedir}/Public/README.txt
+cp -p $VVS/README.profiles $DESTDIR/%{LSBservedir}/profiles/README.txt
+
+# Add PAM smbpass facility
+mv $DESTDIR/usr/bin/pam_smbpass.so $DESTDIR/lib/security
+
+for f in testparm testprns; do
+ ln -s $f $DESTDIR/usr/bin/smb$f
+ ln -s $f.1 $DESTDIR/usr/man/man1/smb$f.1
+done
+ln -s make_smbcodepage $DESTDIR/usr/bin/mksmbcodepage
+#ln -s make_smbpasswd $DESTDIR/usr/bin/mksmbpasswd
+#ln -sf convert_smbpasswd $DESTDIR/usr/bin/convertsmbpasswd
+ln -s ../usr/bin/smbmnt $DESTDIR/sbin/mount.smbfs
+
+cat <<-'EoH' > $DESTDIR%{EtcSamba}/lmhosts
+ 127.0.0.1 localhost
+EoH
+
+
+DOCD="$DESTDIR/%{_defaultdocdir}/samba-%{Version}"; mkdir -p $DOCD
+ln -sf ../Copyrights/GPL-2.0 $DOCD/COPYING
+cp -p README README-smbmount Manifest Read-Manifest-Now $DOCD
+cp -p WHATSNEW.txt Roadmap $DOCD
+cp -a docs examples $DOCD
+
+mv $DOCD/docs/htmldocs/wfw_slip.htm $DOCD/docs/wfw_slip.html
+
+rm -rf $DOCD/docs/{htmldocs,manpages,yodldocs}
+rm -rf $DOCD/examples/{svr4-startup,printing}
+rm -rf $DOCD/CVS $DOCD/*/CVS $DOCD/*/*/CVS $DOCD/*/*/*/CVS
+
+cp -p swat/README $DOCD/README.swat
+
+# This is the O'Reily Samba Book - on-line
+for i in docs/htmldocs/using_samba/*.html
+do
+install -m644 $i $DESTDIR/usr/share/swat/using_samba
+done
+for i in docs/htmldocs/using_samba/figs/*.gif
+do
+install -m644 $i $DESTDIR/usr/share/swat/using_samba/figs
+done
+for i in docs/htmldocs/using_samba/gifs/*.gif
+do
+install -m644 $i $DESTDIR/usr/share/swat/using_samba/gifs
+done
+
+%{fixUP} -vT $DOCD/examples -e 's:/usr/local/bin/:/usr/bin/:g;'
+%{fixUP} -vT $DESTDIR/etc/samba.d -e 's:\@samba_home\@:%{LSBservedir}:'
+
+%{fixManPages}
+
+%{mkLists} -c samba
+cat << 'EOF' | %{mkLists} -d samba
+Samba base
+%{LSBservedir} config-IGNORED
+^/(etc|var|home|tmp) config-IGNORED
+swat swat
+%{_defaultdocdir}/samba-[^/]+/$ base
+%{_defaultdocdir}/samba- doc
+tmp IGNORED
+man IGNORED
+@default@
+EOF
+cat << 'EOF' | %{mkLists} -f -a samba
+\.old$ IGNORED
+Samba/README.txt base
+^/etc config-IGNORED
+%{_defaultdocdir}/samba-[^/]+/(COPYING|README$) base
+libnss_wins.so base
+%{_defaultdocdir}/samba-[^/]+/(COPYING|README$) base
+%{_defaultdocdir}/samba- doc
+smb(mount|mnt|umount) smbfs
+mount.smbfs smbfs
+swat swat
+@default@
+EOF
+
+
+%Clean
+%{rmDESTDIR}
+
+
+%Post
+lisa --SysV-init install samba S91 3:4:5 K09 0:1:2:6
+
+
+%Post -n swat
+lisa --inetd install swat stream tcp nowait.400 root /usr/sbin/tcpd swat
+perl -pi -e '$s=1 if /^swat/;
+ print "swat:ALL EXCEPT 127.0.0.1\n" if eof && ! $s' /etc/hosts.deny
+
+
+%PostUn
+lisa --SysV-init remove samba $1
+# We want to remove the browse.dat and wins.dat files so they can not
+# interfer with a new version of samba!
+rm -f /var/lock/samba/{browse,wins}.dat
+
+
+%PostUn -n swat
+lisa --inetd disable swat $1
+[ -x /usr/sbin/swat ]||perl -ni -e '/^swat\s*\:/||print' /etc/hosts.deny
+
+
+%Files -f files-samba-base
+%defattr(-,root,root)
+%config %attr(755,root,root) /etc/rc.d/init.d/samba
+%config %attr(644,root,root) /etc/sysconfig/daemons/samba
+%config %attr(644,root,root) /etc/pam.d/samba
+%config %attr(644,root,root) /etc/logrotate.d/samba
+%config %attr(-,root,root) %{EtcSamba}
+%dir %attr(755,root,root) /var/lock/samba.d
+%dir %attr(755,root,root) /var/log/samba.d
+%dir %attr(1777,root,root) /var/spool/samba
+%dir %attr(755,root,root) %{LSBservedir}
+%dir %attr(755,root,root) %{LSBservedir}/netlogon
+%dir %attr(755,root,root) %{LSBservedir}/profiles
+%dir %attr(755,root,root) %{LSBservedir}/Public
+
+
+%Files doc -f files-samba-doc
+%defattr(-,root,root)
+
+
+%Files -n smbfs -f files-samba-smbfs
+%defattr(-,root,root)
+
+
+%Files -n swat -f files-samba-swat
+%defattr(-,root,root)
+
+
+%ChangeLog
+* Mon Jan 01 1997 ...
+$Id: samba2.spec.tmpl,v 1.3 2001/06/01 12:33:16 jerry Exp $
diff --git a/packaging/Caldera/OpenLinux/samba3.spec.tmpl b/packaging/Caldera/OpenLinux/samba3.spec.tmpl
new file mode 100644
index 00000000000..ab4e48649b9
--- /dev/null
+++ b/packaging/Caldera/OpenLinux/samba3.spec.tmpl
@@ -0,0 +1,314 @@
+%define Version PVERSION
+%define date PRELEASE
+%define Vendor Caldera
+%define Dist OpenLinux
+%define EtcSamba /etc/samba.d
+
+Name : samba
+Version : %{Version}
+Release : %{date}
+Group : Server/Network
+
+Summary : Samba SMB client and server.
+
+Copyright : Andrew Tridgell, John H Terpstra; GPL Version 2
+Packager : Klaus Singvogel <klaus@caldera.de>
+Icon : Caldera-daemon.gif
+URL : http://samba.org/samba
+
+Requires : libpam >= 0.66, SysVinit-scripts >= 1.04-6
+
+
+BuildRoot : /tmp/%{Name}-%{Version}
+
+Source: ftp://ftp.samba.org/pub/samba/%{Name}-%{Version}%{date}.tar.gz
+#Patch0: %{Name}-%{Version}-smbmount.patch
+Patch1: %{Name}-%{Version}-install.patch
+#Patch2: %{Name}-%{Version}-smbconf.patch
+
+
+%Package doc
+Group : Server/Network
+
+Summary : Documentation on SAMBA.
+
+
+%Package -n smbfs
+Group : System/Network
+
+Summary : Mount and unmount commands for SMB filesystems (smbfs).
+
+
+%Package -n swat
+Group : Administration/Network
+Requires : setup >= 2.0-2, tcp_wrappers
+
+Summary : Samba Web Administration Tool.
+Samba provides an SMB server which can be used to provide
+network services to SMB (sometimes called "Lan Manager")
+clients, including various versions of MS Windows, OS/2,
+and other Linux machines. Samba also provides some SMB
+clients, which complement the built-in SMB filesystem
+in Linux. Samba uses NetBIOS over TCP/IP (NetBT) protocols
+and does NOT need NetBEUI (Microsoft Raw NetBIOS frame)
+protocol.
+
+Samba-2.2 features working NT Domain Control capability and
+includes the SWAT (Samba Web Administration Tool) that
+allows samba's smb.conf file to be remotely managed using your
+favourite web browser. For the time being this is being
+enabled on TCP port 901 via inetd.
+
+Users are advised to use Samba-2.2 as a Windows NT4
+Domain Controller only on networks that do NOT have a Windows
+NT Domain Controller. This release does NOT as yet have
+Backup Domain control ability.
+
+Please refer to the WHATSNEW.txt document for fixup information.
+This binary release includes encrypted password support.
+
+Please read the smb.conf file and ENCRYPTION.txt in the
+docs directory for implementation details.
+
+%Description
+
+NOTE: Caldera OpenLinux uses PAM which has integrated support
+for Shadow passwordsand for quotas. Do NOT recompile with the
+SHADOW_PWD option enabled.
+
+%Description doc
+Documentation on SAMBA.
+
+
+%Description -n smbfs
+This package includes the tools necessary to mount filesystems from
+SMB servers.
+
+Smbmount and smbumount are an interface to the SMB filesystem. Smbfs is
+a filesystem which understands the SMB protocol. This is the protocol
+Windows for Workgroups, Windows NT or Lan Manager use to talk to each
+other. It was inspired by samba, the program by Andrew Tridgell that
+turns any unix site into a file server for DOS or Windows clients. See
+http://samba.org/samba for this interesting program suite and lots of
+more information on SMB and NetBIOS over TCP/IP. There you also find
+explanation for conceps like NetBIOS name or share.
+
+
+%Description -n swat
+swat allows a Samba administrator to configure the complex smb.conf
+file via a Web browser. In addition, a swat configuration page has
+help links to all the configurable options in the smb.conf file
+allowing an administrator to easily look up the effects of any change.
+
+
+%Prep
+%setup -n samba
+#%%patch0 -p1
+%patch1 -p1
+#%patch2 -p1
+
+# instead of patch (to help configuration) ... ;^)
+%{fixUP} -vbT source/Makefile.in -e '
+ s:we don.t use sbindir because we want:if you want : +
+ s:(the previous releases of Samba):$1, please use: +
+ s:(SBINDIR\s*=\s*\@)b:# ./configure --sbindir=\\\$(BINDIR)\n${1}sb: +
+ s:/log\.(\S+):/log/samba.d/${1}d: +
+ s:(PASSWD_PROGRAM\s*=\s*)(/bin):$1/usr$2: +
+ s:^(LIBS\s*=):AUTH_$1: +
+ s:((SMBD|SWAT|RPCCLIENT|SMBPASSWD)_OBJ\) )(\$\(LDF):$1\$(AUTH_LIBS) $3:
+'
+
+for i in {cvs.,change-}log; do [ ! -f ../$i ] || mv ../$i source; done
+
+mv swat/help/welcome.html docs
+%{fixUP} -vT docs -e '
+ s:/usr/local/samba/bin/(smb(client|run)):/usr/bin/$1:g +
+ s:/usr/local/samba/bin/((s|n)mbd|swat):/usr/sbin/$1:g +
+ s:/usr/local/samba/var/locks:/var/lock/samba.d: +
+ s:/usr/local/samba/(var|lib)/log:/var/log/samba.d/smb: +
+ s:/usr/local/samba/swat:/usr/share/samba/swat:g +
+ s:/usr/local/samba/lib:%{EtcSamba}:g;
+'
+mv docs/welcome.html swat/help
+for i in docs/*/smb.conf.5*; do
+ %{fixUP} -vT $i -e '
+ s:users\.map:smbusers:g +
+ s:SAMBA_INSTALL_DIRECTORY/lib:%{EtcSamba}: +
+ s:None \(set in compile\)\.:(see above).: +
+ s:/usr/local/:/usr/:g;
+ '
+done
+%{fixUP} -vT docs/textdocs/Faxing.txt -e '
+ s:/usr/local/etc/:/etc/: +
+ s:/usr/local/:/usr/:;
+'
+%{fixUP} -vT docs/textdocs/ENCRYPTION.txt -e '
+ s:/usr/local/samba/private:%{EtcSamba}:g +
+ s:mksmbpasswd.sh:mksmbpasswd:g +
+ s:the Samba source directory:/usr/bin:;
+'
+# End of DirtyHack(TM)
+
+
+%Build
+cd source
+autoreconf
+
+CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" ./configure \
+ --prefix='$(DESTDIR)/usr' \
+ --localstatedir='$(DESTDIR)/var' \
+ --libdir='$(DESTDIR)%{EtcSamba}' \
+ --with-privatedir='$(LIBDIR)' \
+ --with-lockdir='$(DESTDIR)/var/lock/samba.d' \
+ --with-swatdir='$(DESTDIR)/usr/share/swat' \
+ --with-smbmount --with-pam --without-smbwrapper \
+ --with-utmp --with-quotas --with-vfs --with-msdfs \
+ --with-profile --with-syslog --with-utmp --with-netatalk \
+ --with-sambabook=$(DESTDIR)/usr/share/swat/using_samba
+
+make all nsswitch/libnss_wins.so
+
+
+%Install
+%{mkDESTDIR}
+VVS=packaging/%{Vendor}/%{Dist}
+
+mkdir -p $DESTDIR/etc/{{rc.d/init,logrotate,pam}.d,sysconfig/daemons}
+mkdir -p $DESTDIR/var/{lo{ck,g}/samba.d,spool/samba}
+mkdir -p $DESTDIR/usr/{share,swat/using_samba}
+mkdir -p $DESTDIR/home/samba $DESTDIR%{EtcSamba}/codepages/src $DESTDIR/sbin
+
+make -C source install
+
+strip $DESTDIR/usr/bin/smb{mount,mnt,umount}
+mv $DESTDIR/usr/bin/{make,add,conv}* $DESTDIR/usr/sbin
+
+#cp -p source/codepages/codepage_def.??? $DESTDIR%{EtcSamba}/codepages/src
+
+# Install the nsswitch library extension file
+cp -p source/nsswitch/libnss_wins.so $DESTDIR/lib
+# Make link for wins resolver
+cd $DESTDIR/lib
+ln -s libnss_wins.so libnss_wins.so.2
+cd $RPM_BUILD_DIR
+
+cp -p $VVS/samba.init $DESTDIR/etc/rc.d/init.d/samba
+ln -s /etc/rc.d/init.d/samba $DESTDIR/usr/sbin
+
+cp -p $VVS/smb.conf.sample $DESTDIR%{EtcSamba}/smb.conf.sample
+#cp -p $VVS/smb.conf.sample $DESTDIR%{EtcSamba}/smb.conf
+cp -p $VVS/smbusers $DESTDIR%{EtcSamba}
+cp -p $VVS/smbprint $DESTDIR/usr/bin
+cp -p $VVS/smbadduser.perl $DESTDIR/usr/sbin/smbadduser
+cp -p $VVS/make_smbpasswd.perl $DESTDIR/usr/sbin/make_smbpasswd
+cp -p $VVS/convertsmbpasswd.perl $DESTDIR/usr/sbin/convertsmbpasswd
+cp -p $VVS/updatesmbpasswd.perl $DESTDIR/usr/sbin/updatesmbpasswd
+cp -p $VVS/findsmb $DESTDIR/usr/sbin
+cp -p $VVS/samba.daemon $DESTDIR/etc/sysconfig/daemons/samba
+cp -p $VVS/samba.pam $DESTDIR/etc/pam.d/samba
+cp -p $VVS/samba.logrotate $DESTDIR/etc/logrotate.d/samba
+
+for f in testparm testprns; do
+ ln -s $f $DESTDIR/usr/bin/smb$f
+ ln -s $f.1 $DESTDIR/usr/man/man1/smb$f.1
+done
+ln -s make_smbcodepage $DESTDIR/usr/sbin/mksmbcodepage
+ln -s make_smbpasswd $DESTDIR/usr/sbin/mksmbpasswd
+ln -sf convert_smbpasswd $DESTDIR/usr/sbin/convertsmbpasswd
+
+cat <<-'EoH' > $DESTDIR%{EtcSamba}/lmhosts
+ 127.0.0.1 localhost
+EoH
+
+
+DOCD="$DESTDIR/%{_defaultdocdir}/samba-%{Version}"; mkdir -p $DOCD
+ln -sf ../Copyrights/GPL-2.0 $DOCD/COPYING
+cp -p README Manifest Read-Manifest-Now WHATSNEW.txt Roadmap $DOCD
+cp -a docs examples $DOCD
+
+mv $DOCD/docs/htmldocs/wfw_slip.htm $DOCD/docs/wfw_slip.html
+
+rm -rf $DOCD/docs/{htmldocs,manpages,yodldocs}
+rm -rf $DOCD/examples/{svr4-startup,printing}
+
+cp -p swat/README $DOCD/README.swat
+
+%{fixUP} -vT $DOCD/examples -e 's:/usr/local/bin/:/usr/bin/:g;'
+
+%{fixManPages}
+
+%{mkLists} -c samba
+cat << 'EOF' | %{mkLists} -d samba
+^/(etc|var|home) config-IGNORED
+swat swat
+/usr/doc/samba-[^/]+/$ base
+/doc/samba- doc
+@default@
+EOF
+cat << 'EOF' | %{mkLists} -f -a samba
+^/etc config-IGNORED
+/doc/samba-[^/]+/(COPYING|README$) base
+/doc/samba- doc
+smb(mount|mnt|umount) smbfs
+mount.smbfs smbfs
+swat swat
+@default@
+EOF
+
+
+%Clean
+%{rmDESTDIR}
+
+
+%Post
+lisa --SysV-init install samba S91 3:4:5 K09 0:1:2:6
+
+
+%Post -n swat
+lisa --inetd install swat stream tcp nowait.400 root /usr/sbin/tcpd swat
+perl -pi -e '$s=1 if /^swat/;
+ print "swat:ALL EXCEPT 127.0.0.1\n" if eof && ! $s' /etc/hosts.deny
+
+
+%PostUn
+lisa --SysV-init remove samba $1
+# We want to remove the browse.dat and wins.dat files so they can not
+# interfer with a new version of samba!
+rm -f /var/lock/samba/{browse,wins}.dat
+
+
+%PostUn -n swat
+lisa --inetd disable swat $1
+[ -x /usr/sbin/swat ]||perl -ni -e '/^swat\s*\:/||print' /etc/hosts.deny
+
+
+%Files -f files-samba-base
+%defattr(-,root,root)
+%config %attr(755,root,root) /etc/rc.d/init.d/samba
+%config %attr(644,root,root) /etc/sysconfig/daemons/samba
+%config %attr(644,root,root) /etc/pam.d/samba
+%config %attr(644,root,root) /etc/logrotate.d/samba
+%config %attr(-,root,root) %{EtcSamba}
+%config %attr(755,root,root) /home/samba
+
+%dir %attr(755,root,root) /var/lock/samba.d
+%dir %attr(755,root,root) /var/log/samba.d
+%dir %attr(1777,root,root) /var/spool/samba
+#%dir %attr(775,root,nobody) /home/samba
+
+
+%Files doc -f files-samba-doc
+%defattr(-,root,root)
+
+
+%Files -n smbfs -f files-samba-smbfs
+%defattr(-,root,root)
+
+
+%Files -n swat -f files-samba-swat
+%defattr(-,root,root)
+
+
+%ChangeLog
+* Mon Jan 01 1997 ...
+
diff --git a/packaging/Caldera/OpenLinux/smb.conf b/packaging/Caldera/OpenLinux/smb.conf
new file mode 100644
index 00000000000..e62c7bf1e4c
--- /dev/null
+++ b/packaging/Caldera/OpenLinux/smb.conf
@@ -0,0 +1,51 @@
+# Samba config file created using SWAT
+# from localhost (127.0.0.1)
+
+# Global parameters
+[global]
+ workgroup = MYGROUP
+ server string = Samba Server on Caldera OpenLinux
+ encrypt passwords = Yes
+ username map = /etc/samba.d/smbusers
+ password level = 8
+ username level = 8
+ log file = /var/log/samba.d/smb.%m
+ max log size = 200
+ socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
+ logon path = \\%L\Profiles\%U
+ dns proxy = No
+ printing = cups
+
+[homes]
+ comment = Home Directories
+ path = %H/Samba
+ username = %S
+ valid users = %S
+ writeable = Yes
+ create mask = 0750
+ only user = Yes
+ browseable = No
+
+[netlogon]
+ comment = Samba Network Logon Service
+ path = @samba_home@/netlogon
+ guest ok = Yes
+ share modes = No
+
+[profiles]
+ path = @samba_home@/profiles
+ writeable = Yes
+ guest ok = Yes
+ browseable = No
+
+[printers]
+ comment = All Printers
+ path = /var/spool/samba
+ create mask = 0700
+ printable = Yes
+ browseable = No
+
+[public]
+ comment = Public Stuff
+ path = @samba_home@/Public
+ write list = @users
diff --git a/packaging/Caldera/OpenLinux/smb.conf.sample b/packaging/Caldera/OpenLinux/smb.conf.sample
new file mode 100644
index 00000000000..cec5a8a8b22
--- /dev/null
+++ b/packaging/Caldera/OpenLinux/smb.conf.sample
@@ -0,0 +1,315 @@
+# 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
+#
+# 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 many any basic syntactic errors.
+#
+#======================= Global Settings =====================================
+[global]
+
+# workgroup = NT-Domain-Name or Workgroup-Name
+ workgroup = MYGROUP
+
+# server string is the equivalent of the NT Description field
+ server string = Samba Server on Caldera OpenLinux
+
+# 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
+
+# It should not be necessary to specify the print system type unless
+# it is non-standard. Currently supported print systems include:
+# bsd, 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.d/smb.%m
+
+# Put a capping on the size of the log files (in Kb).
+ max log size = 200
+
+# Security mode. Most people will want user level security. See
+# security_level.txt for details.
+ security = user
+# Use password server option only with security = server
+; password server = <NT-Server-Name>
+
+# Password Level allows matching of _n_ characters of the password for
+# all combinations of upper and lower case.
+ password level = 8
+ username level = 8
+
+# You may wish to use password encryption. Please read
+# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
+# Do not enable this option unless you have read those documents
+ encrypt passwords = yes
+ smb passwd file = /etc/samba.d/smbpasswd
+
+# The following are needed to allow password changing from Windows to
+# update the Linux sytsem password also.
+# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
+# NOTE2: You do NOT need these to allow workstations to change only
+# the encrypted SMB passwords. They allow the Unix password
+# to be kept in sync with the SMB password.
+; unix password sync = Yes
+; passwd program = /usr/bin/passwd %u
+; passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
+
+# Unix users can map to different SMB User names
+ username map = /etc/samba.d/smbusers
+
+# 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
+; include = /etc/samba.d/smb.conf.%m
+
+# Most people will find that this option gives better performance.
+# See speed.txt and the manual pages for details
+ socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
+
+# 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
+
+# Configure remote browse list synchronisation here
+# request announcement to, or browse list sync from:
+# a specific host or from / to a whole subnet (see below)
+; remote browse sync = 192.168.3.25 192.168.5.255
+# Cause this host to announce itself to local subnets here
+; remote announce = 192.168.1.255 192.168.2.44
+
+# 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 = 20
+
+# 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
+
+# Use only if you have an NT server on your network that has been
+# configured at install time to be a primary domain controller.
+; domain controller = <NT-Domain-Controller-SMBName>
+
+# 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
+
+# All NetBIOS names must be resolved to IP Addresses
+# 'Name Resolve Order' allows the named resolution mechanism to be specified
+# the default order is "host lmhosts wins bcast". "host" means use the unix
+# system gethostbyname() function call that will use either /etc/hosts OR
+# DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf
+# and the /etc/resolv.conf file. "host" therefore is system configuration
+# dependant. This parameter is most often of use to prevent DNS lookups
+# in order to resolve NetBIOS names to IP Addresses. Use with care!
+# The example below excludes use of name resolution for machines that are NOT
+# on the local network segment
+# - OR - are not deliberately to be known via lmhosts or via WINS.
+; name resolve order = wins lmhosts bcast
+
+# 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 built-in default for versions 1.9.17 is yes,
+# this has been changed in version 1.9.18 to no.
+ dns proxy = no
+
+# Case Preservation can be handy - system default is _no_
+# NOTE: These can be set on a per share basis
+; preserve case = no
+; short preserve case = no
+# Default case is normally upper case for all DOS files
+; default case = lower
+# Be very careful with case sensitivity - it can break things!
+; case sensitive = no
+
+#============================ Share Definitions ==============================
+[homes]
+ comment = Home Directories
+; this gives access to a 'Public' sub-directory in each user's home...
+; (it is named 'public' as it is intended to be used by other sharing
+; technologies (like NetWare, appletalk) too and may get disclosed due
+; to weak protocols! -- hmm, are there less secure protocols than NFS? :)
+ path = %H/Samba
+ valid users = %S
+ users = %S
+ only user = yes
+ browseable = no
+ writable = yes
+ create mask = 0750
+
+# Un-comment the following and create the netlogon directory for Domain Logons
+[netlogon]
+ comment = Samba Network Logon Service
+ path = @samba_home@/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 = @samba_home@/profiles
+ writeable = yes
+ 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
+ create mask = 0700
+
+# A publicly accessible directory, but read only, except for people in
+# the "users" group
+[public]
+ comment = Public Stuff
+ path = @samba_home@/public
+ browseable = yes
+ read only = yes
+ public = no
+ printable = no
+; writable = yes
+# access may be controlled by these options
+; read list = user1, user2, @group
+; valid users = user1, user3
+; write list = @users
+
+# Other examples.
+#
+# This one is useful for people to share files, BUT
+# access to '/tmp' or '/var/tmp' should *not* be given lightly,
+# as this can (still) pose a security threat!
+# Better use a dedicate sub-directory to /(var/)tmp or something
+# like a [public] share!
+[tmp]
+ comment = Temporary file space
+ path = /tmp
+ browseable = yes
+ read only = yes
+ public = no
+ printable = no
+
+# 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/packaging/Caldera/OpenLinux/smbadduser.perl b/packaging/Caldera/OpenLinux/smbadduser.perl
new file mode 100755
index 00000000000..61bec2320d9
--- /dev/null
+++ b/packaging/Caldera/OpenLinux/smbadduser.perl
@@ -0,0 +1,146 @@
+#!/usr/bin/perl -w
+#
+# smbadduser - Written by Mike Zakharoff
+# perl-rewrite by Raymund Will
+#
+
+$smbpasswd = "/etc/samba.d/smbpasswd";
+$user_map = "/etc/samba.d/smbusers";
+#
+# Set to site specific passwd command
+#
+$passwd = "cat /etc/passwd |";
+#$passwd = "niscat passwd.org_dir |";
+if ( -e "/var/run/ypbind.pid" ) {
+ $passwd = "(cat /etc/passwd; ypcat passwd ) |";
+}
+
+$line = "-" x 58;
+if ($#ARGV < 0) {
+ print <<EoM;
+$line
+Written: Mike Zakharoff email: michael.j.zakharoff\@boeing.com
+
+ 1) Updates $smbpasswd
+ 2) Updates $user_map
+ 3) Executes smbpasswd for each new user
+
+smbadduser unixid[:ntid] unixid[:ntid] ...
+
+Example: smbadduser zak:zakharoffm jdoe johns:smithj
+$line
+EoM
+ exit 1;
+}
+
+# get valid UNIX-Ids (later skip missing)
+%U = ();
+{
+ my $X = "X" x 32;
+ my @t = ();
+
+ open( IN, $passwd) || die( "ERROR: open($passwd): $!\n");
+ while ( <IN> ) {
+ next unless (/^[A-Za-z0-9_]+:/);
+ @t = split(/:/);
+ $U{$t[0]} = join( ":", ($t[0], $t[2], $X, $X, $t[4], $t[5], $t[6]));
+ }
+ close( IN);
+}
+# get all smb passwords (later skip already existent)
+%S = ();
+$Cs = "";
+if ( -r $smbpasswd ) {
+ open( IN, $smbpasswd) || die( "ERROR: open($smbpasswd): $!\n");
+ while ( <IN> ) {
+ if ( /^\#/ ) {
+ $Cs .= $_; next;
+ } elsif ( ! /^([A-Za-z0-9_]+):/ ) {
+ chop; print STDERR "ERROR: $_: invalid smbpasswd entry!\n"; next;
+ }
+ $S{$1} = $_;
+ }
+ close( IN);
+}
+# get all map entries
+%M = ();
+$Cm = "";
+if ( -r $user_map ) {
+ open( IN, $user_map) || die( "ERROR: open($user_map): $!\n");
+ while ( <IN> ) {
+ if ( /^\#/ ) {
+ $Cm .= $_; next;
+ } elsif ( ! /^([A-Za-z0-9_]+)\s*=\s*(\S.+\S)\s*/ ) {
+ chop; print STDERR "ERROR: $_: invalid user-map entry!\n"; next;
+ }
+ $M{$1} = $2;
+ }
+ close( IN);
+}
+# check parameter syntax
+%N = ();
+{
+ foreach ( @ARGV ) {
+ my ( $u, $s, @R) = split(/:/);
+ if ( $#R >= 0 ) {
+ print STDERR "ERROR: $_: Must use unixid[:ntid] SKIPPING...\n";
+ next;
+ }
+ $s = $u unless ( defined( $s) );
+ if ( ! exists( $U{$u}) ) {
+ print STDERR "ERROR: $u: Not in passwd database SKIPPING...\n";
+ next;
+ }
+ if ( exists( $S{$u}) ) {
+ print STDERR "ERROR: $u: Already in smbpasswd database SKIPPING...\n";
+ next;
+ }
+ print "Adding: $u to $smbpasswd\n";
+ $S{$u} = $U{$u};
+ if ( $u ne $s ) {
+ if ( exists( $M{$u}) ) {
+ if ( $M{$u} !~ /\b$s\b/ ) {
+ print "Adding: $s to $u in $user_map\n";
+ $M{$u} .= " $s";
+ }
+ } else {
+ print "Mapping: $s to $u in $user_map\n";
+ $M{$u} = $s;
+ }
+ }
+ $N{$u} = $s;
+ }
+}
+# rewrite $smbpasswd
+{
+ open( OUT, "> $smbpasswd.new") || die( "ERROR: open($smbpasswd.new): $!\n");
+ $Cs = "#\n# SMB password file.\n#\n" unless ( $Cs );
+ print OUT $Cs;
+ foreach ( sort( keys( %S)) ) {
+ print OUT $S{$_};
+ }
+ close( OUT);
+ rename( $smbpasswd, $smbpasswd . "-");
+ rename( $smbpasswd . ".new", $smbpasswd) || die;
+}
+# rewrite $user_map
+{
+ open( OUT, "> $user_map.new") || die( "ERROR: open($user_map.new): $!\n");
+ $Cm = "# Unix_name = SMB_name1 SMB_name2 ...\n" unless ( $Cm );
+ print OUT $Cm;
+ foreach ( sort( keys( %M)) ) {
+ print OUT "$_ = $M{$_}\n";
+ }
+ close( OUT);
+ rename( $user_map, $user_map . "-");
+ rename( $user_map . ".new", $user_map) || die;
+}
+# call 'smbpasswd' for each new
+{
+ foreach ( sort( keys( %N)) ) {
+ print $line . "\n";
+ print "ENTER password for $_\n";
+ system( "smbpasswd $_");
+ }
+}
+
diff --git a/packaging/Caldera/OpenLinux/smbprint b/packaging/Caldera/OpenLinux/smbprint
new file mode 100755
index 00000000000..5d66aa13774
--- /dev/null
+++ b/packaging/Caldera/OpenLinux/smbprint
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+# This script is an input filter for printcap printing on a unix machine. It
+# uses the smbclient program to print the file to the specified smb-based
+# server and service.
+# For example you could have a printcap entry like this
+#
+# smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint
+#
+# which would create a unix printer called "smb" that will print via this
+# script. You will need to create the spool directory /usr/spool/smb with
+# appropriate permissions and ownerships for your system.
+
+# Set these to the server and service you wish to print to
+# In this example I have a WfWg PC called "lapland" that has a printer
+# exported called "printer" with no password.
+
+#
+# Script further altered by hamiltom@ecnz.co.nz (Michael Hamilton)
+# so that the server, service, and password can be read from
+# a /var/spool/lpd/PRINTNAME/.config file.
+#
+# In order for this to work the /etc/printcap entry must include an
+# accounting file (af=...):
+#
+# cdcolour:\
+# :cm=CD IBM Colorjet on 6th:\
+# :sd=/var/spool/lpd/cdcolour:\
+# :af=/var/spool/lpd/cdcolour/acct:\
+# :if=/usr/local/etc/smbprint:\
+# :mx=0:\
+# :lp=/dev/null:
+#
+# The /usr/var/spool/lpd/PRINTNAME/.config file should contain:
+# server=PC_SERVER
+# service=PR_SHARENAME
+# password="password"
+#
+# E.g.
+# server=PAULS_PC
+# service=CJET_371
+# password=""
+
+#
+# Debugging log file, change to /dev/null if you like.
+#
+# logfile=/tmp/smb-print.log
+logfile=/dev/null
+
+
+#
+# The last parameter to the filter is the accounting file name.
+# Extract the directory name from the file name.
+# Concat this with /.config to get the config file.
+#
+eval acct_file=\${$#}
+spool_dir=`dirname $acct_file`
+config_file=$spool_dir/.config
+
+# Should read the following variables set in the config file:
+# server
+# service
+# password
+eval `cat $config_file`
+
+#
+# Some debugging help, change the >> to > if you want to save space.
+#
+echo "server $server, service $service" >> $logfile
+
+(
+# NOTE You may wish to add the line `echo translate' if you want automatic
+# CR/LF translation when printing.
+# echo translate
+ echo "print -"
+ cat
+) | /usr/bin/smbclient "//$server/$service" $password -U $server -N -P >> $logfile 2>&1
diff --git a/packaging/Caldera/OpenLinux/smbusers b/packaging/Caldera/OpenLinux/smbusers
new file mode 100644
index 00000000000..ae3389f53f8
--- /dev/null
+++ b/packaging/Caldera/OpenLinux/smbusers
@@ -0,0 +1,3 @@
+# Unix_name = SMB_name1 SMB_name2 ...
+root = administrator admin
+nobody = guest pcguest smbguest
diff --git a/packaging/Caldera/OpenLinux/updatesmbpasswd.perl b/packaging/Caldera/OpenLinux/updatesmbpasswd.perl
new file mode 100755
index 00000000000..60f572b4905
--- /dev/null
+++ b/packaging/Caldera/OpenLinux/updatesmbpasswd.perl
@@ -0,0 +1,10 @@
+#!/usr/bin/perl -w
+while ( <> ) {
+ print;
+ @V = split(/:/);
+ $_ = $V[3];
+ if ( $V[0] !~ /^\#/ && !(/^[0-9A-F]{32}$/ || /^X{32}$/ || /^\*{32}$/) ) {
+ $V[3] = "X" x 32;
+ }
+ print( join( ':', @V));
+}
diff --git a/packaging/Caldera/OpenServer/Clean b/packaging/Caldera/OpenServer/Clean
new file mode 100755
index 00000000000..fe4eed25270
--- /dev/null
+++ b/packaging/Caldera/OpenServer/Clean
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# Cleanup after having configured, compiled, installed and packaged.
+# Careful - running this script attempts to restore this hierarchy to
+# freshly unpacked source
+#
+# Invoke as "./Clean -n" to get this script to tell you what it would do
+# without doing anything
+#
+
+V=
+[ "$1" = "-n" ] && V=echo
+
+[ -d dist ] && $V rm -rf dist
+[ -f ../../../source/Makefile ] && {
+ $V cd ../../../source
+ $V rm -f bin/locktest bin/masktest bin/smbsh bin/debug2html \
+ bin/locktest2 bin/smbfilter bin/smbtorture
+ $V make clean
+ $V make distclean
+ $V rm -f mout*
+}
diff --git a/packaging/Caldera/OpenServer/Compile b/packaging/Caldera/OpenServer/Compile
new file mode 100755
index 00000000000..cba414ec743
--- /dev/null
+++ b/packaging/Caldera/OpenServer/Compile
@@ -0,0 +1,48 @@
+#!/bin/ksh
+#
+# invoke with -n as the first argument to get this script to tell
+# you what it would do without doing anything
+#
+
+V=
+[ "$1" = "-n" ] && V=echo
+
+CC="gcc -I/usr/local/include -L/usr/local/lib"
+CFLAGS="-O3 -I/usr/local/include -L/usr/local/lib"
+CXX="g++"
+CXXFLAGS="-O3 -I/usr/local/include/stl -I/usr/local/include -L/usr/local/lib"
+RANLIB=true
+MAKE=/usr/local/bin/make
+if [ "$V" = "echo" ]
+then
+ echo "exporting the following shell variables:"
+ echo "CC=$CC"
+ echo "CXX=$CXX"
+ echo "RANLIB=$RANLIB"
+ echo "MAKE=$MAKE"
+ echo "CFLAGS=$CFLAGS"
+ echo "CXXFLAGS=$CXXFLAGS"
+else
+ export CC CXX RANLIB MAKE CFLAGS CXXFLAGS
+fi
+
+if [ "$V" = "echo" ]
+then
+ echo "cd ../../../source"
+ echo "rm -f mout-1 mout-2 mout-3 mout-4"
+ echo "make all 2>&1 | tee mout-1"
+ echo "make smbfilter smbtorture debug2html 2>&1 | tee mout-2"
+ echo "make bin/smbspool smbwrapper bin/wbinfo 2>&1 | tee mout-3"
+ echo "make masktest locktest locktest2 2>&1 | tee mout-3"
+else
+ cd ../../../source
+ rm -f mout-1 mout-2 mout-3 mout-4
+ make all 2>&1 | tee mout-1
+ make smbfilter smbtorture debug2html 2>&1 | tee mout-2
+ make bin/smbspool smbwrapper bin/wbinfo 2>&1 | tee mout-3
+ make masktest locktest locktest2 2>&1 | tee mout-3
+fi
+#
+# Not building :
+# nsswitch - no <nss.h>
+# rpctorture - improper use of client_info struct, dunno
diff --git a/packaging/Caldera/OpenServer/Configure b/packaging/Caldera/OpenServer/Configure
new file mode 100755
index 00000000000..65a4f1186fa
--- /dev/null
+++ b/packaging/Caldera/OpenServer/Configure
@@ -0,0 +1,73 @@
+#!/bin/ksh
+#
+# invoke with -n as the first argument to get this script to tell
+# you what it would do without doing anything
+#
+
+V=
+[ "$1" = "-n" ] && V=echo
+
+CC="gcc -I/usr/local/include -L/usr/local/lib"
+CFLAGS="-O3 -I/usr/local/include -L/usr/local/lib"
+CXX="g++"
+CXXFLAGS="-O3 -I/usr/local/include/stl -I/usr/local/include -L/usr/local/lib"
+RANLIB=true
+MAKE=/usr/local/bin/make
+PREFIX=/usr/local/samba
+if [ "$V" = "echo" ]
+then
+ echo "exporting the following shell variables:"
+ echo "CC=$CC"
+ echo "CXX=$CXX"
+ echo "RANLIB=$RANLIB"
+ echo "MAKE=$MAKE"
+ echo "CFLAGS=$CFLAGS"
+ echo "CXXFLAGS=$CXXFLAGS"
+ echo "PREFIX=$PREFIX"
+else
+ export CC CXX RANLIB MAKE CFLAGS CXXFLAGS PREFIX
+fi
+
+cd ../../../source
+[ -f mout-config ] && {
+ if [ "$V" = "echo" ]
+ then
+ echo "mv mout-config mout-config$$"
+ else
+ mv mout-config mout-config$$
+ fi
+}
+if [ "$V" = "echo" ]
+then
+ echo "./configure \
+ --prefix=${PREFIX} \
+ --with-profile \
+ --with-syslog \
+ --with-utmp \
+ --with-vfs \
+ --with-msdfs \
+ --with-netatalk \
+ --with-sambabook=${PREFIX}/swat/using_samba \
+ 2>&1 | tee mout-config"
+else
+ ./configure \
+ --prefix=${PREFIX} \
+ --with-profile \
+ --with-syslog \
+ --with-utmp \
+ --with-vfs \
+ --with-msdfs \
+ --with-netatalk \
+ --with-sambabook=${PREFIX}/swat/using_samba \
+ 2>&1 | tee mout-config
+fi
+
+cat >> include/config.h <<EOF
+#ifdef HAVE_LONGLONG
+#undef HAVE_LONGLONG
+#endif
+EOF
+
+sed -e "s/nobody/nouser/" include/local.h > /tmp/nouser$$
+cp /tmp/nouser$$ include/local.h
+rm -f /tmp/nouser$$
diff --git a/packaging/Caldera/OpenServer/Install b/packaging/Caldera/OpenServer/Install
new file mode 100755
index 00000000000..ab27b6f67fa
--- /dev/null
+++ b/packaging/Caldera/OpenServer/Install
@@ -0,0 +1,156 @@
+#!/bin/ksh
+#
+# invoke with -n as the first argument to get this script to tell
+# you what it would do without doing anything
+#
+
+V=
+[ "$1" = "-n" ] && V=echo
+
+# Make sure we pick up the install binary from /usr/local/bin
+# rather than /etc/install
+PATH=/usr/local/bin:$PATH
+export PATH
+
+PREFIX=/usr/local/samba
+HERE=`pwd`
+PKGDIR=packaging/Caldera/OpenServer
+
+BUILD_ROOT=${HERE}/dist
+BLDFIX=${BUILD_ROOT}/${PREFIX}
+$V rm -rf $BUILD_ROOT
+$V mkdir -p $BUILD_ROOT/etc/init.d
+$V mkdir -p ${BLDFIX}/bin
+$V mkdir -p ${BLDFIX}/sbin
+$V mkdir -p ${BLDFIX}/swat/using_samba/gifs
+$V mkdir -p ${BLDFIX}/swat/using_samba/figs
+$V mkdir -p ${BLDFIX}/swat/images
+$V mkdir -p ${BLDFIX}/swat/help
+$V mkdir -p ${BLDFIX}/swat/include
+$V mkdir -p ${BLDFIX}/man/man.1
+$V mkdir -p ${BLDFIX}/man/man.5
+$V mkdir -p ${BLDFIX}/man/man.7
+$V mkdir -p ${BLDFIX}/man/man.8
+$V mkdir -p ${BLDFIX}/var/locks
+$V mkdir -p ${BLDFIX}/lib/codepages/src
+
+# Copy into the dist tree the custom data files
+for i in Clean Install MakeSSO Packem Remove cdmt.config
+do
+ $V cp pkg/$i ${BUILD_ROOT}
+done
+for i in cntl input
+do
+ $V rm -rf ${BUILD_ROOT}/$i
+ $V cp -r pkg/$i ${BUILD_ROOT}/$i
+done
+
+cd ../../..
+
+# Install standard binary files
+for i in nmblookup smbclient smbpasswd smbstatus testparm testprns \
+ make_smbcodepage make_unicodemap make_printerdef rpcclient smbspool \
+ smbsh
+do
+$V install -m755 -s source/bin/$i ${BLDFIX}/bin
+done
+for i in mksmbpasswd.sh smbtar
+do
+$V install -m755 source/script/$i ${BLDFIX}/bin
+done
+
+# Install secure binary files
+for i in smbd nmbd swat debug2html smbtorture smbfilter locktest2 masktest
+do
+$V install -m755 -s source/bin/$i ${BLDFIX}/sbin
+done
+
+
+# Install level 1 man pages
+for i in *.1
+do
+$V install -m644 docs/manpages/$i ${BLDFIX}/man/man.1
+done
+
+# Install codepage source files
+for i in 437 737 775 850 852 861 866 932 936 949 950 1251
+do
+$V install -m644 source/codepages/codepage_def.$i ${BLDFIX}/lib/codepages/src
+done
+for i in 437 737 850 852 861 866 932 936 949 950 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R
+do
+$V install -m644 source/codepages/CP$i.TXT ${BLDFIX}/lib/codepages/src
+done
+
+# Install SWAT helper files
+for i in swat/help/*.html docs/htmldocs/*.html
+do
+$V install -m644 $i ${BLDFIX}/swat/help
+done
+for i in swat/images/*.gif
+do
+$V install -m644 $i ${BLDFIX}/swat/images
+done
+for i in swat/include/*.html
+do
+$V install -m644 $i ${BLDFIX}/swat/include
+done
+
+# This is the O'Reily Samba Book - on-line
+for i in docs/htmldocs/using_samba/*.html
+do
+$V install -m644 $i ${BLDFIX}/swat/using_samba
+done
+for i in docs/htmldocs/using_samba/figs/*.gif
+do
+$V install -m644 $i ${BLDFIX}/swat/using_samba/figs
+done
+for i in docs/htmldocs/using_samba/gifs/*.gif
+do
+$V install -m644 $i ${BLDFIX}/swat/using_samba/gifs
+done
+
+# Install the miscellany
+$V install -m644 swat/README ${BLDFIX}/swat
+$V install -m644 docs/manpages/smb.conf.5 ${BLDFIX}/man/man.5
+$V install -m644 docs/manpages/lmhosts.5 ${BLDFIX}/man/man.5
+$V install -m644 docs/manpages/smbpasswd.5 ${BLDFIX}/man/man.5
+$V install -m644 docs/manpages/samba.7 ${BLDFIX}/man/man.7
+$V install -m644 docs/manpages/smbd.8 ${BLDFIX}/man/man.8
+$V install -m644 docs/manpages/nmbd.8 ${BLDFIX}/man/man.8
+$V install -m644 docs/manpages/smbpasswd.8 ${BLDFIX}/man/man.8
+$V install -m644 docs/manpages/swat.8 ${BLDFIX}/man/man.8
+$V install -m644 docs/manpages/smbmount.8 ${BLDFIX}/man/man.8
+$V install -m644 docs/manpages/smbmnt.8 ${BLDFIX}/man/man.8
+$V install -m644 docs/manpages/smbumount.8 ${BLDFIX}/man/man.8
+$V install -m644 ${PKGDIR}/smb.conf ${BLDFIX}/lib/smb.conf
+$V install -m644 ${PKGDIR}/smbusers $BUILD_ROOT/etc/smbusers
+$V install -m755 ${PKGDIR}/smbprint ${BLDFIX}/bin
+$V install -m755 ${PKGDIR}/findsmb ${BLDFIX}/bin
+$V install -m755 ${PKGDIR}/smbadduser ${BLDFIX}/bin
+$V install -m755 ${PKGDIR}/smb.init $BUILD_ROOT/etc/init.d/samba
+
+# The following is now done in the postinstall script
+#
+# if [ "$V" = "echo" ]
+# then
+# echo "echo 127.0.0.1 localhost > $BUILD_ROOT/etc/lmhosts"
+# else
+# echo 127.0.0.1 localhost > $BUILD_ROOT/etc/lmhosts
+# fi
+#
+# Build codepage load files
+# $V cd ${BLDFIX}/lib/codepages
+# for i in 437 737 775 850 852 861 866 932 936 949 950 1251
+# do
+# $V ${PREFIX}/bin/make_smbcodepage c $i \
+# ${BLDFIX}/lib/codepages/src/codepage_def.$i \
+# ${BLDFIX}/lib/codepages/codepage.$i
+# done
+# for i in 437 737 850 852 861 866 932 936 949 950 \
+# ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R
+# do
+# $V ${PREFIX}/bin/make_unicodemap $i \
+# ${BLDFIX}/lib/codepages/src/CP$i.TXT \
+# ${BLDFIX}/lib/codepages/unicode_map.$i
+# done
diff --git a/packaging/Caldera/OpenServer/Makevol b/packaging/Caldera/OpenServer/Makevol
new file mode 100755
index 00000000000..dc57b246ef5
--- /dev/null
+++ b/packaging/Caldera/OpenServer/Makevol
@@ -0,0 +1,10 @@
+#!/bin/ksh
+#
+# invoke with -n as the first argument to get this script to tell
+# you what it would do without doing anything
+#
+
+./Configure $*
+./Compile $*
+./Install $*
+./Package $*
diff --git a/packaging/Caldera/OpenServer/Package b/packaging/Caldera/OpenServer/Package
new file mode 100755
index 00000000000..c954e55e1e8
--- /dev/null
+++ b/packaging/Caldera/OpenServer/Package
@@ -0,0 +1,13 @@
+#!/bin/ksh
+#
+# Now create the actual custom installable media images
+#
+# invoke with -n as the first argument to get this script to tell
+# you what it would do without doing anything
+#
+
+V=
+[ "$1" = "-n" ] && V=echo
+
+$V cd dist
+$V ./MakeSSO
diff --git a/packaging/Caldera/OpenServer/README b/packaging/Caldera/OpenServer/README
new file mode 100644
index 00000000000..794bf546049
--- /dev/null
+++ b/packaging/Caldera/OpenServer/README
@@ -0,0 +1,44 @@
+Preparation Date: April 13, 2001
+Preparer: Ronald Joe Record <rr@sco.com>
+
+Instructions: Preparing Samba Packages for SCO OpenServer
+===============================================================
+
+We provide support only for current versions of SCO OpenServer
+
+The file samba-2.2-osr5.patch is a patch file suitable for use
+with the patch command as follows:
+
+ # cd ../../../source
+ # patch -p 0 -i ../packaging/Caldera/OpenServer/samba-2.2-osr5.patch
+
+The files modified by this patch are:
+ utils/torture.c
+ utils/locktest.c
+ utils/locktest2.c
+
+This patch should only be necessary until these changes are accepted
+back into the 2.2 source tree. Until then, this patch must be applied
+prior to building Samba 2.2 on SCO OpenServer 5.
+
+To produce the custom installable media images simply type (in this directory):
+ # ./Makevol
+
+The resultant samba media images should reside in the ./dist subdirectory.
+To install from the media images, issue the command (as root):
+
+ # cd dist
+ # ./Install
+
+Alternately, each of the steps in building the media images may be performed
+individually by invoking each of the following:
+
+ # ./Configure
+ # ./Compile
+ # ./Install
+ # ./Package
+
+If files are added or deleted from the SCO OpenServer Samba distribution then
+the prototype file in the pkg directory should be appropriately modified.
+The files in the pkg subdirectory were initially created using the mkpkg
+package from SCO Skunkware (see http://www.sco.com/skunkware).
diff --git a/packaging/Caldera/OpenServer/findsmb b/packaging/Caldera/OpenServer/findsmb
new file mode 100755
index 00000000000..bb91c784b89
--- /dev/null
+++ b/packaging/Caldera/OpenServer/findsmb
@@ -0,0 +1,141 @@
+#!/usr/local/bin/perl
+#
+# Prints info on all smb responding machines on a subnet.
+# This script needs to be run on a machine without nmbd running and be
+# run as root to get correct info from WIN95 clients.
+#
+# syntax:
+# findsmb [subnet broadcast address]
+#
+# with no agrument it will list machines on the current subnet
+#
+# There will be a "+" in front of the workgroup name for machines that are
+# local master browsers for that workgroup. There will be an "*" in front
+# of the workgroup name for machines that are the domain master browser for
+# that workgroup.
+#
+
+$SAMBABIN = "/usr/local/samba/bin";
+
+for ($i = 0; $i < 2; $i++) { # test for -d option and broadcast address
+ $_ = shift;
+ if (m/-d|-D/) {
+ $DEBUG = 1;
+ } else {
+ if ($_) {
+ $BCAST = "-B $_";
+ }
+ }
+}
+
+sub ipsort # do numeric sort on last field of IP address
+{
+ @t1 = split(/\./,$a);
+ @t2 = split(/\./,$b);
+ @t1[3] <=> @t2[3];
+}
+
+# look for all machines that respond to a name lookup
+
+open(NMBLOOKUP,"$SAMBABIN/nmblookup $BCAST '*'|") ||
+ die("Can't run nmblookup '*'.\n");
+
+# get rid of all lines that are not a response IP address,
+# strip everything but IP address and sort by last field in address
+
+@ipaddrs = sort ipsort grep(s/ \*<00>.*$//,<NMBLOOKUP>);
+
+# print header info
+
+print "\nIP ADDR NETBIOS NAME WORKGROUP/OS/VERSION $BCAST\n";
+print "---------------------------------------------------------------------\n";
+
+foreach $ip (@ipaddrs) # loop through each IP address found
+{
+ $ip =~ s/\n//; # strip newline from IP address
+
+# find the netbios names registered by each machine
+
+ open(NMBLOOKUP,"$SAMBABIN/nmblookup -r -A $ip|") ||
+ die("Can't get nmb name list.\n");
+ @nmblookup = <NMBLOOKUP>;
+ close NMBLOOKUP;
+
+# get the first <00> name
+
+ @name = grep(/<00>/,@nmblookup);
+ $_ = @name[0];
+ if ($_) { # we have a netbios name
+ if (/GROUP/) { # is it a group name
+ ($name, $aliases, $type, $length, @addresses) =
+ gethostbyaddr(pack('C4',split('\.',$ip)),2);
+ if (! $name) { # could not get name
+ $name = "unknown nis name";
+ }
+ } else {
+ /(\S+)/;
+ $name = $1;
+ }
+
+# do an smbclient command on the netbios name.
+
+ open(SMB,"$SAMBABIN/smbclient -N -L $name -I $ip -U% |") ||
+ die("Can't do smbclient command.\n");
+ @smb = <SMB>;
+ close SMB;
+
+ if ($DEBUG) { # if -d flag print results of nmblookup and smbclient
+ print "===============================================================\n";
+ print @nmblookup;
+ print @smb;
+ }
+
+# look for the OS= string
+
+ @info = grep(/OS=/,@smb);
+ $_ = @info[0];
+ if ($_) { # we found response
+ s/Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter
+
+ } else { # no OS= string in response (WIN95 client)
+
+# for WIN95 clients get workgroup name from nmblookup response
+ @name = grep(/<00> - <GROUP>/,@nmblookup);
+ $_ = @name[0];
+ if ($_) {
+ /(\S+)/;
+ $_ = "[$1]";
+ } else {
+ $_ = "Unknown Workgroup";
+ }
+ }
+
+# see if machine registered a local master browser name
+ if (grep(/<1d>/,@nmblookup)) {
+ $master = '+'; # indicate local master browser
+ if (grep(/<1b>/,@nmblookup)) { # how about domain master browser?
+ $master = '*'; # indicate domain master browser
+ }
+ } else {
+ $master = ' '; # not a browse master
+ }
+
+# line up info in 3 columns
+
+ print "$ip".' 'x(16-length($ip))."$name".' 'x(14-length($name))."$master"."$_\n";
+
+ } else { # no netbios name found
+# try getting the host name
+ ($name, $aliases, $type, $length, @addresses) =
+ gethostbyaddr(pack('C4',split('\.',$ip)),2);
+ if (! $name) { # could not get name
+ $name = "unknown nis name";
+ }
+ if ($DEBUG) { # if -d flag print results of nmblookup
+ print "===============================================================\n";
+ print @nmblookup;
+ }
+ print "$ip".' 'x(16-length($ip))."$name\n";
+ }
+}
+
diff --git a/packaging/Caldera/OpenServer/pkg/Clean b/packaging/Caldera/OpenServer/pkg/Clean
new file mode 100755
index 00000000000..fa68f18118c
--- /dev/null
+++ b/packaging/Caldera/OpenServer/pkg/Clean
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+rm -rf archives sso usr
diff --git a/packaging/Caldera/OpenServer/pkg/Install b/packaging/Caldera/OpenServer/pkg/Install
new file mode 100755
index 00000000000..ef0f61f33e1
--- /dev/null
+++ b/packaging/Caldera/OpenServer/pkg/Install
@@ -0,0 +1 @@
+custom -p SKUNK2000:Samba -i -z `pwd`/archives/FLOPPY
diff --git a/packaging/Caldera/OpenServer/pkg/MakeSSO b/packaging/Caldera/OpenServer/pkg/MakeSSO
new file mode 100755
index 00000000000..538aaf58f77
--- /dev/null
+++ b/packaging/Caldera/OpenServer/pkg/MakeSSO
@@ -0,0 +1,25 @@
+:
+# MakeSSO
+#
+
+rm -rf archives sso
+
+ CDMT_DIR=`pwd`; export CDMT_DIR
+ Samba_DIR=`pwd`; export Samba_DIR
+ cdmtParse
+ if test $? != 0
+ then
+ exit 1
+ fi
+
+ cdmtCompress
+ if test $? != 0
+ then
+ exit 1
+ fi
+
+ cdmtArchive
+ if test $? != 0
+ then
+ exit 1
+ fi
diff --git a/packaging/Caldera/OpenServer/pkg/Packem b/packaging/Caldera/OpenServer/pkg/Packem
new file mode 100755
index 00000000000..a1b67e972d9
--- /dev/null
+++ b/packaging/Caldera/OpenServer/pkg/Packem
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+P=`pwd`
+PKGTAR=`basename $P`-VOLS.tar
+PKGDIST=`basename $P`-dist.tar.gz
+
+DIRS=usr
+[ -d etc ] && DIRS="etc usr"
+cd archives/FLOPPY
+tar cf ../../$PKGTAR VOL*
+cd ../..
+tar cf - $DIRS | /usr/local/bin/gzip -9 > $PKGDIST
+[ -f $PKGTAR ] && rm -rf archives
+[ -f $PKGDIST ] && rm -rf $DIRS
+rm -rf sso
diff --git a/packaging/Caldera/OpenServer/pkg/Remove b/packaging/Caldera/OpenServer/pkg/Remove
new file mode 100755
index 00000000000..ea6102ac38a
--- /dev/null
+++ b/packaging/Caldera/OpenServer/pkg/Remove
@@ -0,0 +1,16 @@
+#!/bin/sh
+#
+# Generic command-line Software Manger (custom) removal from
+# media images. Based on the installation script by Phil Hollenback
+# (philiph@sco.com) and Ron Record (rr@sco.com)
+#
+
+# Set this to be the full pathname to the directory
+# where your media images are:
+VDIR=`pwd`/archives/FLOPPY
+VOLS=$VDIR/VOL.000.000
+
+component=`grep "component" < $VOLS | head -1 | cut -d= -f2 | cut -d: -f1`
+package=`grep "component" < $VOLS | head -1 | cut -d= -f2 | cut -d: -f2`
+
+custom -p $component:$package -r
diff --git a/packaging/Caldera/OpenServer/pkg/cdmt.config b/packaging/Caldera/OpenServer/pkg/cdmt.config
new file mode 100644
index 00000000000..e11c1961f22
--- /dev/null
+++ b/packaging/Caldera/OpenServer/pkg/cdmt.config
@@ -0,0 +1,34 @@
+MACROS:
+
+DEFAULT_EXEC_MODE = 0755
+
+DEFAULT_FILE_MODE = 0644
+DEFAULT_FILE_OWNER = bin
+DEFAULT_FILE_GROUP = bin
+
+DEFAULT_DIR_MODE = 0755
+DEFAULT_DIR_OWNER = bin
+DEFAULT_DIR_GROUP = bin
+
+DEFAULT_FIFO_MODE = 0644
+DEFAULT_FIFO_OWNER = bin
+DEFAULT_FIFO_GROUP = bin
+
+DEFAULT_DISTTREEROOT_SHARED = $CDMT_DIR
+DEFAULT_DISTTREEROOT_CLIENT = $CDMT_DIR
+
+CONFIG:
+ removeFiles = FALSE
+ removalPrompt = FALSE
+ archiveMedia = FLOPPY
+ compress = TRUE
+ ssoDir = sso
+
+FLOPPY_MEDIA:
+ device = /dev/rfd0
+ volumeSize = 8000
+ distVendor = SCO
+ distVersion = 2.2
+ distCode = SKUNK2000
+ paperLabel = "SCO Skunkware Samba 2.2"
+
diff --git a/packaging/Caldera/OpenServer/pkg/cntl/ccs b/packaging/Caldera/OpenServer/pkg/cntl/ccs
new file mode 100755
index 00000000000..0cb22490e47
--- /dev/null
+++ b/packaging/Caldera/OpenServer/pkg/cntl/ccs
@@ -0,0 +1,108 @@
+#!/bin/sh
+#
+# Postinstallscript written by Ron Record (rr@sco.com)
+#
+
+scriptname="$0"
+step="$1"
+keywords="$2"
+pkglist="$3"
+
+# Source in the standard functions library, ccsSetup.sh
+. ccsSetup.sh
+
+ccs_return_value=0
+
+SPOOL=/var/spool/samba
+SVCS=/etc/services
+INET=/etc/inetd.conf
+LMHOST=/etc/lmhosts
+PREFIX=/usr/local/samba
+
+#
+# Create /var/spool/samba, create an initial /etc/lmhosts, build the
+# codepages and setup swat to be run out of inetd on port 901
+#
+PostExport()
+{
+ [ -d $SPOOL ] || {
+ mkdir -p $SPOOL
+ chmod 1777 $SPOOL
+ }
+ if [ -f $LMHOST ]
+ then
+ grep localhost $LMHOST > /dev/null || {
+ echo 127.0.0.1 localhost >> $LMHOST
+ }
+ else
+ echo 127.0.0.1 localhost > $LMHOST
+ fi
+
+ cd ${PREFIX}/lib/codepages
+ for i in 437 737 775 850 852 861 866 932 936 949 950 1251
+ do
+ ${PREFIX}/bin/make_smbcodepage c $i \
+ ${PREFIX}/lib/codepages/src/codepage_def.$i \
+ ${PREFIX}/lib/codepages/codepage.$i
+ done
+ for i in 437 737 850 852 861 866 932 936 949 950 \
+ ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R
+ do
+ ${PREFIX}/bin/make_unicodemap $i \
+ ${PREFIX}/lib/codepages/src/CP$i.TXT \
+ ${PREFIX}/lib/codepages/unicode_map.$i
+ done
+
+ grep swat $SVCS > /dev/null || {
+ echo "swat 901/tcp # Samba Web Administration Tool " >> $SVCS
+ }
+
+ grep swat $INET > /dev/null || {
+ echo "swat stream tcp nowait root /usr/local/samba/bin/swat swat " >> $INET
+ }
+
+ kill -1 `ps -e | grep inetd | awk ' { print $1 } '`
+}
+
+DisableStop()
+{
+ /etc/init.d/samba disable > /dev/null 2>&1
+ /etc/init.d/samba stop > /dev/null 2>&1
+}
+
+#
+# Remove /var/spool/samba and delete inetd entries for swat
+#
+PostUnexport()
+{
+ [ -d $SPOOL ] && {
+ rm -rf $SPOOL
+ }
+
+ grep swat $SVCS > /dev/null && {
+ B=`basename $SVCS`
+ T=$B$$
+ grep -v swat $SVCS > /tmp/$T
+ cp /tmp/$T $SVCS
+ rm -f /tmp/$T
+ }
+
+ grep swat $INET > /dev/null || {
+ B=`basename $INET`
+ T=$B$$
+ grep -v swat $INET > /tmp/$T
+ cp /tmp/$T $INET
+ rm -f /tmp/$T
+ }
+
+ kill -1 `ps -e | grep inetd | awk ' { print $1 } '`
+}
+
+case "$step" in
+ POST_EXPORT) PostExport ;;
+ PRE_UNEXPORT) DisableStop ;;
+ POST_UNEXPORT) PostUnexport ;;
+esac
+
+exit $ccs_return_value
+
diff --git a/packaging/Caldera/OpenServer/pkg/input/Samba.cmpnt b/packaging/Caldera/OpenServer/pkg/input/Samba.cmpnt
new file mode 100644
index 00000000000..245f6d12ce8
--- /dev/null
+++ b/packaging/Caldera/OpenServer/pkg/input/Samba.cmpnt
@@ -0,0 +1,25 @@
+
+COMP:SKUNK2000:Samba:
+description = "Samba - A Windows SMB/CIFS fileserver for UNIX"
+version = 2.2
+subpackages = Samba
+required = Samba
+dependencies =
+distTreeRootSHARED = $Samba_DIR
+distTreeRootCLIENT = $Samba_DIR
+pkgFiles = $Samba_DIR/input/Samba.pkg
+
+FILE_DEFAULT:
+mode = $DEFAULT_FILE_MODE
+owner = $DEFAULT_FILE_OWNER
+group = $DEFAULT_FILE_GROUP
+
+DIR_DEFAULT:
+mode = $DEFAULT_DIR_MODE
+owner = $DEFAULT_DIR_OWNER
+group = $DEFAULT_DIR_GROUP
+
+FIFO_DEFAULT:
+mode = $DEFAULT_FIFO_MODE
+owner = $DEFAULT_FIFO_OWNER
+group = $DEFAULT_FIFO_GROUP
diff --git a/packaging/Caldera/OpenServer/pkg/input/Samba.pkg b/packaging/Caldera/OpenServer/pkg/input/Samba.pkg
new file mode 100644
index 00000000000..ea76e74a610
--- /dev/null
+++ b/packaging/Caldera/OpenServer/pkg/input/Samba.pkg
@@ -0,0 +1,1905 @@
+
+PKG:Control:
+description = "Control package"
+dependencies =
+distTreeRootSHARED = $Samba_DIR
+distTreeRootCLIENT = $Samba_DIR
+
+DIR:Control:SHARED:cntl:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Control:SHARED:cntl/ccs:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+PKG:Samba:
+description = "Samba - A Windows SMB/CIFS fileserver for UNIX"
+dependencies =
+distTreeRootSHARED = $Samba_DIR
+distTreeRootCLIENT = $Samba_DIR
+
+DIR:Samba:SHARED:etc:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+DIR:Samba:SHARED:etc/init.d:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:etc/init.d/samba:
+mode = 0755
+owner = root
+group = sys
+flags =
+exportPath = /etc/init.d/samba
+
+FILE:Samba:SHARED:etc/smbusers:
+mode = 0644
+owner = root
+group = sys
+flags =
+exportPath = /etc/smbusers
+
+DIR:Samba:SHARED:usr:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+DIR:Samba:SHARED:usr/local:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+DIR:Samba:SHARED:usr/local/samba:
+mode = 0755
+owner = root
+group = sys
+flags =
+exportPath = /usr/local/samba
+
+DIR:Samba:SHARED:usr/local/samba/bin:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/bin/nmblookup:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/bin/smbclient:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/bin/smbpasswd:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/bin/smbstatus:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/bin/testparm:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/bin/testprns:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/bin/make_smbcodepage:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/bin/make_unicodemap:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/bin/make_printerdef:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/bin/rpcclient:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/bin/smbspool:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/bin/smbsh:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/bin/mksmbpasswd.sh:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/bin/smbtar:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/bin/smbprint:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/bin/findsmb:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/bin/smbadduser:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+DIR:Samba:SHARED:usr/local/samba/sbin:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/sbin/smbd:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/sbin/nmbd:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/sbin/swat:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/sbin/debug2html:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/sbin/smbtorture:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/sbin/smbfilter:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/sbin/locktest2:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/sbin/masktest:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+DIR:Samba:SHARED:usr/local/samba/swat:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+DIR:Samba:SHARED:usr/local/samba/swat/using_samba:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+DIR:Samba:SHARED:usr/local/samba/swat/using_samba/gifs:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/gifs/index.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/gifs/samba.s.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/gifs/txthome.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/gifs/txtnexta.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/gifs/txtpreva.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+DIR:Samba:SHARED:usr/local/samba/swat/using_samba/figs:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0101.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0102.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0103.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0104.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0105.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0106.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0107.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0108.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0109.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0110.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0111.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0112.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0113.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0114.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0201.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0202.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0203.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0204.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0301.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0302.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0303.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0304.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0305.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0306.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0307.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0308.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0309.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0310.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0311.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0312.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0313.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0314.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0315.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0316.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0317.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0318.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0319.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0320.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0321.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0322.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0323.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0324.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0325.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0326.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0327.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0328.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0401.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0402.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0403.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0404.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0405.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0406.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0407.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0501.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0502.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0503.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0504.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0505.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0506.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0507.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0508.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0601.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0602.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0603.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0604.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0605.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0606.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0701.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0702.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0703.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0704.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0705.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0706.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0707.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0708.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0709.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0801.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0802.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0803.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0804.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0805.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0901.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0902.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0903.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0904.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.0905.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.aa01.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.ab01.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/figs/sam.ab02.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/appa_01.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/appa_02.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/appa_03.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/appa_04.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/appa_05.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/appb_01.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/appb_02.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/appb_03.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/appc_01.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/appd_01.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/appe_01.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/appf_01.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch01_01.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch01_02.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch01_03.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch01_04.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch01_05.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch01_06.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch01_07.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch01_08.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch02_01.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch02_02.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch02_03.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch02_04.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch02_05.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch02_06.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch03_01.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch03_02.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch03_03.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch04_01.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch04_02.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch04_03.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch04_04.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch04_05.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch04_06.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch04_07.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch04_08.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch05_01.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch05_02.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch05_03.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch05_04.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch05_05.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch06_01.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch06_02.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch06_03.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch06_04.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch06_05.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch06_06.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch07_01.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch07_02.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch07_03.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch08_01.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch08_02.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch08_03.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch08_04.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch08_05.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch08_06.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch08_07.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch09_01.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch09_02.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/ch09_03.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/index.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/inx.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/licenseinfo.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/using_samba/this_edition.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+DIR:Samba:SHARED:usr/local/samba/swat/images:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/images/globals.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/images/home.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/images/passwd.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/images/printers.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/images/samba.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/images/shares.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/images/status.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/images/viewconfig.gif:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+DIR:Samba:SHARED:usr/local/samba/swat/help:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/welcome.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/DOMAIN_MEMBER.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/NT_Security.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/OS2-Client-HOWTO.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/Samba-HOWTO-Collection.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/UNIX_INSTALL.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/findsmb.1.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/lmhosts.5.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/make_smbcodepage.1.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/msdfs_setup.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/nmbd.8.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/nmblookup.1.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/printer_driver2.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/rpcclient.1.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/samba-pdc-faq.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/samba-pdc-howto.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/samba.7.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/smb.conf.5.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/smbcacls.1.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/smbclient.1.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/smbcontrol.1.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/smbd.8.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/smbmnt.8.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/smbmount.8.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/smbpasswd.5.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/smbpasswd.8.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/smbrun.1.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/smbsh.1.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/smbspool.8.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/smbstatus.1.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/smbtar.1.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/smbumount.8.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/swat.8.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/testparm.1.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/testprns.1.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/wbinfo.1.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/winbind.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/help/winbindd.8.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+DIR:Samba:SHARED:usr/local/samba/swat/include:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/include/footer.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/include/header.html:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/swat/README:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+DIR:Samba:SHARED:usr/local/samba/man:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+DIR:Samba:SHARED:usr/local/samba/man/man.1:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/man/man.1/findsmb.1:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/man/man.1/make_smbcodepage.1:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/man/man.1/make_unicodemap.1:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/man/man.1/nmblookup.1:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/man/man.1/rpcclient.1:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/man/man.1/smbcacls.1:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/man/man.1/smbclient.1:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/man/man.1/smbcontrol.1:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/man/man.1/smbrun.1:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/man/man.1/smbsh.1:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/man/man.1/smbstatus.1:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/man/man.1/smbtar.1:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/man/man.1/testparm.1:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/man/man.1/testprns.1:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/man/man.1/wbinfo.1:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+DIR:Samba:SHARED:usr/local/samba/man/man.5:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/man/man.5/smb.conf.5:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/man/man.5/lmhosts.5:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/man/man.5/smbpasswd.5:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+DIR:Samba:SHARED:usr/local/samba/man/man.7:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/man/man.7/samba.7:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+DIR:Samba:SHARED:usr/local/samba/man/man.8:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/man/man.8/smbd.8:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/man/man.8/nmbd.8:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/man/man.8/smbpasswd.8:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/man/man.8/swat.8:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/man/man.8/smbmount.8:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/man/man.8/smbmnt.8:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/man/man.8/smbumount.8:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+DIR:Samba:SHARED:usr/local/samba/var:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+DIR:Samba:SHARED:usr/local/samba/var/locks:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+DIR:Samba:SHARED:usr/local/samba/lib:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+DIR:Samba:SHARED:usr/local/samba/lib/codepages:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+DIR:Samba:SHARED:usr/local/samba/lib/codepages/src:
+mode = 0755
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/codepage_def.437:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/codepage_def.737:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/codepage_def.775:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/codepage_def.850:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/codepage_def.852:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/codepage_def.861:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/codepage_def.866:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/codepage_def.932:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/codepage_def.936:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/codepage_def.949:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/codepage_def.950:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/codepage_def.1251:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CP437.TXT:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CP737.TXT:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CP850.TXT:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CP852.TXT:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CP861.TXT:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CP866.TXT:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CP932.TXT:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CP936.TXT:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CP949.TXT:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CP950.TXT:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CPISO8859-1.TXT:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CPISO8859-2.TXT:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CPISO8859-5.TXT:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CPISO8859-7.TXT:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/lib/codepages/src/CPKOI8-R.TXT:
+mode = 0644
+owner = root
+group = sys
+flags =
+
+FILE:Samba:SHARED:usr/local/samba/lib/smb.conf:
+mode = 0644
+owner = root
+group = sys
+flags =
diff --git a/packaging/Caldera/OpenServer/pkg/input/Samba.prd b/packaging/Caldera/OpenServer/pkg/input/Samba.prd
new file mode 100644
index 00000000000..e31c8bfe8e8
--- /dev/null
+++ b/packaging/Caldera/OpenServer/pkg/input/Samba.prd
@@ -0,0 +1,6 @@
+PROD:SKUNK2000:Samba:
+description = "Samba - A Windows SMB/CIFS fileserver for UNIX"
+version = 2.2
+packages = SKUNK2000:Samba
+required = SKUNK2000:Samba
+cmpntFiles = Samba.cmpnt
diff --git a/packaging/Caldera/OpenServer/samba-2.2-osr5.patch b/packaging/Caldera/OpenServer/samba-2.2-osr5.patch
new file mode 100644
index 00000000000..fb71d9298b4
--- /dev/null
+++ b/packaging/Caldera/OpenServer/samba-2.2-osr5.patch
@@ -0,0 +1,29 @@
+--- utils/torture.c.00 Fri Mar 30 13:53:26 2001
++++ utils/torture.c Fri Apr 13 15:06:04 2001
+@@ -2703,7 +2703,11 @@
+
+ dbf = stdout;
+
++#if defined(_SCO_DS) /* SCO OpenServer */
++ setvbuf(stdout, NULL, _IONBF, 0);
++#else
+ setbuffer(stdout, NULL, 0);
++#endif
+
+ charset_initialise();
+
+--- utils/locktest.c.00 Fri Sep 29 13:18:14 2000
++++ utils/locktest.c Fri Apr 13 17:54:11 2001
+@@ -384,8 +384,12 @@
+ recorded[n].conn = random() % NCONNECTIONS;
+ recorded[n].f = random() % NFILES;
+ recorded[n].start = LOCKBASE + ((unsigned)random() % (LOCKRANGE-1));
++#if defined(_SCO_DS) /* OpenServer */
++ recorded[n].len = 1;
++#else
+ recorded[n].len = 1 +
+ random() % (LOCKRANGE-(recorded[n].start-LOCKBASE));
++#endif
+ recorded[n].start *= RANGE_MULTIPLE;
+ recorded[n].len *= RANGE_MULTIPLE;
+ recorded[n].r1 = random() % 100;
diff --git a/packaging/Caldera/OpenServer/smb.conf b/packaging/Caldera/OpenServer/smb.conf
new file mode 100644
index 00000000000..717c4efb174
--- /dev/null
+++ b/packaging/Caldera/OpenServer/smb.conf
@@ -0,0 +1,291 @@
+# 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
+#
+# 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 many any basic syntactic errors.
+#
+#======================= Global Settings =====================================
+[global]
+
+# workgroup = NT-Domain-Name or Workgroup-Name
+ workgroup = MYGROUP
+
+# server string is the equivalent of the NT Description field
+ server string = Samba Server
+
+# This option is important for security. It allows you to restrict
+# connections to machines which are on your local network. The
+# following example restricts access to two C class networks and
+# the "loopback" interface. For more examples of the syntax see
+# the smb.conf man page
+; hosts allow = 192.168.1. 192.168.2. 127.
+
+# if you want to automatically load your printer list rather
+# than setting them up individually then you'll need this
+ printcap name = lpstat
+ load printers = yes
+
+# It should not be necessary to spell out the print system type unless
+# yours is non-standard. Currently supported print systems include:
+# bsd, sysv, plp, lprng, aix, hpux, qnx
+ printing = sysv
+
+# Uncomment this if you want a guest account, you must add this to /etc/passwd
+# otherwise the user "nouser" is used
+; guest account = pcguest
+
+# this tells Samba to use a separate log file for each machine
+# that connects
+ log file = /usr/local/samba/var/log.%m
+
+# Put a capping on the size of the log files (in Kb).
+ max log size = 50
+
+# Security mode. Most people will want user level security. See
+# security_level.txt for details.
+ security = user
+# Use password server option only with security = server
+; password server = <NT-Server-Name>
+
+# Password Level allows matching of _n_ characters of the password for
+# all combinations of upper and lower case.
+; password level = 8
+; username level = 8
+
+# You may wish to use password encryption. Please read
+# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
+# Do not enable this option unless you have read those documents
+; encrypt passwords = yes
+; smb passwd file = /etc/smbpasswd
+
+# The following are needed to allow password changing from Windows to
+# update the Linux sytsem password also.
+# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
+# NOTE2: You do NOT need these to allow workstations to change only
+# the encrypted SMB passwords. They allow the Unix password
+# to be kept in sync with the SMB password.
+; unix password sync = Yes
+; passwd program = /usr/bin/passwd %u
+; passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
+
+# Unix users can map to different SMB User names
+; username map = /etc/smbusers
+
+# 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
+; include = /etc/smb.conf.%m
+
+# Most people will find that this option gives better performance.
+# See speed.txt and the manual pages for details
+ socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
+
+# 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
+
+# Configure remote browse list synchronisation here
+# request announcement to, or browse list sync from:
+# a specific host or from / to a whole subnet (see below)
+; remote browse sync = 192.168.3.25 192.168.5.255
+# Cause this host to announce itself to local subnets here
+; remote announce = 192.168.1.255 192.168.2.44
+
+# 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
+
+# Use only if you have an NT server on your network that has been
+# configured at install time to be a primary domain controller.
+; domain controller = <NT-Domain-Controller-SMBName>
+
+# 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
+
+# All NetBIOS names must be resolved to IP Addresses
+# 'Name Resolve Order' allows the named resolution mechanism to be specified
+# the default order is "host lmhosts wins bcast". "host" means use the unix
+# system gethostbyname() function call that will use either /etc/hosts OR
+# DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf
+# and the /etc/resolv.conf file. "host" therefore is system configuration
+# dependant. This parameter is most often of use to prevent DNS lookups
+# in order to resolve NetBIOS names to IP Addresses. Use with care!
+# The example below excludes use of name resolution for machines that are NOT
+# on the local network segment
+# - OR - are not deliberately to be known via lmhosts or via WINS.
+; name resolve order = wins lmhosts bcast
+
+# 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 built-in default for versions 1.9.17 is yes,
+# this has been changed in version 1.9.18 to no.
+ dns proxy = no
+
+# Case Preservation can be handy - system default is _no_
+# NOTE: These can be set on a per share basis
+; preserve case = no
+; short preserve case = no
+# Default case is normally upper case for all DOS files
+; default case = lower
+# Be very careful with case sensitivity - it can break things!
+; case sensitive = no
+
+#============================ 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 = /home/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 = /home/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/packaging/Caldera/OpenServer/smb.init b/packaging/Caldera/OpenServer/smb.init
new file mode 100755
index 00000000000..ce6c6fa4b38
--- /dev/null
+++ b/packaging/Caldera/OpenServer/smb.init
@@ -0,0 +1,76 @@
+#!/bin/sh
+#ident "@(#)samba.server 1.0 96/06/19 TK" /* SVr4.0 1.1.13.1*/
+#
+# Please send info on modifications to knuutila@cs.utu.fi
+#
+# This file should have uid root, gid sys and chmod 744
+#
+# Modified 17-Jul-99 by Ron Record (rr@sco.com) for use in SCO Skunkware
+#
+
+SAMBADIR=/usr/local/samba
+RCSCRIPT=/etc/rc2.d/S99samba
+
+if [ ! -d /usr/bin ]
+then # /usr not mounted
+ exit
+fi
+
+killproc() { # kill the named process(es)
+ if [ -f $SAMBADIR/var/locks/$1.pid ]
+ then
+ kill `cat $SAMBADIR/var/locks/$1.pid`
+ else
+ pid=`/usr/bin/ps -e |
+ /usr/bin/grep $1 |
+ /usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
+ [ "$pid" != "" ] && kill $pid
+ fi
+}
+
+start() {
+#
+# Edit these lines to suit your installation (paths, workgroup, host)
+#
+ $SAMBADIR/sbin/smbd -D -s $SAMBADIR/lib/smb.conf
+ $SAMBADIR/sbin/nmbd -D -s $SAMBADIR/lib/smb.conf
+}
+
+stop() {
+ killproc nmbd
+ killproc smbd
+}
+
+# Start/stop processes required for samba server
+
+case "$1" in
+
+'start')
+ start
+ ;;
+'stop')
+ stop
+ ;;
+'restart')
+ stop
+ start
+ ;;
+'enable')
+ if [ -h $RCSCRIPT ] ; then
+ echo "Samba is already enabled."
+ else
+ echo "Enabling Samba ... \c"
+ rm -f $RCSCRIPT
+ ln -s /etc/init.d/samba $RCSCRIPT
+ echo "Done"
+ fi
+ ;;
+'disable')
+ echo "Disabling Samba ... \c"
+ rm -f $RCSCRIPT
+ echo "Done"
+ ;;
+*)
+ echo "Usage: /etc/init.d/samba { start | stop | restart | enable | disable }"
+ ;;
+esac
diff --git a/packaging/Caldera/OpenServer/smbadduser b/packaging/Caldera/OpenServer/smbadduser
new file mode 100755
index 00000000000..2f38bf28f1a
--- /dev/null
+++ b/packaging/Caldera/OpenServer/smbadduser
@@ -0,0 +1,73 @@
+#!/bin/csh
+#
+# smbadduser - Written by Mike Zakharoff
+#
+unalias *
+set path = ($path)
+
+set smbpasswd = /etc/smbpasswd
+set user_map = /etc/smbusers
+#
+# Set to site specific passwd command
+#
+set passwd = "cat /etc/passwd"
+#set passwd = "niscat passwd.org_dir"
+#set passwd = "ypcat passwd"
+
+set line = "----------------------------------------------------------"
+if ($#argv == 0) then
+ echo $line
+ echo "Written: Mike Zakharoff email: michael.j.zakharoff@boeing.com"
+ echo ""
+ echo " 1) Updates $smbpasswd"
+ echo " 2) Updates $user_map"
+ echo " 3) Executes smbpasswd for each new user"
+ echo ""
+ echo "smbadduser unixid:ntid unixid:ntid ..."
+ echo ""
+ echo "Example: smbadduser zak:zakharoffm johns:smithj"
+ echo $line
+ exit 1
+endif
+
+touch $smbpasswd $user_map
+set new = ()
+foreach one ($argv)
+ echo $one | grep ':' >& /dev/null
+ if ($status != 0) then
+ echo "ERROR: Must use unixid:ntid like -> zak:zakharoffm"
+ continue
+ endif
+ set unix = `echo $one | awk -F: '{print $1}'`
+ set ntid = `echo $one | awk -F: '{print $2}'`
+
+ set usr = `eval $passwd | awk -F: '$1==USR {print $1}' USR=$unix`
+ if ($#usr != 1) then
+ echo "ERROR: $unix Not in passwd database SKIPPING..."
+ continue
+ endif
+ set tmp = `cat $smbpasswd | awk -F: '$1==USR {print $1}' USR=$unix`
+ if ($#tmp != 0) then
+ echo "ERROR: $unix is already in $smbpasswd SKIPPING..."
+ continue
+ endif
+
+ echo "Adding: $unix to $smbpasswd"
+ eval $passwd | \
+ awk -F: '$1==USR { \
+ printf( "%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:%s:%s:%s\n", $1, $3, $5, $6, $7) }' USR=$unix >> $smbpasswd
+ if ($unix != $ntid) then
+ echo "Adding: {$unix = $ntid} to $user_map"
+ echo "$unix = $ntid" >> $user_map
+ endif
+ set new = ($new $unix)
+end
+
+#
+# Enter password for new users
+#
+foreach one ($new)
+ echo $line
+ echo "ENTER password for $one"
+ smbpasswd $one
+end
diff --git a/packaging/Caldera/OpenServer/smbprint b/packaging/Caldera/OpenServer/smbprint
new file mode 100755
index 00000000000..ec083eede62
--- /dev/null
+++ b/packaging/Caldera/OpenServer/smbprint
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+# This script is an input filter for printcap printing on a unix machine. It
+# uses the smbclient program to print the file to the specified smb-based
+# server and service.
+# For example you could have a printcap entry like this
+#
+# smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint
+#
+# which would create a unix printer called "smb" that will print via this
+# script. You will need to create the spool directory /usr/spool/smb with
+# appropriate permissions and ownerships for your system.
+
+# Set these to the server and service you wish to print to
+# In this example I have a WfWg PC called "lapland" that has a printer
+# exported called "printer" with no password.
+
+#
+# Script further altered by hamiltom@ecnz.co.nz (Michael Hamilton)
+# so that the server, service, and password can be read from
+# a /var/spool/lpd/PRINTNAME/.config file.
+#
+# In order for this to work the /etc/printcap entry must include an
+# accounting file (af=...):
+#
+# cdcolour:\
+# :cm=CD IBM Colorjet on 6th:\
+# :sd=/var/spool/lpd/cdcolour:\
+# :af=/var/spool/lpd/cdcolour/acct:\
+# :if=/usr/local/etc/smbprint:\
+# :mx=0:\
+# :lp=/dev/null:
+#
+# The /usr/var/spool/lpd/PRINTNAME/.config file should contain:
+# server=PC_SERVER
+# service=PR_SHARENAME
+# password="password"
+#
+# E.g.
+# server=PAULS_PC
+# service=CJET_371
+# password=""
+
+#
+# Debugging log file, change to /dev/null if you like.
+#
+# logfile=/tmp/smb-print.log
+logfile=/dev/null
+
+
+#
+# The last parameter to the filter is the accounting file name.
+# Extract the directory name from the file name.
+# Concat this with /.config to get the config file.
+#
+eval acct_file=\${$#}
+spool_dir=`dirname $acct_file`
+config_file=$spool_dir/.config
+
+# Should read the following variables set in the config file:
+# server
+# service
+# password
+eval `cat $config_file`
+
+#
+# Some debugging help, change the >> to > if you want to same space.
+#
+echo "server $server, service $service" >> $logfile
+
+(
+# NOTE You may wish to add the line `echo translate' if you want automatic
+# CR/LF translation when printing.
+# echo translate
+ echo "print -"
+ cat
+) | /usr/bin/smbclient "\\\\$server\\$service" $password -U $server -N -P >> $logfile
diff --git a/packaging/Caldera/OpenServer/smbusers b/packaging/Caldera/OpenServer/smbusers
new file mode 100644
index 00000000000..08f611826ab
--- /dev/null
+++ b/packaging/Caldera/OpenServer/smbusers
@@ -0,0 +1,3 @@
+# Unix_name = SMB_name1 SMB_name2 ...
+root = administrator admin
+nouser = guest pcguest smbguest
diff --git a/packaging/Caldera/UnixWare/Clean b/packaging/Caldera/UnixWare/Clean
new file mode 100755
index 00000000000..fe4eed25270
--- /dev/null
+++ b/packaging/Caldera/UnixWare/Clean
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# Cleanup after having configured, compiled, installed and packaged.
+# Careful - running this script attempts to restore this hierarchy to
+# freshly unpacked source
+#
+# Invoke as "./Clean -n" to get this script to tell you what it would do
+# without doing anything
+#
+
+V=
+[ "$1" = "-n" ] && V=echo
+
+[ -d dist ] && $V rm -rf dist
+[ -f ../../../source/Makefile ] && {
+ $V cd ../../../source
+ $V rm -f bin/locktest bin/masktest bin/smbsh bin/debug2html \
+ bin/locktest2 bin/smbfilter bin/smbtorture
+ $V make clean
+ $V make distclean
+ $V rm -f mout*
+}
diff --git a/packaging/Caldera/UnixWare/Compile b/packaging/Caldera/UnixWare/Compile
new file mode 100755
index 00000000000..2867e4d5ad5
--- /dev/null
+++ b/packaging/Caldera/UnixWare/Compile
@@ -0,0 +1,52 @@
+#!/bin/ksh
+#
+# invoke with -n as the first argument to get this script to tell
+# you what it would do without doing anything
+#
+
+V=
+[ "$1" = "-n" ] && V=echo
+
+CC="cc -Kthread -Kalloca -I/usr/local/include -L/usr/local/lib"
+CPP="$CC -E"
+CFLAGS="-Xa -Dasm=__asm -DANSICPP -O3"
+LDFLAGS="-L/usr/local/lib"
+CXX="CC -I/usr/local/include"
+CXXFLAGS="-O3 -I/usr/local/include/stl -L/usr/local/lib"
+RANLIB=true
+MAKE=/usr/local/bin/make
+if [ "$V" = "echo" ]
+then
+ echo "exporting the following shell variables:"
+ echo "CC=$CC"
+ echo "CPP=$CPP"
+ echo "CXX=$CXX"
+ echo "RANLIB=$RANLIB"
+ echo "MAKE=$MAKE"
+ echo "CFLAGS=$CFLAGS"
+ echo "CXXFLAGS=$CXXFLAGS"
+ echo "LDFLAGS=$LDFLAGS"
+else
+ export CC CPP CXX RANLIB MAKE CFLAGS CXXFLAGS LDFLAGS
+fi
+
+if [ "$V" = "echo" ]
+then
+ echo "cd ../../../source"
+ echo "rm -f mout-1 mout-2 mout-3 mout-4"
+ echo "make all 2>&1 | tee mout-1"
+ echo "make smbfilter smbtorture debug2html 2>&1 | tee mout-2"
+ echo "make bin/smbspool smbwrapper bin/wbinfo 2>&1 | tee mout-3"
+ echo "make masktest locktest locktest2 2>&1 | tee mout-3"
+else
+ cd ../../../source
+ rm -f mout-1 mout-2 mout-3 mout-4
+ make all 2>&1 | tee mout-1
+ make smbfilter smbtorture debug2html 2>&1 | tee mout-2
+ make bin/smbspool smbwrapper bin/wbinfo 2>&1 | tee mout-3
+ make masktest locktest locktest2 2>&1 | tee mout-3
+fi
+#
+# Not building :
+# nsswitch - no <nss.h>
+# rpctorture - improper use of client_info struct, dunno
diff --git a/packaging/Caldera/UnixWare/Configure b/packaging/Caldera/UnixWare/Configure
new file mode 100755
index 00000000000..e5a7fbba4dc
--- /dev/null
+++ b/packaging/Caldera/UnixWare/Configure
@@ -0,0 +1,67 @@
+#!/bin/ksh
+#
+# invoke with -n as the first argument to get this script to tell
+# you what it would do without doing anything
+#
+
+V=
+[ "$1" = "-n" ] && V=echo
+
+CC="cc -Kthread -Kalloca -I/usr/local/include -L/usr/local/lib"
+CPP="$CC -E"
+CFLAGS="-Xa -Dasm=__asm -DANSICPP -O3"
+LDFLAGS="-L/usr/local/lib"
+CXX="CC -I/usr/local/include"
+CXXFLAGS="-O3 -I/usr/local/include/stl -L/usr/local/lib"
+RANLIB=true
+MAKE=/usr/local/bin/make
+PREFIX=/usr/local/samba
+if [ "$V" = "echo" ]
+then
+ echo "exporting the following shell variables:"
+ echo "CC=$CC"
+ echo "CPP=$CPP"
+ echo "CXX=$CXX"
+ echo "RANLIB=$RANLIB"
+ echo "MAKE=$MAKE"
+ echo "CFLAGS=$CFLAGS"
+ echo "CXXFLAGS=$CXXFLAGS"
+ echo "LDFLAGS=$LDFLAGS"
+ echo "PREFIX=$PREFIX"
+else
+ export CC CPP CXX RANLIB MAKE CFLAGS CXXFLAGS LDFLAGS PREFIX
+fi
+
+cd ../../../source
+[ -f mout-config ] && {
+ if [ "$V" = "echo" ]
+ then
+ echo "mv mout-config mout-config$$"
+ else
+ mv mout-config mout-config$$
+ fi
+}
+if [ "$V" = "echo" ]
+then
+ echo "./configure \
+ --prefix=${PREFIX} \
+ --with-profile \
+ --with-syslog \
+ --with-utmp \
+ --with-vfs \
+ --with-msdfs \
+ --with-netatalk \
+ --with-sambabook=${PREFIX}/swat/using_samba \
+ 2>&1 | tee mout-config"
+else
+ ./configure \
+ --prefix=${PREFIX} \
+ --with-profile \
+ --with-syslog \
+ --with-utmp \
+ --with-vfs \
+ --with-msdfs \
+ --with-netatalk \
+ --with-sambabook=${PREFIX}/swat/using_samba \
+ 2>&1 | tee mout-config
+fi
diff --git a/packaging/Caldera/UnixWare/Install b/packaging/Caldera/UnixWare/Install
new file mode 100755
index 00000000000..3fffc37d25a
--- /dev/null
+++ b/packaging/Caldera/UnixWare/Install
@@ -0,0 +1,146 @@
+#!/bin/ksh
+#
+# invoke with -n as the first argument to get this script to tell
+# you what it would do without doing anything
+#
+
+V=
+[ "$1" = "-n" ] && V=echo
+
+PREFIX=/usr/local/samba
+HERE=`pwd`
+PKGDIR=packaging/Caldera/UnixWare
+
+BUILD_ROOT=${HERE}/dist
+BLDFIX=${BUILD_ROOT}/${PREFIX}
+$V rm -rf $BUILD_ROOT
+$V mkdir -p $BUILD_ROOT/etc/init.d
+$V mkdir -p ${BLDFIX}/bin
+$V mkdir -p ${BLDFIX}/sbin
+$V mkdir -p ${BLDFIX}/swat/using_samba/gifs
+$V mkdir -p ${BLDFIX}/swat/using_samba/figs
+$V mkdir -p ${BLDFIX}/swat/images
+$V mkdir -p ${BLDFIX}/swat/help
+$V mkdir -p ${BLDFIX}/swat/include
+$V mkdir -p ${BLDFIX}/man/man1
+$V mkdir -p ${BLDFIX}/man/man5
+$V mkdir -p ${BLDFIX}/man/man7
+$V mkdir -p ${BLDFIX}/man/man8
+$V mkdir -p ${BLDFIX}/var/locks
+$V mkdir -p ${BLDFIX}/lib/codepages/src
+
+# Copy into the dist tree the pkg data files
+for i in pkg/*
+do
+ [ -f $i ] && $V cp $i ${BUILD_ROOT}
+done
+
+cd ../../..
+
+# Install standard binary files
+for i in nmblookup smbclient smbpasswd smbstatus testparm testprns \
+ make_smbcodepage make_unicodemap make_printerdef rpcclient smbspool \
+ smbsh smbwrapper.so
+do
+$V install -m755 -s source/bin/$i ${BLDFIX}/bin
+done
+for i in mksmbpasswd.sh smbtar
+do
+$V install -m755 source/script/$i ${BLDFIX}/bin
+done
+
+# Install secure binary files
+for i in smbd nmbd swat debug2html smbtorture smbfilter locktest2 masktest
+do
+$V install -m755 -s source/bin/$i ${BLDFIX}/sbin
+done
+
+
+# Install level 1 man pages
+for i in *.1
+do
+$V install -m644 docs/manpages/$i ${BLDFIX}/man/man1
+done
+
+# Install codepage source files
+for i in 437 737 775 850 852 861 866 932 936 949 950 1251
+do
+$V install -m644 source/codepages/codepage_def.$i ${BLDFIX}/lib/codepages/src
+done
+for i in 437 737 850 852 861 866 932 936 949 950 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R
+do
+$V install -m644 source/codepages/CP$i.TXT ${BLDFIX}/lib/codepages/src
+done
+
+# Install SWAT helper files
+for i in swat/help/*.html docs/htmldocs/*.html
+do
+$V install -m644 $i ${BLDFIX}/swat/help
+done
+for i in swat/images/*.gif
+do
+$V install -m644 $i ${BLDFIX}/swat/images
+done
+for i in swat/include/*.html
+do
+$V install -m644 $i ${BLDFIX}/swat/include
+done
+
+# This is the O'Reily Samba Book - on-line
+for i in docs/htmldocs/using_samba/*.html
+do
+$V install -m644 $i ${BLDFIX}/swat/using_samba
+done
+for i in docs/htmldocs/using_samba/figs/*.gif
+do
+$V install -m644 $i ${BLDFIX}/swat/using_samba/figs
+done
+for i in docs/htmldocs/using_samba/gifs/*.gif
+do
+$V install -m644 $i ${BLDFIX}/swat/using_samba/gifs
+done
+
+# Install the miscellany
+$V install -m644 swat/README ${BLDFIX}/swat
+$V install -m644 docs/manpages/smb.conf.5 ${BLDFIX}/man/man5
+$V install -m644 docs/manpages/lmhosts.5 ${BLDFIX}/man/man5
+$V install -m644 docs/manpages/smbpasswd.5 ${BLDFIX}/man/man5
+$V install -m644 docs/manpages/samba.7 ${BLDFIX}/man/man7
+$V install -m644 docs/manpages/smbd.8 ${BLDFIX}/man/man8
+$V install -m644 docs/manpages/nmbd.8 ${BLDFIX}/man/man8
+$V install -m644 docs/manpages/smbpasswd.8 ${BLDFIX}/man/man8
+$V install -m644 docs/manpages/swat.8 ${BLDFIX}/man/man8
+$V install -m644 docs/manpages/smbmount.8 ${BLDFIX}/man/man8
+$V install -m644 docs/manpages/smbmnt.8 ${BLDFIX}/man/man8
+$V install -m644 docs/manpages/smbumount.8 ${BLDFIX}/man/man8
+$V install -m644 ${PKGDIR}/smb.conf ${BLDFIX}/lib/smb.conf
+$V install -m644 ${PKGDIR}/smbusers $BUILD_ROOT/etc/smbusers
+$V install -m755 ${PKGDIR}/smbprint ${BLDFIX}/bin
+$V install -m755 ${PKGDIR}/findsmb ${BLDFIX}/bin
+$V install -m755 ${PKGDIR}/smbadduser ${BLDFIX}/bin
+$V install -m755 ${PKGDIR}/smb.init $BUILD_ROOT/etc/init.d/samba
+
+# The following is now done in the postinstall script
+#
+# if [ "$V" = "echo" ]
+# then
+# echo "echo 127.0.0.1 localhost > $BUILD_ROOT/etc/lmhosts"
+# else
+# echo 127.0.0.1 localhost > $BUILD_ROOT/etc/lmhosts
+# fi
+#
+# Build codepage load files
+# $V cd ${BLDFIX}/lib/codepages
+# for i in 437 737 775 850 852 861 866 932 936 949 950 1251
+# do
+# $V ${PREFIX}/bin/make_smbcodepage c $i \
+# ${BLDFIX}/lib/codepages/src/codepage_def.$i \
+# ${BLDFIX}/lib/codepages/codepage.$i
+# done
+# for i in 437 737 850 852 861 866 932 936 949 950 \
+# ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R
+# do
+# $V ${PREFIX}/bin/make_unicodemap $i \
+# ${BLDFIX}/lib/codepages/src/CP$i.TXT \
+# ${BLDFIX}/lib/codepages/unicode_map.$i
+# done
diff --git a/packaging/Caldera/UnixWare/Makepkg b/packaging/Caldera/UnixWare/Makepkg
new file mode 100755
index 00000000000..dc57b246ef5
--- /dev/null
+++ b/packaging/Caldera/UnixWare/Makepkg
@@ -0,0 +1,10 @@
+#!/bin/ksh
+#
+# invoke with -n as the first argument to get this script to tell
+# you what it would do without doing anything
+#
+
+./Configure $*
+./Compile $*
+./Install $*
+./Package $*
diff --git a/packaging/Caldera/UnixWare/Package b/packaging/Caldera/UnixWare/Package
new file mode 100755
index 00000000000..f225b8eb7ea
--- /dev/null
+++ b/packaging/Caldera/UnixWare/Package
@@ -0,0 +1,40 @@
+#!/bin/ksh
+#
+# Now create the actual pkgadd installable datastream
+#
+# invoke with -n as the first argument to get this script to tell
+# you what it would do without doing anything
+#
+
+V=
+[ "$1" = "-n" ] && V=echo
+
+$V cd dist
+PKGNAME=samba
+PKGBLD=`pwd`
+[ "$V" = "echo" ] && PKGBLD=$PKGBLD/dist
+
+PKGCOMPRESS="-c"
+#PKGBLOCKLIM=2876
+PKGBLOCKLIM=6200
+
+##############################################################################
+#
+# make filesystem-type package in directory ./$PKGNAME/
+# (source files reside in ./root)
+#
+# don't use PKGBLOCKLIM for now
+#
+$V pkgmk -o $PKGCOMPRESS -d $PKGBLD -r $PKGBLD
+#pkgmk -o $PKGCOMPRESS -l $PKGBLOCKLIM -d $PKGBLD -r $PKGBLD
+#pkgmk -o $PKGCOMPRESS -l $PKGBLOCKLIM -d $PKGBLD -r $PKGBLD/root
+
+#
+# make $PKGNAME.pkg datastream-type package
+#
+$V pkgtrans -s $PKGBLD $PKGBLD/$PKGNAME.pkg $PKGNAME
+
+#
+# remove filesystem-type package
+#
+#rm -rf $PKGBLD/$PKGNAME
diff --git a/packaging/Caldera/UnixWare/README b/packaging/Caldera/UnixWare/README
new file mode 100644
index 00000000000..74f8dc53d5d
--- /dev/null
+++ b/packaging/Caldera/UnixWare/README
@@ -0,0 +1,54 @@
+Preparation Date: December 28, 2000
+Preparer: Ronald Joe Record <rr@sco.com>
+
+Instructions: Preparing Samba Packages for UnixWare
+===============================================================
+
+We provide support only for current versions of UnixWare.
+
+The file samba-2.2-uw7.patch is a patch file suitable for use
+with the patch command as follows:
+
+ # cd ../../../source
+ # patch -p 0 -i ../packaging/Caldera/UnixWare/samba-2.2-uw7.patch
+
+The files modified by this patch are:
+ smbwrapper/smbw.c
+ tdb/tdb.c
+ utils/torture.c
+ utils/locktest.c
+ utils/locktest2.c
+ utils/masktest.c
+ utils/smbcacls.c
+ ltconfig
+ configure.in
+
+This patch should only be necessary until these changes are accepted
+back into the 2.2 source tree. Until then, this patch must be applied
+prior to building Samba 2.2 on UnixWare 7. After applying the patch it
+is then necessary to run autoconf again and regenerate the configure file:
+
+ # cd ../../../source
+ # autoconf
+
+To produce the pkgadd installable datastream simply type (in this directory):
+ # ./Makepkg
+
+The resultant samba.pkg should reside in the ./dist subdirectory.
+To install from this pkgadd datastream, issue the command (as root):
+
+ # cd dist
+ # pkgadd -d `pwd`/samba.pkg all
+
+Alternately, each of the steps in building the datastream may be performed
+individually by invoking each of the following:
+
+ # ./Configure
+ # ./Compile
+ # ./Install
+ # ./Package
+
+If files are added or deleted from the UnixWare Samba distribution then
+the prototype file in the pkg directory should be appropriately modified.
+The files in the pkg subdirectory were initially created using the mkpkg
+package from SCO Skunkware (see http://www.sco.com/skunkware).
diff --git a/packaging/Caldera/UnixWare/findsmb b/packaging/Caldera/UnixWare/findsmb
new file mode 100755
index 00000000000..bb91c784b89
--- /dev/null
+++ b/packaging/Caldera/UnixWare/findsmb
@@ -0,0 +1,141 @@
+#!/usr/local/bin/perl
+#
+# Prints info on all smb responding machines on a subnet.
+# This script needs to be run on a machine without nmbd running and be
+# run as root to get correct info from WIN95 clients.
+#
+# syntax:
+# findsmb [subnet broadcast address]
+#
+# with no agrument it will list machines on the current subnet
+#
+# There will be a "+" in front of the workgroup name for machines that are
+# local master browsers for that workgroup. There will be an "*" in front
+# of the workgroup name for machines that are the domain master browser for
+# that workgroup.
+#
+
+$SAMBABIN = "/usr/local/samba/bin";
+
+for ($i = 0; $i < 2; $i++) { # test for -d option and broadcast address
+ $_ = shift;
+ if (m/-d|-D/) {
+ $DEBUG = 1;
+ } else {
+ if ($_) {
+ $BCAST = "-B $_";
+ }
+ }
+}
+
+sub ipsort # do numeric sort on last field of IP address
+{
+ @t1 = split(/\./,$a);
+ @t2 = split(/\./,$b);
+ @t1[3] <=> @t2[3];
+}
+
+# look for all machines that respond to a name lookup
+
+open(NMBLOOKUP,"$SAMBABIN/nmblookup $BCAST '*'|") ||
+ die("Can't run nmblookup '*'.\n");
+
+# get rid of all lines that are not a response IP address,
+# strip everything but IP address and sort by last field in address
+
+@ipaddrs = sort ipsort grep(s/ \*<00>.*$//,<NMBLOOKUP>);
+
+# print header info
+
+print "\nIP ADDR NETBIOS NAME WORKGROUP/OS/VERSION $BCAST\n";
+print "---------------------------------------------------------------------\n";
+
+foreach $ip (@ipaddrs) # loop through each IP address found
+{
+ $ip =~ s/\n//; # strip newline from IP address
+
+# find the netbios names registered by each machine
+
+ open(NMBLOOKUP,"$SAMBABIN/nmblookup -r -A $ip|") ||
+ die("Can't get nmb name list.\n");
+ @nmblookup = <NMBLOOKUP>;
+ close NMBLOOKUP;
+
+# get the first <00> name
+
+ @name = grep(/<00>/,@nmblookup);
+ $_ = @name[0];
+ if ($_) { # we have a netbios name
+ if (/GROUP/) { # is it a group name
+ ($name, $aliases, $type, $length, @addresses) =
+ gethostbyaddr(pack('C4',split('\.',$ip)),2);
+ if (! $name) { # could not get name
+ $name = "unknown nis name";
+ }
+ } else {
+ /(\S+)/;
+ $name = $1;
+ }
+
+# do an smbclient command on the netbios name.
+
+ open(SMB,"$SAMBABIN/smbclient -N -L $name -I $ip -U% |") ||
+ die("Can't do smbclient command.\n");
+ @smb = <SMB>;
+ close SMB;
+
+ if ($DEBUG) { # if -d flag print results of nmblookup and smbclient
+ print "===============================================================\n";
+ print @nmblookup;
+ print @smb;
+ }
+
+# look for the OS= string
+
+ @info = grep(/OS=/,@smb);
+ $_ = @info[0];
+ if ($_) { # we found response
+ s/Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter
+
+ } else { # no OS= string in response (WIN95 client)
+
+# for WIN95 clients get workgroup name from nmblookup response
+ @name = grep(/<00> - <GROUP>/,@nmblookup);
+ $_ = @name[0];
+ if ($_) {
+ /(\S+)/;
+ $_ = "[$1]";
+ } else {
+ $_ = "Unknown Workgroup";
+ }
+ }
+
+# see if machine registered a local master browser name
+ if (grep(/<1d>/,@nmblookup)) {
+ $master = '+'; # indicate local master browser
+ if (grep(/<1b>/,@nmblookup)) { # how about domain master browser?
+ $master = '*'; # indicate domain master browser
+ }
+ } else {
+ $master = ' '; # not a browse master
+ }
+
+# line up info in 3 columns
+
+ print "$ip".' 'x(16-length($ip))."$name".' 'x(14-length($name))."$master"."$_\n";
+
+ } else { # no netbios name found
+# try getting the host name
+ ($name, $aliases, $type, $length, @addresses) =
+ gethostbyaddr(pack('C4',split('\.',$ip)),2);
+ if (! $name) { # could not get name
+ $name = "unknown nis name";
+ }
+ if ($DEBUG) { # if -d flag print results of nmblookup
+ print "===============================================================\n";
+ print @nmblookup;
+ }
+ print "$ip".' 'x(16-length($ip))."$name\n";
+ }
+}
+
diff --git a/packaging/Caldera/UnixWare/pkg/admin b/packaging/Caldera/UnixWare/pkg/admin
new file mode 100644
index 00000000000..fe2438c770c
--- /dev/null
+++ b/packaging/Caldera/UnixWare/pkg/admin
@@ -0,0 +1 @@
+basedir=ask
diff --git a/packaging/Caldera/UnixWare/pkg/pkginfo b/packaging/Caldera/UnixWare/pkg/pkginfo
new file mode 100644
index 00000000000..c4d8bff0bb9
--- /dev/null
+++ b/packaging/Caldera/UnixWare/pkg/pkginfo
@@ -0,0 +1,10 @@
+PKG="samba"
+NAME="Samba - A Windows SMB/CIFS fileserver for UNIX"
+VERSION="2.2"
+VENDOR="SCO"
+HOTLINE="1-800-SCO-UNIX"
+EMAIL="rr@sco.com"
+CATEGORY="skunkware"
+CLASSES="samba"
+ARCH="i386"
+BASEDIR=/
diff --git a/packaging/Caldera/UnixWare/pkg/postinstall b/packaging/Caldera/UnixWare/pkg/postinstall
new file mode 100755
index 00000000000..4e202ae3543
--- /dev/null
+++ b/packaging/Caldera/UnixWare/pkg/postinstall
@@ -0,0 +1,56 @@
+#!/bin/sh
+#
+# Create /var/spool/samba, setup swat to be run out of inetd on port 901,
+# initialize the lmhosts file and create the codepage load files
+#
+# Written 10-Aug-1999 by Ronald Joe Record (rr@sco.com)
+#
+
+SPOOL=/var/spool/samba
+SVCS=/etc/services
+INET=/etc/inetd.conf
+PREFIX=/usr/local/samba
+LMHOST=/etc/lmhosts
+
+[ -d $SPOOL ] || {
+ mkdir -p $SPOOL
+ chmod 1777 $SPOOL
+}
+
+grep swat $SVCS > /dev/null || {
+ echo "swat 901/tcp # Samba Web Administration Tool " >> $SVCS
+}
+
+grep swat $INET > /dev/null || {
+ echo "swat stream tcp nowait root /usr/local/samba/bin/swat swat " >> $INET
+}
+
+if [ -f $LMHOST ]
+then
+ grep localhost $LMHOST > /dev/null || {
+ echo 127.0.0.1 localhost >> $LMHOST
+ }
+else
+ echo 127.0.0.1 localhost > $LMHOST
+fi
+
+#
+# Build codepage load files
+#
+
+cd ${PREFIX}/lib/codepages
+for i in 437 737 775 850 852 861 866 932 936 949 950 1251
+do
+ ${PREFIX}/bin/make_smbcodepage c $i \
+ ${PREFIX}/lib/codepages/src/codepage_def.$i \
+ ${PREFIX}/lib/codepages/codepage.$i
+done
+for i in 437 737 850 852 861 866 932 936 949 950 \
+ ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R
+do
+ ${PREFIX}/bin/make_unicodemap $i \
+ ${PREFIX}/lib/codepages/src/CP$i.TXT \
+ ${PREFIX}/lib/codepages/unicode_map.$i
+done
+
+kill -1 `ps -e | grep inetd | awk ' { print $1 } '`
diff --git a/packaging/Caldera/UnixWare/pkg/postremove b/packaging/Caldera/UnixWare/pkg/postremove
new file mode 100755
index 00000000000..dc81d6fa85f
--- /dev/null
+++ b/packaging/Caldera/UnixWare/pkg/postremove
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# Remove /var/spool/samba and delete inetd entries for swat
+#
+
+SPOOL=/var/spool/samba
+SVCS=/etc/services
+INET=/etc/inetd.conf
+
+[ -d $SPOOL ] && {
+ rm -rf $SPOOL
+}
+
+grep swat $SVCS > /dev/null && {
+ B=`basename $SVCS`
+ T=$B$$
+ grep -v swat $SVCS > /tmp/$T
+ cp /tmp/$T $SVCS
+ rm -f /tmp/$T
+}
+
+grep swat $INET > /dev/null || {
+ B=`basename $INET`
+ T=$B$$
+ grep -v swat $INET > /tmp/$T
+ cp /tmp/$T $INET
+ rm -f /tmp/$T
+}
+
+kill -1 `ps -e | grep inetd | awk ' { print $1 } '`
diff --git a/packaging/Caldera/UnixWare/pkg/prototype b/packaging/Caldera/UnixWare/pkg/prototype
new file mode 100644
index 00000000000..13a64b6feb1
--- /dev/null
+++ b/packaging/Caldera/UnixWare/pkg/prototype
@@ -0,0 +1,310 @@
+i admin=admin
+i pkginfo=pkginfo
+i postinstall=postinstall
+i postremove=postremove
+
+d samba etc 0755 root sys
+d samba etc/init.d 0755 root sys
+f samba etc/init.d/samba 0755 root sys
+f samba etc/smbusers 0644 root sys
+d samba usr 0755 root sys
+d samba usr/local 0755 root sys
+d samba usr/local/samba 0755 root sys
+d samba usr/local/samba/bin 0755 root sys
+f samba usr/local/samba/bin/nmblookup 0755 root sys
+f samba usr/local/samba/bin/smbclient 0755 root sys
+f samba usr/local/samba/bin/smbpasswd 0755 root sys
+f samba usr/local/samba/bin/smbstatus 0755 root sys
+f samba usr/local/samba/bin/testparm 0755 root sys
+f samba usr/local/samba/bin/testprns 0755 root sys
+f samba usr/local/samba/bin/make_smbcodepage 0755 root sys
+f samba usr/local/samba/bin/make_unicodemap 0755 root sys
+f samba usr/local/samba/bin/make_printerdef 0755 root sys
+f samba usr/local/samba/bin/rpcclient 0755 root sys
+f samba usr/local/samba/bin/smbspool 0755 root sys
+f samba usr/local/samba/bin/smbsh 0755 root sys
+f samba usr/local/samba/bin/smbwrapper.so 0755 root sys
+f samba usr/local/samba/bin/mksmbpasswd.sh 0755 root sys
+f samba usr/local/samba/bin/smbtar 0755 root sys
+f samba usr/local/samba/bin/smbprint 0755 root sys
+f samba usr/local/samba/bin/findsmb 0755 root sys
+f samba usr/local/samba/bin/smbadduser 0755 root sys
+d samba usr/local/samba/sbin 0755 root sys
+f samba usr/local/samba/sbin/smbd 0755 root sys
+f samba usr/local/samba/sbin/nmbd 0755 root sys
+f samba usr/local/samba/sbin/swat 0755 root sys
+f samba usr/local/samba/sbin/debug2html 0755 root sys
+f samba usr/local/samba/sbin/smbtorture 0755 root sys
+f samba usr/local/samba/sbin/smbfilter 0755 root sys
+f samba usr/local/samba/sbin/locktest2 0755 root sys
+f samba usr/local/samba/sbin/masktest 0755 root sys
+d samba usr/local/samba/swat 0755 root sys
+d samba usr/local/samba/swat/using_samba 0755 root sys
+d samba usr/local/samba/swat/using_samba/gifs 0755 root sys
+f samba usr/local/samba/swat/using_samba/gifs/index.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/gifs/samba.s.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/gifs/txthome.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/gifs/txtnexta.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/gifs/txtpreva.gif 0644 root sys
+d samba usr/local/samba/swat/using_samba/figs 0755 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0101.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0102.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0103.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0104.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0105.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0106.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0107.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0108.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0109.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0110.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0111.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0112.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0113.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0114.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0201.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0202.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0203.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0204.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0301.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0302.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0303.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0304.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0305.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0306.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0307.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0308.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0309.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0310.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0311.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0312.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0313.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0314.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0315.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0316.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0317.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0318.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0319.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0320.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0321.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0322.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0323.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0324.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0325.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0326.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0327.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0328.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0401.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0402.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0403.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0404.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0405.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0406.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0407.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0501.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0502.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0503.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0504.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0505.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0506.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0507.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0508.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0601.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0602.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0603.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0604.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0605.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0606.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0701.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0702.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0703.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0704.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0705.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0706.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0707.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0708.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0709.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0801.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0802.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0803.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0804.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0805.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0901.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0902.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0903.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0904.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.0905.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.aa01.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.ab01.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/figs/sam.ab02.gif 0644 root sys
+f samba usr/local/samba/swat/using_samba/appa_01.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/appa_02.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/appa_03.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/appa_04.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/appa_05.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/appb_01.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/appb_02.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/appb_03.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/appc_01.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/appd_01.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/appe_01.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/appf_01.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch01_01.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch01_02.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch01_03.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch01_04.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch01_05.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch01_06.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch01_07.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch01_08.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch02_01.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch02_02.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch02_03.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch02_04.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch02_05.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch02_06.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch03_01.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch03_02.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch03_03.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch04_01.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch04_02.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch04_03.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch04_04.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch04_05.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch04_06.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch04_07.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch04_08.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch05_01.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch05_02.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch05_03.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch05_04.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch05_05.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch06_01.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch06_02.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch06_03.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch06_04.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch06_05.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch06_06.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch07_01.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch07_02.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch07_03.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch08_01.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch08_02.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch08_03.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch08_04.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch08_05.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch08_06.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch08_07.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch09_01.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch09_02.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/ch09_03.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/index.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/inx.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/licenseinfo.html 0644 root sys
+f samba usr/local/samba/swat/using_samba/this_edition.html 0644 root sys
+d samba usr/local/samba/swat/images 0755 root sys
+f samba usr/local/samba/swat/images/globals.gif 0644 root sys
+f samba usr/local/samba/swat/images/home.gif 0644 root sys
+f samba usr/local/samba/swat/images/passwd.gif 0644 root sys
+f samba usr/local/samba/swat/images/printers.gif 0644 root sys
+f samba usr/local/samba/swat/images/samba.gif 0644 root sys
+f samba usr/local/samba/swat/images/shares.gif 0644 root sys
+f samba usr/local/samba/swat/images/status.gif 0644 root sys
+f samba usr/local/samba/swat/images/viewconfig.gif 0644 root sys
+d samba usr/local/samba/swat/help 0755 root sys
+f samba usr/local/samba/swat/help/welcome.html 0644 root sys
+f samba usr/local/samba/swat/help/DOMAIN_MEMBER.html 0644 root sys
+f samba usr/local/samba/swat/help/NT_Security.html 0644 root sys
+f samba usr/local/samba/swat/help/findsmb.1.html 0644 root sys
+f samba usr/local/samba/swat/help/lmhosts.5.html 0644 root sys
+f samba usr/local/samba/swat/help/make_smbcodepage.1.html 0644 root sys
+f samba usr/local/samba/swat/help/nmbd.8.html 0644 root sys
+f samba usr/local/samba/swat/help/nmblookup.1.html 0644 root sys
+f samba usr/local/samba/swat/help/rpcclient.1.html 0644 root sys
+f samba usr/local/samba/swat/help/samba-pdc-faq.html 0644 root sys
+f samba usr/local/samba/swat/help/samba-pdc-howto.html 0644 root sys
+f samba usr/local/samba/swat/help/samba.7.html 0644 root sys
+f samba usr/local/samba/swat/help/smb.conf.5.html 0644 root sys
+f samba usr/local/samba/swat/help/smbclient.1.html 0644 root sys
+f samba usr/local/samba/swat/help/smbcontrol.1.html 0644 root sys
+f samba usr/local/samba/swat/help/smbd.8.html 0644 root sys
+f samba usr/local/samba/swat/help/smbpasswd.5.html 0644 root sys
+f samba usr/local/samba/swat/help/smbpasswd.8.html 0644 root sys
+f samba usr/local/samba/swat/help/smbrun.1.html 0644 root sys
+f samba usr/local/samba/swat/help/smbsh.1.html 0644 root sys
+f samba usr/local/samba/swat/help/smbspool.8.html 0644 root sys
+f samba usr/local/samba/swat/help/smbstatus.1.html 0644 root sys
+f samba usr/local/samba/swat/help/smbtar.1.html 0644 root sys
+f samba usr/local/samba/swat/help/swat.8.html 0644 root sys
+f samba usr/local/samba/swat/help/testparm.1.html 0644 root sys
+f samba usr/local/samba/swat/help/testprns.1.html 0644 root sys
+f samba usr/local/samba/swat/help/wbinfo.1.html 0644 root sys
+f samba usr/local/samba/swat/help/winbindd.8.html 0644 root sys
+d samba usr/local/samba/swat/include 0755 root sys
+f samba usr/local/samba/swat/include/footer.html 0644 root sys
+f samba usr/local/samba/swat/include/header.html 0644 root sys
+f samba usr/local/samba/swat/README 0644 root sys
+d samba usr/local/samba/man 0755 root sys
+d samba usr/local/samba/man/man1 0755 root sys
+f samba usr/local/samba/man/man1/findsmb.1 0644 root sys
+f samba usr/local/samba/man/man1/make_smbcodepage.1 0644 root sys
+f samba usr/local/samba/man/man1/make_unicodemap.1 0644 root sys
+f samba usr/local/samba/man/man1/nmblookup.1 0644 root sys
+f samba usr/local/samba/man/man1/smbclient.1 0644 root sys
+f samba usr/local/samba/man/man1/smbcontrol.1 0644 root sys
+f samba usr/local/samba/man/man1/smbrun.1 0644 root sys
+f samba usr/local/samba/man/man1/smbsh.1 0644 root sys
+f samba usr/local/samba/man/man1/smbstatus.1 0644 root sys
+f samba usr/local/samba/man/man1/smbtar.1 0644 root sys
+f samba usr/local/samba/man/man1/testparm.1 0644 root sys
+f samba usr/local/samba/man/man1/testprns.1 0644 root sys
+f samba usr/local/samba/man/man1/wbinfo.1 0644 root sys
+d samba usr/local/samba/man/man5 0755 root sys
+f samba usr/local/samba/man/man5/smb.conf.5 0644 root sys
+f samba usr/local/samba/man/man5/lmhosts.5 0644 root sys
+f samba usr/local/samba/man/man5/smbpasswd.5 0644 root sys
+d samba usr/local/samba/man/man7 0755 root sys
+f samba usr/local/samba/man/man7/samba.7 0644 root sys
+d samba usr/local/samba/man/man8 0755 root sys
+f samba usr/local/samba/man/man8/smbd.8 0644 root sys
+f samba usr/local/samba/man/man8/nmbd.8 0644 root sys
+f samba usr/local/samba/man/man8/smbpasswd.8 0644 root sys
+f samba usr/local/samba/man/man8/swat.8 0644 root sys
+f samba usr/local/samba/man/man8/smbmount.8 0644 root sys
+f samba usr/local/samba/man/man8/smbmnt.8 0644 root sys
+f samba usr/local/samba/man/man8/smbumount.8 0644 root sys
+d samba usr/local/samba/var 0755 root sys
+d samba usr/local/samba/var/locks 0755 root sys
+d samba usr/local/samba/lib 0755 root sys
+d samba usr/local/samba/lib/codepages 0755 root sys
+d samba usr/local/samba/lib/codepages/src 0755 root sys
+f samba usr/local/samba/lib/codepages/src/codepage_def.437 0644 root sys
+f samba usr/local/samba/lib/codepages/src/codepage_def.737 0644 root sys
+f samba usr/local/samba/lib/codepages/src/codepage_def.775 0644 root sys
+f samba usr/local/samba/lib/codepages/src/codepage_def.850 0644 root sys
+f samba usr/local/samba/lib/codepages/src/codepage_def.852 0644 root sys
+f samba usr/local/samba/lib/codepages/src/codepage_def.861 0644 root sys
+f samba usr/local/samba/lib/codepages/src/codepage_def.866 0644 root sys
+f samba usr/local/samba/lib/codepages/src/codepage_def.932 0644 root sys
+f samba usr/local/samba/lib/codepages/src/codepage_def.936 0644 root sys
+f samba usr/local/samba/lib/codepages/src/codepage_def.949 0644 root sys
+f samba usr/local/samba/lib/codepages/src/codepage_def.950 0644 root sys
+f samba usr/local/samba/lib/codepages/src/codepage_def.1251 0644 root sys
+f samba usr/local/samba/lib/codepages/src/CP437.TXT 0644 root sys
+f samba usr/local/samba/lib/codepages/src/CP737.TXT 0644 root sys
+f samba usr/local/samba/lib/codepages/src/CP850.TXT 0644 root sys
+f samba usr/local/samba/lib/codepages/src/CP852.TXT 0644 root sys
+f samba usr/local/samba/lib/codepages/src/CP861.TXT 0644 root sys
+f samba usr/local/samba/lib/codepages/src/CP866.TXT 0644 root sys
+f samba usr/local/samba/lib/codepages/src/CP932.TXT 0644 root sys
+f samba usr/local/samba/lib/codepages/src/CP936.TXT 0644 root sys
+f samba usr/local/samba/lib/codepages/src/CP949.TXT 0644 root sys
+f samba usr/local/samba/lib/codepages/src/CP950.TXT 0644 root sys
+f samba usr/local/samba/lib/codepages/src/CPISO8859-1.TXT 0644 root sys
+f samba usr/local/samba/lib/codepages/src/CPISO8859-2.TXT 0644 root sys
+f samba usr/local/samba/lib/codepages/src/CPISO8859-5.TXT 0644 root sys
+f samba usr/local/samba/lib/codepages/src/CPISO8859-7.TXT 0644 root sys
+f samba usr/local/samba/lib/codepages/src/CPKOI8-R.TXT 0644 root sys
+f samba usr/local/samba/lib/smb.conf 0644 root sys
+d samba usr/local/man 0755 root sys
+d samba usr/local/man/html 0755 root sys
+s samba usr/local/man/html/samba=/usr/local/samba/swat/using_samba
diff --git a/packaging/Caldera/UnixWare/samba-2.2-uw7-prototype.patch b/packaging/Caldera/UnixWare/samba-2.2-uw7-prototype.patch
new file mode 100644
index 00000000000..7678379b063
--- /dev/null
+++ b/packaging/Caldera/UnixWare/samba-2.2-uw7-prototype.patch
@@ -0,0 +1,11 @@
+--- packaging/Caldera/UnixWare/pkg/prototype.00 Tue Jan 9 05:40:47 2001
++++ packaging/Caldera/UnixWare/pkg/prototype Fri Apr 13 14:44:33 2001
+@@ -220,7 +220,7 @@
+ f samba usr/local/samba/swat/help/make_smbcodepage.1.html 0644 root sys
+ f samba usr/local/samba/swat/help/nmbd.8.html 0644 root sys
+ f samba usr/local/samba/swat/help/nmblookup.1.html 0644 root sys
+-f samba usr/local/samba/swat/help/rpcclient.8.html 0644 root sys
++f samba usr/local/samba/swat/help/rpcclient.1.html 0644 root sys
+ f samba usr/local/samba/swat/help/samba-pdc-faq.html 0644 root sys
+ f samba usr/local/samba/swat/help/samba-pdc-howto.html 0644 root sys
+ f samba usr/local/samba/swat/help/samba.7.html 0644 root sys
diff --git a/packaging/Caldera/UnixWare/samba-2.2-uw7.patch b/packaging/Caldera/UnixWare/samba-2.2-uw7.patch
new file mode 100644
index 00000000000..c4412e542ee
--- /dev/null
+++ b/packaging/Caldera/UnixWare/samba-2.2-uw7.patch
@@ -0,0 +1,200 @@
+--- smbwrapper/smbw.c.orig Mon Jan 8 12:37:48 2001
++++ smbwrapper/smbw.c Fri Apr 13 13:09:00 2001
+@@ -22,6 +22,11 @@
+ #include "includes.h"
+ #include "realcalls.h"
+
++#if defined(__USLC__) && defined(HAVE_SYS_ACL_H)
++#define GETACL ACL_GET
++#define GETACLCNT ACL_CNT
++#endif
++
+ pstring smbw_cwd;
+
+ static struct smbw_file *smbw_files;
+@@ -1462,7 +1467,11 @@
+ /*****************************************************
+ say no to acls
+ *******************************************************/
++#if defined(__USLC__)
++ int smbw_acl(const char *pathp, int cmd, int nentries, void *aclbufp)
++#else
+ int smbw_acl(const char *pathp, int cmd, int nentries, aclent_t *aclbufp)
++#endif
+ {
+ if (cmd == GETACL || cmd == GETACLCNT) return 0;
+ errno = ENOSYS;
+@@ -1474,7 +1483,11 @@
+ /*****************************************************
+ say no to acls
+ *******************************************************/
++#if defined(__USLC__)
++ int smbw_facl(int fd, int cmd, int nentries, void *aclbufp)
++#else
+ int smbw_facl(int fd, int cmd, int nentries, aclent_t *aclbufp)
++#endif
+ {
+ if (cmd == GETACL || cmd == GETACLCNT) return 0;
+ errno = ENOSYS;
+--- tdb/tdb.c.orig Fri Apr 13 05:58:34 2001
++++ tdb/tdb.c Fri Apr 13 13:34:18 2001
+@@ -856,7 +856,11 @@
+ {
+ TDB_DATA key, dbuf;
+ struct list_struct rec;
++#if defined(__USLC__)
++ struct tdb_traverse_lock tl = { (struct tdb_traverse_lock *)0, 0, 0 };
++#else
+ struct tdb_traverse_lock tl = { NULL, 0, 0 };
++#endif
+ int ret, count = 0;
+
+ /* This was in the initializaton, above, but the IRIX compiler
+--- utils/torture.c.orig Fri Mar 30 13:53:26 2001
++++ utils/torture.c Fri Apr 13 13:09:01 2001
+@@ -2703,7 +2703,11 @@
+
+ dbf = stdout;
+
++#if defined(__USLC__)
++ setbuf(stdout, NULL);
++#else
+ setbuffer(stdout, NULL, 0);
++#endif
+
+ charset_initialise();
+
+--- utils/locktest.c.orig Fri Sep 29 13:18:14 2000
++++ utils/locktest.c Fri Apr 13 13:09:01 2001
+@@ -34,7 +34,7 @@
+
+ #define FILENAME "\\locktest.dat"
+ #define LOCKRANGE 1000
+-#define LOCKBASE 0;
++#define LOCKBASE 0
+
+ /*
+ #define LOCKBASE (0x40000000 - 50)
+@@ -59,6 +59,7 @@
+ char needed;
+ };
+
++#ifndef __USLC__
+ static struct record preset[] = {
+ #if 0
+ {36, 5, 0, 0, 0, 8, 1},
+@@ -67,6 +68,7 @@
+ {99, 11, 0, 0, 7, 1, 1},
+ #endif
+ };
++#endif /* __USLC__) */
+
+ static struct record *recorded;
+
+@@ -378,20 +380,23 @@
+ recorded = (struct record *)malloc(sizeof(*recorded) * numops);
+
+ for (n=0; n<numops; n++) {
++#ifndef __USLC__
+ if (n < sizeof(preset) / sizeof(preset[0])) {
+ recorded[n] = preset[n];
+ } else {
++#endif
+ recorded[n].conn = random() % NCONNECTIONS;
+ recorded[n].f = random() % NFILES;
+ recorded[n].start = LOCKBASE + ((unsigned)random() % (LOCKRANGE-1));
+- recorded[n].len = 1 +
+- random() % (LOCKRANGE-(recorded[n].start-LOCKBASE));
++ recorded[n].len = 1 + random() % (LOCKRANGE-(recorded[n].start-LOCKBASE));
+ recorded[n].start *= RANGE_MULTIPLE;
+ recorded[n].len *= RANGE_MULTIPLE;
+ recorded[n].r1 = random() % 100;
+ recorded[n].r2 = random() % 100;
+ recorded[n].needed = True;
++#ifndef __USLC__
+ }
++#endif
+ }
+
+ reconnect(cli, fnum, share);
+@@ -484,7 +489,11 @@
+ int seed, server;
+ static pstring servicesf = CONFIGFILE;
+
++#if defined(__USLC__)
++ setvbuf(stdout,NULL,_IOLBF,0); /* line buffered */
++#else
+ setlinebuf(stdout);
++#endif
+
+ dbf = stderr;
+
+--- utils/locktest2.c.orig Tue Jun 13 08:47:44 2000
++++ utils/locktest2.c Fri Apr 13 13:09:01 2001
+@@ -540,7 +540,11 @@
+ int seed;
+ static pstring servicesf = CONFIGFILE;
+
++#if defined(__USLC__)
++ setvbuf(stdout,NULL,_IOLBF,0); /* line buffered */
++#else
+ setlinebuf(stdout);
++#endif
+
+ dbf = stderr;
+
+--- utils/masktest.c.orig Fri May 26 17:28:02 2000
++++ utils/masktest.c Fri Apr 13 13:09:01 2001
+@@ -310,7 +310,11 @@
+ int seed;
+ static pstring servicesf = CONFIGFILE;
+
++#if defined(__USLC__)
++ setvbuf(stdout,NULL,_IOLBF,0); /* line buffered */
++#else
+ setlinebuf(stdout);
++#endif
+
+ dbf = stderr;
+
+--- utils/smbcacls.c.orig Thu Apr 12 21:09:39 2001
++++ utils/smbcacls.c Fri Apr 13 13:09:01 2001
+@@ -824,7 +824,11 @@
+
+ ctx=talloc_init();
+
++#if defined(__USLC__)
++ setvbuf(stdout,NULL,_IOLBF,0); /* line buffered */
++#else
+ setlinebuf(stdout);
++#endif
+
+ dbf = stderr;
+
+--- ltconfig.orig Mon Mar 13 15:20:00 2000
++++ ltconfig Fri Apr 13 13:09:01 2001
+@@ -1482,9 +1482,9 @@
+ no_undefined_flag=' -z text'
+ # $CC -shared without GNU ld will not create a library from C++
+ # object files and a static libstdc++, better avoid it by now
+- archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
++ archive_cmds='$LD -G${allow_undefined_flag} -h $rpath/$soname -o $lib $libobjs $deplibs $linkopts'
+ archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
++ $LD -G${allow_undefined_flag} -M $lib.exp -h $rpath/$soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
+ hardcode_libdir_flag_spec=
+ hardcode_shlibpath_var=no
+ runpath_var='LD_RUN_PATH'
+--- configure.in.orig Fri Apr 13 11:33:18 2001
++++ configure.in Fri Apr 13 13:09:01 2001
+@@ -727,6 +727,10 @@
+ *sysv5*)
+ if [ test "$GCC" != yes ]; then
+ AC_DEFINE(HAVE_MEMSET)
++ PICFLAG="-KPIC"
++ ac_cv_prog_cc_fpic=no
++ ac_cv_prog_cc_Kpic=no
++ ac_cv_prog_cc_KPIC=yes
+ fi
+ LDSHFLAGS="-G"
+ ;;
diff --git a/packaging/Caldera/UnixWare/smb.conf b/packaging/Caldera/UnixWare/smb.conf
new file mode 100644
index 00000000000..e3b3ae9e693
--- /dev/null
+++ b/packaging/Caldera/UnixWare/smb.conf
@@ -0,0 +1,291 @@
+# 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
+#
+# 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 many any basic syntactic errors.
+#
+#======================= Global Settings =====================================
+[global]
+
+# workgroup = NT-Domain-Name or Workgroup-Name
+ workgroup = MYGROUP
+
+# server string is the equivalent of the NT Description field
+ server string = Samba Server
+
+# This option is important for security. It allows you to restrict
+# connections to machines which are on your local network. The
+# following example restricts access to two C class networks and
+# the "loopback" interface. For more examples of the syntax see
+# the smb.conf man page
+; hosts allow = 192.168.1. 192.168.2. 127.
+
+# if you want to automatically load your printer list rather
+# than setting them up individually then you'll need this
+ printcap name = lpstat
+ load printers = yes
+
+# It should not be necessary to spell out the print system type unless
+# yours is non-standard. Currently supported print systems include:
+# bsd, sysv, plp, lprng, aix, hpux, qnx
+ printing = sysv
+
+# Uncomment this if you want a guest account, you must add this to /etc/passwd
+# otherwise the user "nobody" is used
+; guest account = pcguest
+
+# this tells Samba to use a separate log file for each machine
+# that connects
+ log file = /usr/local/samba/var/log.%m
+
+# Put a capping on the size of the log files (in Kb).
+ max log size = 50
+
+# Security mode. Most people will want user level security. See
+# security_level.txt for details.
+ security = user
+# Use password server option only with security = server
+; password server = <NT-Server-Name>
+
+# Password Level allows matching of _n_ characters of the password for
+# all combinations of upper and lower case.
+; password level = 8
+; username level = 8
+
+# You may wish to use password encryption. Please read
+# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
+# Do not enable this option unless you have read those documents
+; encrypt passwords = yes
+; smb passwd file = /etc/smbpasswd
+
+# The following are needed to allow password changing from Windows to
+# update the Linux sytsem password also.
+# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
+# NOTE2: You do NOT need these to allow workstations to change only
+# the encrypted SMB passwords. They allow the Unix password
+# to be kept in sync with the SMB password.
+; unix password sync = Yes
+; passwd program = /usr/bin/passwd %u
+; passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
+
+# Unix users can map to different SMB User names
+; username map = /etc/smbusers
+
+# 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
+; include = /etc/smb.conf.%m
+
+# Most people will find that this option gives better performance.
+# See speed.txt and the manual pages for details
+ socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
+
+# 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
+
+# Configure remote browse list synchronisation here
+# request announcement to, or browse list sync from:
+# a specific host or from / to a whole subnet (see below)
+; remote browse sync = 192.168.3.25 192.168.5.255
+# Cause this host to announce itself to local subnets here
+; remote announce = 192.168.1.255 192.168.2.44
+
+# 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
+
+# Use only if you have an NT server on your network that has been
+# configured at install time to be a primary domain controller.
+; domain controller = <NT-Domain-Controller-SMBName>
+
+# 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
+
+# All NetBIOS names must be resolved to IP Addresses
+# 'Name Resolve Order' allows the named resolution mechanism to be specified
+# the default order is "host lmhosts wins bcast". "host" means use the unix
+# system gethostbyname() function call that will use either /etc/hosts OR
+# DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf
+# and the /etc/resolv.conf file. "host" therefore is system configuration
+# dependant. This parameter is most often of use to prevent DNS lookups
+# in order to resolve NetBIOS names to IP Addresses. Use with care!
+# The example below excludes use of name resolution for machines that are NOT
+# on the local network segment
+# - OR - are not deliberately to be known via lmhosts or via WINS.
+; name resolve order = wins lmhosts bcast
+
+# 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 built-in default for versions 1.9.17 is yes,
+# this has been changed in version 1.9.18 to no.
+ dns proxy = no
+
+# Case Preservation can be handy - system default is _no_
+# NOTE: These can be set on a per share basis
+; preserve case = no
+; short preserve case = no
+# Default case is normally upper case for all DOS files
+; default case = lower
+# Be very careful with case sensitivity - it can break things!
+; case sensitive = no
+
+#============================ 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 = /home/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 = /home/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/packaging/Caldera/UnixWare/smb.init b/packaging/Caldera/UnixWare/smb.init
new file mode 100755
index 00000000000..ce6c6fa4b38
--- /dev/null
+++ b/packaging/Caldera/UnixWare/smb.init
@@ -0,0 +1,76 @@
+#!/bin/sh
+#ident "@(#)samba.server 1.0 96/06/19 TK" /* SVr4.0 1.1.13.1*/
+#
+# Please send info on modifications to knuutila@cs.utu.fi
+#
+# This file should have uid root, gid sys and chmod 744
+#
+# Modified 17-Jul-99 by Ron Record (rr@sco.com) for use in SCO Skunkware
+#
+
+SAMBADIR=/usr/local/samba
+RCSCRIPT=/etc/rc2.d/S99samba
+
+if [ ! -d /usr/bin ]
+then # /usr not mounted
+ exit
+fi
+
+killproc() { # kill the named process(es)
+ if [ -f $SAMBADIR/var/locks/$1.pid ]
+ then
+ kill `cat $SAMBADIR/var/locks/$1.pid`
+ else
+ pid=`/usr/bin/ps -e |
+ /usr/bin/grep $1 |
+ /usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
+ [ "$pid" != "" ] && kill $pid
+ fi
+}
+
+start() {
+#
+# Edit these lines to suit your installation (paths, workgroup, host)
+#
+ $SAMBADIR/sbin/smbd -D -s $SAMBADIR/lib/smb.conf
+ $SAMBADIR/sbin/nmbd -D -s $SAMBADIR/lib/smb.conf
+}
+
+stop() {
+ killproc nmbd
+ killproc smbd
+}
+
+# Start/stop processes required for samba server
+
+case "$1" in
+
+'start')
+ start
+ ;;
+'stop')
+ stop
+ ;;
+'restart')
+ stop
+ start
+ ;;
+'enable')
+ if [ -h $RCSCRIPT ] ; then
+ echo "Samba is already enabled."
+ else
+ echo "Enabling Samba ... \c"
+ rm -f $RCSCRIPT
+ ln -s /etc/init.d/samba $RCSCRIPT
+ echo "Done"
+ fi
+ ;;
+'disable')
+ echo "Disabling Samba ... \c"
+ rm -f $RCSCRIPT
+ echo "Done"
+ ;;
+*)
+ echo "Usage: /etc/init.d/samba { start | stop | restart | enable | disable }"
+ ;;
+esac
diff --git a/packaging/Caldera/UnixWare/smbadduser b/packaging/Caldera/UnixWare/smbadduser
new file mode 100755
index 00000000000..2f38bf28f1a
--- /dev/null
+++ b/packaging/Caldera/UnixWare/smbadduser
@@ -0,0 +1,73 @@
+#!/bin/csh
+#
+# smbadduser - Written by Mike Zakharoff
+#
+unalias *
+set path = ($path)
+
+set smbpasswd = /etc/smbpasswd
+set user_map = /etc/smbusers
+#
+# Set to site specific passwd command
+#
+set passwd = "cat /etc/passwd"
+#set passwd = "niscat passwd.org_dir"
+#set passwd = "ypcat passwd"
+
+set line = "----------------------------------------------------------"
+if ($#argv == 0) then
+ echo $line
+ echo "Written: Mike Zakharoff email: michael.j.zakharoff@boeing.com"
+ echo ""
+ echo " 1) Updates $smbpasswd"
+ echo " 2) Updates $user_map"
+ echo " 3) Executes smbpasswd for each new user"
+ echo ""
+ echo "smbadduser unixid:ntid unixid:ntid ..."
+ echo ""
+ echo "Example: smbadduser zak:zakharoffm johns:smithj"
+ echo $line
+ exit 1
+endif
+
+touch $smbpasswd $user_map
+set new = ()
+foreach one ($argv)
+ echo $one | grep ':' >& /dev/null
+ if ($status != 0) then
+ echo "ERROR: Must use unixid:ntid like -> zak:zakharoffm"
+ continue
+ endif
+ set unix = `echo $one | awk -F: '{print $1}'`
+ set ntid = `echo $one | awk -F: '{print $2}'`
+
+ set usr = `eval $passwd | awk -F: '$1==USR {print $1}' USR=$unix`
+ if ($#usr != 1) then
+ echo "ERROR: $unix Not in passwd database SKIPPING..."
+ continue
+ endif
+ set tmp = `cat $smbpasswd | awk -F: '$1==USR {print $1}' USR=$unix`
+ if ($#tmp != 0) then
+ echo "ERROR: $unix is already in $smbpasswd SKIPPING..."
+ continue
+ endif
+
+ echo "Adding: $unix to $smbpasswd"
+ eval $passwd | \
+ awk -F: '$1==USR { \
+ printf( "%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:%s:%s:%s\n", $1, $3, $5, $6, $7) }' USR=$unix >> $smbpasswd
+ if ($unix != $ntid) then
+ echo "Adding: {$unix = $ntid} to $user_map"
+ echo "$unix = $ntid" >> $user_map
+ endif
+ set new = ($new $unix)
+end
+
+#
+# Enter password for new users
+#
+foreach one ($new)
+ echo $line
+ echo "ENTER password for $one"
+ smbpasswd $one
+end
diff --git a/packaging/Caldera/UnixWare/smbprint b/packaging/Caldera/UnixWare/smbprint
new file mode 100755
index 00000000000..ec083eede62
--- /dev/null
+++ b/packaging/Caldera/UnixWare/smbprint
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+# This script is an input filter for printcap printing on a unix machine. It
+# uses the smbclient program to print the file to the specified smb-based
+# server and service.
+# For example you could have a printcap entry like this
+#
+# smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint
+#
+# which would create a unix printer called "smb" that will print via this
+# script. You will need to create the spool directory /usr/spool/smb with
+# appropriate permissions and ownerships for your system.
+
+# Set these to the server and service you wish to print to
+# In this example I have a WfWg PC called "lapland" that has a printer
+# exported called "printer" with no password.
+
+#
+# Script further altered by hamiltom@ecnz.co.nz (Michael Hamilton)
+# so that the server, service, and password can be read from
+# a /var/spool/lpd/PRINTNAME/.config file.
+#
+# In order for this to work the /etc/printcap entry must include an
+# accounting file (af=...):
+#
+# cdcolour:\
+# :cm=CD IBM Colorjet on 6th:\
+# :sd=/var/spool/lpd/cdcolour:\
+# :af=/var/spool/lpd/cdcolour/acct:\
+# :if=/usr/local/etc/smbprint:\
+# :mx=0:\
+# :lp=/dev/null:
+#
+# The /usr/var/spool/lpd/PRINTNAME/.config file should contain:
+# server=PC_SERVER
+# service=PR_SHARENAME
+# password="password"
+#
+# E.g.
+# server=PAULS_PC
+# service=CJET_371
+# password=""
+
+#
+# Debugging log file, change to /dev/null if you like.
+#
+# logfile=/tmp/smb-print.log
+logfile=/dev/null
+
+
+#
+# The last parameter to the filter is the accounting file name.
+# Extract the directory name from the file name.
+# Concat this with /.config to get the config file.
+#
+eval acct_file=\${$#}
+spool_dir=`dirname $acct_file`
+config_file=$spool_dir/.config
+
+# Should read the following variables set in the config file:
+# server
+# service
+# password
+eval `cat $config_file`
+
+#
+# Some debugging help, change the >> to > if you want to same space.
+#
+echo "server $server, service $service" >> $logfile
+
+(
+# NOTE You may wish to add the line `echo translate' if you want automatic
+# CR/LF translation when printing.
+# echo translate
+ echo "print -"
+ cat
+) | /usr/bin/smbclient "\\\\$server\\$service" $password -U $server -N -P >> $logfile
diff --git a/packaging/Caldera/UnixWare/smbusers b/packaging/Caldera/UnixWare/smbusers
new file mode 100644
index 00000000000..ae3389f53f8
--- /dev/null
+++ b/packaging/Caldera/UnixWare/smbusers
@@ -0,0 +1,3 @@
+# Unix_name = SMB_name1 SMB_name2 ...
+root = administrator admin
+nobody = guest pcguest smbguest
diff --git a/packaging/Digital/Instructions b/packaging/Digital/Instructions
new file mode 100644
index 00000000000..f764ad350dd
--- /dev/null
+++ b/packaging/Digital/Instructions
@@ -0,0 +1,55 @@
+Copyright (C) 1997-1998 John H Terpstra
+E-mail: jht@samba.org
+
+Subject: Installation Instructions for Digital Unix v4.0
+--------------------------------------------------------
+
+1) cd /
+2) tar xvf [path-to-]/install.tar
+3) cd /usr/local/samba/lib
+4) vi smb.conf
+
+Now modify smb.conf to reflect your site needs.
+
+5) samba start
+
+To stop samba:
+
+ samba stop
+
+You could install samba to run from the system start-up scripts
+(recommended) by running ./setup.sh
+
+Start / Stop Samba as follows:-
+
+ samba [start | stop]
+
+
+Subject: Encrypted password support
+-----------------------------------
+
+Encrypted password support is quite distinct from Digital Enhanced
+Security Mode operation of the Unix system. Encrypted passwords
+applies to the SMB connections serviced by this machine, not to
+local user logons. Local user logons are services by the security
+system chosen by your system administrator.
+
+Digital Unix knows of either BASIC or ENHANCED security mode
+operation. BASIC mode uses the traditional /etc/passwd database
+containing Unix crypted passwords. ENHANCED mode uses a TCB database.
+Samba-1.9.18p10 has been modified so that if OSF1_ENH_SEC is defined
+at compile time then a password check will be made first using ENHANCED
+mode and if that fails then it will try BASIC mode. This is the case
+for this binary distribution - you need not recompile. In other
+words: this binary distribution will work with either security mode.
+
+To enable SMB encrypted password support do the following:
+
+1) Put /usr/local/samba/bin in your PATH
+2) Edit /usr/local/samba/lib/smb.conf and uncomment the
+ line "encrypt passwd = yes"
+3) Execute: smbpasswd -a "username" "password"
+
+The above will create your /usr/local/samba/private/smbpasswd file
+in which will be the NT and LanMAN hashed passwords.
+
diff --git a/packaging/Digital/PackageDate b/packaging/Digital/PackageDate
new file mode 100644
index 00000000000..360e4148aa0
--- /dev/null
+++ b/packaging/Digital/PackageDate
@@ -0,0 +1 @@
+November 14, 1998, Australia/Sydney
diff --git a/packaging/Digital/Packager b/packaging/Digital/Packager
new file mode 100644
index 00000000000..75252978dc1
--- /dev/null
+++ b/packaging/Digital/Packager
@@ -0,0 +1,2 @@
+Date: November 14, 1998
+Packager: John H Terpstra <jht@samba.org>
diff --git a/packaging/Digital/Packaging-instructions b/packaging/Digital/Packaging-instructions
new file mode 100644
index 00000000000..77eafd312f5
--- /dev/null
+++ b/packaging/Digital/Packaging-instructions
@@ -0,0 +1,14 @@
+The package building files should be located in a directory
+called: samba-2.0.0
+
+Step Directions
+==== ============================================
+1. Copy the samba distribution tarball into the packaging directory
+2. Make sure you have a installed on your system the GNU gzip/gunzip files
+3. Edit "package-prep" script as required
+4. Run "package-prep"
+
+If all goes well, you should now have a usable distribution package.
+
+Note: Update the Instructions file as required.
+
diff --git a/packaging/Digital/package-prep b/packaging/Digital/package-prep
new file mode 100755
index 00000000000..2daee8b69ef
--- /dev/null
+++ b/packaging/Digital/package-prep
@@ -0,0 +1,30 @@
+tar xvf skeleton.tar
+NOWDIR=`pwd`;
+( cd /usr/local;
+ if [ -x man ]; then mv man man.orig; fi
+ if [ -x samba ]; then mv samba samba.orig; fi
+ ln -sf $NOWDIR/usr/local/man man;
+ ln -sf $NOWDIR/usr/local/samba samba; )
+gunzip samba-2.0.0.tar.gz
+tar xvf samba-2.0.0.tar
+cd samba-2.0.0/source
+./configure
+make
+make install
+cd $NOWDIR/usr/local/samba
+cp -pr man ../
+rm -rf man
+cd $NOWDIR
+tar cvf install.tar usr var
+cd samba-2.0.0/source
+rm -f ../source/bin/*
+make clean
+cd ../..
+tar cvf samba-2.0.0.tar samba-2.0.0
+rm -rf samba-2.0.0
+rm -rf usr var
+cd ..
+find samba-2.0.0 -print | cpio -o > samba-2.0.0-OSF1-v4.0-beta5.cpio
+gzip samba-2.0.0-OSF1-v4.0-beta5.cpio
+cd samba-2.0.0
+tar xvf install.tar
diff --git a/packaging/Digital/samba.init b/packaging/Digital/samba.init
new file mode 100755
index 00000000000..6a742440890
--- /dev/null
+++ b/packaging/Digital/samba.init
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+if [ ! -d /usr/bin ]; then
+ echo "The /usr file system is not mounted."
+ exit 1
+fi
+
+killproc() {
+ pid=`/bin/ps ax | grep -w $1 | sed -e 's/^ *//' -e 's/ .*//'`
+ echo "Stopping $1 now."
+ [ "$pid" != "" ] && kill -15 $pid
+ echo $pid
+}
+
+
+# Start/stop processes required for samba server
+
+case "$1" in
+
+ 'start')
+ echo "Starting Samba"
+ /usr/local/samba/bin/smbd
+ /usr/local/samba/bin/nmbd
+ echo "Done."
+ ;;
+ 'stop')
+ killproc smbd
+ killproc nmbd
+ ;;
+ *)
+ echo "Usage: /sbin/init.d/samba.init [ start | stop ]"
+ ;;
+esac
+exit 0
diff --git a/packaging/Digital/setup.sh b/packaging/Digital/setup.sh
new file mode 100755
index 00000000000..81b04878bb1
--- /dev/null
+++ b/packaging/Digital/setup.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+echo "Setting up for SWAT - The Samba Web Administration Tool"
+
+echo 'swat 901/tcp' >> /etc/services
+uniq /etc/services /tmp/tempserv
+cp /tmp/tempserv /etc/services
+rm /tmp/tempserv
+echo 'swat stream tcp nowait.400 root /usr/local/samba/bin/swat swat' >> /etc/inetd.conf
+uniq /etc/inetd.conf /tmp/tempinetd
+cp /tmp/tempinetd /etc/inetd.conf
+rm /tmp/tempinetd
+echo "Creating Symbolic Links for Start up Scripts"
+cp -f samba.init /sbin/init.d
+chown bin.bin /sbin/init.d/samba.init
+chmod 750 /sbin/init.d/samba.init
+ln -sf /sbin/init.d/samba.init /sbin/rc0.d/K01samba
+ln -sf /sbin/init.d/samba.init /sbin/rc2.d/K91samba
+ln -sf /sbin/init.d/samba.init /sbin/rc3.d/S91samba
+echo "Done. Now settting up samba command"
+ln /sbin/init.d/samba.init /sbin/samba
+echo "Done."
+echo "To start / stop samba:"
+echo " execute: samba [start | stop]
diff --git a/packaging/Digital/skeleton.tar b/packaging/Digital/skeleton.tar
new file mode 100644
index 00000000000..92598d0c5e7
--- /dev/null
+++ b/packaging/Digital/skeleton.tar
Binary files differ
diff --git a/packaging/Example/Instructions b/packaging/Example/Instructions
new file mode 100644
index 00000000000..02ffa7b6a8c
--- /dev/null
+++ b/packaging/Example/Instructions
@@ -0,0 +1,41 @@
+Copyright (C) 1997-1998 Samba-Team
+E-mail: samba-binaries@samba.org
+
+Subject: Installation Instructions for SuperNewOS X.X
+--------------------------------------------------------
+
+1) cd /
+2) tar xvf [path-to-samba-package]/install.tar
+3) cd /usr/local/samba/lib
+4) vi smb.conf
+
+Now modify smb.conf to reflect your site needs.
+
+5) samba start
+
+To stop samba:
+
+ samba stop
+
+You could install samba to run from the system start-up scripts
+(recommended) by running ./setup.sh
+
+Start / Stop Samba as follows:-
+
+ samba [start | stop]
+
+
+Subject: New Users Must Read This
+-----------------------------------
+Above ALL else, read the smb.conf man pages _AND_ all text documentation.
+
+To enable SMB encrypted password support do the following:
+
+1) Put /usr/local/samba/bin in your PATH
+2) Edit /usr/local/samba/lib/smb.conf and uncomment the
+ line "encrypt passwd = yes"
+3) Execute: smbpasswd -a "username" "password"
+
+The above will create your /usr/local/samba/private/smbpasswd file
+in which will be the NT and LanMAN hashed passwords.
+
diff --git a/packaging/Example/PackageDate b/packaging/Example/PackageDate
new file mode 100644
index 00000000000..95cbb0972bf
--- /dev/null
+++ b/packaging/Example/PackageDate
@@ -0,0 +1 @@
+# Month, WeekDay, Date, Year, PreparerCity, Country
diff --git a/packaging/Example/Packager b/packaging/Example/Packager
new file mode 100644
index 00000000000..f5db3f8c303
--- /dev/null
+++ b/packaging/Example/Packager
@@ -0,0 +1 @@
+Packager: John Doe <doej@somewhere.org>
diff --git a/packaging/Example/Packaging-instructions b/packaging/Example/Packaging-instructions
new file mode 100644
index 00000000000..b598fd68b15
--- /dev/null
+++ b/packaging/Example/Packaging-instructions
@@ -0,0 +1,16 @@
+The package building files should be located in a
+directory called: samba-X.X.X
+
+Where X.X.X is the version ID.
+
+Step Directions
+==== ============================================
+1. Copy the samba distribution tarball into the packaging directory
+2. Make sure you have a installed on your system the GNU gzip/gunzip files
+3. Edit "package-prep" script as required
+4. Run "package-prep"
+
+If all goes well, you should now have a usable distribution package.
+
+Note: Update the Instructions file as required.
+
diff --git a/packaging/Example/package-prep b/packaging/Example/package-prep
new file mode 100755
index 00000000000..e8f5089a865
--- /dev/null
+++ b/packaging/Example/package-prep
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+# Extract the skeleton directory structure into which samba will be installed.
+tar xvf skeleton.tar
+
+# Now link the skeleton directory structure into the final install tree.
+( cd /usr/local;
+ mv man man.orig;
+ mv samba samba.orig;
+ NOWDIR=`pwd`;
+ ln -sf $NOWDIR/usr/local/man man;
+ ln -sf $NOWDIR/usr/local/samba samba; )
+
+# Unpack the master source tarball
+gunzip samba-X.X.X.tar.gz
+tar xvf samba-X.X.X.tar
+
+# Now build the binary files
+cd samba-X.X.X/source
+./configure
+make
+make install
+
+# Install into the packaging tree that full reflects the final install tree
+cd $NOWDIR/usr/local/samba
+cp -pr man ../
+rm -rf man
+cd $NOWDIR
+
+# Create the package tarball
+tar cvf install.tar usr var
+
+# Clean up original sources preserving all configured files
+# Note: This will allow installers to check build options
+cd samba-X.X.X/source
+rm -f ../source/bin/*
+make clean
+cd ../..
+tar cvf samba-X.X.X.tar samba-X.X.X
+rm -rf samba-X.X.X
+rm -rf usr var
+cd ..
+tar cvf samba-X.X.X-OS-Version-CPU.tar samba-X.X.X
+gzip samba-X.X.X-OS-Version-CPU.tar
+
+# We now have the distribution package, now restore our runtime system
+cd samba-X.X.X
+tar xcf install.tar
+
+# Please test operation before shipping the binary distribution package
+# to the samba-team.
diff --git a/packaging/Example/samba.init b/packaging/Example/samba.init
new file mode 100755
index 00000000000..c1d605cda06
--- /dev/null
+++ b/packaging/Example/samba.init
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+if [ ! -d /usr/bin ]; then
+ echo "The /usr file system is not mounted."
+ exit 1
+fi
+
+killproc() {
+ pid=`/bin/ps ax | grep -w $1 | sed -e 's/^ *//' -e 's/ .*//'`
+ echo "Stopping $1 now."
+ [ "$pid" != "" ] && kill -15 $pid
+ echo $pid
+}
+
+
+# Start/stop processes required for samba server
+
+case "$1" in
+
+ 'start')
+ echo "Starting Samba"
+ /usr/local/samba/sbin/smbd
+ /usr/local/samba/sbin/nmbd
+ echo "Done."
+ ;;
+ 'stop')
+ killproc smbd
+ killproc nmbd
+ ;;
+ *)
+ echo "Usage: /sbin/init.d/samba.init [ start | stop ]"
+ ;;
+esac
+exit 0
diff --git a/packaging/Example/setup.sh b/packaging/Example/setup.sh
new file mode 100755
index 00000000000..994b16d5ef0
--- /dev/null
+++ b/packaging/Example/setup.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# Note: This file MUST be edited to suit the target OS environment.
+#
+
+echo "Setting up for SWAT - The Samba Web Administration Tool"
+
+echo 'swat 901/tcp' >> /etc/services
+uniq /etc/services /tmp/tempserv
+cp /tmp/tempserv /etc/services
+rm /tmp/tempserv
+echo 'swat stream tcp nowait.400 root /usr/local/samba/bin/swat swat' >> /etc/inetd.conf
+uniq /etc/inetd.conf /tmp/tempinetd
+cp /tmp/tempinetd /etc/inetd.conf
+rm /tmp/tempinetd
+echo "Creating Symbolic Links for Start up Scripts"
+cp -f samba.init /sbin/init.d
+chown bin.bin /sbin/init.d/samba.init
+chmod 750 /sbin/init.d/samba.init
+ln -sf /sbin/init.d/samba.init /sbin/rc0.d/K01samba
+ln -sf /sbin/init.d/samba.init /sbin/rc2.d/K91samba
+ln -sf /sbin/init.d/samba.init /sbin/rc3.d/S91samba
+echo "Done. Now settting up samba command"
+ln /sbin/init.d/samba.init /sbin/samba
+echo "Done."
+echo "To start / stop samba:"
+echo " execute: samba [start | stop]
diff --git a/packaging/Example/skeleton.tar b/packaging/Example/skeleton.tar
new file mode 100644
index 00000000000..92598d0c5e7
--- /dev/null
+++ b/packaging/Example/skeleton.tar
Binary files differ
diff --git a/packaging/LSB/README b/packaging/LSB/README
new file mode 100644
index 00000000000..4ff0b99d769
--- /dev/null
+++ b/packaging/LSB/README
@@ -0,0 +1,6 @@
+README.lsb - 1 July 2001
+------------------------
+
+The files in this directory allow you to build an LSB-compliant
+version of SAMBA using the RPM software and the LSB development
+environment.
diff --git a/packaging/LSB/lsb-samba.spec b/packaging/LSB/lsb-samba.spec
new file mode 100644
index 00000000000..516eaa430eb
--- /dev/null
+++ b/packaging/LSB/lsb-samba.spec
@@ -0,0 +1,100 @@
+#
+# "$Id: lsb-samba.spec,v 1.2 2001/07/03 01:01:12 jra Exp $"
+#
+# Linux Standards Based RPM "spec" file for SAMBA.
+#
+
+Summary: SAMBA
+Name: lsb-samba
+Version: 2.2.1
+Release: 0
+Copyright: GPL
+Group: System Environment/Daemons
+Source: ftp://ftp.samba.org/pub/samba/samba-%{version}.tar.gz
+Url: http://www.samba.org
+Packager: Michael Sweet <mike@easysw.com>
+Vendor: SAMBA Team
+
+# Require the "lsb" package, which guarantees LSB compliance.
+Requires: lsb
+
+# use BuildRoot so as not to disturb the version already installed
+BuildRoot: /var/tmp/%{name}-root
+
+%description
+
+%prep
+%setup
+
+%build
+export LDFLAGS="-L/usr/lib/lsb --dynamic-linker=/lib/ld-lsb.so.1"
+
+./configure --with-fhs --prefix=/usr --sysconfdir=/etc \
+ --sharedstatedir=/var --datadir=/usr/share \
+ --with-configdir=/etc/samba \
+ --with-swatdir=/usr/share/samba/swat
+
+# If we got this far, all prerequisite libraries must be here.
+make
+
+%install
+# Make sure the RPM_BUILD_ROOT directory exists.
+rm -rf $RPM_BUILD_ROOT
+mkdir $RPM_BUILD_ROOT
+
+make \
+ BASEDIR=$RPM_BUILD_ROOT/usr \
+ BINDIR=$RPM_BUILD_ROOT/usr/bin \
+ CODEPAGEDIR=$RPM_BUILD_ROOT/usr/share/samba/codepages \
+ CONFIGDIR=$RPM_BUILD_ROOT/etc/samba \
+ INCLUDEDIR=$RPM_BUILD_ROOT/usr/include \
+ LIBDIR=$RPM_BUILD_ROOT/usr/lib \
+ LOCKDIR=$RPM_BUILD_ROOT/var/lock/samba \
+ LOGFILEBASE=$RPM_BUILD_ROOT/var/log/samba \
+ MANDIR=$RPM_BUILD_ROOT/usr/share/man \
+ SBINDIR=$RPM_BUILD_ROOT/usr/sbin \
+ SWATDIR=$RPM_BUILD_ROOT/usr/share/samba/swat \
+ VARDIR=$RPM_BUILD_ROOT/var \
+ install
+
+mkdir -p $RPM_BUILD_ROOT/etc/init.d
+install -m 700 packaging/LSB/samba.sh /etc/init.d/samba
+
+mkdir -p $RPM_BUILD_ROOT/etc/samba
+install -m 644 packaging/LSB/smb.conf /etc/samba
+
+mkdir -p $RPM_BUILD_ROOT/etc/xinetd.d
+install -m 644 packaging/LSB/samba.xinetd /etc/xinetd.d/samba
+
+%post
+/usr/lib/lsb/install_initd /etc/init.d/samba
+
+%preun
+/usr/lib/lsb/remove_initd /etc/init.d/samba
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+%dir /etc/init.d
+/etc/init.d/samba
+%dir /etc/samba
+%config(noreplace) /etc/samba/smb.conf
+%dir /etc/samba/private
+%dir /etc/xinetd.d
+%config(noreplace) /etc/xinetd.d/samba
+%dir /usr/bin
+/usr/bin/*
+%dir /usr/sbin
+/usr/sbin/*
+%dir /usr/share/man
+/usr/share/man/*
+%dir /usr/share/samba
+/usr/share/samba/*
+%dir /var/lock/samba
+%dir /var/log/samba
+
+#
+# End of "$Id: lsb-samba.spec,v 1.2 2001/07/03 01:01:12 jra Exp $".
+#
diff --git a/packaging/LSB/samba.sh b/packaging/LSB/samba.sh
new file mode 100755
index 00000000000..99fa1b0117d
--- /dev/null
+++ b/packaging/LSB/samba.sh
@@ -0,0 +1,80 @@
+#!/bin/sh
+#
+# "$Id: samba.sh,v 1.2 2001/07/03 01:01:12 jra Exp $"
+#
+# SAMBA startup (init) script for LSB-compliant systems.
+#
+# Provides: smbd nmbd
+# Required-Start: 3 5
+# Required-Stop: 0 2 1 6
+# Default-Start: 3 5
+# Default-Stop: 0 2 1 6
+# Description: Starts and stops the SAMBA smbd and nmbd daemons \
+# used to provide SMB network services.
+#
+
+# Source LSB function library.
+. /lib/lsb/init-functions
+
+# Check that smb.conf exists.
+if test ! -f /etc/samba/smb.conf; then
+ log_failure_msg "The smb.conf file does not exist."
+ exit 6
+fi
+
+# Make sure that smbd and nmbd exist...
+if test ! -f /usr/sbin/nmbd -o ! -f /usr/sbin/smbd; then
+ log_failure_msg "The nmbd and/or smbd daemons are not installed."
+ exit 5
+fi
+
+# See how we were called.
+case "$1" in
+ start)
+ start_daemon nmbd -D
+ start_daemon smbd -D
+ log_success_msg "Started SMB services."
+ ;;
+
+ stop)
+ killproc smbd
+ killproc nmbd
+ log_success_msg "Shutdown SMB services."
+ ;;
+
+ reload)
+ # smbd and nmbd automatically re-read the smb.conf file...
+ log_success_msg "Reload not necessary with SAMBA."
+ ;;
+
+ status)
+ if test -z "`pidofproc smbd`"; then
+ log_success_msg "smbd is not running."
+ else
+ log_success_msg "smbd is running."
+ fi
+ if test -z "`pidofproc nmbd`"; then
+ log_success_msg "nmbd is not running."
+ else
+ log_success_msg "nmbd is running."
+ fi
+ ;;
+
+
+ restart | force-reload)
+ $0 stop
+ $0 start
+ ;;
+
+ *)
+ echo "Usage: smb {start|stop|reload|force-reload|restart|status}"
+ exit 1
+ ;;
+esac
+
+# Return "success"
+exit 0
+
+#
+# End of "$Id: samba.sh,v 1.2 2001/07/03 01:01:12 jra Exp $".
+#
diff --git a/packaging/LSB/samba.xinetd b/packaging/LSB/samba.xinetd
new file mode 100644
index 00000000000..8c38b354218
--- /dev/null
+++ b/packaging/LSB/samba.xinetd
@@ -0,0 +1,15 @@
+# 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.
+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/packaging/LSB/smb.conf b/packaging/LSB/smb.conf
new file mode 100644
index 00000000000..71ff9463884
--- /dev/null
+++ b/packaging/LSB/smb.conf
@@ -0,0 +1,290 @@
+# 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
+#
+# 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
+ workgroup = MYGROUP
+
+# server string is the equivalent of the NT Description field
+ server string = Samba Server
+
+# This option is important for security. It allows you to restrict
+# connections to machines which are on your local network. The
+# following example restricts access to two C class networks and
+# the "loopback" interface. For more examples of the syntax see
+# the smb.conf man page
+; hosts allow = 192.168.1. 192.168.2. 127.
+
+# if you want to automatically load your printer list rather
+# than setting them up individually then you'll need this
+ printcap name = /etc/printcap
+ load printers = yes
+
+# It should not be necessary to spell out the print system type unless
+# yours is non-standard. Currently supported print systems include:
+# bsd, sysv, plp, lprng, aix, hpux, qnx
+; printing = bsd
+
+# 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
+
+# Security mode. Most people will want user level security. See
+# security_level.txt for details.
+ security = user
+# Use password server option only with security = server
+; password server = <NT-Server-Name>
+
+# Password Level allows matching of _n_ characters of the password for
+# all combinations of upper and lower case.
+; password level = 8
+; username level = 8
+
+# You may wish to use password encryption. Please read
+# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
+# Do not enable this option unless you have read those documents
+; encrypt passwords = yes
+; smb passwd file = /etc/samba/smbpasswd
+
+# The following are needed to allow password changing from Windows to
+# update the Linux sytsem password also.
+# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
+# NOTE2: You do NOT need these to allow workstations to change only
+# the encrypted SMB passwords. They allow the Unix password
+# to be kept in sync with the SMB password.
+; unix password sync = Yes
+; passwd program = /usr/bin/passwd %u
+; passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
+
+# Unix users can map to different SMB User names
+; username map = /etc/samba/smbusers
+
+# 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
+; include = /etc/samba/smb.conf.%m
+
+# Most people will find that this option gives better performance.
+# See speed.txt and the manual pages for details
+ socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
+
+# 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
+
+# Configure remote browse list synchronisation here
+# request announcement to, or browse list sync from:
+# a specific host or from / to a whole subnet (see below)
+; remote browse sync = 192.168.3.25 192.168.5.255
+# Cause this host to announce itself to local subnets here
+; remote announce = 192.168.1.255 192.168.2.44
+
+# 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
+
+# Use only if you have an NT server on your network that has been
+# configured at install time to be a primary domain controller.
+; domain controller = <NT-Domain-Controller-SMBName>
+
+# 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
+
+# All NetBIOS names must be resolved to IP Addresses
+# 'Name Resolve Order' allows the named resolution mechanism to be specified
+# the default order is "host lmhosts wins bcast". "host" means use the unix
+# system gethostbyname() function call that will use either /etc/hosts OR
+# DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf
+# and the /etc/resolv.conf file. "host" therefore is system configuration
+# dependant. This parameter is most often of use to prevent DNS lookups
+# in order to resolve NetBIOS names to IP Addresses. Use with care!
+# The example below excludes use of name resolution for machines that are NOT
+# on the local network segment
+# - OR - are not deliberately to be known via lmhosts or via WINS.
+; name resolve order = wins lmhosts bcast
+
+# 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 built-in default for versions 1.9.17 is yes,
+# this has been changed in version 1.9.18 to no.
+ dns proxy = no
+
+# Case Preservation can be handy - system default is _no_
+# NOTE: These can be set on a per share basis
+; preserve case = no
+; short preserve case = no
+# Default case is normally upper case for all DOS files
+; default case = lower
+# Be very careful with case sensitivity - it can break things!
+; case sensitive = no
+
+#============================ 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 = /home/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 = /home/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
+; read only = yes
+; 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/packaging/Mandrake/.cvsignore b/packaging/Mandrake/.cvsignore
new file mode 100644
index 00000000000..ffcc2e7e5ee
--- /dev/null
+++ b/packaging/Mandrake/.cvsignore
@@ -0,0 +1,2 @@
+makerpms.sh
+samba2.spec
diff --git a/packaging/Mandrake/README b/packaging/Mandrake/README
new file mode 100644
index 00000000000..1c5bb30edc0
--- /dev/null
+++ b/packaging/Mandrake/README
@@ -0,0 +1,11 @@
+Preparation Date: Sat Apr 14 2001
+Preparer: John H Terpstra <jht@samba.org>
+
+Instructions: Preparing Samba Packages for Mandrake Linux 7.2
+===============================================================
+
+We provide support only for current versions of Mandrake Linux.
+
+To produce the RPMS simply type:
+ sh makerpms.sh
+
diff --git a/packaging/Mandrake/empty.patch b/packaging/Mandrake/empty.patch
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/packaging/Mandrake/empty.patch
diff --git a/packaging/Mandrake/findsmb b/packaging/Mandrake/findsmb
new file mode 100755
index 00000000000..986c2481779
--- /dev/null
+++ b/packaging/Mandrake/findsmb
@@ -0,0 +1,141 @@
+#!/usr/bin/perl
+#
+# Prints info on all smb responding machines on a subnet.
+# This script needs to be run on a machine without nmbd running and be
+# run as root to get correct info from WIN95 clients.
+#
+# syntax:
+# findsmb [subnet broadcast address]
+#
+# with no agrument it will list machines on the current subnet
+#
+# There will be a "+" in front of the workgroup name for machines that are
+# local master browsers for that workgroup. There will be an "*" in front
+# of the workgroup name for machines that are the domain master browser for
+# that workgroup.
+#
+
+$SAMBABIN = "/usr/bin";
+
+for ($i = 0; $i < 2; $i++) { # test for -d option and broadcast address
+ $_ = shift;
+ if (m/-d|-D/) {
+ $DEBUG = 1;
+ } else {
+ if ($_) {
+ $BCAST = "-B $_";
+ }
+ }
+}
+
+sub ipsort # do numeric sort on last field of IP address
+{
+ @t1 = split(/\./,$a);
+ @t2 = split(/\./,$b);
+ @t1[3] <=> @t2[3];
+}
+
+# look for all machines that respond to a name lookup
+
+open(NMBLOOKUP,"$SAMBABIN/nmblookup $BCAST '*'|") ||
+ die("Can't run nmblookup '*'.\n");
+
+# get rid of all lines that are not a response IP address,
+# strip everything but IP address and sort by last field in address
+
+@ipaddrs = sort ipsort grep(s/ \*<00>.*$//,<NMBLOOKUP>);
+
+# print header info
+
+print "\nIP ADDR NETBIOS NAME WORKGROUP/OS/VERSION $BCAST\n";
+print "---------------------------------------------------------------------\n";
+
+foreach $ip (@ipaddrs) # loop through each IP address found
+{
+ $ip =~ s/\n//; # strip newline from IP address
+
+# find the netbios names registered by each machine
+
+ open(NMBLOOKUP,"$SAMBABIN/nmblookup -r -A $ip|") ||
+ die("Can't get nmb name list.\n");
+ @nmblookup = <NMBLOOKUP>;
+ close NMBLOOKUP;
+
+# get the first <00> name
+
+ @name = grep(/<00>/,@nmblookup);
+ $_ = @name[0];
+ if ($_) { # we have a netbios name
+ if (/GROUP/) { # is it a group name
+ ($name, $aliases, $type, $length, @addresses) =
+ gethostbyaddr(pack('C4',split('\.',$ip)),2);
+ if (! $name) { # could not get name
+ $name = "unknown nis name";
+ }
+ } else {
+ /(\S+)/;
+ $name = $1;
+ }
+
+# do an smbclient command on the netbios name.
+
+ open(SMB,"$SAMBABIN/smbclient -N -L $name -I $ip -U% |") ||
+ die("Can't do smbclient command.\n");
+ @smb = <SMB>;
+ close SMB;
+
+ if ($DEBUG) { # if -d flag print results of nmblookup and smbclient
+ print "===============================================================\n";
+ print @nmblookup;
+ print @smb;
+ }
+
+# look for the OS= string
+
+ @info = grep(/OS=/,@smb);
+ $_ = @info[0];
+ if ($_) { # we found response
+ s/Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter
+
+ } else { # no OS= string in response (WIN95 client)
+
+# for WIN95 clients get workgroup name from nmblookup response
+ @name = grep(/<00> - <GROUP>/,@nmblookup);
+ $_ = @name[0];
+ if ($_) {
+ /(\S+)/;
+ $_ = "[$1]";
+ } else {
+ $_ = "Unknown Workgroup";
+ }
+ }
+
+# see if machine registered a local master browser name
+ if (grep(/<1d>/,@nmblookup)) {
+ $master = '+'; # indicate local master browser
+ if (grep(/<1b>/,@nmblookup)) { # how about domain master browser?
+ $master = '*'; # indicate domain master browser
+ }
+ } else {
+ $master = ' '; # not a browse master
+ }
+
+# line up info in 3 columns
+
+ print "$ip".' 'x(16-length($ip))."$name".' 'x(14-length($name))."$master"."$_\n";
+
+ } else { # no netbios name found
+# try getting the host name
+ ($name, $aliases, $type, $length, @addresses) =
+ gethostbyaddr(pack('C4',split('\.',$ip)),2);
+ if (! $name) { # could not get name
+ $name = "unknown nis name";
+ }
+ if ($DEBUG) { # if -d flag print results of nmblookup
+ print "===============================================================\n";
+ print @nmblookup;
+ }
+ print "$ip".' 'x(16-length($ip))."$name\n";
+ }
+}
+
diff --git a/packaging/Mandrake/makerpms.sh.tmpl b/packaging/Mandrake/makerpms.sh.tmpl
new file mode 100644
index 00000000000..c4ad9c6b581
--- /dev/null
+++ b/packaging/Mandrake/makerpms.sh.tmpl
@@ -0,0 +1,16 @@
+#!/bin/sh
+# Copyright (C) 1998 John H Terpstra, 1999 K Spoon
+#
+SPECDIR=/usr/src/RPM/SPECS
+SRCDIR=/usr/src/RPM/SOURCES
+USERID=`id -u`
+GRPID=`id -g`
+VERSION='PVERSION'
+
+( cd ../../.. ; mv samba samba-$VERSION; chown -R ${USERID}.${GRPID} ${SRCDIR}/samba-$VERSION )
+( cd ../../.. ; tar --exclude=CVS -czvf ${SRCDIR}/samba-$VERSION.tar.gz samba-$VERSION )
+( cd ../../.. ; mv samba-$VERSION samba )
+cp -a *.spec $SPECDIR
+cp -a *.patch smb.* samba.log $SRCDIR
+cd $SPECDIR
+rpm -ba -v samba2.spec
diff --git a/packaging/Mandrake/samba.log b/packaging/Mandrake/samba.log
new file mode 100644
index 00000000000..7dc1667bafe
--- /dev/null
+++ b/packaging/Mandrake/samba.log
@@ -0,0 +1,15 @@
+/var/log/samba/log.nmbd {
+ notifempty
+ missingok
+ postrotate
+ /usr/bin/killall -HUP nmbd
+ endscript
+}
+
+/var/log/samba/log.smbd {
+ notifempty
+ missingok
+ postrotate
+ /usr/bin/killall -HUP smbd
+ endscript
+}
diff --git a/packaging/Mandrake/samba.pamd b/packaging/Mandrake/samba.pamd
new file mode 100644
index 00000000000..30912de1726
--- /dev/null
+++ b/packaging/Mandrake/samba.pamd
@@ -0,0 +1,5 @@
+#%PAM-1.0
+auth required /lib/security/pam_nologin.so
+auth required /lib/security/pam_stack.so service=system-auth
+account required /lib/security/pam_stack.so service=system-auth
+session required /lib/security/pam_stack.so service=system-auth
diff --git a/packaging/Mandrake/samba.xinetd b/packaging/Mandrake/samba.xinetd
new file mode 100644
index 00000000000..a6dea1f7405
--- /dev/null
+++ b/packaging/Mandrake/samba.xinetd
@@ -0,0 +1,15 @@
+# default: on
+# 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.
+service swat
+{
+ port = 901
+ socket_type = stream
+ wait = no
+ only_from = localhost
+ user = root
+ server = /usr/sbin/swat
+ log_on_failure += USERID
+ disable = no
+}
diff --git a/packaging/Mandrake/samba2.spec.tmpl b/packaging/Mandrake/samba2.spec.tmpl
new file mode 100644
index 00000000000..5bc92535f80
--- /dev/null
+++ b/packaging/Mandrake/samba2.spec.tmpl
@@ -0,0 +1,300 @@
+Summary: Samba SMB client and server
+Name: samba
+Version: PVERSION
+Release: PRELEASE
+Copyright: GNU GPL version 2
+Group: Networking
+Source: ftp://samba.org/pub/samba/samba-%{version}.tar.gz
+Packager: Gerald (Jerry) Carter [Samba-Team] <jerry@samba.org>
+Requires: pam >= 0.72 kernel >= 2.2.1 glibc >= 2.1.2
+Prereq: chkconfig fileutils
+BuildRoot: /var/tmp/samba
+Prefix: /usr
+
+%description
+Samba provides an SMB server which can be used to provide
+network services to SMB (sometimes called "Lan Manager")
+clients, including various versions of MS Windows, OS/2,
+and other Linux machines. Samba also provides some SMB
+clients, which complement the built-in SMB filesystem
+in Linux. Samba uses NetBIOS over TCP/IP (NetBT) protocols
+and does NOT need NetBEUI (Microsoft Raw NetBIOS frame)
+protocol.
+
+Samba-2.2 features working NT Domain Control capability and
+includes the SWAT (Samba Web Administration Tool) that
+allows samba's smb.conf file to be remotely managed using your
+favourite web browser. For the time being this is being
+enabled on TCP port 901 via inetd.
+
+Users are advised to use Samba-2.2 as a Windows NT4
+Domain Controller only on networks that do NOT have a Windows
+NT Domain Controller. This release does NOT as yet have
+Backup Domain control ability.
+
+Please refer to the WHATSNEW.txt document for fixup information.
+This binary release includes encrypted password support.
+
+Please read the smb.conf file and ENCRYPTION.txt in the
+docs directory for implementation details.
+
+%changelog
+* Mon May 21 2001 Gerald (Jerry) Carter <jerry@samba.org>
+ - removed docs/htmldocs and docs/manpages from /usr/share/docs
+ These het installed in /usr/share/swat already
+ - Fix for codepages and src not getting installed in the RPM
+ - Fixed minor typos
+
+* Mon Apr 23 2001 Gerald (Jerry) Carter <jerry@samba.org>
+ - Added a few bug fixes to release the first Mandrake RPMS
+
+* Sat Apr 14 2001 John H Terpstra <jht@samba.org>
+ - Added official samba-team support for Mandrakesoft
+ - We get a lot of requests for this!
+
+%prep
+%setup
+
+%build
+cd source
+
+%ifarch ia64
+libtoolize --copy --force # get it to recognize IA-64
+autoconf
+autoheader
+EXTRA="-D_LARGEFILE64_SOURCE"
+%endif
+
+NUMCPU=`grep processor /proc/cpuinfo | wc -l`
+
+CFLAGS="$RPM_OPT_FLAGS $EXTRA" ./configure \
+ --prefix=%{prefix} \
+ --with-fhs \
+ --libdir=/etc/samba \
+ --localstatedir=/var \
+ --with-codepagedir=%{prefix}/share/samba/codepages \
+ --with-configdir=/etc/samba \
+ --with-lockdir=/var/lock/samba \
+ --with-swatdir=%{prefix}/share/swat \
+ --with-quotas \
+ --with-smbmount \
+ --with-pam \
+ --with-pam_smbpass \
+ --with-syslog \
+ --with-utmp \
+ --with-netatalk \
+ --with-sambabook=%{prefix}/share/swat/using_samba
+
+make -j${NUMCPU} proto
+make -j${NUMCPU} all smbfilter nsswitch/libnss_wins.so debug2html
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d,samba,xinetd.d}
+mkdir -p $RPM_BUILD_ROOT/etc/samba/security
+mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
+mkdir -p $RPM_BUILD_ROOT/lib/security
+mkdir -p $RPM_BUILD_ROOT%{prefix}/{bin,sbin}
+mkdir -p $RPM_BUILD_ROOT/home/samba
+mkdir -p $RPM_BUILD_ROOT/sbin
+mkdir -p $RPM_BUILD_ROOT%{prefix}/share/swat/{images,help,include}
+mkdir -p $RPM_BUILD_ROOT%{prefix}/share/samba/codepages/src
+mkdir -p $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba/{figs,gifs}
+mkdir -p $RPM_BUILD_ROOT%{prefix}/share/man/{man1,man5,man7,man8}
+mkdir -p $RPM_BUILD_ROOT/var/lock/samba
+mkdir -p $RPM_BUILD_ROOT/var/log/samba
+mkdir -p $RPM_BUILD_ROOT/var/spool/samba
+
+# Install standard binary files
+for i in nmblookup smbclient smbpasswd smbstatus testparm testprns \
+ make_smbcodepage make_unicodemap make_printerdef rpcclient smbspool \
+ smbmount smbumount smbmnt
+do
+ install -m755 -s source/bin/$i $RPM_BUILD_ROOT%{prefix}/bin
+done
+for i in smbtar
+do
+ install -m755 source/script/$i $RPM_BUILD_ROOT%{prefix}/bin
+done
+
+# Install secure binary files
+for i in smbd nmbd swat debug2html smbfilter
+do
+ install -m755 -s source/bin/$i $RPM_BUILD_ROOT%{prefix}/sbin
+done
+
+# we need a symlink for mount to recognise the smb and smbfs filesystem types
+ln -sf %{prefix}/bin/smbmount $RPM_BUILD_ROOT/sbin/mount.smbfs
+ln -sf %{prefix}/bin/smbmount $RPM_BUILD_ROOT/sbin/mount.smb
+
+# Install codepage source files
+for i in 437 737 775 850 852 861 866 932 936 949 950 1251; do
+ install -m644 source/codepages/codepage_def.$i $RPM_BUILD_ROOT%{prefix}/share/samba/codepages/src
+done
+for i in 437 737 850 852 861 866 932 936 949 950 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R; do
+ install -m644 source/codepages/CP$i.TXT $RPM_BUILD_ROOT%{prefix}/share/samba/codepages/src
+done
+
+# Install the nsswitch library extenstion file
+install -m755 source/nsswitch/libnss_wins.so $RPM_BUILD_ROOT/lib
+# Make link for wins resolver
+( cd $RPM_BUILD_ROOT/lib; ln -s libnss_wins.so libnss_wins.so.2; )
+
+# PAM Authentication file
+install -m755 source/bin/pam_smbpass.so $RPM_BUILD_ROOT/lib/security
+
+# Install SWAT helper files
+for i in swat/help/*.html docs/htmldocs/*.html; do
+ install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/help
+done
+for i in swat/images/*.gif; do
+ install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/images
+done
+for i in swat/include/*.html; do
+ install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/include
+done
+
+# This is the O'Reily Samba Book - on-line
+for i in docs/htmldocs/using_samba/*.html; do
+ install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba
+done
+for i in docs/htmldocs/using_samba/figs/*.gif; do
+ install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba/figs
+done
+for i in docs/htmldocs/using_samba/gifs/*.gif; do
+ install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba/gifs
+done
+
+# Install the miscellany
+install -m644 swat/README $RPM_BUILD_ROOT%{prefix}/share/swat
+# Install level 1 man pages
+for i in *.1; do
+ install -m644 docs/manpages/$i $RPM_BUILD_ROOT%{prefix}/share/man/man1
+done
+install -m644 docs/manpages/smb.conf.5 $RPM_BUILD_ROOT%{prefix}/share/man/man5
+install -m644 docs/manpages/lmhosts.5 $RPM_BUILD_ROOT%{prefix}/share/man/man5
+install -m644 docs/manpages/smbpasswd.5 $RPM_BUILD_ROOT%{prefix}/share/man/man5
+
+install -m644 docs/manpages/samba.7 $RPM_BUILD_ROOT%{prefix}/share/man/man7
+
+install -m644 docs/manpages/smbd.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8
+install -m644 docs/manpages/nmbd.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8
+install -m644 docs/manpages/smbpasswd.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8
+install -m644 docs/manpages/swat.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8
+install -m644 docs/manpages/smbmount.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8
+install -m644 docs/manpages/smbmnt.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8
+install -m644 docs/manpages/smbumount.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8
+install -m644 docs/manpages/smbspool.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8
+
+install -m644 swat/README $RPM_BUILD_ROOT%{prefix}/share/swat
+
+install -m644 packaging/Mandrake/smb.con* $RPM_BUILD_ROOT/etc/samba/
+install -m644 packaging/Mandrake/smbusers $RPM_BUILD_ROOT/etc/samba/smbusers
+install -m755 packaging/Mandrake/smbprint $RPM_BUILD_ROOT%{prefix}/bin
+install -m755 packaging/Mandrake/findsmb $RPM_BUILD_ROOT%{prefix}/bin
+install -m755 packaging/Mandrake/smb.init $RPM_BUILD_ROOT/etc/rc.d/init.d/smb
+install -m755 packaging/Mandrake/smb.init $RPM_BUILD_ROOT%{prefix}/sbin/samba
+install -m644 packaging/Mandrake/samba.pamd $RPM_BUILD_ROOT/etc/pam.d/samba
+install -m644 packaging/Mandrake/samba.log $RPM_BUILD_ROOT/etc/logrotate.d/samba
+install -m644 packaging/Mandrake/samba.xinetd $RPM_BUILD_ROOT/etc/xinetd.d/swat
+echo 127.0.0.1 localhost > $RPM_BUILD_ROOT/etc/samba/lmhosts
+
+##
+## remove these directories so they don't get installed twice
+##
+/bin/rm -rf docs/htmldocs
+/bin/rm -rf docs/manpages
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+/sbin/chkconfig --add smb
+/sbin/chkconfig smb off
+
+# Build codepage load files
+cd %{prefix}/share/samba/codepages
+for i in 437 737 775 850 852 861 866 932 936 949 950 1251
+do
+%{prefix}/bin/make_smbcodepage c $i %{prefix}/share/samba/codepages/src/codepage_def.$i %{prefix}/share/samba/codepages/codepage.$i
+done
+for i in 437 737 850 852 861 866 932 936 949 950 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R
+do
+%{prefix}/bin/make_unicodemap $i %{prefix}/share/samba/codepages/src/CP$i.TXT %{prefix}/share/samba/codepages/unicode_map.$i
+done
+
+# Add swat entry to /etc/services if not already there
+if !( grep ^[:space:]*swat /etc/services > /dev/null ) then
+ echo 'swat 901/tcp # Add swat service used via inetd' >> /etc/services
+fi
+
+%preun
+if [ $1 = 0 ] ; then
+ /sbin/chkconfig --del smb
+
+ # We want to remove the browse.dat file
+ if [ -e /var/lock/samba/browse.dat ]; then
+ rm -f /var/lock/samba/browse.dat
+ fi
+fi
+
+%postun
+# Only delete remnants of samba if this is the final deletion.
+if [ $1 = 0 ] ; then
+ if [ -x /etc/pam.d/samba ]; then
+ rm -f /etc/pam.d/samba
+ fi
+ if [ -e /var/log/samba ]; then
+ rm -rf /var/log/samba
+ fi
+ if [ -e /var/lock/samba ]; then
+ rm -rf /var/lock/samba
+ fi
+
+ # Remove swat entries from /etc/inetd.conf and /etc/services
+ cd /etc
+ tmpfile=/etc/tmp.$$
+ sed -e '/^[:space:]*swat.*$/d' /etc/services > $tmpfile
+ mv $tmpfile services
+fi
+
+%triggerpostun -- samba < samba-2.0.0
+if [ $0 != 0 ]; then
+ /sbin/chkconfig --add smb
+fi
+
+%files
+%doc README COPYING Manifest Read-Manifest-Now
+%doc WHATSNEW.txt Roadmap
+%doc docs
+%doc swat/README
+%doc examples
+%attr(-,root,root) %{prefix}/sbin/*
+%attr(-,root,root) /sbin/*
+%attr(-,root,root) %{prefix}/bin/*
+%attr(755,root,root) /lib/*
+%attr(-,root,root) %{prefix}/share/swat/help/*
+%attr(-,root,root) %{prefix}/share/swat/images/*
+%attr(-,root,root) %{prefix}/share/swat/include/*
+%attr(-,root,root) %{prefix}/share/swat/using_samba/*
+%attr(-,root,root) %config(noreplace) /etc/samba/lmhosts
+%attr(-,root,root) %config(noreplace) /etc/samba/smb.conf
+%attr(-,root,root) %config(noreplace) /etc/samba/smbusers
+%attr(-,root,root) /etc/rc.d/init.d/smb
+%attr(-,root,root) /etc/logrotate.d/samba
+%attr(-,root,root) %config(noreplace) /etc/pam.d/samba
+%attr(-,root,root) %{prefix}/share/man/man1/*
+%attr(-,root,root) %{prefix}/share/man/man5/*
+%attr(-,root,root) %{prefix}/share/man/man7/*
+%attr(-,root,root) %{prefix}/share/man/man8/*
+%attr(-,root,root) %dir /etc/samba/
+%attr(-,root,root) %dir /usr/share/samba/codepages/*
+%attr(-,root,root) %dir /usr/share/samba/codepages/src/*
+%attr(-,root,root) %dir /var/lock/samba
+%attr(-,root,root) %dir /var/log/samba
+%attr(1777,root,root) %dir /var/spool/samba
+
+
+
diff --git a/packaging/Mandrake/smb.conf b/packaging/Mandrake/smb.conf
new file mode 100644
index 00000000000..a14e90ec16b
--- /dev/null
+++ b/packaging/Mandrake/smb.conf
@@ -0,0 +1,320 @@
+# 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
+#
+# 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
+ workgroup = MDKGROUP
+
+# server string is the equivalent of the NT Description field
+ server string = Samba Server %v
+
+# 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.
+
+# Enabling internationalization:
+# you can match a Windows code page with a UNIX character set.
+# Windows: 437 (US), 737 (GREEK), 850 (Latin1 - Western European),
+# 852 (Eastern Eu.), 861 (Icelandic), 932 (Cyrillic - Russian),
+# 936 (Japanese - Shift-JIS), 936 (Simpl. Chinese), 949 (Korean Hangul),
+# 950 (Trad. Chin.).
+# UNIX: ISO8859-1 (Western European), ISO8859-2 (Eastern Eu.),
+# ISO8859-5 (Russian Cyrillic), KOI8-R (Alt-Russ. Cyril.)
+# This is an example for french users:
+; client code page = 850
+; character set = ISO8859-1
+
+
+# CHANGES TO ENABLE PRINTING ON ALL CUPS PRINTERS IN THE NETWORK
+# (as cups is now used in linux-mandrake 7.2 by default)
+# if you want to automatically load your printer list rather
+# than setting them up individually then you'll need this
+ printcap name = lpstat
+ load printers = yes
+
+# It should not be necessary to spell out the print system type unless
+# yours is non-standard. Currently supported print systems include:
+# bsd, sysv, plp, lprng, aix, hpux, qnx, cups
+ 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
+
+# Security mode. Most people will want user level security. See
+# security_level.txt for details.
+ security = user
+# Use password server option only with security = server
+; password server = <NT-Server-Name>
+
+# Password Level allows matching of _n_ characters of the password for
+# all combinations of upper and lower case.
+; password level = 8
+; username level = 8
+
+# You may wish to use password encryption. Please read
+# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
+# Do not enable this option unless you have read those documents
+; encrypt passwords = yes
+; smb passwd file = /etc/samba/private/smbpasswd
+
+# The following are needed to allow password changing from Windows to
+# update the Linux sytsem password also.
+# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
+# NOTE2: You do NOT need these to allow workstations to change only
+# the encrypted SMB passwords. They allow the Unix password
+# to be kept in sync with the SMB password.
+; unix password sync = Yes
+; passwd program = /usr/bin/passwd %u
+; passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
+
+# Unix users can map to different SMB User names
+; username map = /etc/smbusers
+
+# 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
+; include = /etc/smb.conf.%m
+
+# Most people will find that this option gives better performance.
+# See speed.txt and the manual pages for details
+ socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
+
+# 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
+
+# Configure remote browse list synchronisation here
+# request announcement to, or browse list sync from:
+# a specific host or from / to a whole subnet (see below)
+; remote browse sync = 192.168.3.25 192.168.5.255
+# Cause this host to announce itself to local subnets here
+; remote announce = 192.168.1.255 192.168.2.44
+
+# 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
+
+# All NetBIOS names must be resolved to IP Addresses
+# 'Name Resolve Order' allows the named resolution mechanism to be specified
+# the default order is "host lmhosts wins bcast". "host" means use the unix
+# system gethostbyname() function call that will use either /etc/hosts OR
+# DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf
+# and the /etc/resolv.conf file. "host" therefore is system configuration
+# dependant. This parameter is most often of use to prevent DNS lookups
+# in order to resolve NetBIOS names to IP Addresses. Use with care!
+# The example below excludes use of name resolution for machines that are NOT
+# on the local network segment
+# - OR - are not deliberately to be known via lmhosts or via WINS.
+; name resolve order = wins lmhosts bcast
+
+# 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 built-in default for versions 1.9.17 is yes,
+# this has been changed in version 1.9.18 to no.
+ dns proxy = no
+
+# Case Preservation can be handy - system default is _no_
+# NOTE: These can be set on a per share basis
+; preserve case = no
+; short preserve case = no
+# Default case is normally upper case for all DOS files
+; default case = lower
+# Be very careful with case sensitivity - it can break things!
+; case sensitive = no
+
+#============================ 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
+
+#Uncomment the following 2 lines if you would like your login scripts to
+#be created dynamically by ntlogon (check that you have it in the correct
+#locationn (the default of the ntlogon rpm available in contribs)
+;root preexec = /usr/bin/ntlogon -u %U -g %G -o %a -d /var/lib/samba/netlogon
+;root postexec = rm -f /var/lib/samba/netlogon/%U.bat
+
+# 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 CUPS print system there is no need to
+# specifically define each individual printer.
+# You must configure the samba printers with the appropriate Windows
+# drivers on your Windows clients. On the Samba server no filtering is
+# done. If you wish that the server provides the driver and the clients
+# send PostScript ("Generic PostScript Printer" under Windows), you have
+# to swap the 'print command' line below with the commented one.
+[printers]
+ comment = All Printers
+ path = /var/spool/samba
+ browseable = no
+# to allow user 'guest account' to print.
+ guest ok = yes
+ writable = no
+ printable = yes
+ create mode = 0700
+# =====================================
+# print command: see above for details.
+# =====================================
+ print command = lpr-cups -P %p -o raw %s -r # using client side printer drivers.
+; print command = lpr-cups -P %p %s # using cups own drivers (use generic PostScript on clients).
+ lpq command = lpstat -o %p
+ lprm command = cancel %p-%j
+
+# 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
+; public = yes
+; writable = 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/packaging/Mandrake/smb.init b/packaging/Mandrake/smb.init
new file mode 100755
index 00000000000..8855f04efba
--- /dev/null
+++ b/packaging/Mandrake/smb.init
@@ -0,0 +1,93 @@
+#!/bin/sh
+#
+# chkconfig: - 91 35
+# description: Starts and stops the Samba smbd and nmbd daemons \
+# used to provide SMB network services.
+
+# 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 SMB services: "
+ daemon smbd -D
+ RETVAL=$?
+ echo
+ echo -n "Starting NMB services: "
+ daemon nmbd -D
+ RETVAL2=$?
+ echo
+ [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && touch /var/lock/subsys/smb || \
+ RETVAL=1
+ return $RETVAL
+}
+stop() {
+ echo -n "Shutting down SMB services: "
+ killproc smbd
+ RETVAL=$?
+ echo
+ echo -n "Shutting down NMB services: "
+ killproc nmbd
+ RETVAL2=$?
+ [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && rm -f /var/lock/subsys/smb
+ echo ""
+ return $RETVAL
+}
+restart() {
+ stop
+ start
+}
+reload() {
+ echo -n "Reloading smb.conf file: "
+ killproc smbd -HUP
+ RETVAL=$?
+ echo
+ return $RETVAL
+}
+mdkstatus() {
+ status smbd
+ status nmbd
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ restart
+ ;;
+ reload)
+ reload
+ ;;
+ status)
+ mdkstatus
+ ;;
+ condrestart)
+ [ -f /var/lock/subsys/smb ] && restart || :
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|status|condrestart}"
+ exit 1
+esac
+
+exit $?
diff --git a/packaging/Mandrake/smbprint b/packaging/Mandrake/smbprint
new file mode 100755
index 00000000000..0d07c9c7833
--- /dev/null
+++ b/packaging/Mandrake/smbprint
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+# This script is an input filter for printcap printing on a unix machine. It
+# uses the smbclient program to print the file to the specified smb-based
+# server and service.
+# For example you could have a printcap entry like this
+#
+# smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint
+#
+# which would create a unix printer called "smb" that will print via this
+# script. You will need to create the spool directory /usr/spool/smb with
+# appropriate permissions and ownerships for your system.
+
+# Set these to the server and service you wish to print to
+# In this example I have a WfWg PC called "lapland" that has a printer
+# exported called "printer" with no password.
+
+#
+# Script further altered by hamiltom@ecnz.co.nz (Michael Hamilton)
+# so that the server, service, and password can be read from
+# a /var/spool/lpd/PRINTNAME/.config file.
+#
+# In order for this to work the /etc/printcap entry must include an
+# accounting file (af=...):
+#
+# cdcolour:\
+# :cm=CD IBM Colorjet on 6th:\
+# :sd=/var/spool/lpd/cdcolour:\
+# :af=/var/spool/lpd/cdcolour/acct:\
+# :if=/usr/local/etc/smbprint:\
+# :mx=0:\
+# :lp=/dev/null:
+#
+# The /usr/var/spool/lpd/PRINTNAME/.config file should contain:
+# server=PC_SERVER
+# service=PR_SHARENAME
+# password="password"
+#
+# E.g.
+# server=PAULS_PC
+# service=CJET_371
+# password=""
+
+#
+# Debugging log file, change to /dev/null if you like.
+#
+# logfile=/tmp/smb-print.log
+logfile=/dev/null
+
+
+#
+# The last parameter to the filter is the accounting file name.
+# Extract the directory name from the file name.
+# Concat this with /.config to get the config file.
+#
+eval acct_file=\${$#}
+spool_dir=`dirname $acct_file`
+config_file=$spool_dir/.config
+
+# Should read the following variables set in the config file:
+# server
+# service
+# password
+eval `cat $config_file`
+
+#
+# Some debugging help, change the >> to > if you want to same space.
+#
+echo "server $server, service $service" >> $logfile
+
+(
+# NOTE You may wish to add the line `echo translate' if you want automatic
+# CR/LF translation when printing.
+# echo translate
+ echo "print -"
+ cat
+) | /usr/bin/smbclient "//$server/$service" $password -U $server -N -P >> $logfile
diff --git a/packaging/Mandrake/smbusers b/packaging/Mandrake/smbusers
new file mode 100644
index 00000000000..ae3389f53f8
--- /dev/null
+++ b/packaging/Mandrake/smbusers
@@ -0,0 +1,3 @@
+# Unix_name = SMB_name1 SMB_name2 ...
+root = administrator admin
+nobody = guest pcguest smbguest
diff --git a/packaging/PHT/TurboLinux/.cvsignore b/packaging/PHT/TurboLinux/.cvsignore
new file mode 100644
index 00000000000..0238ed8cae6
--- /dev/null
+++ b/packaging/PHT/TurboLinux/.cvsignore
@@ -0,0 +1,3 @@
+makefile-path.patch
+makerpms.sh
+samba2.spec
diff --git a/packaging/PHT/TurboLinux/README b/packaging/PHT/TurboLinux/README
new file mode 100644
index 00000000000..867ff01811b
--- /dev/null
+++ b/packaging/PHT/TurboLinux/README
@@ -0,0 +1,11 @@
+Preparation Date: October 25, 1998
+Preparer: John H Terpstra <jht@samba.org>
+
+Instructions: Preparing Samba Packages for TurboLinux
+===============================================================
+
+We provide support only for current versions of TurboLinux.
+
+To produce the RPMS simply type:
+ sh makerpms.sh
+
diff --git a/packaging/PHT/TurboLinux/findsmb b/packaging/PHT/TurboLinux/findsmb
new file mode 100755
index 00000000000..986c2481779
--- /dev/null
+++ b/packaging/PHT/TurboLinux/findsmb
@@ -0,0 +1,141 @@
+#!/usr/bin/perl
+#
+# Prints info on all smb responding machines on a subnet.
+# This script needs to be run on a machine without nmbd running and be
+# run as root to get correct info from WIN95 clients.
+#
+# syntax:
+# findsmb [subnet broadcast address]
+#
+# with no agrument it will list machines on the current subnet
+#
+# There will be a "+" in front of the workgroup name for machines that are
+# local master browsers for that workgroup. There will be an "*" in front
+# of the workgroup name for machines that are the domain master browser for
+# that workgroup.
+#
+
+$SAMBABIN = "/usr/bin";
+
+for ($i = 0; $i < 2; $i++) { # test for -d option and broadcast address
+ $_ = shift;
+ if (m/-d|-D/) {
+ $DEBUG = 1;
+ } else {
+ if ($_) {
+ $BCAST = "-B $_";
+ }
+ }
+}
+
+sub ipsort # do numeric sort on last field of IP address
+{
+ @t1 = split(/\./,$a);
+ @t2 = split(/\./,$b);
+ @t1[3] <=> @t2[3];
+}
+
+# look for all machines that respond to a name lookup
+
+open(NMBLOOKUP,"$SAMBABIN/nmblookup $BCAST '*'|") ||
+ die("Can't run nmblookup '*'.\n");
+
+# get rid of all lines that are not a response IP address,
+# strip everything but IP address and sort by last field in address
+
+@ipaddrs = sort ipsort grep(s/ \*<00>.*$//,<NMBLOOKUP>);
+
+# print header info
+
+print "\nIP ADDR NETBIOS NAME WORKGROUP/OS/VERSION $BCAST\n";
+print "---------------------------------------------------------------------\n";
+
+foreach $ip (@ipaddrs) # loop through each IP address found
+{
+ $ip =~ s/\n//; # strip newline from IP address
+
+# find the netbios names registered by each machine
+
+ open(NMBLOOKUP,"$SAMBABIN/nmblookup -r -A $ip|") ||
+ die("Can't get nmb name list.\n");
+ @nmblookup = <NMBLOOKUP>;
+ close NMBLOOKUP;
+
+# get the first <00> name
+
+ @name = grep(/<00>/,@nmblookup);
+ $_ = @name[0];
+ if ($_) { # we have a netbios name
+ if (/GROUP/) { # is it a group name
+ ($name, $aliases, $type, $length, @addresses) =
+ gethostbyaddr(pack('C4',split('\.',$ip)),2);
+ if (! $name) { # could not get name
+ $name = "unknown nis name";
+ }
+ } else {
+ /(\S+)/;
+ $name = $1;
+ }
+
+# do an smbclient command on the netbios name.
+
+ open(SMB,"$SAMBABIN/smbclient -N -L $name -I $ip -U% |") ||
+ die("Can't do smbclient command.\n");
+ @smb = <SMB>;
+ close SMB;
+
+ if ($DEBUG) { # if -d flag print results of nmblookup and smbclient
+ print "===============================================================\n";
+ print @nmblookup;
+ print @smb;
+ }
+
+# look for the OS= string
+
+ @info = grep(/OS=/,@smb);
+ $_ = @info[0];
+ if ($_) { # we found response
+ s/Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter
+
+ } else { # no OS= string in response (WIN95 client)
+
+# for WIN95 clients get workgroup name from nmblookup response
+ @name = grep(/<00> - <GROUP>/,@nmblookup);
+ $_ = @name[0];
+ if ($_) {
+ /(\S+)/;
+ $_ = "[$1]";
+ } else {
+ $_ = "Unknown Workgroup";
+ }
+ }
+
+# see if machine registered a local master browser name
+ if (grep(/<1d>/,@nmblookup)) {
+ $master = '+'; # indicate local master browser
+ if (grep(/<1b>/,@nmblookup)) { # how about domain master browser?
+ $master = '*'; # indicate domain master browser
+ }
+ } else {
+ $master = ' '; # not a browse master
+ }
+
+# line up info in 3 columns
+
+ print "$ip".' 'x(16-length($ip))."$name".' 'x(14-length($name))."$master"."$_\n";
+
+ } else { # no netbios name found
+# try getting the host name
+ ($name, $aliases, $type, $length, @addresses) =
+ gethostbyaddr(pack('C4',split('\.',$ip)),2);
+ if (! $name) { # could not get name
+ $name = "unknown nis name";
+ }
+ if ($DEBUG) { # if -d flag print results of nmblookup
+ print "===============================================================\n";
+ print @nmblookup;
+ }
+ print "$ip".' 'x(16-length($ip))."$name\n";
+ }
+}
+
diff --git a/packaging/PHT/TurboLinux/makerpms.sh.tmpl b/packaging/PHT/TurboLinux/makerpms.sh.tmpl
new file mode 100644
index 00000000000..c389bf1a68a
--- /dev/null
+++ b/packaging/PHT/TurboLinux/makerpms.sh.tmpl
@@ -0,0 +1,14 @@
+#!/bin/sh
+# Copyright (C) 1998 John H Terpstra, 1999 K Spoon
+#
+SPECDIR=/usr/src/turbo/SPECS
+SRCDIR=/usr/src/turbo/SOURCES
+USERID=`id -u`
+GRPID=`id -g`
+
+( cd ../../../.. ; chown -R ${USERID}.${GRPID} ${SRCDIR}/samba-PVERSION )
+( cd ../../../.. ; tar czvf ${SRCDIR}/samba-PVERSION.tar.gz samba-PVERSION )
+cp -a *.spec $SPECDIR
+cp -a *.patch smb.* samba.log $SRCDIR
+cd $SPECDIR
+rpm -ba -v samba2.spec
diff --git a/packaging/PHT/TurboLinux/samba.log b/packaging/PHT/TurboLinux/samba.log
new file mode 100644
index 00000000000..c5f2a5b45bc
--- /dev/null
+++ b/packaging/PHT/TurboLinux/samba.log
@@ -0,0 +1,11 @@
+/var/log/samba/log.nmb {
+ postrotate
+ /usr/bin/killall -HUP nmbd
+ endrotate
+}
+
+/var/log/samba/log.smb {
+ postrotate
+ /usr/bin/killall -HUP smbd
+ endrotate
+}
diff --git a/packaging/PHT/TurboLinux/samba.pamd b/packaging/PHT/TurboLinux/samba.pamd
new file mode 100644
index 00000000000..225ab724ec9
--- /dev/null
+++ b/packaging/PHT/TurboLinux/samba.pamd
@@ -0,0 +1,11 @@
+#%PAM-1.0
+#[For version 1.0 syntax, the above header is optional]
+#
+# The PAM configuration file for the `samba' service
+#
+auth required /lib/security/pam_pwdb.so nullok nodelay # shadow audit
+# auth required /lib/security/pam_smbpass.so nodelay
+account required /lib/security/pam_pwdb.so audit nodelay
+session required /lib/security/pam_pwdb.so nodelay
+password required /lib/security/pam_pwdb.so # shadow md5
+#password required /lib/security/pam_smbpass.so nodelay smbconf=/etc/samba.d/smb.conf
diff --git a/packaging/PHT/TurboLinux/samba2.spec.tmpl b/packaging/PHT/TurboLinux/samba2.spec.tmpl
new file mode 100644
index 00000000000..0633f62a7e7
--- /dev/null
+++ b/packaging/PHT/TurboLinux/samba2.spec.tmpl
@@ -0,0 +1,502 @@
+Summary: Samba SMB client and server
+Name: samba
+Version: PVERSION
+Release: PRELEASE
+Copyright: GNU GPL version 2
+Group: Networking
+Source: ftp://samba.org/pub/samba/samba-PVERSION.tar.gz
+Patch: smbw.patch
+Requires: pam >= 0.64 kernel >= 2.2.1 glibc >= 2.1.2
+Prereq: chkconfig fileutils
+BuildRoot: /var/tmp/samba
+Prefix: /usr
+
+%package debugtools
+Version: PVERSION
+Release: PRELEASE
+Group: Networking
+Summary: Programs to debug Samba and to test SMB client integrity
+
+%package -n smbfs
+Version: PVERSION
+Release: PRELEASE
+Group: Utilities/File
+Summary: Programs to mount SMB shares.
+
+%description
+Samba provides an SMB server which can be used to provide
+network services to SMB (sometimes called "Lan Manager")
+clients, including various versions of MS Windows, OS/2,
+and other Linux machines. Samba also provides some SMB
+clients, which complement the built-in SMB filesystem
+in Linux. Samba uses NetBIOS over TCP/IP (NetBT) protocols
+and does NOT need NetBEUI (Microsoft Raw NetBIOS frame)
+protocol.
+
+Samba-2.2 features working NT Domain Control capability and
+includes the SWAT (Samba Web Administration Tool) that
+allows samba's smb.conf file to be remotely managed using your
+favourite web browser. For the time being this is being
+enabled on TCP port 901 via inetd.
+
+Users are advised to use Samba-2.2 as a Windows NT4
+Domain Controller only on networks that do NOT have a Windows
+NT Domain Controller. This release does NOT as yet have
+Backup Domain control ability.
+
+Please refer to the WHATSNEW.txt document for fixup information.
+This binary release includes encrypted password support.
+
+Please read the smb.conf file and ENCRYPTION.txt in the
+docs directory for implementation details.
+
+NOTE: TurboLinux uses PAM which has integrated support
+for Shadow passwords and quotas. Do NOT recompile with the
+SHADOW_PWD option enabled.
+
+
+%description -n smbfs
+This package includes the tools necessary to mount filesystems from
+SMB servers.
+
+Smbmount and smbumount are an interface to the SMB filesystem. Smbfs is
+a filesystem which understands the SMB protocol. This is the protocol
+Windows for Workgroups, Windows NT or Lan Manager use to talk to each
+other. It was inspired by samba, the program by Andrew Tridgell that
+turns any unix site into a file server for DOS or Windows clients. See
+http://samba.org/samba for this interesting program suite and lots of
+more information on SMB and NetBIOS over TCP/IP. There you also find
+explanation for conceps like NetBIOS name or share.
+
+%changelog
+* Tue Mar 27 2001 John H Terpstra <jht@samba.org>
+- Fixes to make 2.2 compile
+
+* Sat Nov 04 2000 John H Terpstra <jht@samba.org>
+- Put Symlink for libnss_wins.so back into main install section
+
+* Fri Nov 3 2000 Uros Prestor <uros@turbolinux.com>
+- ported to IA-64
+
+* Mon Oct 09 2000 John H Terpstra <jht@turbolinux.com>
+- Started move to Samba-2.2.0
+- Added nsswitch wins support
+
+* Mon May 29 2000 John H Terpstra <jht@turbolinux.com>
+- moved linkage of libnss_wins.so.2 to %post
+- added removal step to %postun
+
+* Fri Apr 14 2000 John H Terpstra <jht@turbolinux.com>
+- Added unicode pages
+
+* Sat Apr 08 2000 John H Terpsta <jht@turbolinux.com>
+- Added nsswitch stuff
+- Fixed some typos
+- Changed hard link for smbmount to symlink
+
+* Sun Apr 02 2000 John H Terpstra <jht@turbolinux.com>
+- Updated for samba-2.0.7
+- Added codepages 775 1251
+- Added configure options "--with-profile --with-utmp
+ --with-netatalk --with-sambabook=/usr/share/swat/using_samba"
+- added using_samba book
+
+* Fri Oct 29 1999 Kelley Spoon <kspoon@turbolinux.com>
+- get rid of the rc?.d directories
+- -j flags for make command to (hopefully) speed up on
+ SMP systems
+- discoverd that John had already made the changes I
+ was going to do...
+- Wait! He forgot to move the man pages into /usr/share!
+ Cool... I get to do something substantial.
+
+* Sun Oct 16 1999 John H Terspstra <jht@turbolinux.com>
+- changed mount.smb to link to smbmount
+- removed smbwrappers as it is broken with glibc-2.1.x
+
+* Sun May 09 1999 John H Terpstra <jht@samba.org>
+- Added smbtorture et al.
+
+* Wed Mar 10 1999 Scott Stone <sstone@turbolinux.com>
+- This package now builds smbfs stuff
+- Added xinetd autosetup in the post install section
+- (todo: add remove of xinetd stuff in postuninstall section)
+
+* Sun Feb 28 1999 Jeremy Allison <jra@samba.org>
+ - Removed smbrun binary and tidied up some loose ends
+
+* Sun Oct 25 1998 John H Terpstra <jht@samba.org>
+ - Added modifier to /config specifier so that smb.conf,
+ lmhosts and smbusers never get lost
+
+* Sat Oct 24 1998 John H Terpstra <jht@samba.org>
+ - removed README.smbsh file from docs area
+
+* Mon Oct 05 1998 John H Terpstra <jht@samba.org>
+ - Added rpcclient to binaries list
+ - Added smbwrapper stuff
+
+* Fri Aug 21 1998 John H Terpstra <jht@samba.org>
+ - Updated for Samba version 2.0 building
+
+* Tue Jul 07 1998 Erik Troan <ewt@redhat.com>
+ - updated postun triggerscript to check $0
+ - clear /etc/codepages from %preun instead of %postun
+
+* Sat Jul 04 1998 John H Terpstra <jht@samba.org>
+ - fixed codepage preservation during update via -Uvh
+
+* Mon Jun 08 1998 Erik Troan <ewt@redhat.com>
+ - made the %postun script a tad less agressive; no reason to remove
+ the logs or lock file
+ - the %postun and %preun should only exectute if this is the final
+ removal
+ - migrated %triggerpostun from Red Hat's samba package to work around
+ packaging problems in some Red Hat samba releases
+
+* Sun Apr 26 1998 John H Terpstra <jht@samba.org>
+ - Tidy up for early alpha releases
+ - added findsmb from SGI packaging
+
+* Thu Apr 09 1998 John H Terpstra <jht@samba.org>
+ - Updated spec file
+ - Included new codepage.936
+
+* Sat Mar 20 1998 John H Terpstra <jht@samba.org>
+ - Added swat facility
+
+* Sat Jan 24 1998 John H Terpstra <jht@samba.org>
+ - Many optimisations (some suggested by Manoj Kasichainula <manojk@io.com>
+ - Use of chkconfig in place of individual symlinks to /etc/rc.d/init/smb
+ - Compounded make line
+ - Updated smb.init restart mechanism
+ - Use compound mkdir -p line instead of individual calls to mkdir
+ - Fixed smb.conf file path for log files
+ - Fixed smb.conf file path for incoming smb print spool directory
+ - Added a number of options to smb.conf file
+ - Added smbadduser command (missed from all previous RPMs) - Doooh!
+ - Added smbuser file and smb.conf file updates for username map
+
+%prep
+%setup
+%patch -p1
+
+
+%build
+cd source
+
+%ifarch ia64
+libtoolize --copy --force # get it to recognize IA-64
+%endif
+
+autoconf
+autoheader
+NUMCPU=`grep processor /proc/cpuinfo | wc -l`
+CFLAGS="$RPM_OPT_FLAGS $EXTRA" ./configure \
+ --prefix=%{prefix} \
+ --libdir=/etc/samba \
+ --with-lockdir=/var/lock/samba \
+ --with-privatedir=/etc \
+ --with-swatdir=%{prefix}/share/swat \
+ --with-quotas \
+ --with-smbmount \
+ --with-pam \
+ --with-pam_smbpass \
+ --with-profile \
+ --with-syslog \
+ --with-utmp \
+ --with-netatalk \
+ --with-sambabook=%{prefix}/share/swat/using_samba
+
+make -j${NUMCPU} all smbfilter nsswitch/libnss_wins.so
+make -j${NUMCPU} debug2html
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT/sbin
+mkdir -p $RPM_BUILD_ROOT%{prefix}/share/samba/codepages/src
+mkdir -p $RPM_BUILD_ROOT/etc/samba
+mkdir -p $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d}
+mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
+mkdir -p $RPM_BUILD_ROOT/lib
+mkdir -p $RPM_BUILD_ROOT/home/samba
+mkdir -p $RPM_BUILD_ROOT%{prefix}/{bin,sbin}
+mkdir -p $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba/{gifs,figs}
+mkdir -p $RPM_BUILD_ROOT%{prefix}/share/swat/{images,help,include}
+mkdir -p $RPM_BUILD_ROOT%{prefix}/share/man/{man1,man5,man7,man8}
+mkdir -p $RPM_BUILD_ROOT/var/lock/samba
+mkdir -p $RPM_BUILD_ROOT/var/log/samba
+mkdir -p $RPM_BUILD_ROOT/var/spool/samba
+
+# Install standard binary files
+for i in nmblookup smbclient smbpasswd smbstatus testparm testprns \
+ make_smbcodepage make_unicodemap make_printerdef rpcclient smbspool
+do
+install -m755 -s source/bin/$i $RPM_BUILD_ROOT%{prefix}/bin
+done
+for i in mksmbpasswd.sh smbtar
+do
+install -m755 source/script/$i $RPM_BUILD_ROOT%{prefix}/bin
+done
+
+# Install secure binary files
+for i in smbd nmbd swat smbmount smbumount smbmnt debug2html smbfilter
+do
+install -m755 -s source/bin/$i $RPM_BUILD_ROOT/usr/sbin
+done
+
+
+# Install level 1 man pages
+for i in *.1
+do
+install -m644 docs/manpages/$i $RPM_BUILD_ROOT%{prefix}/share/man/man1
+done
+
+# Install codepage source files
+for i in 437 737 775 850 852 861 866 932 936 949 950 1251
+do
+install -m644 source/codepages/codepage_def.$i $RPM_BUILD_ROOT%{prefix}/samba/codepages/src
+done
+for i in 437 737 850 852 861 866 932 936 949 950 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R
+do
+install -m644 source/codepages/CP$i.TXT $RPM_BUILD_ROO%{prefix}/samba/codepages/src
+done
+
+# Install the nsswitch library extension file
+install -m755 source/nsswitch/libnss_wins.so $RPM_BUILD_ROOT/lib
+# Make link for wins resolver
+( cd $RPM_BUILD_ROOT/lib; ln -s libnss_wins.so libnss_wins.so.2; )
+
+# Install PAM pam_smbpass.so
+install -m644 source/bin/pam_smbpass.so $RPM_BUILD_ROOT/lib/security
+
+# Install SWAT helper files
+for i in swat/help/*.html docs/htmldocs/*.html
+do
+install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/help
+done
+for i in swat/images/*.gif
+do
+install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/images
+done
+for i in swat/include/*.html
+do
+install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/include
+done
+
+# This is the O'Reily Samba Book - on-line
+for i in docs/htmldocs/using_samba/*.html
+do
+install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba
+done
+for i in docs/htmldocs/using_samba/figs/*.gif
+do
+install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba/figs
+done
+for i in docs/htmldocs/using_samba/gifs/*.gif
+do
+install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba/gifs
+done
+
+# Install the miscellany
+install -m644 swat/README $RPM_BUILD_ROOT%{prefix}/share/swat
+install -m644 docs/manpages/smb.conf.5 $RPM_BUILD_ROOT%{prefix}/share/man/man5
+install -m644 docs/manpages/lmhosts.5 $RPM_BUILD_ROOT%{prefix}/share/man/man5
+install -m644 docs/manpages/smbpasswd.5 $RPM_BUILD_ROOT%{prefix}/share/man/man5
+install -m644 docs/manpages/samba.7 $RPM_BUILD_ROOT%{prefix}/share/man/man7
+install -m644 docs/manpages/smbd.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8
+install -m644 docs/manpages/nmbd.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8
+install -m644 docs/manpages/smbpasswd.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8
+install -m644 docs/manpages/swat.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8
+install -m644 docs/manpages/smbmount.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8
+install -m644 docs/manpages/smbmnt.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8
+install -m644 docs/manpages/smbumount.8 $RPM_BUILD_ROOT%{prefix}/share/man/man8
+install -m644 packaging/PHT/TurboLinux/smb.conf $RPM_BUILD_ROOT/etc/samba/smb.conf
+install -m644 packaging/PHT/TurboLinux/smbusers $RPM_BUILD_ROOT/etc/samba/smbusers
+install -m755 packaging/PHT/TurboLinux/smbprint $RPM_BUILD_ROOT%{prefix}/bin
+install -m755 packaging/PHT/TurboLinux/findsmb $RPM_BUILD_ROOT%{prefix}/bin
+install -m755 packaging/PHT/TurboLinux/smb.init $RPM_BUILD_ROOT/etc/rc.d/init.d/smb
+install -m755 packaging/PHT/TurboLinux/smb.init $RPM_BUILD_ROOT%{prefix}/sbin/samba
+install -m644 packaging/PHT/TurboLinux/samba.pamd $RPM_BUILD_ROOT/etc/pam.d/samba
+install -m644 packaging/PHT/TurboLinux/samba.log $RPM_BUILD_ROOT/etc/logrotate.d/samba
+echo 127.0.0.1 localhost > $RPM_BUILD_ROOT/etc/lmhosts
+
+# Link smbmount to /sbin/mount.smb and /sbin/mount.smbfs
+ln -sf %{prefix}/sbin/smbmount $RPM_BUILD_ROOT/sbin/mount.smb
+ln -sf %{prefix}/sbin/smbmount $RPM_BUILD_ROOT/sbin/mount.smbfs
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+/sbin/chkconfig --add smb
+/sbin/chkconfig smb off
+
+# Build codepage load files
+cd %{prefix}/share/samba
+for i in 437 737 775 850 852 861 866 932 936 949 950 1251
+do
+%{prefix}/bin/make_smbcodepage c $i %{prefix}/share/samba/codepages/src/codepage_def.$i %{prefix}/share/samba/codepages/codepage.$i
+done
+for i in 437 737 850 852 861 866 932 936 949 950 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI8-R
+do
+%{prefix}/bin/make_unicodemap $i %{prefix}/share/samba/codepages/src/CP$i.TXT %{prefix}/share/samba/codepages/unicode_map.$i
+done
+
+# Add swat entry to /etc/services if not already there
+if !( grep ^[:space:]*swat /etc/services > /dev/null ) then
+ echo 'swat 901/tcp # Add swat service used via inetd' >> /etc/services
+fi
+
+# Add swat entry to /etc/inetd.conf if needed
+if !( grep ^[:space:]*swat /etc/inetd.conf > /dev/null ) then
+ echo '#swat stream tcp nowait.400 root %{prefix}/sbin/swat swat' >> /etc/inetd.conf
+ killall -1 inetd || :
+fi
+
+# Now create the xinetd.conf file from our inetd.conf file, back up orig first.
+if [ -f /etc/xinetd.conf ]; then
+ mv /etc/xinetd.conf /etc/xinetd.conf.presamba
+ /usr/sbin/itox --daemon_dir /usr/sbin < /etc/inetd.conf > /etc/xinetd.conf
+fi
+
+
+%preun
+if [ $1 = 0 ] ; then
+ /sbin/chkconfig --del smb
+
+ for n in %{prefix}/share/samba/codepages/*; do
+ if [ $n != %{prefix}/share/samba/codepages/src ]; then
+ rm -rf $n
+ fi
+ done
+ # We want to remove the browse.dat and wins.dat files so they can not interfer with a new version of samba!
+ if [ -e /var/lock/samba/browse.dat ]; then
+ rm -f /var/lock/samba/browse.dat
+ fi
+ if [ -e /var/lock/samba/wins.dat ]; then
+ rm -f /var/lock/samba/wins.dat
+ fi
+fi
+
+%postun
+# Only delete remnants of samba if this is the final deletion.
+if [ $1 = 0 ] ; then
+ if [ -x /etc/pam.d/samba ]; then
+ rm -f /etc/pam.d/samba
+ fi
+ if [ -e /var/log/samba ]; then
+ rm -rf /var/log/samba
+ fi
+
+# Note: We MUST keep:
+# winbindd_*, sshare_info*, printing*, ntdrivers*
+
+ if [ -x /var/lock/samba ]; then
+ rm -f /var/lock/samba/browse.dat
+ rm -f /var/lock/samba/{brlock,connections,locking,messages}.tdb
+ if [ -e /var/lock/samba.d/namelist.debug ]; then
+ rm -f /var/lock/samba.d/namelist.debug
+ fi
+ rm -f /var/lock/samba/unexpected.tdb
+ rm -f /var/lock/samba/{smbd,nmbd}.pid
+ fi
+
+ # Remove swat entries from /etc/inetd.conf and /etc/services
+ cd /etc
+ tmpfile=/etc/tmp.$$
+ sed -e '/^[:space:]*swat.*$/d' /etc/inetd.conf > $tmpfile
+ mv $tmpfile inetd.conf
+ sed -e '/#swat.*$/d' /etc/inetd.conf > $tmpfile
+ mv $tmpfile inetd.conf
+ sed -e '/^[:space:]*swat.*$/d' /etc/services > $tmpfile
+ mv $tmpfile services
+
+ # Recreate xinetd.conf file from /etc/inetd.conf
+ mv /etc/xinetd.conf /etc/xinetd.conf.samba
+ /usr/sbin/itox --daemon_dir /usr/sbin < /etc/inetd.conf > /etc/xinetd.conf
+fi
+
+
+%triggerpostun -- samba < samba-2.0.0
+if [ $0 != 0 ]; then
+ /sbin/chkconfig --add smb
+fi
+
+
+%files
+%doc README COPYING Manifest Read-Manifest-Now
+%doc WHATSNEW.txt Roadmap
+%doc docs
+%doc swat/README
+%doc examples
+%attr(-,root,root) %{prefix}/sbin/smbd
+%attr(-,root,root) %{prefix}/sbin/nmbd
+%attr(-,root,root) %{prefix}/sbin/swat
+%attr(-,root,root) %{prefix}/sbin/debug2html
+%attr(0750,root,root) %{prefix}/sbin/samba
+%attr(-,root,root) %{prefix}/bin/smbclient
+%attr(-,root,root) %{prefix}/bin/rpcclient
+%attr(-,root,root) %{prefix}/bin/testparm
+%attr(-,root,root) %{prefix}/bin/testprns
+%attr(-,root,root) %{prefix}/bin/findsmb
+%attr(-,root,root) %{prefix}/bin/smbstatus
+%attr(-,root,root) %{prefix}/bin/nmblookup
+%attr(-,root,root) %{prefix}/bin/make_smbcodepage
+%attr(-,root,root) %{prefix}/bin/make_unicodemap
+%attr(-,root,root) %{prefix}/bin/make_printerdef
+%attr(-,root,root) %{prefix}/bin/smbpasswd
+%attr(-,root,root) %{prefix}/bin/smbtar
+%attr(-,root,root) %{prefix}/bin/smbprint
+%attr(-,root,root) %{prefix}/bin/smbspool
+%attr(-,root,root) %{prefix}/bin/smbadduser
+%attr(755,root,root) /lib/libnss_wins.s*
+%attr(755,root,root) /lib/security/pam_smbpass.so
+%attr(-,root,root) %{prefix}/share/swat/help/*
+%attr(-,root,root) %{prefix}/share/swat/images/*
+%attr(-,root,root) %{prefix}/share/swat/include/header.html
+%attr(-,root,root) %{prefix}/share/swat/include/footer.html
+%attr(-,root,root) %{prefix}/share/swat/using_samba/*
+%attr(-,root,root) %config(noreplace) /etc/samba/lmhosts
+%attr(-,root,root) %config(noreplace) /etc/samba/smb.conf
+%attr(-,root,root) %config(noreplace) /etc/samba/smbusers
+%attr(-,root,root) /etc/rc.d/init.d/smb
+%attr(-,root,root) /etc/logrotate.d/samba
+%attr(-,root,root) /etc/pam.d/samba
+%attr(-,root,root) %{prefix}/share/samba/codepages/src/codepage_def.*
+%attr(-,root,root) %{prefix}/share/samba/codepages/src/CP*
+# %attr(-,root,root) %{prefix}/share/man/man1/smbsh.1
+%attr(-,root,root) %{prefix}/share/man/man1/make_smbcodepage.1
+%attr(-,root,root) %{prefix}/share/man/man1/make_unicodemap.1
+%attr(-,root,root) %{prefix}/share/man/man1/nmblookup.1
+%attr(-,root,root) %{prefix}/share/man/man1/smbclient.1
+%attr(-,root,root) %{prefix}/share/man/man1/smbrun.1
+%attr(-,root,root) %{prefix}/share/man/man1/smbstatus.1
+%attr(-,root,root) %{prefix}/share/man/man1/smbtar.1
+%attr(-,root,root) %{prefix}/share/man/man1/testparm.1
+%attr(-,root,root) %{prefix}/share/man/man1/testprns.1
+%attr(-,root,root) %{prefix}/share/man/man5/lmhosts.5
+%attr(-,root,root) %{prefix}/share/man/man5/smb.conf.5
+%attr(-,root,root) %{prefix}/share/man/man5/smbpasswd.5
+%attr(-,root,root) %{prefix}/share/man/man7/samba.7
+%attr(-,root,root) %{prefix}/share/man/man8/nmbd.8
+%attr(-,root,root) %{prefix}/share/man/man8/smbd.8
+%attr(-,root,root) %{prefix}/share/man/man8/smbpasswd.8
+%attr(-,root,root) %{prefix}/share/man/man8/swat.8
+%attr(-,root,nobody) %dir /home/samba
+%attr(-,root,root) %dir %{prefix}/share/samba/codepages
+%attr(-,root,root) %dir %{prefix}/share/samba/codepages/src
+%attr(-,root,root) %dir /var/lock/samba
+%attr(-,root,root) %dir /var/log/samba
+%attr(1777,root,root) %dir /var/spool/samba
+
+%files -n smbfs
+%attr(-,root,root) %{prefix}/sbin/smbmount
+%attr(-,root,root) %{prefix}/sbin/smbumount
+%attr(-,root,root) %{prefix}/sbin/smbmnt
+%attr(-,root,root) /sbin/mount.smb
+%attr(-,root,root) /sbin/mount.smbfs
+%attr(-,root,root) %{prefix}/share/man/man8/smbmnt.8
+%attr(-,root,root) %{prefix}/share/man/man8/smbmount.8
+%attr(-,root,root) %{prefix}/share/man/man8/smbumount.8
diff --git a/packaging/PHT/TurboLinux/smb.conf b/packaging/PHT/TurboLinux/smb.conf
new file mode 100644
index 00000000000..e07d15c93ef
--- /dev/null
+++ b/packaging/PHT/TurboLinux/smb.conf
@@ -0,0 +1,291 @@
+# 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
+#
+# 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 many any basic syntactic errors.
+#
+#======================= Global Settings =====================================
+[global]
+
+# workgroup = NT-Domain-Name or Workgroup-Name
+ workgroup = MYGROUP
+
+# server string is the equivalent of the NT Description field
+ server string = Samba Server
+
+# This option is important for security. It allows you to restrict
+# connections to machines which are on your local network. The
+# following example restricts access to two C class networks and
+# the "loopback" interface. For more examples of the syntax see
+# the smb.conf man page
+; hosts allow = 192.168.1. 192.168.2. 127.
+
+# if you want to automatically load your printer list rather
+# than setting them up individually then you'll need this
+ printcap name = /etc/printcap
+ load printers = yes
+
+# It should not be necessary to spell out the print system type unless
+# yours is non-standard. Currently supported print systems include:
+# bsd, sysv, plp, lprng, aix, hpux, qnx
+; printing = bsd
+
+# 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
+
+# Security mode. Most people will want user level security. See
+# security_level.txt for details.
+ security = user
+# Use password server option only with security = server
+; password server = <NT-Server-Name>
+
+# Password Level allows matching of _n_ characters of the password for
+# all combinations of upper and lower case.
+; password level = 8
+; username level = 8
+
+# You may wish to use password encryption. Please read
+# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
+# Do not enable this option unless you have read those documents
+; encrypt passwords = yes
+; smb passwd file = /etc/smbpasswd
+
+# The following are needed to allow password changing from Windows to
+# update the Linux sytsem password also.
+# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
+# NOTE2: You do NOT need these to allow workstations to change only
+# the encrypted SMB passwords. They allow the Unix password
+# to be kept in sync with the SMB password.
+; unix password sync = Yes
+; passwd program = /usr/bin/passwd %u
+; passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
+
+# Unix users can map to different SMB User names
+; username map = /etc/smbusers
+
+# 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
+; include = /etc/smb.conf.%m
+
+# Most people will find that this option gives better performance.
+# See speed.txt and the manual pages for details
+ socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
+
+# 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
+
+# Configure remote browse list synchronisation here
+# request announcement to, or browse list sync from:
+# a specific host or from / to a whole subnet (see below)
+; remote browse sync = 192.168.3.25 192.168.5.255
+# Cause this host to announce itself to local subnets here
+; remote announce = 192.168.1.255 192.168.2.44
+
+# 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
+
+# Use only if you have an NT server on your network that has been
+# configured at install time to be a primary domain controller.
+; domain controller = <NT-Domain-Controller-SMBName>
+
+# 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
+
+# All NetBIOS names must be resolved to IP Addresses
+# 'Name Resolve Order' allows the named resolution mechanism to be specified
+# the default order is "host lmhosts wins bcast". "host" means use the unix
+# system gethostbyname() function call that will use either /etc/hosts OR
+# DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf
+# and the /etc/resolv.conf file. "host" therefore is system configuration
+# dependant. This parameter is most often of use to prevent DNS lookups
+# in order to resolve NetBIOS names to IP Addresses. Use with care!
+# The example below excludes use of name resolution for machines that are NOT
+# on the local network segment
+# - OR - are not deliberately to be known via lmhosts or via WINS.
+; name resolve order = wins lmhosts bcast
+
+# 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 built-in default for versions 1.9.17 is yes,
+# this has been changed in version 1.9.18 to no.
+ dns proxy = no
+
+# Case Preservation can be handy - system default is _no_
+# NOTE: These can be set on a per share basis
+; preserve case = no
+; short preserve case = no
+# Default case is normally upper case for all DOS files
+; default case = lower
+# Be very careful with case sensitivity - it can break things!
+; case sensitive = no
+
+#============================ 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 = /home/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 = /home/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/packaging/PHT/TurboLinux/smb.init b/packaging/PHT/TurboLinux/smb.init
new file mode 100755
index 00000000000..6529977d236
--- /dev/null
+++ b/packaging/PHT/TurboLinux/smb.init
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# chkconfig: 345 91 35
+# description: Starts and stops the Samba smbd and nmbd daemons \
+# used to provide SMB network services.
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# Source networking configuration.
+. /etc/sysconfig/network
+
+# Check that networking is up.
+[ ${NETWORKING} = "no" ] && exit 0
+
+# Check that smb.conf exists.
+[ -f /etc/smb.conf ] || exit 0
+
+# See how we were called.
+case "$1" in
+ start)
+ echo -n "Starting SMB services: "
+ daemon smbd -D
+ daemon nmbd -D
+ echo
+ touch /var/lock/subsys/smb
+ ;;
+ stop)
+ echo -n "Shutting down SMB services: "
+ killproc smbd
+ killproc nmbd
+ rm -f /var/lock/subsys/smb
+ echo ""
+ ;;
+ status)
+ status smbd
+ status nmbd
+ ;;
+ restart)
+ echo -n "Restarting SMB services: "
+ $0 stop
+ $0 start
+ echo "done."
+ ;;
+ *)
+ echo "Usage: smb {start|stop|restart|status}"
+ exit 1
+esac
+
diff --git a/packaging/PHT/TurboLinux/smbadduser b/packaging/PHT/TurboLinux/smbadduser
new file mode 100755
index 00000000000..2f38bf28f1a
--- /dev/null
+++ b/packaging/PHT/TurboLinux/smbadduser
@@ -0,0 +1,73 @@
+#!/bin/csh
+#
+# smbadduser - Written by Mike Zakharoff
+#
+unalias *
+set path = ($path)
+
+set smbpasswd = /etc/smbpasswd
+set user_map = /etc/smbusers
+#
+# Set to site specific passwd command
+#
+set passwd = "cat /etc/passwd"
+#set passwd = "niscat passwd.org_dir"
+#set passwd = "ypcat passwd"
+
+set line = "----------------------------------------------------------"
+if ($#argv == 0) then
+ echo $line
+ echo "Written: Mike Zakharoff email: michael.j.zakharoff@boeing.com"
+ echo ""
+ echo " 1) Updates $smbpasswd"
+ echo " 2) Updates $user_map"
+ echo " 3) Executes smbpasswd for each new user"
+ echo ""
+ echo "smbadduser unixid:ntid unixid:ntid ..."
+ echo ""
+ echo "Example: smbadduser zak:zakharoffm johns:smithj"
+ echo $line
+ exit 1
+endif
+
+touch $smbpasswd $user_map
+set new = ()
+foreach one ($argv)
+ echo $one | grep ':' >& /dev/null
+ if ($status != 0) then
+ echo "ERROR: Must use unixid:ntid like -> zak:zakharoffm"
+ continue
+ endif
+ set unix = `echo $one | awk -F: '{print $1}'`
+ set ntid = `echo $one | awk -F: '{print $2}'`
+
+ set usr = `eval $passwd | awk -F: '$1==USR {print $1}' USR=$unix`
+ if ($#usr != 1) then
+ echo "ERROR: $unix Not in passwd database SKIPPING..."
+ continue
+ endif
+ set tmp = `cat $smbpasswd | awk -F: '$1==USR {print $1}' USR=$unix`
+ if ($#tmp != 0) then
+ echo "ERROR: $unix is already in $smbpasswd SKIPPING..."
+ continue
+ endif
+
+ echo "Adding: $unix to $smbpasswd"
+ eval $passwd | \
+ awk -F: '$1==USR { \
+ printf( "%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:%s:%s:%s\n", $1, $3, $5, $6, $7) }' USR=$unix >> $smbpasswd
+ if ($unix != $ntid) then
+ echo "Adding: {$unix = $ntid} to $user_map"
+ echo "$unix = $ntid" >> $user_map
+ endif
+ set new = ($new $unix)
+end
+
+#
+# Enter password for new users
+#
+foreach one ($new)
+ echo $line
+ echo "ENTER password for $one"
+ smbpasswd $one
+end
diff --git a/packaging/PHT/TurboLinux/smbprint b/packaging/PHT/TurboLinux/smbprint
new file mode 100755
index 00000000000..ec083eede62
--- /dev/null
+++ b/packaging/PHT/TurboLinux/smbprint
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+# This script is an input filter for printcap printing on a unix machine. It
+# uses the smbclient program to print the file to the specified smb-based
+# server and service.
+# For example you could have a printcap entry like this
+#
+# smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint
+#
+# which would create a unix printer called "smb" that will print via this
+# script. You will need to create the spool directory /usr/spool/smb with
+# appropriate permissions and ownerships for your system.
+
+# Set these to the server and service you wish to print to
+# In this example I have a WfWg PC called "lapland" that has a printer
+# exported called "printer" with no password.
+
+#
+# Script further altered by hamiltom@ecnz.co.nz (Michael Hamilton)
+# so that the server, service, and password can be read from
+# a /var/spool/lpd/PRINTNAME/.config file.
+#
+# In order for this to work the /etc/printcap entry must include an
+# accounting file (af=...):
+#
+# cdcolour:\
+# :cm=CD IBM Colorjet on 6th:\
+# :sd=/var/spool/lpd/cdcolour:\
+# :af=/var/spool/lpd/cdcolour/acct:\
+# :if=/usr/local/etc/smbprint:\
+# :mx=0:\
+# :lp=/dev/null:
+#
+# The /usr/var/spool/lpd/PRINTNAME/.config file should contain:
+# server=PC_SERVER
+# service=PR_SHARENAME
+# password="password"
+#
+# E.g.
+# server=PAULS_PC
+# service=CJET_371
+# password=""
+
+#
+# Debugging log file, change to /dev/null if you like.
+#
+# logfile=/tmp/smb-print.log
+logfile=/dev/null
+
+
+#
+# The last parameter to the filter is the accounting file name.
+# Extract the directory name from the file name.
+# Concat this with /.config to get the config file.
+#
+eval acct_file=\${$#}
+spool_dir=`dirname $acct_file`
+config_file=$spool_dir/.config
+
+# Should read the following variables set in the config file:
+# server
+# service
+# password
+eval `cat $config_file`
+
+#
+# Some debugging help, change the >> to > if you want to same space.
+#
+echo "server $server, service $service" >> $logfile
+
+(
+# NOTE You may wish to add the line `echo translate' if you want automatic
+# CR/LF translation when printing.
+# echo translate
+ echo "print -"
+ cat
+) | /usr/bin/smbclient "\\\\$server\\$service" $password -U $server -N -P >> $logfile
diff --git a/packaging/PHT/TurboLinux/smbusers b/packaging/PHT/TurboLinux/smbusers
new file mode 100644
index 00000000000..ae3389f53f8
--- /dev/null
+++ b/packaging/PHT/TurboLinux/smbusers
@@ -0,0 +1,3 @@
+# Unix_name = SMB_name1 SMB_name2 ...
+root = administrator admin
+nobody = guest pcguest smbguest
diff --git a/packaging/PHT/TurboLinux/smbw.patch b/packaging/PHT/TurboLinux/smbw.patch
new file mode 100644
index 00000000000..0abbfdf73f6
--- /dev/null
+++ b/packaging/PHT/TurboLinux/smbw.patch
@@ -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
diff --git a/packaging/README b/packaging/README
new file mode 100644
index 00000000000..ce651377907
--- /dev/null
+++ b/packaging/README
@@ -0,0 +1,38 @@
+Copyright (C) 1997-1998 Samba-Team
+Date: November 16, 1998
+Updates: First Release - 19970819
+ 19981116
+===============================================================================
+
+Note:
+=====
+This directory is a public repository for platform specific files including
+build files for binary package distributions for specific operating systems
+as well as for source file distribution packages for those systems.
+
+The Example directory should be used as a guide for preparation of binary
+packages for distribution via the official samba ftp sites.
+
+The files contained here are intended for use only by those wishing to build
+distribution packages and are NOT considered suitable material for anyone who
+wants to just install Samba from the pristine source files contained under
+the ~/source directory.
+
+All contributions / modifications / additions / etc. to the packaging files
+should be sent to samba-patches@samba.org with the subject marked:
+ PACKAGING: [add|mod|contrib] Your subject.
+
+Should you, or anyone you know of, have package build instructions and/or files
+that may be of use to the wider community of Samba users please mail the above
+account with subject: PACKAGING: [avail] OS xxxxxxxxxx
+where xxxxxxxxxx is the operating system platform that may be contributed.
+
+We will contact the person who is offering to contribute package build details
+to ensure that their contribution can be included in the official Samba sources.
+
+In the event that anyone wishes to contribute package build information please
+indicate in your response how we may access a suitable system to ensure our
+ability to keep the binary distribution itself current with the released source.
+
+The future of cooperatively developed software such as Samba depends on the
+willingness of all partners to share the fruit of their labours.
diff --git a/packaging/README.UnixWare b/packaging/README.UnixWare
new file mode 100644
index 00000000000..a4b08954ecc
--- /dev/null
+++ b/packaging/README.UnixWare
@@ -0,0 +1,6 @@
+Date: January 9, 2001
+Maintainer: John H Terpstra
+Subject: UnixWare Packaging Files
+Modifications: Initial release 20010109
+
+Note: The packaging build files for UnixWare are located under ~samba/packaging/Caldera/UnixWare.
diff --git a/packaging/RedHat/.cvsignore b/packaging/RedHat/.cvsignore
new file mode 100644
index 00000000000..4ce9d934e6e
--- /dev/null
+++ b/packaging/RedHat/.cvsignore
@@ -0,0 +1,6 @@
+makefile-path.patch
+makerpms.sh
+samba2.spec
+smbadduser
+smbw.patch
+samba2.rpm?.spec \ No newline at end of file
diff --git a/packaging/RedHat/README b/packaging/RedHat/README
new file mode 100644
index 00000000000..210248fa35a
--- /dev/null
+++ b/packaging/RedHat/README
@@ -0,0 +1,11 @@
+Preparation Date: Fri Aug 21, 1998
+Preparer: John H Terpstra <jht@samba.org>
+
+Instructions: Preparing Samba Packages for Red Hat Linux 5.X
+===============================================================
+
+We provide support only for current versions of Red Hat Linux.
+
+To produce the RPMS simply type:
+ sh makerpms.sh
+
diff --git a/packaging/RedHat/findsmb b/packaging/RedHat/findsmb
new file mode 100755
index 00000000000..986c2481779
--- /dev/null
+++ b/packaging/RedHat/findsmb
@@ -0,0 +1,141 @@
+#!/usr/bin/perl
+#
+# Prints info on all smb responding machines on a subnet.
+# This script needs to be run on a machine without nmbd running and be
+# run as root to get correct info from WIN95 clients.
+#
+# syntax:
+# findsmb [subnet broadcast address]
+#
+# with no agrument it will list machines on the current subnet
+#
+# There will be a "+" in front of the workgroup name for machines that are
+# local master browsers for that workgroup. There will be an "*" in front
+# of the workgroup name for machines that are the domain master browser for
+# that workgroup.
+#
+
+$SAMBABIN = "/usr/bin";
+
+for ($i = 0; $i < 2; $i++) { # test for -d option and broadcast address
+ $_ = shift;
+ if (m/-d|-D/) {
+ $DEBUG = 1;
+ } else {
+ if ($_) {
+ $BCAST = "-B $_";
+ }
+ }
+}
+
+sub ipsort # do numeric sort on last field of IP address
+{
+ @t1 = split(/\./,$a);
+ @t2 = split(/\./,$b);
+ @t1[3] <=> @t2[3];
+}
+
+# look for all machines that respond to a name lookup
+
+open(NMBLOOKUP,"$SAMBABIN/nmblookup $BCAST '*'|") ||
+ die("Can't run nmblookup '*'.\n");
+
+# get rid of all lines that are not a response IP address,
+# strip everything but IP address and sort by last field in address
+
+@ipaddrs = sort ipsort grep(s/ \*<00>.*$//,<NMBLOOKUP>);
+
+# print header info
+
+print "\nIP ADDR NETBIOS NAME WORKGROUP/OS/VERSION $BCAST\n";
+print "---------------------------------------------------------------------\n";
+
+foreach $ip (@ipaddrs) # loop through each IP address found
+{
+ $ip =~ s/\n//; # strip newline from IP address
+
+# find the netbios names registered by each machine
+
+ open(NMBLOOKUP,"$SAMBABIN/nmblookup -r -A $ip|") ||
+ die("Can't get nmb name list.\n");
+ @nmblookup = <NMBLOOKUP>;
+ close NMBLOOKUP;
+
+# get the first <00> name
+
+ @name = grep(/<00>/,@nmblookup);
+ $_ = @name[0];
+ if ($_) { # we have a netbios name
+ if (/GROUP/) { # is it a group name
+ ($name, $aliases, $type, $length, @addresses) =
+ gethostbyaddr(pack('C4',split('\.',$ip)),2);
+ if (! $name) { # could not get name
+ $name = "unknown nis name";
+ }
+ } else {
+ /(\S+)/;
+ $name = $1;
+ }
+
+# do an smbclient command on the netbios name.
+
+ open(SMB,"$SAMBABIN/smbclient -N -L $name -I $ip -U% |") ||
+ die("Can't do smbclient command.\n");
+ @smb = <SMB>;
+ close SMB;
+
+ if ($DEBUG) { # if -d flag print results of nmblookup and smbclient
+ print "===============================================================\n";
+ print @nmblookup;
+ print @smb;
+ }
+
+# look for the OS= string
+
+ @info = grep(/OS=/,@smb);
+ $_ = @info[0];
+ if ($_) { # we found response
+ s/Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter
+
+ } else { # no OS= string in response (WIN95 client)
+
+# for WIN95 clients get workgroup name from nmblookup response
+ @name = grep(/<00> - <GROUP>/,@nmblookup);
+ $_ = @name[0];
+ if ($_) {
+ /(\S+)/;
+ $_ = "[$1]";
+ } else {
+ $_ = "Unknown Workgroup";
+ }
+ }
+
+# see if machine registered a local master browser name
+ if (grep(/<1d>/,@nmblookup)) {
+ $master = '+'; # indicate local master browser
+ if (grep(/<1b>/,@nmblookup)) { # how about domain master browser?
+ $master = '*'; # indicate domain master browser
+ }
+ } else {
+ $master = ' '; # not a browse master
+ }
+
+# line up info in 3 columns
+
+ print "$ip".' 'x(16-length($ip))."$name".' 'x(14-length($name))."$master"."$_\n";
+
+ } else { # no netbios name found
+# try getting the host name
+ ($name, $aliases, $type, $length, @addresses) =
+ gethostbyaddr(pack('C4',split('\.',$ip)),2);
+ if (! $name) { # could not get name
+ $name = "unknown nis name";
+ }
+ if ($DEBUG) { # if -d flag print results of nmblookup
+ print "===============================================================\n";
+ print @nmblookup;
+ }
+ print "$ip".' 'x(16-length($ip))."$name\n";
+ }
+}
+
diff --git a/packaging/RedHat/makerpms.sh.tmpl b/packaging/RedHat/makerpms.sh.tmpl
new file mode 100644
index 00000000000..44b89a45ec8
--- /dev/null
+++ b/packaging/RedHat/makerpms.sh.tmpl
@@ -0,0 +1,38 @@
+#!/bin/sh
+# Copyright (C) John H Terpstra 1998
+# Updated for RPM 3 by Jochen Wiedmann, joe@ispsoft.de
+# Changed for a generic tar file rebuild by abartlet@pcug.org.au
+USERID=`id -u`
+GRPID=`id -g`
+VERSION='PVERSION'
+
+rm -f ../../samba2.*.spec
+
+case `rpm --version | awk '{print $3}'` in
+ 2.*)
+ sed -e "s/MANDIR_MACRO/\%\{prefix\}\/man/g" < samba2.spec > samba2.rpm2.spec
+ cp samba2.rpm2.spec ../../
+ ;;
+ 3.*)
+ sed -e "s/MANDIR_MACRO/\%\{prefix\}\/man/g" < samba2.spec > samba2.rpm3.spec
+ cp samba2.rpm3.spec ../../
+ ;;
+ 4.*)
+ sed -e "s/MANDIR_MACRO/\%\{_mandir\}/g" < samba2.spec > samba2.rpm4.spec
+ cp samba2.rpm4.spec ../../
+ ;;
+ *)
+ echo "Unknown RPM version: `rpm --version`"
+ exit 1
+ ;;
+esac
+
+( cd ../../source; if [ -f Makefile ]; then make distclean; fi )
+( cd ../../.. ; chown -R ${USERID}.${GRPID} samba-${VERSION} )
+( cd ../../.. ; tar --exclude=CVS -czvf samba-${VERSION}.tar.gz samba-${VERSION}/samba2.*.spec samba-${VERSION} )
+
+rpm -ta -v ../../../samba-${VERSION}.tar.gz
+
+
+
+
diff --git a/packaging/RedHat/samba.log b/packaging/RedHat/samba.log
new file mode 100644
index 00000000000..4b244099c4f
--- /dev/null
+++ b/packaging/RedHat/samba.log
@@ -0,0 +1,11 @@
+/var/log/samba/log.nmbd {
+ postrotate
+ /usr/bin/killall -HUP nmbd
+ endscript
+}
+
+/var/log/samba/log.smbd {
+ postrotate
+ /usr/bin/killall -HUP smbd
+ endscript
+}
diff --git a/packaging/RedHat/samba.pamd b/packaging/RedHat/samba.pamd
new file mode 100644
index 00000000000..1b4a93fb19e
--- /dev/null
+++ b/packaging/RedHat/samba.pamd
@@ -0,0 +1,4 @@
+auth required /lib/security/pam_pwdb.so nullok shadow
+account required /lib/security/pam_pwdb.so
+session required /lib/security/pam_pwdb.so
+password required /lib/security/pam_pwdb.so
diff --git a/packaging/RedHat/samba.pamd.stack b/packaging/RedHat/samba.pamd.stack
new file mode 100644
index 00000000000..6a948f92cbd
--- /dev/null
+++ b/packaging/RedHat/samba.pamd.stack
@@ -0,0 +1,6 @@
+#%PAM-1.0
+auth required pam_nologin.so
+auth required pam_stack.so service=system-auth
+account required pam_stack.so service=system-auth
+session required pam_stack.so service=system-auth
+password required pam_stack.so service=system-auth
diff --git a/packaging/RedHat/samba.xinetd b/packaging/RedHat/samba.xinetd
new file mode 100644
index 00000000000..8c38b354218
--- /dev/null
+++ b/packaging/RedHat/samba.xinetd
@@ -0,0 +1,15 @@
+# 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.
+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/packaging/RedHat/samba2.spec.tmpl b/packaging/RedHat/samba2.spec.tmpl
new file mode 100644
index 00000000000..c99b9123825
--- /dev/null
+++ b/packaging/RedHat/samba2.spec.tmpl
@@ -0,0 +1,458 @@
+Summary: Samba SMB client and server
+Name: samba
+Version: PVERSION
+Release: PRELEASE
+Copyright: GNU GPL version 2
+Group: Networking
+Source: ftp://samba.org/pub/samba/samba-%{version}.tar.gz
+Packager: John H Terpstra [Samba-Team] <jht@samba.org>
+Requires: pam >= 0.72 kernel >= 2.2.1 glibc >= 2.1.2
+Prereq: chkconfig fileutils
+BuildRoot: /var/tmp/samba
+Prefix: /usr
+
+%description
+Samba provides an SMB server which can be used to provide
+network services to SMB (sometimes called "Lan Manager")
+clients, including various versions of MS Windows, OS/2,
+and other Linux machines. Samba also provides some SMB
+clients, which complement the built-in SMB filesystem
+in Linux. Samba uses NetBIOS over TCP/IP (NetBT) protocols
+and does NOT need NetBEUI (Microsoft Raw NetBIOS frame)
+protocol.
+
+Samba-2.2 features working NT Domain Control capability and
+includes the SWAT (Samba Web Administration Tool) that
+allows samba's smb.conf file to be remotely managed using your
+favourite web browser. For the time being this is being
+enabled on TCP port 901 via inetd.
+
+Users are advised to use Samba-2.2 as a Windows NT4
+Domain Controller only on networks that do NOT have a Windows
+NT Domain Controller. This release does NOT as yet have
+Backup Domain control ability.
+
+Please refer to the WHATSNEW.txt document for fixup information.
+This binary release includes encrypted password support.
+
+Please read the smb.conf file and ENCRYPTION.txt in the
+docs directory for implementation details.
+
+NOTE: Red Hat Linux uses PAM which has integrated support
+for Shadow passwords and quotas. Do NOT recompile with the
+SHADOW_PWD option enabled
+
+%changelog
+* Mon Aug 1 2001 Tim Potter <tpot@samba.org>
+ - Install winbind daemon, client programs, nss and pam libraries
+ - Removed codepage stuff so spec file works with current HEAD branch
+
+* Sat Mar 31 2001 Andrew Bartlett <abartlet@pcug.org.au>
+ - Changed prefix/share/man for _mandir/share/man
+ - Changed this for a sed macro MANDIR_MACRO
+ - This allows us to build both RH7 (RPM4)
+ and older versions from same specfile.
+ - Made makerpms.sh use the rpm -ta command rather
+ than attempting to devine the correct location to
+ put the file. Also removes some /tmp symlink games.
+ - Allows build on RPM4
+ - Increased PAM requirements to allow us to use
+ system-auth (this pam is in 6.x errata at least)
+
+* Tue Mar 27 2001 John H Terpstra <jht@samba.org>
+ - Fixed typos introduced by Sum Wun.
+ - Build for Red Hat 7.x
+
+* Sun Nov 12 2000 John H Terpstra <jht@samba.org>
+ - Updated for Samba-2.2 releases
+ - Added libnss_wins.so stuff
+ - Added compile-time options
+
+* Sat Nov 29 1999 Matthew Vanecek <mev0003@unt.edu>
+ - Added a Prefix and changed "/usr" to "%{prefix}"
+
+* Sat Nov 11 1999 Tridge <tridge@linuxcare.com>
+ - changed from mount.smb to mount.smbfs
+
+* Sat Oct 9 1999 Tridge <tridge@linuxcare.com>
+ - removed smbwrapper
+ - added smbmnt and smbmount
+
+* Sun Apr 25 1999 John H Terpstra <jht@samba.org>
+ - added smbsh.1 man page
+
+* Fri Mar 26 1999 Andrew Tridgell <tridge@samba.org>
+ - added --with-pam as pam is no longer used by default
+
+* Sat Jan 27 1999 Jeremy Allison <jra@samba.org>
+ - Removed smbrun binary and tidied up some loose ends
+
+* Sun Oct 25 1998 John H Terpstra <jht@samba.org>
+ - Added parameters to /config to ensure smb.conf, lmhosts,
+ and smbusers never gets over-written.
+
+* Sat Oct 24 1998 John H Terpstra <jht@samba.org>
+ - removed README.smbsh file from docs area
+
+* Mon Oct 05 1998 John H Terpstra <jht@samba.org>
+ - Added rpcclient to binaries list
+ - Added smbwrapper stuff
+
+* Fri Aug 21 1998 John H Terpstra <jht@samba.org>
+ - Updated for Samba version 2.0 building
+
+* Tue Jul 07 1998 Erik Troan <ewt@redhat.com>
+ - updated postun triggerscript to check $0
+ - clear /etc/codepages from %preun instead of %postun
+
+* Sat Jul 04 1998 John H Terpstra <jht@samba.org>
+ - fixed codepage preservation during update via -Uvh
+
+* Mon Jun 08 1998 Erik Troan <ewt@redhat.com>
+ - made the %postun script a tad less agressive; no reason to remove
+ the logs or lock file
+ - the %postun and %preun should only exectute if this is the final
+ removal
+ - migrated %triggerpostun from Red Hat's samba package to work around
+ packaging problems in some Red Hat samba releases
+
+* Sun Apr 26 1998 John H Terpstra <jht@samba.org>
+ - Tidy up for early alpha releases
+ - added findsmb from SGI packaging
+
+* Thu Apr 09 1998 John H Terpstra <jht@samba.org>
+ - Updated spec file
+ - Included new codepage.936
+
+* Sat Mar 20 1998 John H Terpstra <jht@samba.org>
+ - Added swat facility
+
+* Sat Jan 24 1998 John H Terpstra <jht@samba.org>
+ - Many optimisations (some suggested by Manoj Kasichainula <manojk@io.com>
+ - Use of chkconfig in place of individual symlinks to /etc/rc.d/init/smb
+ - Compounded make line
+ - Updated smb.init restart mechanism
+ - Use compound mkdir -p line instead of individual calls to mkdir
+ - Fixed smb.conf file path for log files
+ - Fixed smb.conf file path for incoming smb print spool directory
+ - Added a number of options to smb.conf file
+ - Added smbuser file and smb.conf file updates for username map
+
+%prep
+%setup
+
+%build
+cd source
+
+%ifarch ia64
+libtoolize --copy --force # get it to recognize IA-64
+autoheader
+autoconf
+EXTRA="-D_LARGEFILE64_SOURCE"
+%endif
+NUMCPU=`grep processor /proc/cpuinfo | wc -l`
+CFLAGS="$RPM_OPT_FLAGS $EXTRA" ./configure \
+ --prefix=%{prefix} \
+ --localstatedir=/var \
+ --with-configdir=/etc/samba \
+ --with-privatedir=/etc/samba \
+ --with-fhs \
+ --with-quotas \
+ --with-smbmount \
+ --with-pam \
+ --with-syslog \
+ --with-utmp \
+ --with-netatalk \
+ --with-sambabook=%{prefix}/share/swat/using_samba \
+ --with-swatdir=%{prefix}/share/swat
+make -j${NUMCPU} proto
+make -j${NUMCPU} all nsswitch/libnss_wins.so
+make -j${NUMCPU} debug2html
+make -j${NUMCPU} bin/smbspool
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT/sbin
+mkdir -p $RPM_BUILD_ROOT/etc/samba
+mkdir -p $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d,samba}
+mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
+mkdir -p $RPM_BUILD_ROOT%{prefix}/{bin,sbin}
+mkdir -p $RPM_BUILD_ROOT%{prefix}/share/swat/{images,help,include,using_samba}
+mkdir -p $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba/{figs,gifs}
+mkdir -p $RPM_BUILD_ROOTMANDIR_MACRO
+mkdir -p $RPM_BUILD_ROOT/var/lock/samba
+mkdir -p $RPM_BUILD_ROOT/var/log/samba
+mkdir -p $RPM_BUILD_ROOT/var/spool/samba
+mkdir -p $RPM_BUILD_ROOT/lib/security
+
+# Install standard binary files
+for i in nmblookup smbclient smbpasswd smbstatus testparm testprns \
+ make_printerdef rpcclient smbspool smbcacls smbcontrol wbinfo
+do
+install -m755 source/bin/$i $RPM_BUILD_ROOT%{prefix}/bin
+done
+for i in mksmbpasswd.sh smbtar
+do
+install -m755 source/script/$i $RPM_BUILD_ROOT%{prefix}/bin
+done
+
+# Install secure binary files
+for i in smbd nmbd swat smbmount smbumount smbmnt debug2html winbindd
+do
+install -m755 source/bin/$i $RPM_BUILD_ROOT%{prefix}/sbin
+done
+
+# we need a symlink for mount to recognise the smb and smbfs filesystem types
+ln -sf %{prefix}/sbin/smbmount $RPM_BUILD_ROOT/sbin/mount.smbfs
+ln -sf %{prefix}/sbin/smbmount $RPM_BUILD_ROOT/sbin/mount.smb
+
+# This allows us to get away without duplicating code that
+# sombody else can maintain for us.
+cd source
+make LIBDIR=$RPM_BUILD_ROOT/etc/samba \
+ BINDIR=$RPM_BUILD_ROOT%{prefix}/bin \
+ MANDIR=$RPM_BUILD_ROOTMANDIR_MACRO \
+ SWATDIR=$RPM_BUILD_ROOT/usr/share/swat \
+ SAMBABOOK=$RPM_BUILD_ROOT/usr/share/swat/using_samba \
+ installman installswat
+cd ..
+
+# Install the nsswitch library extension file
+install -m755 source/nsswitch/libnss_wins.so $RPM_BUILD_ROOT/lib
+
+# Make link for wins resolver
+( cd $RPM_BUILD_ROOT/lib; ln -s libnss_wins.so libnss_wins.so.2; )
+
+# Install winbind shared libraries
+install -m755 source/nsswitch/libnss_winbind.so $RPM_BUILD_ROOT/lib
+install -m755 source/nsswitch/pam_winbind.so $RPM_BUILD_ROOT/lib/security
+
+# Install SWAT helper files
+for i in swat/help/*.html docs/htmldocs/*.html
+do
+install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/help
+done
+for i in swat/images/*.gif
+do
+install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/images
+done
+for i in swat/include/*.html
+do
+install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/include
+done
+
+# Install the miscellany
+install -m644 swat/README $RPM_BUILD_ROOT%{prefix}/share/swat
+install -m755 packaging/RedHat/smbprint $RPM_BUILD_ROOT%{prefix}/bin
+install -m755 packaging/RedHat/findsmb $RPM_BUILD_ROOT%{prefix}/bin
+install -m755 packaging/RedHat/smb.init $RPM_BUILD_ROOT/etc/rc.d/init.d/smb
+install -m755 packaging/RedHat/smb.init $RPM_BUILD_ROOT%{prefix}/sbin/samba
+install -m644 packaging/RedHat/samba.log $RPM_BUILD_ROOT/etc/logrotate.d/samba
+install -m644 packaging/RedHat/smb.conf $RPM_BUILD_ROOT/etc/samba/smb.conf
+install -m644 packaging/RedHat/smbusers $RPM_BUILD_ROOT/etc/samba/smbusers
+install -m644 packaging/RedHat/samba.pamd $RPM_BUILD_ROOT/etc/pam.d/samba
+install -m644 packaging/RedHat/samba.pamd.stack $RPM_BUILD_ROOT/etc/samba/samba.stack
+install -m644 packaging/RedHat/samba.xinetd $RPM_BUILD_ROOT/etc/samba/samba.xinetd
+echo 127.0.0.1 localhost > $RPM_BUILD_ROOT/etc/samba/lmhosts
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+/sbin/chkconfig --add smb
+/sbin/chkconfig smb off
+
+echo "Looking for old /etc/smb.conf..."
+if [ -f /etc/smb.conf ]; then
+ echo "Moving old /etc/smb.conf to /etc/samba/smb.conf"
+ mv /etc/smb.conf /etc/samba/smb.conf
+fi
+
+echo "Looking for old /etc/smbusers..."
+if [ -f /etc/smbusers ]; then
+ echo "Moving old /etc/smbusers to /etc/samba/smbusers"
+ mv /etc/smbusers /etc/samba/smbusers
+fi
+
+echo "Looking for old /etc/lmhosts..."
+if [ -f /etc/lmhosts ]; then
+ echo "Moving old /etc/lmhosts to /etc/samba/lmhosts"
+ mv /etc/lmhosts /etc/samba/lmhosts
+fi
+
+echo "Looking for old /etc/MACHINE.SID..."
+if [ -f /etc/MACHINE.SID ]; then
+ echo "Moving old /etc/MACHINE.SID to /etc/samba/MACHINE.SID"
+ mv /etc/MACHINE.SID /etc/samba/MACHINE.SID
+fi
+
+echo "Looking for old /etc/smbpasswd..."
+if [ -f /etc/smbpasswd ]; then
+ echo "Moving old /etc/smbpasswd to /etc/samba/smbpasswd"
+ mv /etc/smbpasswd /etc/samba/smbpasswd
+fi
+
+# Add swat entry to /etc/services if not already there.
+if !( grep ^[:space:]*swat /etc/services > /dev/null ) then
+ echo 'swat 901/tcp # Add swat service used via inetd' >> /etc/services
+fi
+
+# Add swat entry to /etc/inetd.conf if needed.
+if [ -f /etc/inetd.conf ]; then
+ if !( grep ^[:space:]*swat /etc/inetd.conf > /dev/null ) then
+ echo 'swat stream tcp nowait.400 root %{prefix}/sbin/swat swat' >> /etc/inetd.conf
+ killall -1 inetd || :
+ fi
+fi
+
+# Add swat entry to xinetd.d if needed.
+if [ -d $RPM_BUILD_ROOT/etc/xinetd.d -a ! -f /etc/xinetd.d/swat ]; then
+ mv /etc/samba/samba.xinetd /etc/xinetd.d/swat
+else
+ rm -f /etc/samba/samba.xinetd
+fi
+
+# Install the correct version of the samba pam file, depending on pam version.
+if [ -f /lib/security/pam_stack.so ]; then
+ echo "Installing stack version of /etc/pam.d/samba..."
+ mv /etc/samba/samba.stack /etc/pam.d/samba
+else
+ echo "Installing non-stack version of /etc/pam.d/samba..."
+ rm -f /etc/samba/samba.stack
+fi
+
+# Create winbind nss client symlink
+
+ln -s /lib/libnss_winbind.so /lib/libnss_winbind.so.2
+
+%preun
+if [ $1 = 0 ] ; then
+ /sbin/chkconfig --del smb
+
+ # We want to remove the browse.dat and wins.dat files so they can not interfer with a new version of samba!
+ if [ -e /var/lock/samba/browse.dat ]; then
+ rm -f /var/lock/samba/browse.dat
+ fi
+ if [ -e /var/lock/samba/wins.dat ]; then
+ rm -f /var/lock/samba/wins.dat
+ fi
+
+ # Remove the transient tdb files.
+ if [ -e /var/lock/samba/brlock.tdb ]; then
+ rm -f /var/lock/samba/brlock.tdb
+ fi
+
+ if [ -e /var/lock/samba/unexpected.tdb ]; then
+ rm -f /var/lock/samba/unexpected.tdb
+ fi
+
+ if [ -e /var/lock/samba/connections.tdb ]; then
+ rm -f /var/lock/samba/connections.tdb
+ fi
+
+ if [ -e /var/lock/samba/locking.tdb ]; then
+ rm -f /var/lock/samba/locking.tdb
+ fi
+
+ if [ -e /var/lock/samba/messages.tdb ]; then
+ rm -f /var/lock/samba/messages.tdb
+ fi
+
+ # Remove winbind nss client symlink
+
+ if [ -L /lib/libnss_winbind.so.2 ]; then
+ rm -f /lib/libnss_winbind.so.2
+ fi
+fi
+
+%postun
+# Only delete remnants of samba if this is the final deletion.
+if [ $1 = 0 ] ; then
+ if [ -x /etc/pam.d/samba ]; then
+ rm -f /etc/pam.d/samba
+ fi
+ if [ -e /var/log/samba ]; then
+ rm -rf /var/log/samba
+ fi
+
+ # Remove swat entries from /etc/inetd.conf and /etc/services
+ cd /etc
+ tmpfile=/etc/tmp.$$
+ if [ -f /etc/inetd.conf ]; then
+ # preserve inetd.conf permissions.
+ cp -p /etc/inetd.conf $tmpfile
+ sed -e '/^[:space:]*swat.*$/d' /etc/inetd.conf > $tmpfile
+ mv $tmpfile inetd.conf
+ fi
+ # preserve services permissions.
+ cp -p /etc/services $tmpfile
+ sed -e '/^[:space:]*swat.*$/d' /etc/services > $tmpfile
+ mv $tmpfile /etc/services
+
+ # Remove swat entry from /etc/xinetd.d
+ if [ -f /etc/xinetd.d/swat ]; then
+ rm -r /etc/xinetd.d/swat
+ fi
+fi
+
+%triggerpostun -- samba < samba-2.0.0
+if [ $0 != 0 ]; then
+ /sbin/chkconfig --add smb
+fi
+
+%files
+%doc README COPYING Manifest Read-Manifest-Now
+%doc WHATSNEW.txt Roadmap
+%doc docs
+%doc swat/README
+%doc examples
+%attr(-,root,root) %{prefix}/sbin/smbd
+%attr(-,root,root) %{prefix}/sbin/nmbd
+%attr(-,root,root) %{prefix}/sbin/swat
+%attr(-,root,root) %{prefix}/sbin/smbmnt
+%attr(-,root,root) %{prefix}/sbin/smbmount
+%attr(-,root,root) %{prefix}/sbin/smbumount
+%attr(-,root,root) %{prefix}/sbin/winbindd
+%attr(-,root,root) /sbin/mount.smbfs
+%attr(-,root,root) /sbin/mount.smb
+%attr(-,root,root) %{prefix}/bin/mksmbpasswd.sh
+%attr(-,root,root) %{prefix}/bin/smbclient
+%attr(-,root,root) %{prefix}/bin/smbspool
+%attr(-,root,root) %{prefix}/bin/rpcclient
+%attr(-,root,root) %{prefix}/bin/testparm
+%attr(-,root,root) %{prefix}/bin/testprns
+%attr(-,root,root) %{prefix}/bin/findsmb
+%attr(-,root,root) %{prefix}/bin/smbstatus
+%attr(-,root,root) %{prefix}/bin/nmblookup
+%attr(-,root,root) %{prefix}/bin/make_printerdef
+%attr(-,root,root) %{prefix}/bin/smbpasswd
+%attr(-,root,root) %{prefix}/bin/smbtar
+%attr(-,root,root) %{prefix}/bin/smbprint
+%attr(-,root,root) %{prefix}/bin/smbcontrol
+%attr(-,root,root) %{prefix}/bin/smbcacls
+%attr(-,root,root) %{prefix}/bin/wbinfo
+%attr(755,root,root) /lib/libnss_wins.s*
+%attr(-,root,root) %{prefix}/share/swat/help/*
+%attr(-,root,root) %{prefix}/share/swat/images/*
+%attr(-,root,root) %{prefix}/share/swat/include/header.html
+%attr(-,root,root) %{prefix}/share/swat/include/footer.html
+%attr(-,root,root) %{prefix}/share/swat/using_samba/*
+%attr(-,root,root) %config(noreplace) /etc/samba/lmhosts
+%attr(-,root,root) %config(noreplace) /etc/samba/smb.conf
+%attr(-,root,root) %config(noreplace) /etc/samba/smbusers
+%attr(-,root,root) /etc/samba/samba.stack
+%attr(-,root,root) /etc/samba/samba.xinetd
+%attr(-,root,root) /etc/rc.d/init.d/smb
+%attr(-,root,root) /etc/logrotate.d/samba
+%attr(-,root,root) %config(noreplace) /etc/pam.d/samba
+%attr(-,root,root) MANDIR_MACRO/man1/*
+%attr(-,root,root) MANDIR_MACRO/man5/*
+%attr(-,root,root) MANDIR_MACRO/man7/*
+%attr(-,root,root) MANDIR_MACRO/man8/*
+%attr(755,root,root) %dir /var/lock/samba
+%attr(-,root,root) %dir /var/log/samba
+%attr(1777,root,root) %dir /var/spool/samba
+%attr(-,root,root) /lib/libnss_winbind.so
+%attr(-,root,root) /lib/security/pam_winbind.so
diff --git a/packaging/RedHat/smb.conf b/packaging/RedHat/smb.conf
new file mode 100644
index 00000000000..71ff9463884
--- /dev/null
+++ b/packaging/RedHat/smb.conf
@@ -0,0 +1,290 @@
+# 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
+#
+# 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
+ workgroup = MYGROUP
+
+# server string is the equivalent of the NT Description field
+ server string = Samba Server
+
+# This option is important for security. It allows you to restrict
+# connections to machines which are on your local network. The
+# following example restricts access to two C class networks and
+# the "loopback" interface. For more examples of the syntax see
+# the smb.conf man page
+; hosts allow = 192.168.1. 192.168.2. 127.
+
+# if you want to automatically load your printer list rather
+# than setting them up individually then you'll need this
+ printcap name = /etc/printcap
+ load printers = yes
+
+# It should not be necessary to spell out the print system type unless
+# yours is non-standard. Currently supported print systems include:
+# bsd, sysv, plp, lprng, aix, hpux, qnx
+; printing = bsd
+
+# 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
+
+# Security mode. Most people will want user level security. See
+# security_level.txt for details.
+ security = user
+# Use password server option only with security = server
+; password server = <NT-Server-Name>
+
+# Password Level allows matching of _n_ characters of the password for
+# all combinations of upper and lower case.
+; password level = 8
+; username level = 8
+
+# You may wish to use password encryption. Please read
+# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
+# Do not enable this option unless you have read those documents
+; encrypt passwords = yes
+; smb passwd file = /etc/samba/smbpasswd
+
+# The following are needed to allow password changing from Windows to
+# update the Linux sytsem password also.
+# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
+# NOTE2: You do NOT need these to allow workstations to change only
+# the encrypted SMB passwords. They allow the Unix password
+# to be kept in sync with the SMB password.
+; unix password sync = Yes
+; passwd program = /usr/bin/passwd %u
+; passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
+
+# Unix users can map to different SMB User names
+; username map = /etc/samba/smbusers
+
+# 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
+; include = /etc/samba/smb.conf.%m
+
+# Most people will find that this option gives better performance.
+# See speed.txt and the manual pages for details
+ socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
+
+# 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
+
+# Configure remote browse list synchronisation here
+# request announcement to, or browse list sync from:
+# a specific host or from / to a whole subnet (see below)
+; remote browse sync = 192.168.3.25 192.168.5.255
+# Cause this host to announce itself to local subnets here
+; remote announce = 192.168.1.255 192.168.2.44
+
+# 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
+
+# Use only if you have an NT server on your network that has been
+# configured at install time to be a primary domain controller.
+; domain controller = <NT-Domain-Controller-SMBName>
+
+# 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
+
+# All NetBIOS names must be resolved to IP Addresses
+# 'Name Resolve Order' allows the named resolution mechanism to be specified
+# the default order is "host lmhosts wins bcast". "host" means use the unix
+# system gethostbyname() function call that will use either /etc/hosts OR
+# DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf
+# and the /etc/resolv.conf file. "host" therefore is system configuration
+# dependant. This parameter is most often of use to prevent DNS lookups
+# in order to resolve NetBIOS names to IP Addresses. Use with care!
+# The example below excludes use of name resolution for machines that are NOT
+# on the local network segment
+# - OR - are not deliberately to be known via lmhosts or via WINS.
+; name resolve order = wins lmhosts bcast
+
+# 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 built-in default for versions 1.9.17 is yes,
+# this has been changed in version 1.9.18 to no.
+ dns proxy = no
+
+# Case Preservation can be handy - system default is _no_
+# NOTE: These can be set on a per share basis
+; preserve case = no
+; short preserve case = no
+# Default case is normally upper case for all DOS files
+; default case = lower
+# Be very careful with case sensitivity - it can break things!
+; case sensitive = no
+
+#============================ 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 = /home/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 = /home/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
+; read only = yes
+; 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/packaging/RedHat/smb.init b/packaging/RedHat/smb.init
new file mode 100755
index 00000000000..260439281a3
--- /dev/null
+++ b/packaging/RedHat/smb.init
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# chkconfig: 345 91 35
+# description: Starts and stops the Samba smbd and nmbd daemons \
+# used to provide SMB network services.
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# 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
+
+# See how we were called.
+case "$1" in
+ start)
+ echo -n "Starting SMB services: "
+ daemon smbd -D
+ daemon nmbd -D
+ echo
+ touch /var/lock/subsys/smb
+ ;;
+ stop)
+ echo -n "Shutting down SMB services: "
+ killproc smbd
+ killproc nmbd
+ rm -f /var/lock/subsys/smb
+ echo ""
+ ;;
+ status)
+ status smbd
+ status nmbd
+ ;;
+ restart)
+ echo -n "Restarting SMB services: "
+ $0 stop
+ $0 start
+ echo "done."
+ ;;
+ *)
+ echo "Usage: smb {start|stop|restart|status}"
+ exit 1
+esac
+
diff --git a/packaging/RedHat/smbprint b/packaging/RedHat/smbprint
new file mode 100755
index 00000000000..ec083eede62
--- /dev/null
+++ b/packaging/RedHat/smbprint
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+# This script is an input filter for printcap printing on a unix machine. It
+# uses the smbclient program to print the file to the specified smb-based
+# server and service.
+# For example you could have a printcap entry like this
+#
+# smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint
+#
+# which would create a unix printer called "smb" that will print via this
+# script. You will need to create the spool directory /usr/spool/smb with
+# appropriate permissions and ownerships for your system.
+
+# Set these to the server and service you wish to print to
+# In this example I have a WfWg PC called "lapland" that has a printer
+# exported called "printer" with no password.
+
+#
+# Script further altered by hamiltom@ecnz.co.nz (Michael Hamilton)
+# so that the server, service, and password can be read from
+# a /var/spool/lpd/PRINTNAME/.config file.
+#
+# In order for this to work the /etc/printcap entry must include an
+# accounting file (af=...):
+#
+# cdcolour:\
+# :cm=CD IBM Colorjet on 6th:\
+# :sd=/var/spool/lpd/cdcolour:\
+# :af=/var/spool/lpd/cdcolour/acct:\
+# :if=/usr/local/etc/smbprint:\
+# :mx=0:\
+# :lp=/dev/null:
+#
+# The /usr/var/spool/lpd/PRINTNAME/.config file should contain:
+# server=PC_SERVER
+# service=PR_SHARENAME
+# password="password"
+#
+# E.g.
+# server=PAULS_PC
+# service=CJET_371
+# password=""
+
+#
+# Debugging log file, change to /dev/null if you like.
+#
+# logfile=/tmp/smb-print.log
+logfile=/dev/null
+
+
+#
+# The last parameter to the filter is the accounting file name.
+# Extract the directory name from the file name.
+# Concat this with /.config to get the config file.
+#
+eval acct_file=\${$#}
+spool_dir=`dirname $acct_file`
+config_file=$spool_dir/.config
+
+# Should read the following variables set in the config file:
+# server
+# service
+# password
+eval `cat $config_file`
+
+#
+# Some debugging help, change the >> to > if you want to same space.
+#
+echo "server $server, service $service" >> $logfile
+
+(
+# NOTE You may wish to add the line `echo translate' if you want automatic
+# CR/LF translation when printing.
+# echo translate
+ echo "print -"
+ cat
+) | /usr/bin/smbclient "\\\\$server\\$service" $password -U $server -N -P >> $logfile
diff --git a/packaging/RedHat/smbusers b/packaging/RedHat/smbusers
new file mode 100644
index 00000000000..ae3389f53f8
--- /dev/null
+++ b/packaging/RedHat/smbusers
@@ -0,0 +1,3 @@
+# Unix_name = SMB_name1 SMB_name2 ...
+root = administrator admin
+nobody = guest pcguest smbguest
diff --git a/packaging/SGI/.cvsignore b/packaging/SGI/.cvsignore
new file mode 100644
index 00000000000..7b74def5aea
--- /dev/null
+++ b/packaging/SGI/.cvsignore
@@ -0,0 +1,8 @@
+bins
+catman
+html
+codepages
+swat
+Makefile
+samba.idb
+samba.spec
diff --git a/packaging/SGI/README b/packaging/SGI/README
new file mode 100644
index 00000000000..f13164af4a7
--- /dev/null
+++ b/packaging/SGI/README
@@ -0,0 +1,44 @@
+This directory contains sample files for using Samba on an IRIX
+system. These were taken from a system running IRIX 6.2. The
+client machines were running Win95 and connected via the Ethernet
+using TCP/IP and DNS. Consult the Samba documentation for tips
+on configuring Samba "properly"; this smb.conf file is very simple.
+Consult the Microsoft help/documentation to understand how to
+configure the networking support on the PC clients (Win95, WfW,
+etc.).
+
+This distribution is configured so that various Samba configuration,
+binary, and log files are placed in the /usr/samba file hierarchy.
+Man pages are placed in the /usr/share/catman/u_man hierarchy.
+
+The version number of the distribution is a 10 digit number that
+is created from the samba version number. Each section of the samba
+version number forms 2 digits of the version number (with leading
+zeros if necessary). The alpha versions add 00 and 2 digits for
+the alpha number. The first release adds 0100. Patch releases add
+2 digits for the patch level plus 1 and 00.
+
+samba version 1.9.18alpha9 would become 0109180009
+samba version 1.9.18 would become 0109180100
+samba version 1.9.18p9 would become 0109181000
+
+You can enable all printers on your system to be used by samba
+by running the script /usr/samba/mkprintcap.sh
+
+This distribution automatically configures samba to run as deamons
+by the script /etc/init.d/samba and the file /etc/config/samba
+(used by chkconfig). If you would prefer to have samba started by
+inetd you can run the script /usr/samba/inetd.sh.
+
+To create a Samba distribution you must have the Documenter's WorkBench
+package installed to format the manual pages. In addition you need
+to have the Software Packager software (inst_dev) installed to
+generate the inst images, and Perl to generate the spec and idb files.
+
+From /usr/samba/packaging/SGI directory run the mkrelease.sh script.
+There is one optional argument which is the major release number of the
+OS version (4, 5, or 6) you desire. If no number is specified it defaults
+to 6. This script uses Perl to generate the Makefile with the proper
+defines and the packaging files samba.spec and samba.idb. The binary
+package files will be placed in ./bins
+
diff --git a/packaging/SGI/findsmb b/packaging/SGI/findsmb
new file mode 100755
index 00000000000..a48ec592e80
--- /dev/null
+++ b/packaging/SGI/findsmb
@@ -0,0 +1,141 @@
+#!/bin/perl
+#
+# Prints info on all smb responding machines on a subnet.
+# This script needs to be run on a machine without nmbd running and be
+# run as root to get correct info from WIN95 clients.
+#
+# syntax:
+# findsmb [subnet broadcast address]
+#
+# with no agrument it will list machines on the current subnet
+#
+# There will be a "+" in front of the workgroup name for machines that are
+# local master browsers for that workgroup. There will be an "*" in front
+# of the workgroup name for machines that are the domain master browser for
+# that workgroup.
+#
+
+$SAMBABIN = "/usr/samba/bin";
+
+for ($i = 0; $i < 2; $i++) { # test for -d option and broadcast address
+ $_ = shift;
+ if (m/-d|-D/) {
+ $DEBUG = 1;
+ } else {
+ if ($_) {
+ $BCAST = "-B $_";
+ }
+ }
+}
+
+sub ipsort # do numeric sort on last field of IP address
+{
+ @t1 = split(/\./,$a);
+ @t2 = split(/\./,$b);
+ @t1[3] <=> @t2[3];
+}
+
+# look for all machines that respond to a name lookup
+
+open(NMBLOOKUP,"$SAMBABIN/nmblookup $BCAST '*'|") ||
+ die("Can't run nmblookup '*'.\n");
+
+# get rid of all lines that are not a response IP address,
+# strip everything but IP address and sort by last field in address
+
+@ipaddrs = sort ipsort grep(s/ \*<00>.*$//,<NMBLOOKUP>);
+
+# print header info
+
+print "\nIP ADDR NETBIOS NAME WORKGROUP/OS/VERSION $BCAST\n";
+print "---------------------------------------------------------------------\n";
+
+foreach $ip (@ipaddrs) # loop through each IP address found
+{
+ $ip =~ s/\n//; # strip newline from IP address
+
+# find the netbios names registered by each machine
+
+ open(NMBLOOKUP,"$SAMBABIN/nmblookup -r -A $ip|") ||
+ die("Can't get nmb name list.\n");
+ @nmblookup = <NMBLOOKUP>;
+ close NMBLOOKUP;
+
+# get the first <00> name
+
+ @name = grep(/<00> - /,@nmblookup);
+ $_ = @name[0];
+ if ($_) { # we have a netbios name
+ if (/GROUP/) { # is it a group name
+ ($name, $aliases, $type, $length, @addresses) =
+ gethostbyaddr(pack('C4',split('\.',$ip)),2);
+ if (! $name) { # could not get name
+ $name = "unknown nis name";
+ }
+ } else {
+ /(\S+)/;
+ $name = $1;
+ }
+
+# do an smbclient command on the netbios name.
+
+ open(SMB,"$SAMBABIN/smbclient -N -L $name -I $ip -U% |") ||
+ die("Can't do smbclient command.\n");
+ @smb = <SMB>;
+ close SMB;
+
+ if ($DEBUG) { # if -d flag print results of nmblookup and smbclient
+ print "===============================================================\n";
+ print @nmblookup;
+ print @smb;
+ }
+
+# look for the OS= string
+
+ @info = grep(/OS=/,@smb);
+ $_ = @info[0];
+ if ($_) { # we found response
+ s/.*Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter
+
+ } else { # no OS= string in response (WIN95 client)
+
+# for WIN95 clients get workgroup name from nmblookup response
+ @name = grep(/<00> - <GROUP>/,@nmblookup);
+ $_ = @name[0];
+ if ($_) {
+ /(\S+)/;
+ $_ = "[$1]";
+ } else {
+ $_ = "Unknown Workgroup";
+ }
+ }
+
+# see if machine registered a local master browser name
+ if (grep(/<1d>/,@nmblookup)) {
+ $master = '+'; # indicate local master browser
+ if (grep(/<1b>/,@nmblookup)) { # how about domain master browser?
+ $master = '*'; # indicate domain master browser
+ }
+ } else {
+ $master = ' '; # not a browse master
+ }
+
+# line up info in 3 columns
+
+ print "$ip".' 'x(16-length($ip))."$name".' 'x(14-length($name))."$master"."$_\n";
+
+ } else { # no netbios name found
+# try getting the host name
+ ($name, $aliases, $type, $length, @addresses) =
+ gethostbyaddr(pack('C4',split('\.',$ip)),2);
+ if (! $name) { # could not get name
+ $name = "unknown nis name";
+ }
+ if ($DEBUG) { # if -d flag print results of nmblookup
+ print "===============================================================\n";
+ print @nmblookup;
+ }
+ print "$ip".' 'x(16-length($ip))."$name\n";
+ }
+}
+
diff --git a/packaging/SGI/idb.pl b/packaging/SGI/idb.pl
new file mode 100755
index 00000000000..66cb3fa5584
--- /dev/null
+++ b/packaging/SGI/idb.pl
@@ -0,0 +1,374 @@
+#!/usr/bin/perl
+require "pwd.pl" || die "Required pwd.pl not found";
+
+# This perl script automatically generates the idb file
+
+$PKG = 'samba';
+$SRCDIR = '../..';
+$SRCPFX = '.';
+
+&initpwd;
+$curdir = $ENV{"PWD"};
+
+if ($PKG eq "samba_irix") {
+ open(BOOKS,"IDB.books") || die "Unable to open IDB.books file\n";
+ @books = sort idbsort <BOOKS>;
+ close BOOKS;
+}
+
+# We don't want the files listed in .cvsignore in the source tree
+open(IGNORES,"$SRCDIR/source/.cvsignore") || die "Unable to open .cvsignore file\n";
+while (<IGNORES>) {
+ chop;
+ next if /cvs\.log/;
+ $ignores{$_}++;
+}
+close IGNORES;
+
+# We don't want the files listed in .cvsignore in the source/include tree
+open(IGNORES,"$SRCDIR/source/include/.cvsignore") || die "Unable to open include/.cvsignore file\n";
+while (<IGNORES>) {
+ chop;
+ $ignores{$_}++;
+}
+close IGNORES;
+
+# get the names of all the binary files to be installed
+open(MAKEFILE,"$SRCDIR/source/Makefile") || die "Unable to open Makefile\n";
+@makefile = <MAKEFILE>;
+@winbind_progs = grep(/^WINBIND_PROGS /,@makefile);
+@winbind_sprogs = grep(/^WINBIND_SPROGS /,@makefile);
+@winbind_lprogs = grep(/^WINBIND_LPROGS /,@makefile);
+@winbind_pam_progs = grep(/^WINBIND_PAM_PROGS /,@makefile);
+@sprogs = grep(/^SPROGS /,@makefile);
+@progs1 = grep(/^PROGS1 /,@makefile);
+@progs2 = grep(/^PROGS2 /,@makefile);
+@mprogs = grep(/^MPROGS /,@makefile);
+@progs = grep(/^PROGS /,@makefile);
+@scripts = grep(/^SCRIPTS /,@makefile);
+@codepagelist = grep(/^CODEPAGELIST/,@makefile);
+close MAKEFILE;
+
+if (@winbind_progs) {
+ @winbind_progs[0] =~ s/^.*\=//;
+ @winbind_progs = split(' ',@winbind_progs[0]);
+}
+if (@winbind_sprogs) {
+ @winbind_sprogs[0] =~ s/^.*\=//;
+ @winbind_sprogs = split(' ',@winbind_sprogs[0]);
+}
+if (@winbind_lprogs) {
+ @winbind_lprogs[0] =~ s/^.*\=//;
+ @winbind_lprogs = split(' ',@winbind_lprogs[0]);
+}
+if (@winbind_pam_progs) {
+ @winbind_pam_progs[0] =~ s/^.*\=//;
+ @winbind_pam_progs = split(' ',@winbind_pam_progs[0]);
+}
+if (@sprogs) {
+ @sprogs[0] =~ s/^.*\=//;
+ @sprogs[0] =~ s/\$\(\S+\)\s//g;
+ @sprogs = split(' ',@sprogs[0]);
+}
+if (@progs) {
+ @progs[0] =~ s/^.*\=//;
+ @progs[0] =~ s/\$\(\S+\)\s//g;
+ @progs = split(' ',@progs[0]);
+}
+if (@mprogs) {
+ @mprogs[0] =~ s/^.*\=//;
+ @mprogs = split(' ',@mprogs[0]);
+}
+if (@progs1) {
+ @progs1[0] =~ s/^.*\=//;
+ @progs1 = split(' ',@progs1[0]);
+}
+if (@progs2) {
+ @progs2[0] =~ s/^.*\=//;
+ @progs2 = split(' ',@progs2[0]);
+}
+if (@scripts) {
+ @scripts[0] =~ s/^.*\=//;
+ @scripts[0] =~ s/\$\(srcdir\)\///g;
+ @scripts = split(' ',@scripts[0]);
+}
+
+# we need to create codepages for the package
+@codepagelist[0] =~ s/^.*\=//;
+chdir "$SRCDIR/source";
+system("chmod +x ./script/installcp.sh");
+system("./script/installcp.sh . . ../packaging/SGI/codepages ./bin @codepagelist[0]");
+chdir $curdir;
+opendir(DIR,"$SRCDIR/packaging/SGI/codepages") || die "Can't open codepages directory";
+@codepage = sort readdir(DIR);
+closedir(DIR);
+
+# install the swat files
+chdir "$SRCDIR/source";
+system("chmod +x ./script/installswat.sh");
+system("./script/installswat.sh ../packaging/SGI/swat ./ ../packaging/SGI/swat/using_samba");
+system("cp -f ../swat/README ../packaging/SGI/swat");
+chdir $curdir;
+
+# add my local files to the list of binaries to install
+@bins = sort byfilename (@sprogs,@progs,@progs1,@progs2,@mprogs,@scripts,@winbind_progs,@winbind_sprogs,("/findsmb","/sambalp","/smbprint"));
+@nsswitch = sort byfilename (@winbind_lprogs,@winbind_pam_progs);
+
+# get a complete list of all files in the tree
+chdir "$SRCDIR/";
+&dodir('.');
+chdir $curdir;
+
+# the files installed in docs include all the original files in docs plus all
+# the "*.doc" files from the source tree
+@docs = sort byfilename grep (!/^docs\/$/ & (/^source\/.*\.doc$/ | /^docs\//),@allfiles);
+@docs = grep(!/htmldocs\/using_samba/, @docs);
+@docs = grep(!/docbook/, @docs);
+
+@swatfiles = sort grep(/^packaging\/SGI\/swat/, @allfiles);
+@catman = sort grep(/^packaging\/SGI\/catman/ & !/\/$/, @allfiles);
+@catman = sort bydirnum @catman;
+
+# strip out all the generated directories and the "*.o" files from the source
+# release
+@allfiles = grep(!/^.*\.o$/ & !/^.*\.po$/ & !/^.*\.po32$/ & !/^source\/bin/ & !/^packaging\/SGI\/bins/ & !/^packaging\/SGI\/catman/ & !/^packaging\/SGI\/html/ & !/^packaging\/SGI\/codepages/ & !/^packaging\/SGI\/swat/, @allfiles);
+
+open(IDB,"> $curdir/$PKG.idb") || die "Unable to open $PKG.idb for output\n";
+
+print IDB "f 0644 root sys etc/config/samba $SRCPFX/packaging/SGI/samba.config $PKG.sw.base config(update)\n";
+print IDB "f 0755 root sys etc/init.d/samba $SRCPFX/packaging/SGI/samba.rc $PKG.sw.base\n";
+print IDB "l 0000 root sys etc/rc0.d/K39samba $SRCPFX/packaging/SGI $PKG.sw.base symval(../init.d/samba)\n";
+print IDB "l 0000 root sys etc/rc2.d/S81samba $SRCPFX/packaging/SGI $PKG.sw.base symval(../init.d/samba)\n";
+
+if ($PKG eq "samba_irix") {
+ print IDB "d 0755 root sys usr/relnotes/samba_irix $SRCPFX/packaging/SGI $PKG.man.relnotes\n";
+ print IDB "f 0644 root sys usr/relnotes/samba_irix/TC build/TC $PKG.man.relnotes\n";
+ print IDB "f 0644 root sys usr/relnotes/samba_irix/ch1.z build/ch1.z $PKG.man.relnotes\n";
+ print IDB "f 0644 root sys usr/relnotes/samba_irix/ch2.z build/ch2.z $PKG.man.relnotes\n";
+ print IDB "f 0644 root sys usr/relnotes/samba_irix/ch3.z build/ch3.z $PKG.man.relnotes\n";
+}
+else {
+ @copyfile = grep (/^COPY/,@allfiles);
+ print IDB "d 0755 root sys usr/relnotes/samba $SRCPFX/packaging/SGI $PKG.man.relnotes\n";
+ print IDB "f 0644 root sys usr/relnotes/samba/@copyfile[0] $SRCPFX/@copyfile[0] $PKG.man.relnotes\n";
+ print IDB "f 0644 root sys usr/relnotes/samba/legal_notice.html $SRCPFX/packaging/SGI/legal_notice.html $PKG.man.relnotes\n";
+ print IDB "f 0644 root sys usr/relnotes/samba/samba-relnotes.html $SRCPFX/packaging/SGI/relnotes.html $PKG.man.relnotes\n";
+}
+
+print IDB "d 0755 root sys usr/samba $SRCPFX/packaging/SGI $PKG.sw.base\n";
+
+print IDB "d 0755 root sys usr/samba/bin $SRCPFX/packaging/SGI $PKG.sw.base\n";
+while(@bins) {
+ $nextfile = shift @bins;
+ ($filename = $nextfile) =~ s/^.*\///;;
+
+ if (index($nextfile,'$')) {
+ if ($filename eq "smbpasswd") {
+ print IDB "f 0755 root sys usr/samba/bin/$filename $SRCPFX/source/$nextfile $PKG.sw.base \n";
+ }
+ elsif ($filename eq "findsmb") {
+ print IDB "f 0755 root sys usr/samba/bin/$filename $SRCPFX/packaging/SGI/$filename $PKG.sw.base\n";
+ }
+ elsif ($filename eq "swat") {
+ print IDB "f 4755 root sys usr/samba/bin/$filename $SRCPFX/source/$nextfile $PKG.sw.base preop(\"chroot \$rbase /etc/init.d/samba stop\") exitop(\"chroot \$rbase /usr/samba/scripts/startswat.sh\") removeop(\"chroot \$rbase /sbin/cp /etc/inetd.conf /etc/inetd.conf.O ; chroot \$rbase /sbin/sed -e '/^swat/D' -e '/^#SWAT/D' /etc/inetd.conf.O >/etc/inetd.conf; /etc/killall -HUP inetd || true\")\n";
+ }
+ elsif ($filename eq "sambalp") {
+ print IDB "f 0755 root sys usr/samba/bin/$filename $SRCPFX/packaging/SGI/$filename $PKG.sw.base \n";
+ }
+ elsif ($filename eq "smbprint") {
+ print IDB "f 0755 root sys usr/samba/bin/$filename $SRCPFX/packaging/SGI/$filename $PKG.sw.base\n";
+ }
+ elsif ($filename eq "smbd") {
+ print IDB "f 0755 root sys usr/samba/bin/$filename $SRCPFX/source/$nextfile $PKG.sw.base \n";
+ print IDB "f 0755 root sys usr/samba/bin/$filename.noquota $SRCPFX/source/$nextfile.noquota $PKG.sw.base \n";
+ print IDB "f 0755 root sys usr/samba/bin/$filename.profile $SRCPFX/source/$nextfile.profile $PKG.sw.base \n";
+ }
+ elsif ($filename eq "nmbd") {
+ print IDB "f 0755 root sys usr/samba/bin/$filename $SRCPFX/source/$nextfile $PKG.sw.base \n";
+ print IDB "f 0755 root sys usr/samba/bin/$filename.profile $SRCPFX/source/$nextfile.profile $PKG.sw.base \n";
+ }
+ else {
+ print IDB "f 0755 root sys usr/samba/bin/$filename $SRCPFX/source/$nextfile $PKG.sw.base \n";
+ }
+ }
+}
+
+print IDB "d 0755 root sys usr/samba/docs $SRCPFX/docs $PKG.man.doc\n";
+while (@docs) {
+ $nextfile = shift @docs;
+ next if ($nextfile eq "CVS");
+ ($junk,$file) = split(/\//,$nextfile,2);
+ if (grep(/\/$/,$nextfile)) {
+ $file =~ s/\/$//;
+ $nextfile =~ s/\/$//;
+ print IDB "d 0755 root sys usr/samba/docs/$file $SRCPFX/$nextfile $PKG.man.doc\n";
+ }
+ else {
+ print IDB "f 0644 root sys usr/samba/docs/$file $SRCPFX/$nextfile $PKG.man.doc\n";
+ }
+}
+
+print IDB "d 0755 root sys usr/samba/lib $SRCPFX/packaging/SGI $PKG.sw.base\n";
+print IDB "d 0755 root sys usr/samba/lib/codepages $SRCPFX/packaging/SGI $PKG.sw.base\n";
+while (@codepage) {
+ $nextpage = shift @codepage;
+ print IDB "f 0644 root sys usr/samba/lib/codepages/$nextpage $SRCPFX/packaging/SGI/codepages/$nextpage $PKG.sw.base nostrip \n";
+}
+print IDB "f 0644 root sys usr/samba/lib/smb.conf $SRCPFX/packaging/SGI/smb.conf $PKG.sw.base config(suggest)\n";
+
+if (@nsswitch) {
+ print IDB "d 0644 root sys usr/samba/nsswitch $SRCPFX/packaging/SGI $PKG.sw.base\n";
+ while(@nsswitch) {
+ $nextfile = shift @nsswitch;
+ ($filename = $nextfile) =~ s/^.*\///;;
+ print IDB "f 0755 root sys usr/samba/nsswitch/$filename $SRCPFX/source/$nextfile $PKG.sw.base \n";
+ }
+}
+
+print IDB "d 0755 lp sys usr/samba/printer $SRCPFX/packaging/SGI $PKG.sw.base\n";
+print IDB "d 0755 lp sys usr/samba/printer/W32ALPHA $SRCPFX/packaging/SGI $PKG.sw.base\n";
+print IDB "d 0755 lp sys usr/samba/printer/W32MIPS $SRCPFX/packaging/SGI $PKG.sw.base\n";
+print IDB "d 0755 lp sys usr/samba/printer/W32PPC $SRCPFX/packaging/SGI $PKG.sw.base\n";
+print IDB "d 0755 lp sys usr/samba/printer/W32X86 $SRCPFX/packaging/SGI $PKG.sw.base\n";
+print IDB "d 0755 lp sys usr/samba/printer/WIN40 $SRCPFX/packaging/SGI $PKG.sw.base\n";
+
+print IDB "d 0644 root sys usr/samba/private $SRCPFX/packaging/SGI $PKG.sw.base\n";
+print IDB "f 0600 root sys usr/samba/private/smbpasswd $SRCPFX/packaging/SGI/smbpasswd $PKG.sw.base config(suggest)\n";
+
+print IDB "d 0755 root sys usr/samba/scripts $SRCPFX/packaging/SGI $PKG.src.samba\n";
+print IDB "f 0755 root sys usr/samba/scripts/inetd.sh $SRCPFX/packaging/SGI/inetd.sh $PKG.sw.base\n";
+print IDB "f 0755 root sys usr/samba/scripts/inst.msg $SRCPFX/packaging/SGI/inst.msg $PKG.sw.base exitop(\"chroot \$rbase /usr/samba/scripts/inst.msg\")\n";
+print IDB "f 0755 root sys usr/samba/scripts/mkprintcap.sh $SRCPFX/packaging/SGI/mkprintcap.sh $PKG.sw.base\n";
+print IDB "f 0755 root sys usr/samba/scripts/removeswat.sh $SRCPFX/packaging/SGI/removeswat.sh $PKG.sw.base\n";
+print IDB "f 0755 root sys usr/samba/scripts/startswat.sh $SRCPFX/packaging/SGI/startswat.sh $PKG.sw.base\n";
+
+print IDB "d 0755 root sys usr/samba/src $SRCPFX/packaging/SGI $PKG.src.samba\n";
+@sorted = sort(@allfiles);
+while (@sorted) {
+ $nextfile = shift @sorted;
+ ($file = $nextfile) =~ s/^.*\///;
+ next if grep(/packaging\/SGI/& (/Makefile/ | /samba\.spec/ | /samba\.idb/),$nextfile);
+ next if grep(/source/,$nextfile) && ($ignores{$file});
+ next if ($nextfile eq "CVS");
+ if (grep(/\/$/,$nextfile)) {
+ $nextfile =~ s/\/$//;
+ print IDB "d 0755 root sys usr/samba/src/$nextfile $SRCPFX/$nextfile $PKG.src.samba\n";
+ }
+ else {
+ if (grep((/\.sh$/ | /configure$/ | /configure\.developer/ | /config\.guess/ | /config\.sub/ | /\.pl$/ | /mkman$/ | /pcp\/Install/ | /pcp\/Remove/),$nextfile)) {
+ print IDB "f 0755 root sys usr/samba/src/$nextfile $SRCPFX/$nextfile $PKG.src.samba\n";
+ }
+ else {
+ print IDB "f 0644 root sys usr/samba/src/$nextfile $SRCPFX/$nextfile $PKG.src.samba\n";
+ }
+ }
+}
+
+print IDB "d 0755 root sys usr/samba/swat $SRCPFX/packaging/SGI/swat $PKG.sw.base\n";
+while (@swatfiles) {
+ $nextfile = shift @swatfiles;
+ ($file = $nextfile) =~ s/^packaging\/SGI\/swat\///;
+ next if !$file;
+ if (grep(/\/$/,$file)) {
+ $file =~ s/\/$//;
+ print IDB "d 0755 root sys usr/samba/swat/$file $SRCPFX/packaging/SGI/swat/$file $PKG.sw.base\n";
+ }
+ else {
+ print IDB "f 0444 root sys usr/samba/swat/$file $SRCPFX/packaging/SGI/swat/$file $PKG.sw.base\n";
+ }
+}
+
+print IDB "d 0755 root sys usr/samba/var $SRCPFX/packaging/SGI $PKG.sw.base\n";
+print IDB "d 0755 root sys usr/samba/var/locks $SRCPFX/packaging/SGI $PKG.sw.base\n";
+
+if ($PKG eq "samba_irix") {
+ while(@books) {
+ $nextfile = shift @books;
+ print IDB $nextfile;
+ }
+}
+
+print IDB "d 0755 root sys usr/share/catman/u_man $SRCPFX/packaging/SGI $PKG.man.manpages\n";
+$olddirnum = "0";
+while (@catman) {
+ $nextfile = shift @catman;
+ ($file = $nextfile) =~ s/^packaging\/SGI\/catman\///;
+ ($dirnum = $file) =~ s/^[\D]*//;
+ $dirnum =~ s/\.z//;
+ if ($dirnum ne $olddirnum) {
+ print IDB "d 0755 root sys usr/share/catman/u_man/cat$dirnum $SRCPFX/packaging/SGI $PKG.man.manpages\n";
+ $olddirnum = $dirnum;
+ }
+ print IDB "f 0664 root sys usr/share/catman/u_man/cat$dirnum/$file $SRCPFX/$nextfile $PKG.man.manpages\n";
+}
+print IDB "d 01777 lp sys var/spool/samba $SRCPFX/packaging/SGI $PKG.sw.base\n";
+
+close IDB;
+print "\n\n$PKG.idb file has been created\n";
+
+sub dodir {
+ local($dir, $nlink) = @_;
+ local($dev,$ino,$mode,$subcount);
+
+ ($dev,$ino,$mode,$nlink) = stat('.') unless $nlink;
+
+ opendir(DIR,'.') || die "Can't open current directory";
+ local(@filenames) = sort readdir(DIR);
+ closedir(DIR);
+
+ if ($nlink ==2) { # This dir has no subdirectories.
+ for (@filenames) {
+ next if $_ eq '.';
+ next if $_ eq '..';
+ $this = substr($dir,2)."/$_";
+ push(@allfiles,$this);
+ }
+ }
+ else {
+ $subcount = $nlink -2;
+ for (@filenames) {
+ next if $_ eq '.';
+ next if $_ eq '..';
+ next if $_ eq 'CVS';
+ ($dev,$ino,$mode,$nlink) = lstat($_);
+ $name = "$dir/$_";
+ $this = substr($name,2);
+ $this .= '/' if -d;
+ push(@allfiles,$this);
+ next if $subcount == 0; # seen all the subdirs?
+
+ next unless -d _;
+
+ chdir $_ || die "Can't cd to $name";
+ &dodir($name,$nlink);
+ chdir '..';
+ --$subcount;
+ }
+ }
+}
+
+sub byfilename {
+ ($f0,$f1) = split(/\//,$a,2);
+ ($f0,$f2) = split(/\//,$b,2);
+ $f1 cmp $f2;
+}
+
+sub bydirnum {
+ ($f1 = $a) =~ s/^.*\///;
+ ($f2 = $b) =~ s/^.*\///;
+ ($dir1 = $a) =~ s/^[\D]*//;
+ ($dir2 = $b) =~ s/^[\D]*//;
+ if (!($dir1 <=> $dir2)) {
+ $f1 cmp $f2;
+ }
+ else {
+ $dir1 <=> $dir2;
+ }
+}
+
+sub idbsort {
+ ($f0,$f1,$f2,$f3) = split(/ /,$a,4);
+ ($f0,$f1,$f2,$f4) = split(/ /,$b,4);
+ $f3 cmp $f4;
+}
+
diff --git a/packaging/SGI/inetd.sh b/packaging/SGI/inetd.sh
new file mode 100755
index 00000000000..1d403978aec
--- /dev/null
+++ b/packaging/SGI/inetd.sh
@@ -0,0 +1,37 @@
+#! /bin/sh
+#
+# kill any running samba processes
+#
+/etc/killall smbd nmbd
+chkconfig samba off
+
+#
+# add SAMBA deamons to inetd.conf
+#
+cp /etc/inetd.conf /etc/inetd.conf.O
+
+if [ $? -ne 0 ]; then exit 1; fi
+if [ ! -r /etc/inetd.conf.O -o ! -w /etc/inetd.conf ]; then exit 1; fi
+
+sed -e "/^netbios/D" -e "/^#SAMBA/D" /etc/inetd.conf.O > /etc/inetd.conf
+echo '#SAMBA services' >> /etc/inetd.conf
+echo netbios-ssn stream tcp nowait root /usr/samba/bin/smbd smbd >> /etc/inetd.conf
+echo netbios-ns dgram udp wait root /usr/samba/bin/nmbd nmbd -S >> /etc/inetd.conf
+
+#
+# add SAMBA service ports to /etc/services
+#
+cp /etc/services /etc/services.O
+
+if [ $? -ne 0 ]; then exit 1; fi
+if [ ! -r /etc/services.O -o ! -w /etc/services ]; then exit 1; fi
+
+sed -e "/^netbios/D" -e "/^#SAMBA/D" /etc/services.O > /etc/services
+echo '#SAMBA services' >> /etc/services
+echo 'netbios-ns 137/udp # SAMBA' >> /etc/services
+echo 'netbios-ssn 139/tcp # SAMBA' >> /etc/services
+
+#
+# restart inetd to start SAMBA
+#
+/etc/killall -HUP inetd
diff --git a/packaging/SGI/inst.msg b/packaging/SGI/inst.msg
new file mode 100755
index 00000000000..4d8bab389cb
--- /dev/null
+++ b/packaging/SGI/inst.msg
@@ -0,0 +1,31 @@
+#! /bin/sh
+
+echo
+echo
+echo Samba has been installed on your system.
+echo
+echo Your /etc/services and /etc/inetd.conf files have
+echo been modified to automatically start the
+echo Samba Web Administration Tool \(SWAT\) when you
+echo connect with a web browser to
+echo
+echo http://`hostname`:901
+echo
+echo The original versions of /etc/services and
+echo /etc/inetd.conf were saved with a .O extension.
+echo
+echo If you do not wish SWAT to be enabled you may
+echo run the script /usr/samba/scripts/removeswat.sh
+echo which will remove the entries from /etc/services
+echo and /etc/inetd.conf
+echo
+echo Please review your configuration settings by
+echo connecting to SWAT or editing the file
+echo /usr/samba/lib/smb.conf and then starting
+echo the smbd and nmbd daemons to complete the
+echo installation. You may start the daemons from
+echo the SWAT "Status" page or by executing the
+echo following command as root.
+echo
+echo /etc/init.d/samba start
+echo
diff --git a/packaging/SGI/legal_notice.html b/packaging/SGI/legal_notice.html
new file mode 100644
index 00000000000..fdb76456289
--- /dev/null
+++ b/packaging/SGI/legal_notice.html
@@ -0,0 +1,53 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<HTML VERSION="2.0">
+<HEAD>
+<TITLE>Silicon Graphics Freeware Legal Notice</TITLE>
+</HEAD>
+
+<BODY>
+<H1><A NAME="LEGAL">Silicon Graphics Freeware Legal Notice</A></H1>
+<HR>
+Copyright 1995, Silicon Graphics, Inc. -- ALL RIGHTS RESERVED
+<P>
+You may copy, modify, use and distribute this software, (i)
+provided that you include the entirety of this reservation of
+rights notice in all such copies, and (ii) you comply with any
+additional or different obligations and/or use restrictions
+specified by any third party owner or supplier of the software
+in other notices that may be included with the software.
+
+<P>
+SGI DISCLAIMS ALL WARRANTIES WITH RESPECT TO THIS SOFTWARE,
+EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION,
+ALL WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+PURPOSE OR NONINFRINGEMENT. SGI SHALL NOT BE LIABLE FOR ANY
+SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING,
+WITHOUT LIMITATION, LOST REVENUES, LOST PROFITS, OR LOSS OF
+PROSPECTIVE ECONOMIC ADVANTAGE, RESULTING FROM THE USE OR MISUSE
+OF THIS SOFTWARE.
+
+<P>
+U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND:
+
+<P>
+
+Use, duplication or disclosure by the Government is subject to
+restrictions as set forth in FAR 52.227.19(c)(2) or subparagraph
+(c)(1)(ii) of the Rights in Technical Data and Computer Software
+clause at DFARS 252.227-7013 and/or in similar or successor
+clauses in the FAR, or the DOD or NASA FAR Supplement.
+Unpublished - rights reserved under the Copyright Laws of United
+States. Contractor/manufacturer is Silicon Graphics, Inc., 2011
+N. Shoreline Blvd. Mountain View, CA 94039-7311.
+
+<H3><A NAME="SUPPORT">Product Support</A></H3>
+
+<P>
+Freeware products are not supported by Silicon Graphics or any
+of its support providers. The software contained in this package
+is made available through the generous efforts of their authors.
+Although they are interested in your feedback, they are under no
+obligation to address bugs, enhancements, or answer questions.
+
+</BODY>
+</HTML>
diff --git a/packaging/SGI/mkman b/packaging/SGI/mkman
new file mode 100755
index 00000000000..a39ed9fdd0c
--- /dev/null
+++ b/packaging/SGI/mkman
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+if [ ! -d catman ]; then
+ mkdir catman
+fi
+
+
+FILES="*.?"
+
+cd ../../docs/manpages
+for FILE in $FILES ; do
+ if [ "$FILE" = "smbmnt.8" ]; then continue; fi;
+ if [ "$FILE" = "smbmount.8" -o "$FILE" = "smbumount.8" ]; then continue; fi;
+ if [ "$FILE" = "smbrun.1" ]; then continue; fi;
+ neqn $FILE | tbl | nroff -man > ../../packaging/SGI/catman/`basename $FILE`
+ pack -f ../../packaging/SGI/catman/`basename $FILE`
+done
+cd ../../packaging/SGI
diff --git a/packaging/SGI/mkprintcap.sh b/packaging/SGI/mkprintcap.sh
new file mode 100755
index 00000000000..f610e757f06
--- /dev/null
+++ b/packaging/SGI/mkprintcap.sh
@@ -0,0 +1,15 @@
+#! /bin/sh
+#
+# create printcap file
+#
+if [ -r /usr/samba/printcap ]
+then
+ cp /usr/samba/printcap /usr/samba/printcap.O
+fi
+
+echo "#" > /usr/samba/printcap
+echo "# Samba printcap file" >> /usr/samba/printcap
+echo "# Alias names are separated by |, any name with spaces is taken as a comment" >> /usr/samba/printcap
+echo "#" >> /usr/samba/printcap
+lpstat -a | sed -e "s/ .*//" >> /usr/samba/printcap
+
diff --git a/packaging/SGI/mkrelease.sh b/packaging/SGI/mkrelease.sh
new file mode 100755
index 00000000000..a85a64569bc
--- /dev/null
+++ b/packaging/SGI/mkrelease.sh
@@ -0,0 +1,125 @@
+#!/bin/sh
+
+# This file goes through all the necessary steps to build a release package.
+# syntax:
+# mkrelease.sh [clean]
+#
+# You can specify clean to do a make clean before building. Make clean
+# will also run configure and generate the required Makefile.
+#
+# You can specify which targets to build. If targets are specified, the
+# specified targets will be built but inst packages will not be generated.
+
+doclean=""
+SGI_ABI=-n32
+ISA=-mips3
+CC=cc
+
+if [ ! -f ../../source/Makefile ]; then
+ doclean="clean"
+fi
+
+if [ "$1" = "clean" ]; then
+ doclean=$1
+ shift
+fi
+
+export SGI_ABI ISA CC
+
+if [ "$doclean" = "clean" ]; then
+ cd ../../source
+ if [ -f Makefile ]; then
+ make distclean
+ fi
+ cd ../packaging/SGI
+ rm -rf bins catman html codepages swat samba.idb samba.spec
+fi
+
+# create the catman versions of the manual pages
+#
+if [ "$doclean" = "clean" ]; then
+ echo Making manual pages
+ ./mkman
+ errstat=$?
+ if [ $errstat -ne 0 ]; then
+ echo "Error $errstat making manual pages\n";
+ exit $errstat;
+ fi
+fi
+
+cd ../../source
+if [ "$doclean" = "clean" ]; then
+ echo Create SGI specific Makefile
+ ./configure --prefix=/usr/samba --sbindir='${exec_prefix}/bin' --mandir=/usr/share/catman --with-acl-support
+ errstat=$?
+ if [ $errstat -ne 0 ]; then
+ echo "Error $errstat creating Makefile\n";
+ exit $errstat;
+ fi
+fi
+
+
+# build the sources
+#
+echo Making binaries
+
+make clean
+make headers
+make -P "CFLAGS=-O -g3 -D WITH_PROFILE" bin/smbd bin/nmbd
+errstat=$?
+if [ $errstat -ne 0 ]; then
+ echo "Error $errstat building profile sources\n";
+ exit $errstat;
+fi
+mv bin/smbd bin/smbd.profile
+mv bin/nmbd bin/nmbd.profile
+
+make clean
+make -P "CFLAGS=-O -g3 -D QUOTAOBJS=smbd/noquotas.o" bin/smbd
+errstat=$?
+if [ $errstat -ne 0 ]; then
+ echo "Error $errstat building noquota sources\n";
+ exit $errstat;
+fi
+mv bin/smbd bin/smbd.noquota
+
+make -P "CFLAGS=-O -g3" all
+errstat=$?
+if [ $errstat -ne 0 ]; then
+ echo "Error $errstat building sources\n";
+ exit $errstat;
+fi
+
+cd ../packaging/SGI
+
+#
+# Don't generate packages if targets were specified
+#
+if [ "$1" != "" ]; then
+ exit 0;
+fi
+
+# generate the packages
+#
+echo Generating Inst Packages
+./spec.pl # create the samba.spec file
+errstat=$?
+if [ $errstat -ne 0 ]; then
+ echo "Error $errstat creating samba.spec\n";
+ exit $errstat;
+fi
+
+./idb.pl # create the samba.idb file
+errstat=$?
+if [ $errstat -ne 0 ]; then
+ echo "Error $errstat creating samba.idb\n";
+ exit $errstat;
+fi
+
+if [ ! -d bins ]; then
+ mkdir bins
+fi
+
+# do the packaging
+/usr/sbin/gendist -rbase / -sbase ../.. -idb samba.idb -spec samba.spec -dist ./bins -all
+
diff --git a/packaging/SGI/printcap b/packaging/SGI/printcap
new file mode 100644
index 00000000000..b67b9cb167c
--- /dev/null
+++ b/packaging/SGI/printcap
@@ -0,0 +1,5 @@
+#
+# Sample printcap file
+# Alias names are separated by |, any name with spaces is taken as a comment
+#
+lp4js|lp12|LaserJet on the third floor by the coffee machine
diff --git a/packaging/SGI/relnotes.html b/packaging/SGI/relnotes.html
new file mode 100644
index 00000000000..afcf5796776
--- /dev/null
+++ b/packaging/SGI/relnotes.html
@@ -0,0 +1,233 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<HTML>
+<HEAD>
+ <TITLE>Samba Release Notes</TITLE>
+</HEAD>
+<BODY>
+
+<H1>Samba Release Notes</H1>
+
+<P>
+<HR></P>
+
+<H2>Table of Contents</H2>
+
+<MENU>
+<LI><B><A HREF="#WHATIS">What is Samba?</A></B> </LI>
+
+<LI><B><A HREF="#Support">Support Policy</A> </B></LI>
+
+<LI><B><A HREF="#Installation">Installation Information</A> </B></LI>
+
+<LI><B><A HREF="legal_notice.html">Silicon
+Graphics Legal Notice</A> </B></LI>
+
+<LI><B><A HREF="#AUTHORNOTES">Author's Notice(s)</A> </B></LI>
+
+<LI><B><A HREF="#Documentation">Documentation Information</A> </B></LI>
+</MENU>
+
+<P>
+<HR></P>
+
+<H2><A NAME="WHATIS"></A>What is Samba?</H2>
+
+<P>Samba is an SMB client and server for Unix. It makes it possible for
+client machines running Windows 95 and Windows for Workgroups to access
+files and/or print services on a Unix system. Samba includes an SMB server
+to provide LanManager-style file and print services to PCs, a Netbios (RFC10001/1002)
+name server, and an FTP-like client application for accessing PC resources
+from Unix. </P>
+
+<P>To make Samba work you'll need to configure your server host to run
+<B>smbd</B> and <B>nmbd</B> whenever you connect to a certain Internet
+port from the client machine. <B>Smbd</B> and <B>nmbd</B> can be started
+either as daemons or from inetd.</P>
+
+<P>By default <B>smbd</B> and <B>nmbd</B> are started as daemons by the
+file <I>/etc/init.d/samba</I> in conjunction with the chkconfig variable
+samba being set to on. If you set chkconfig samba off then the deamons
+will not be automatically started on reboot. In this case you must type
+the following at a shell prompt to start samba after a reboot: </P>
+
+<PRE><B> chkconfig samba on
+ /etc/init.d/samba start</B>
+</PRE>
+
+<P>If you make changes to your configuration files, <B>smbd</B> and <B>nmbd</B>
+may be restarted by typing the following at a shell prompt: </P>
+
+<PRE><B> /etc/init.d/samba start</B>
+</PRE>
+
+<P><B>smbd</B> and <B>nmbd</B> may be killed by typing the following at
+a shell prompt: </P>
+
+<PRE><B> /etc/init.d/samba stop</B>
+</PRE>
+
+<P>To have <B>smbd</B> and <B>nmbd</B> started by inetd you can execute
+the shell script <I>/usr/samba/inetd.sh</I> to automatically configure
+the various files and start the processes. This shell script first kills
+any running <B>smbd</B> and <B>nmbd</B> processes. It then removes any
+existing entries for &quot;netbios*&quot; from <I>/etc/inetd.conf</I> and
+adds the following lines </P>
+
+<PRE><B> netbios-ssn stream tcp nowait root /usr/samba/bin/smbd smbd
+ netbios-ns dgram udp wait root /usr/samba/bin/nmbd nmbd -S</B>
+</PRE>
+
+<P>It then removes any existing entries for &quot;netbios*&quot; from <I>/etc/services</I>
+and adds the following lines </P>
+
+<PRE><B> netbios-ns 137/udp # SAMBA
+ netbios-ssn 139/tcp # SAMBA</B>
+</PRE>
+
+<P><I>Inetd</I> is then restarted by executing:</P>
+
+<PRE><B> /etc/killall -HUP inetd</B>
+</PRE>
+
+<P>If you make changes to your configuration files, <B>smbd</B> and <B>nmbd</B>
+may be restarted by typing the following at a shell prompt: </P>
+
+<PRE><B> /etc/killall smbd nmbd
+ /etc/killall -HUP inetd</B>
+</PRE>
+
+<H3><A NAME="AUTHORNOTES"></A>Author's Notice(s):</H3>
+
+<P>The author of this product is: Andrew Tridgell </P>
+
+<P>Samba is distributed freely under the <A HREF="COPYING">GNU
+public license</A>. </P>
+
+<H3><A NAME="Support"></A>Support:</H3>
+
+<P>The software in this package is considered unsupported by Silicon Graphics.
+Neither the authors or Silicon Graphics are compelled to help resolve problems
+you may encounter in the installation, setup, or execution of this software.
+To be more to the point, if you call us with an issue regarding products
+in the Freeware package, we'll have to gracefully terminate the call. The
+<A HREF="http://samba.org/pub/samba/">
+Samba Web Page</A> has a listing of companies and individuals that offer
+commercial support for a fee.
+</P>
+
+<H2><A NAME="Installation"></A>Installation Information</H2>
+
+<P>Samba includes these subsystems: </P>
+
+<TABLE>
+<TR>
+<TD ALIGN=LEFT><B>samba.sw.base</B> (<I>default</I>)</TD>
+
+<TD>Execution environment for Samba.</TD>
+</TR>
+
+<TR>
+<TD ALIGN=left><B>samba.man.manpages</B>(<I>default</I>)</TD>
+
+<TD>Samba's online manual pages (preformatted).</TD>
+</TR>
+
+<TR>
+<TD ALIGN=LEFT VALIGN=TOP><B>samba.man.doc</B> (<I>default</I>)</TD>
+
+<TD>Samba documentation: hints on installation and configuration, an FAQ
+(Frequently Asked Questions), help in diagnosing problems, etc..</TD>
+</TR>
+
+<TR>
+<TD ALIGN=left><B>samba.man.relnotes</B> (<I>default</I>) </TD>
+
+<TD>Samba online release notes.</TD>
+</TR>
+
+<TR>
+<TD ALIGN=LEFT VALIGN=TOP><B>samba.src.samba</B> </TD>
+
+<TD>The Samba software distribution from which this product was
+built (including the packaging/SGI directory which will allow this distribution
+to be rebuilt).</TD>
+</TR>
+</TABLE>
+
+<H3>Installation Method</H3>
+
+<P>All of the subsystems for Samba can be installed using IRIX. You do
+not need to use the miniroot. Refer to the <I>Software Installation Administrator's
+Guide</I> for complete installation instructions. </P>
+
+<H3>Prerequisites</H3>
+
+<P>Your workstation must be running IRIX 5.3 or later in order to use this
+product. </P>
+
+<H3>Configuration Files</H3>
+
+<P>Because configuration files often contain modifications, inst treats
+them specially during the installation process. If they have not been modified,
+inst removes the old file and installs the new version during software
+updates. For configuration files that have been modified, the new version
+is installed and the old version is renamed by adding the suffix .O (for
+older) to the name. The no-suffix version contains changes that are required
+for compatibility with the rest of the newly installed software, that increase
+functionality, or that fix bugs. You should use diff(1) or gdiff(1) to
+compare the two versions of the files and transfer information that you
+recognize as machine or site-specific from the .O version to the no-suffix
+version. </P>
+
+<DL>
+<DT><B>/usr/samba/lib/smb.conf</B> </DT>
+
+<DD>Configuration definitions for the <B>smbd</B> program; the SMB server
+process. The default configuration sets up password-based access to home
+directories on a machine as well as open access to to all printers and
+/tmp. The workgroup is set by default to &quot;workgroup&quot;. It is highly
+recommended that administrators review the content of this file when installing
+Samba for the first time.</DD>
+
+<DT><B>/usr/samba/printcap</B> </DT>
+
+<DD>A file that specifies the available printers on a system. It is included
+as an example; administrators may want to replace it or override the reference
+to it in the <B>smb.conf</B> file. The script <B>/usr/samba/mkprintcap.sh</B>
+was used by inst to create a printcap file that contains all printers on
+your system. You may wish to remove some printers or add a comment to each
+printer name to describe its location.</DD>
+</DL>
+
+<H2><A NAME="Documentation"></A>Documentation Information</H2>
+
+<P>Preformatted manual pages are installed by default as are the contents
+of the <B>docs</B> directory from the Samba distribution; consult <I>samba</I>(7)
+for an introduction. </P>
+
+<P>There is a mailing list for discussion of Samba. To subscribe send mail
+to <A HREF="mailto:listproc@samba.org">listproc@samba.org</A>
+with a body of &quot;subscribe samba Your Name&quot; </P>
+
+<P>To send mail to everyone on the list mail to <A HREF="mailto:samba@samba.org">samba@samba.org</A>.
+</P>
+
+<P>There is also an announcement mailing list where new versions are announced.
+To subscribe send mail to <A HREF="mailto:listproc@samba.org">listproc@samba.org</A>
+with a body of &quot;subscribe samba-announce Your Name&quot;. All announcements
+also go to the samba list. </P>
+
+<P>You might also like to look at the Usenet news group <A HREF="news:comp.protocols.smb">comp.protocols.smb</A>
+as it often contains lots of useful info and is frequented by lots of Samba
+users. The newsgroup was initially setup by people on the Samba mailing
+list. It is not, however, exclusive to Samba, it is a forum for discussing
+the SMB protocol (which Samba implements). </P>
+
+<P>A Samba WWW site has been setup with lots of useful info. Connect to:
+<A HREF="http://samba.org/pub/samba/">http://samba.org/pub/samba/</A>.
+It is maintained by Paul Blackman (thanks Paul!). You can contact him at
+<A HREF="mailto:ictinus@lake.canberra.edu.au">ictinus@lake.canberra.edu.au</A>.
+</P>
+
+</BODY>
+</HTML>
diff --git a/packaging/SGI/removeswat.sh b/packaging/SGI/removeswat.sh
new file mode 100755
index 00000000000..7a4745345be
--- /dev/null
+++ b/packaging/SGI/removeswat.sh
@@ -0,0 +1,25 @@
+#! /bin/sh
+#
+# remove SWAT deamon from inetd.conf
+#
+cp /etc/inetd.conf /etc/inetd.conf.O
+
+if [ $? -ne 0 ]; then exit 1; fi
+if [ ! -r /etc/inetd.conf.O -o ! -w /etc/inetd.conf ]; then exit 1; fi
+
+sed -e "/^swat/D" -e "/^#SWAT/D" /etc/inetd.conf.O > /etc/inetd.conf
+
+#
+# remove SWAT service port from /etc/services
+#
+cp /etc/services /etc/services.O
+
+if [ $? -ne 0 ]; then exit 1; fi
+if [ ! -r /etc/services.O -o ! -w /etc/services ]; then exit 1; fi
+
+sed -e "/^swat/D" -e "/^#SWAT/D" /etc/services.O > /etc/services
+
+#
+# restart inetd to reread config files
+#
+/etc/killall -HUP inetd
diff --git a/packaging/SGI/samba.config b/packaging/SGI/samba.config
new file mode 100644
index 00000000000..b3d86404ab5
--- /dev/null
+++ b/packaging/SGI/samba.config
@@ -0,0 +1 @@
+on
diff --git a/packaging/SGI/samba.rc b/packaging/SGI/samba.rc
new file mode 100644
index 00000000000..bc0f90ee77f
--- /dev/null
+++ b/packaging/SGI/samba.rc
@@ -0,0 +1,43 @@
+#! /bin/sh
+
+#
+# Samba server control
+#
+
+IS_ON=/etc/chkconfig
+KILLALL=/sbin/killall
+
+SAMBAD=/usr/samba/bin/smbd
+#SAMBA_OPTS=-d2
+NMBD=/usr/samba/bin/nmbd
+#NMBD_OPTS=-d1
+
+if test ! -x $IS_ON ; then
+ IS_ON=true
+fi
+
+if $IS_ON verbose ; then
+ ECHO=echo
+else # For a quiet startup and shutdown
+ ECHO=:
+fi
+
+case $1 in
+'start')
+ if $IS_ON samba && test -x $SAMBAD; then
+ $KILLALL -15 smbd nmbd
+ $ECHO "Samba:\c"
+ $SAMBAD $SAMBA_OPTS -D; $ECHO " smbd\c"
+ $NMBD $NMBD_OPTS -D; $ECHO " nmbd\c"
+ $ECHO "."
+ fi
+ ;;
+'stop')
+ $ECHO "Stopping Samba Servers."
+ $KILLALL -15 smbd nmbd
+ exit 0
+ ;;
+*)
+ echo "usage: /etc/init.d/samba {start|stop}"
+ ;;
+esac
diff --git a/packaging/SGI/sambalp b/packaging/SGI/sambalp
new file mode 100644
index 00000000000..61e62215c91
--- /dev/null
+++ b/packaging/SGI/sambalp
@@ -0,0 +1,157 @@
+#!/bin/perl
+#
+# Hacked by Alan Stebbens <aks@sgi.com> to setuid to the username if
+# valid on this system. Written as a secure Perl script. To enable,
+#
+# chown root /usr/samba/bin/sambalp
+# chmod u+s,+x /usr/samba/bin/sambalp
+#
+# If setuidshells is not enabled on your system, you must also do this:
+#
+# systune -i
+# nosuidshells = 0
+# y
+# quit
+#
+# reboot
+#
+# This script will still work as a normal user; it will not try
+# to setuid in this case.
+#
+# If the "$PSFIX" variable is set below...
+#
+# Workaround Win95 printer driver/Impressario bug by removing
+# the PS check for available virtual memory. Note that this
+# bug appears to be in all Win95 print drivers that generate
+# PostScript; but is for certain there with a QMS-PS 810 (the
+# printer type I configure on the Win95-side for printing with
+# Samba).
+#
+# the perl script fixes 3 different bugs.
+# 1. remove the JCL statements added by some HP printer drivers to the
+# beginning of the postscript output.
+# 2. Fix a bug in output from word files with long filenames. A non-printing
+# character added to the end of the title comment by word is
+# removed.
+# 3. The VM fix described above.
+#
+#
+# Modified for Perl4 compatibility.
+#
+
+$PROG = "sambalp";
+
+$PSFIX = 1; # set to 0 if you don't want to run
+ # the "psfix" portion
+
+# Untaint the PATH variable
+@PATH = split(' ',<<EOF);
+ /usr/sbin /usr/bsd /sbin /usr/bin /bin /usr/lib /usr/local/bin
+EOF
+$ENV{'PATH'} = join(':',@PATH);
+
+if ($#ARGV < 3) {
+ print STDERR "usage: $PROG printer file user system\n";
+ exit;
+}
+
+$printer = $ARGV[0];
+$file = $ARGV[1];
+$user = $ARGV[2];
+$system = $ARGV[3];
+
+open(LPSTAT,"/usr/bin/lpstat -t|") || die("Can't get printer list.\n");
+@printers = ();
+while (<LPSTAT>) {
+ next unless /^printer (\w+)/;
+ push(@printers,$1);
+}
+close LPSTAT;
+# Create a hash list
+@printers{@printers} = @printers;
+
+# Untaint the printer name
+if (defined($prtname = $printers{$printer})) {
+ $printer = $prtname;
+} else {
+ die("Unknown printer: \"$printer\"\n");
+}
+
+if ($> == 0) { # are we root?
+ # yes -- then perform a taint checks and possibly do a suid check
+
+ # Untaint the file and system names (pretend to filter them)
+ $file = $file =~ /^(.*)/ ? $1 : die("Bad file: $file\n");
+ $system = $system =~ /^(.*)/ ? $1 : die("Bad system: $system\n");
+
+ # Get the valid users
+ setpwent;
+ %users = ();
+ while (@pwe = getpwent()) {
+ $uids{$pwe[0]} = $pwe[2];
+ $users{$pwe[2]} = $pwe[0];
+ }
+ endpwent();
+
+ # Check out the user -- if the user is a real user on this system,
+ # then become that user so that the printer header page looks right
+ # otherwise, remain as the default user (probably "nobody").
+
+ if (defined($uid = $uids{$user})) {
+
+ # before we change UID, we must ensure that the file is still
+ # readable after the UID change.
+ chown($uid, 9, $file); # make the file owned by the user
+
+ # Now, go ahead and become the user
+ $name = $users{$uid};
+ $> = $uid; # become the user
+ $< = $uid;
+ } else { # do untaint filtering
+ $name = $user =~ /^(\w+)/ ? $1 : die("Bad user: $user\n");
+ }
+} else { # otherwise, just be me
+ $name = $user; # whomever that is
+}
+
+$lpcommand = "/usr/bin/lp -c -d$printer -t'$name on $system'";
+
+# This code is from the original "psfix" but it has been completely
+# rewritten for speed.
+
+if ($PSFIX) { # are we running a "psfix"?
+ open(FILE, $file) || die("Can't read $file: $!\n");
+ open(LP, "|$lpcommand -") || die("Can't open pipe to \"lp\": $!\n");
+ select(LP);
+ while (<FILE>) { #
+ $_ =~ s/^\004//; # strip any ctrl-d's
+ if (/^\e%/) { # get rid of any non-postscript commands
+ while (<FILE>) { # remove text until next %!PS
+ s/^\001M//; # lenmark driver prefixes Ctrl-A M to %!PS
+ last if /^%!PS/;
+ }
+ last if eof(FILE);
+ } elsif (/^%%Title:/) { # fix bug in long titles from MS Word
+ s/.\r$/\r/; # remove trailing character on the title
+ } elsif (/^\/VM\?/) { # remove VM test
+ print "/VM? { pop } bind def\r\n";
+ while (<FILE>) { last if /def\r/; }
+ next; # don't print
+ }
+ print;
+ }
+ close FILE;
+ close LP;
+} else { # we're not running psfix?
+ system("$lpcommand $file");
+}
+
+if ($file =~ m(^/)) {
+ # $file is a fully specified path
+ # Remove the file only if it lives in a directory ending in /tmp.
+ unlink($file) if ($file =~ m(/tmp/[^/]+$));
+} else {
+ # $file is NOT a fully specified path
+ # Remove the file only if current directory ends in /tmp.
+ unlink($file) if (`pwd` =~ m(/tmp$));
+}
diff --git a/packaging/SGI/smb.conf b/packaging/SGI/smb.conf
new file mode 100644
index 00000000000..3448226faa3
--- /dev/null
+++ b/packaging/SGI/smb.conf
@@ -0,0 +1,124 @@
+; Configuration file for smbd.
+; ============================================================================
+; For the format of this file and comprehensive descriptions of all the
+; configuration option, please refer to the man page for smb.conf(5).
+
+; This is a sample configuration for IRIX 6.x systems
+;
+; The following configuration should suit most systems for basic usage and
+; initial testing. It gives all clients access to their home directories and
+; /usr/tmp and allows access to all printers returned by lpstat.
+;
+[global]
+ comment = Samba %v
+ workgroup = workgroup
+ printing = sysv
+;
+; The default for printcap name is lpstat which will export all printers.
+; If you want to limit the printers that are visible to clients, you can
+; use a printcap file. The script mkprintcap.sh will create a printcap
+; file that contains all your printers. Edit this file to only contain the
+; printers that you wish to be visible. Names longer than 15 characters
+; in the printcap file will not be visible to clients.
+;
+; printcap name = /usr/samba/printcap
+ printcap name = lpstat
+;
+; If you are using Impressario 1.x then you'll want to use the
+; sambalp script provided with this package. It works around
+; a problem in the PostScript generated by the standard Windows
+; drivers--there is a check to verify sufficient virtual memory
+; is available in the printer to print the job, but this fails
+; under Impressario because of a bug in Impressario 1.x. The sambalp
+; script strips out the vmstatus check. BTW, when using this
+; setup to print be sure to configure a Windows printer driver
+; that generates PostScript--QMS-PS 810 is one that should work
+; with the sambalp script. This version of sambalp (if installed
+; as a setuid script - see the comments at the beginning of the
+; script) will setuid to the username if valid on the system. This
+; makes the banner pages print the proper username. You can disable
+; the PostScript fixes by changing a variable in sambalp.
+;
+ print command = /usr/samba/bin/sambalp %p %s %U %m
+; print command = /usr/bin/lp -c -d%p -t"%U on machine %m" %s ; rm %s
+
+; clear the default lppause and lpresume commands since these are not
+; supported in IRIX
+ lppause command =
+ lpresume command =
+
+ load printers = yes
+ guest account = nobody
+ browseable = yes
+
+; this tells Samba to use a separate log file for each machine
+; that connects - default is single file named /usr/samba/var/log.smb
+; log file = /usr/samba/var/log.%m
+
+; Set a max size for log files in Kb
+ max log size = 50
+
+; You will need a world readable lock directory
+; if you want to support the file sharing modes for multiple users
+; of the same files
+ locking = yes
+ lock directory = /usr/samba/var/locks
+
+ security = user
+
+; You need to test to see if this makes a difference on your system
+ socket options = TCP_NODELAY
+
+; Set the os level to > 32 if there is no NT server for your workgroup
+ os level = 0
+ preferred master = no
+ domain master = no
+ local master = no
+ wins support = no
+ wins server =
+
+ preserve case = yes
+ short preserve case = yes
+
+; These are the settings required for IRIX password sync
+ passwd program = /usr/bin/passwd %u
+ passwd chat = *ew*password:* %n\n *e-enter*new*password:* %n\n
+
+; Uncomment the following if you wish to use encrypted passwords.
+; encrypt passwords = yes
+
+; Uncomment the following if you wish to sync unix and smbpasswd
+; unix password sync = yes
+
+; Printer admin account to allow uploading printer drivers
+ printer admin = lp
+
+[homes]
+ comment = Home Directories
+ browseable = no
+ writeable = yes
+
+; Share for printer drivers for automatic driver download
+;
+[print$]
+ comment = printer driver directory
+ path = /usr/samba/printer
+ guest ok = yes
+ browseable = yes
+ read only = yes
+ write list = lp
+
+[printers]
+ comment = All Printers
+ path = /var/spool/samba
+ browseable = no
+ printable = yes
+ guest ok = yes
+ writeable = no
+ create mask = 0700
+
+[tmp]
+ comment = Temporary file space
+ path = /usr/tmp
+ writeable = yes
+ guest ok = yes
diff --git a/packaging/SGI/smbpasswd b/packaging/SGI/smbpasswd
new file mode 100644
index 00000000000..8e7ab34cadd
--- /dev/null
+++ b/packaging/SGI/smbpasswd
@@ -0,0 +1 @@
+# Samba SMB password file
diff --git a/packaging/SGI/smbprint b/packaging/SGI/smbprint
new file mode 100644
index 00000000000..07923a42b1e
--- /dev/null
+++ b/packaging/SGI/smbprint
@@ -0,0 +1,54 @@
+#!/bin/sh
+#
+# @(#) smbprint.sysv version 1.0 Ross Wakelin <r.wakelin@march.co.uk>
+#
+# Version 1.0 13 January 1995
+# modified from the original smbprint (bsd) script
+#
+# this script is a System 5 printer interface script. It uses the smbclient
+# program to print the file to the specified smb-based server and service.
+#
+# To add this to your lp system, modify the server and service variables
+# and then execute the following command (as root):
+#
+# lpadmin -punixprintername -v/dev/null -i/usr/samba/bin/smbprint
+#
+# where unixprintername is the name that the printer will be known as
+# on your unix box.
+#
+# the script smbprint will be copied into your printer administration
+# directory (/usr/spool/lp) as a new interface (interface/unixprintername)
+# Then you have to execute the following commands:
+#
+# enable unixprintername
+# accept unixprintername
+#
+# This script will then be called by the lp service to print the files.
+# This script will have 6 or more parameters passed to it by the lp service.
+# The first five will contain details of the print job, who queued it etc,
+# while parameters 6 onwards are a list of files to print. We just
+# cat these to the samba client.
+#
+# clear out the unwanted parameters
+
+shift;shift;shift;shift;shift
+
+# now the argument list is just the files to print
+
+# Set these to the server and service you wish to print to
+# In this example I have a PC called "admin" that has a printer
+# exported called "hplj2" with no password.
+#
+server=admin
+service=hplj2
+password=""
+
+# NOTE: The line `echo translate' provides automatic CR/LF translation
+# when printing.
+(
+ echo translate
+ echo "print -"
+ cat $*
+) | /usr/samba/bin/smbclient "//$server/$service" $password -N > /dev/null
+exit $?
+
diff --git a/packaging/SGI/spec.pl b/packaging/SGI/spec.pl
new file mode 100755
index 00000000000..4541eb04ec3
--- /dev/null
+++ b/packaging/SGI/spec.pl
@@ -0,0 +1,91 @@
+#!/usr/bin/perl
+
+# This perl script generates the samba.spec file based on the version
+# information in the version.h file in the source tree
+
+open (VER,'../../source/include/version.h') || die "Unable to open version.h\n";
+($_ = <VER>) =~ s/"//g;
+close (VER);
+@foo = split(' ');
+splice(@foo,0,2);
+$_ = $foo[0];
+
+# create the package name
+$vername = " id \"Samba Version ".$_."\"\n";
+
+$patch = 0;
+#create the subsystem version numbers
+if (/alpha/) {
+ $_ =~ s/alpha/.00./;
+}
+elsif (/-HEAD/) {
+ $_ =~ s/-HEAD/.01/;
+ $_ .= '.99';
+}
+elsif (/pre-/) {
+ $_ =~ s/pre-//;
+ $_ .= '.00';
+}
+elsif (/p/) {
+ $_ =~ s/p/./;
+ $_ .= '.00';
+ $patch = 1;
+}
+else {
+ $_ .='.01.00';
+}
+
+($v1,$v2,$v3,$v4,$v5) = split('\.');
+$v4 = $v4 + $patch;
+$vernum = sprintf(" version %02d%02d%02d%02d%02d\n",$v1,$v2,$v3,$v4,$v5);
+
+# generate the samba.spec file
+open(SPEC,">samba.spec") || die "Unable to open samba.spec for output\n";
+print SPEC "product samba\n";
+print SPEC $vername;
+print SPEC " image sw\n";
+print SPEC " id \"Samba Execution Environment\"\n";
+print SPEC $vernum;
+print SPEC " order 0\n";
+print SPEC " subsys base default\n";
+print SPEC " id \"Samba Execution Environment\"\n";
+print SPEC " replaces fw_samba.sw.base 0 9999999999\n";
+print SPEC " replaces fw_samba.sw.samba 0 9999999999\n";
+print SPEC " exp samba.sw.base\n";
+print SPEC " endsubsys\n";
+print SPEC " endimage\n";
+print SPEC " image man\n";
+print SPEC " id \"Samba Online Documentation\"\n";
+print SPEC $vernum;
+print SPEC " order 1\n";
+print SPEC " subsys manpages default\n";
+print SPEC " id \"Samba Man Page\"\n";
+print SPEC " replaces fw_samba.man.manpages 0 9999999999\n";
+print SPEC " replaces fw_samba.man.samba 0 9999999999\n";
+print SPEC " exp samba.man.manpages\n";
+print SPEC " endsubsys\n";
+print SPEC " subsys doc default\n";
+print SPEC " id \"Samba Documentation\"\n";
+print SPEC " replaces fw_samba.man.doc 0 9999999999\n";
+print SPEC " exp samba.man.doc\n";
+print SPEC " endsubsys\n";
+print SPEC " subsys relnotes default\n";
+print SPEC " id \"Samba Release Notes\"\n";
+print SPEC " replaces fw_samba.man.relnotes 0 9999999999\n";
+print SPEC " exp samba.man.relnotes\n";
+print SPEC " endsubsys\n";
+print SPEC " endimage\n";
+print SPEC " image src\n";
+print SPEC " id \"Samba Source Code\"\n";
+print SPEC $vernum;
+print SPEC " order 2\n";
+print SPEC " subsys samba\n";
+print SPEC " id \"Samba Source Code\"\n";
+print SPEC " replaces fw_samba.src.samba 0 9999999999\n";
+print SPEC " exp samba.src.samba\n";
+print SPEC " endsubsys\n";
+print SPEC " endimage\n";
+print SPEC "endproduct\n";
+close SPEC || die "Error on close of samba.spec\n";
+
+print "\nsamba.spec file has been created\n\n";
diff --git a/packaging/SGI/startswat.sh b/packaging/SGI/startswat.sh
new file mode 100755
index 00000000000..2a0333020fb
--- /dev/null
+++ b/packaging/SGI/startswat.sh
@@ -0,0 +1,29 @@
+#! /bin/sh
+#
+# add SWAT deamon to inetd.conf
+#
+cp /etc/inetd.conf /etc/inetd.conf.O
+
+if [ $? -ne 0 ]; then exit 1; fi
+if [ ! -r /etc/inetd.conf.O -o ! -w /etc/inetd.conf ]; then exit 1; fi
+
+sed -e "/^swat/D" -e "/^#SWAT/D" /etc/inetd.conf.O > /etc/inetd.conf
+echo '#SWAT services' >> /etc/inetd.conf
+echo swat stream tcp nowait root /usr/samba/bin/swat swat >> /etc/inetd.conf
+
+#
+# add SWAT service port to /etc/services
+#
+cp /etc/services /etc/services.O
+
+if [ $? -ne 0 ]; then exit 1; fi
+if [ ! -r /etc/services.O -o ! -w /etc/services ]; then exit 1; fi
+
+sed -e "/^swat/D" -e "/^#SWAT/D" /etc/services.O > /etc/services
+echo '#SWAT services' >> /etc/services
+echo 'swat 901/tcp # SWAT' >> /etc/services
+
+#
+# restart inetd to start SWAT
+#
+/etc/killall -HUP inetd
diff --git a/packaging/Solaris/README b/packaging/Solaris/README
new file mode 100644
index 00000000000..b918cf91732
--- /dev/null
+++ b/packaging/Solaris/README
@@ -0,0 +1,18 @@
+
+INSTRUCTIONS: Preparing Samba packages for Solaris
+
+To produce a package:
+
+* Build the binaries (by running ./configure; make; in the source directory)
+* Type sh makepkg.sh
+
+The package will be created in the /tmp directory.
+
+By default, the package will be built to install samba in /usr/local
+To change the default, modify the INSTALL_BASE variable in makepkg.sh
+This is after you have configured samba with a --prefix option of the
+alternate samba location and then created the binaries.
+
+Shirish Kalele <kalele@samba.org>
+Date: 2000.01.12
+
diff --git a/packaging/Solaris/copyright b/packaging/Solaris/copyright
new file mode 100644
index 00000000000..1792668d174
--- /dev/null
+++ b/packaging/Solaris/copyright
@@ -0,0 +1 @@
+Copyright (C) 2001 Samba Team
diff --git a/packaging/Solaris/i.swat b/packaging/Solaris/i.swat
new file mode 100644
index 00000000000..047f0e17200
--- /dev/null
+++ b/packaging/Solaris/i.swat
@@ -0,0 +1,44 @@
+while read src dest
+do
+ sed -e '/^swat.*swat$/d' $dest >/tmp/$$swat || exit 2
+ cat $src >>/tmp/$$swat || exit 2
+
+ # Use cp;rm instead of mv because $dest might be a symlink
+ cp -f /tmp/$$swat $dest || exit 2
+ rm -f /tmp/$$swat
+done
+
+if [ "$1" = ENDOFCLASS ]
+then
+
+ # If local install, restart inetd
+ if [ -z "${PKG_INSTALL_ROOT}" ]
+ then
+ TARGET=`hostname`
+ kill -HUP `ps -e -o pid,comm | grep inetd | awk '{print $1}'`
+ else
+ TARGET="<servername>"
+ fi
+
+ cat <<EOF
+The Samba Web Administration Tool (SWAT) has been installed on your system.
+You can connect to it from a web browser on TCP port 901 at
+http://${TARGET}:901/.
+
+If you use NIS/NIS+, check the ${PKG_INSTALL_ROOT}/etc/nsswitch.conf file
+to verify that the local services file is being used as a backend for the
+services database, or you won't be able to connect to the Samba Admin Tool.
+
+EOF
+
+ if [ ! -z "$PKG_INSTALL_ROOT" ]
+ then
+ CAT <<EOF
+The SWAT settings will not take effect till you send a hangup (HUP) signal
+to inetd on the target system.
+
+EOF
+ fi
+
+fi
+
diff --git a/packaging/Solaris/inetd.conf.master b/packaging/Solaris/inetd.conf.master
new file mode 100644
index 00000000000..b11fb7c3db2
--- /dev/null
+++ b/packaging/Solaris/inetd.conf.master
@@ -0,0 +1 @@
+swat stream tcp nowait.400 root __BASEDIR__/samba/bin/swat swat
diff --git a/packaging/Solaris/makepkg.sh b/packaging/Solaris/makepkg.sh
new file mode 100755
index 00000000000..b57e182e4a3
--- /dev/null
+++ b/packaging/Solaris/makepkg.sh
@@ -0,0 +1,185 @@
+#!/bin/sh
+#
+# Copyright (C) Shirish A Kalele 2000
+#
+# Builds a Samba package from the samba distribution.
+# By default, the package will be built to install samba in /usr/local
+# Change the INSTALL_BASE variable to change this: will modify the pkginfo
+# and samba.server files to point to the new INSTALL_BASE
+#
+INSTALL_BASE=/usr/local
+
+add_dynamic_entries()
+{
+ # First build the codepages and append codepage entries to prototype
+ echo "#\n# Codepages \n#"
+ echo d none samba/lib/codepages 0755 root other
+
+ CODEPAGELIST="437 737 850 852 861 932 866 949 950 936"
+ # Check if make_smbcodepage exists
+ if [ ! -f $DISTR_BASE/source/bin/make_smbcodepage ]; then
+ echo "Could not find $DISTR_BASE/source/bin/make_smbcodepage to generate codepages.\n\
+ Please create the binaries before packaging." >&2
+ exit 1
+ fi
+
+ for p in $CODEPAGELIST; do
+ $DISTR_BASE/source/bin/make_smbcodepage c $p $DISTR_BASE/source/codepages/codepage_def.$p $DISTR_BASE/source/codepages/codepage.$p
+ echo f none samba/lib/codepages/codepage.$p=source/codepages/codepage.$p 0644 root other
+ done
+
+ # Create unicode maps
+ if [ ! -f $DISTR_BASE/source/bin/make_unicodemap ]; then
+ echo "Missing $DISTR_BASE/source/bin/make_unicodemap. Aborting." >&2
+ exit 1
+ fi
+
+ # Pull in all the unicode map files from source/codepages/CP*.TXT
+ list=`find $DISTR_BASE/source/codepages -name "CP*.TXT" | sed 's|^.*CP\(.*\)\.TXT|\1|'`
+ for umap in $list
+ do
+ $DISTR_BASE/source/bin/make_unicodemap $umap $DISTR_BASE/source/codepages/CP$umap.TXT $DISTR_BASE/source/codepages/unicode_map.$umap
+ echo f none samba/lib/codepages/unicode_map.$umap=source/codepages/unicode_map.$umap 0644 root other
+ done
+
+ # Add the binaries, docs and SWAT files
+
+ echo "#\n# Binaries \n#"
+ cd $DISTR_BASE/source/bin
+ for binfile in *
+ do
+ if [ -f $binfile ]; then
+ echo f none samba/bin/$binfile=source/bin/$binfile 0755 root other
+ fi
+ done
+
+ # Add the scripts to bin/
+ echo "#\n# Scripts \n#"
+ cd $DISTR_BASE/source/script
+ for shfile in *
+ do
+ if [ -f $shfile ]; then
+ echo f none samba/bin/$shfile=source/script/$shfile 0755 root other
+ fi
+ done
+
+ # Add the manpages
+ echo "#\n# man pages \n#"
+ echo d none /usr ? ? ?
+ echo d none /usr/share ? ? ?
+ echo d none /usr/share/man ? ? ?
+
+ # Create directories for man page sections if nonexistent
+ cd $DISTR_BASE/docs/manpages
+ for i in 1 2 3 4 5 6 7 8 9
+ do
+ manpages=`ls *.$i 2>/dev/null`
+ if [ $? -eq 0 ]
+ then
+ echo d none /usr/share/man/man$i ? ? ?
+ for manpage in $manpages
+ do
+ echo f none /usr/share/man/man${i}/${manpage}=docs/manpages/$manpage 0644 root other
+ done
+ fi
+ done
+
+ echo "#\n# HTML documentation \n#"
+ cd $DISTR_BASE
+ list=`find docs/htmldocs -type d | grep -v "/CVS$"`
+ for docdir in $list
+ do
+ if [ -d $docdir ]; then
+ echo d none samba/$docdir 0755 root other
+ fi
+ done
+
+ list=`find docs/htmldocs -type f | grep -v /CVS/`
+ for htmldoc in $list
+ do
+ if [ -f $htmldoc ]; then
+ echo f none samba/$htmldoc=$htmldoc 0644 root other
+ fi
+ done
+
+ # Create a symbolic link to the Samba book in docs/ for beginners
+ echo 's none samba/docs/samba_book=htmldocs/using_samba'
+
+ echo "#\n# Text Docs \n#"
+ echo d none samba/docs/textdocs 0755 root other
+ cd $DISTR_BASE/docs/textdocs
+ for textdoc in *
+ do
+ if [ -f $textdoc ]; then
+ echo f none samba/docs/textdocs/$textdoc=docs/textdocs/$textdoc 0644 root other
+ fi
+ done
+ echo "#\n# SWAT \n#"
+ cd $DISTR_BASE
+ list=`find swat -type d | grep -v "/CVS$"`
+ for i in $list
+ do
+ echo "d none samba/$i 0755 root other"
+ done
+ list=`find swat -type f | grep -v /CVS/`
+ for i in $list
+ do
+ echo "f none samba/$i=$i 0644 root other"
+ done
+ echo "#\n# HTML documentation for SWAT\n#"
+ cd $DISTR_BASE/docs/htmldocs
+ for htmldoc in *
+ do
+ if [ -f $htmldoc ]; then
+ echo f none samba/swat/help/$htmldoc=docs/htmldocs/$htmldoc 0644 root other
+ fi
+ done
+
+ echo "#\n# Using Samba Book files for SWAT\n#"
+ cd $DISTR_BASE/docs/htmldocs
+
+# set up a symbolic link instead of duplicating the book tree
+ echo 's none samba/swat/using_samba=../docs/htmldocs/using_samba'
+
+}
+
+if [ $# = 0 ]
+then
+ # Try to guess the distribution base..
+ CURR_DIR=`pwd`
+ DISTR_BASE=`echo $CURR_DIR | sed 's|\(.*\)/packaging.*|\1|'`
+ echo "Assuming Samba distribution is rooted at $DISTR_BASE.."
+else
+ DISTR_BASE=$1
+fi
+
+#
+if [ ! -d $DISTR_BASE ]; then
+ echo "Source build directory $DISTR_BASE does not exist."
+ exit 1
+fi
+
+# Set up the prototype file from prototype.master
+if [ -f prototype ]; then
+ rm prototype
+fi
+
+# Setup version from version.h
+VERSION=`sed 's/#define VERSION \"\(.*\)\"$/\1/' ../../source/include/version.h`
+sed -e "s|__VERSION__|$VERSION|" -e "s|__ARCH__|`uname -p`|" -e "s|__BASEDIR__|$INSTALL_BASE|g" pkginfo.master >pkginfo
+
+sed -e "s|__BASEDIR__|$INSTALL_BASE|g" inetd.conf.master >inetd.conf
+sed -e "s|__BASEDIR__|$INSTALL_BASE|g" samba.server.master >samba.server
+
+cp prototype.master prototype
+
+# Add the dynamic part to the prototype file
+(add_dynamic_entries >> prototype)
+
+# Create the package
+pkgmk -o -d /tmp -b $DISTR_BASE -f prototype
+if [ $? = 0 ]
+then
+ pkgtrans /tmp samba.pkg samba
+fi
+echo The samba package is in /tmp
diff --git a/packaging/Solaris/pkg-specs/pkginfo b/packaging/Solaris/pkg-specs/pkginfo
new file mode 100644
index 00000000000..d195f177e90
--- /dev/null
+++ b/packaging/Solaris/pkg-specs/pkginfo
@@ -0,0 +1,12 @@
+PKG=samba
+NAME=SMB based file/printer sharing
+ARCH=sparc
+VERSION=2.0.6
+CATEGORY=system
+VENDOR=Samba Group
+DESC=File and printer sharing for NT workstations
+HOTLINE=Please contact your local UNIX support group
+EMAIL=samba@samba.org
+CLASSES=none
+BASEDIR=/usr/local
+INTONLY=1
diff --git a/packaging/Solaris/pkginfo.master b/packaging/Solaris/pkginfo.master
new file mode 100644
index 00000000000..33e7cdb471d
--- /dev/null
+++ b/packaging/Solaris/pkginfo.master
@@ -0,0 +1,12 @@
+PKG=samba
+NAME=SMB based file/printer sharing
+ARCH=__ARCH__
+VERSION=__VERSION__
+CATEGORY=system
+VENDOR=Samba Team
+DESC=File and printer sharing for Windows workstations
+HOTLINE=Please contact your local UNIX support group
+EMAIL=samba@samba.org
+CLASSES=none
+BASEDIR=__BASEDIR__
+INTONLY=1
diff --git a/packaging/Solaris/postinstall b/packaging/Solaris/postinstall
new file mode 100644
index 00000000000..0b7f40a85d0
--- /dev/null
+++ b/packaging/Solaris/postinstall
@@ -0,0 +1,21 @@
+cat <<EOF
+___________________________________________________________________________
+
+INSTALLATION COMPLETE.
+
+All files comprising the Samba Server have been installed.
+
+You can configure Samba by creating a configuration file at
+${BASEDIR}/samba/lib/smb.conf. For details on configuration,
+refer to the Samba man pages under ${PKG_INSTALL_ROOT}/usr/share/man
+and the documentation at ${BASEDIR}/samba/docs.
+
+BEGINNERS:
+Beginners can also refer to the excellent "Using Samba" book published
+by O'Reilly and Associates and officially supported by the Samba Team.
+This book is supplied with this package and can be accessed at
+${BASEDIR}/samba/docs/samba_book/index.html
+___________________________________________________________________________
+
+EOF
+
diff --git a/packaging/Solaris/preremove b/packaging/Solaris/preremove
new file mode 100644
index 00000000000..28e8d75c298
--- /dev/null
+++ b/packaging/Solaris/preremove
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# If this is a local deinstall, stop samba
+if [ -z "$PKG_INSTALL_ROOT" ]
+then
+ SMBD=`ps -e -o pid,comm | grep smbd | awk '{print $1}'`
+ NMBD=`ps -e -o pid,comm | grep nmbd | awk '{print $1}'`
+ [ ! -z "$SMBD" ] && kill $SMBD
+ [ ! -z "$NMBD" ] && kill $NMBD
+ sleep 2
+fi
+
diff --git a/packaging/Solaris/prototype.master b/packaging/Solaris/prototype.master
new file mode 100644
index 00000000000..bfcb3e00492
--- /dev/null
+++ b/packaging/Solaris/prototype.master
@@ -0,0 +1,52 @@
+#
+# The static master prototype file for the Samba package.
+# For files that can't be dynamically added to the prototype file at
+# package build time
+#
+# Information files.
+#
+i pkginfo=./pkginfo
+i copyright=./copyright
+i request=./request
+i checkinstall
+i preremove=./preremove
+i postinstall=./postinstall
+i i.swat=./i.swat
+i r.swat=./r.swat
+#
+# Stuff that goes into the system areas of the filesystem.
+#
+d none /etc ? ? ?
+d initscript /etc/init.d ? ? ?
+f initscript /etc/init.d/samba.server=packaging/Solaris/samba.server 0744 root sys
+d initscript /etc/rc3.d ? ? ?
+s initscript /etc/rc3.d/S99samba.server=../init.d/samba.server
+#
+# Stuff to set up SWAT
+#
+d swat /etc/inet ? ? ?
+e swat /etc/inet/services=packaging/Solaris/services ? ? ?
+e swat /etc/inet/inetd.conf=packaging/Solaris/inetd.conf ? ? ?
+#
+# Create the samba subtree. (Usually /usr/local/samba )
+#
+d none samba 0755 root other
+d none samba/var 0755 root other
+d none samba/bin 0755 root other
+d none samba/lib 0755 root other
+d none samba/docs 0755 root other
+#
+# Stuff that goes into lib
+#
+f none samba/lib/smb.conf.example=examples/smb.conf.default 0644 root other
+d none samba/lib/regeditscripts 0755 root other
+f none samba/lib/regeditscripts/NT4_PlainPassword.reg=docs/NT4_PlainPassword.reg 0444 root other
+f none samba/lib/regeditscripts/Win95_PlainPassword.reg=docs/Win95_PlainPassword.reg 0444 root other
+f none samba/lib/regeditscripts/Win98_PlainPassword.reg=docs/Win98_PlainPassword.reg 0444 root other
+f none samba/lib/regeditscripts/Win2000_PlainPassword.reg=docs/Win2000_PlainPassword.reg 0444 root other
+#
+# Random files
+f none samba/docs/Samba-HOWTO-Collection.pdf=docs/Samba-HOWTO-Collection.pdf 0644 root other
+#
+# Static part of prototype file ends.
+#
diff --git a/packaging/Solaris/r.swat b/packaging/Solaris/r.swat
new file mode 100644
index 00000000000..11c776646da
--- /dev/null
+++ b/packaging/Solaris/r.swat
@@ -0,0 +1,16 @@
+while read dest
+do
+ sed -e '/^swat.*swat$/d' $dest >/tmp/$$swat || exit 2
+ # Use cp;rm; instead of mv because $dest might be a symlink
+ cp -f /tmp/$$swat $dest || exit 2
+ rm -f /tmp/$$swat
+done
+
+if [ "$1" = ENDOFCLASS ]
+then
+ if [ -z "$PKG_INSTALL_ROOT" ]
+ then
+ kill -HUP `ps -e -o pid,comm | grep inetd | awk '{print $1}'`
+ fi
+fi
+
diff --git a/packaging/Solaris/request b/packaging/Solaris/request
new file mode 100644
index 00000000000..59cdd0ab22a
--- /dev/null
+++ b/packaging/Solaris/request
@@ -0,0 +1,17 @@
+trap 'exit 3' 15
+
+VALSTR=/usr/sadm/bin/valstr
+
+resp=`ckyorn -d y -p "Do you wish to have Samba start whenever the system boots up? (default:y) " -Q`
+$VALSTR -r "^[yY]" $resp
+[ $? -eq 0 ] && CLASSES="$CLASSES initscript"
+
+resp=`ckyorn -d y -p "Do you wish to set up the Samba Web Admin Tool (SWAT)? (default:y) " -Q`
+$VALSTR -r "^[yY]" $resp
+[ $? -eq 0 ] && CLASSES="$CLASSES swat"
+
+cat >$1 <<!
+CLASSES=$CLASSES
+!
+exit 0
+
diff --git a/packaging/Solaris/samba.server.master b/packaging/Solaris/samba.server.master
new file mode 100755
index 00000000000..6de77780b34
--- /dev/null
+++ b/packaging/Solaris/samba.server.master
@@ -0,0 +1,48 @@
+#!/bin/sh
+#ident "@(#)samba.server 1.0 96/06/19 TK" /* SVr4.0 1.1.13.1*/
+#
+# Please send info on modifications to knuutila@cs.utu.fi
+#
+# This file should have uid root, gid sys and chmod 744
+#
+if [ ! -d /usr/bin ]
+then # /usr not mounted
+ exit
+fi
+
+killproc() { # kill the named process(es)
+ pid=`/usr/bin/ps -e |
+ /usr/bin/grep -w $1 |
+ /usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
+ [ "$pid" != "" ] && kill $pid
+}
+
+# Start/stop processes required for samba server
+
+case "$1" in
+
+'start')
+#
+# Edit these lines to suit your installation (paths, workgroup, host)
+#
+ BASE=__BASEDIR__/samba
+ $BASE/bin/smbd -D -s$BASE/lib/smb.conf
+ $BASE/bin/nmbd -D -s$BASE/lib/smb.conf
+ ;;
+'stop')
+ killproc nmbd
+ killproc smbd
+ ;;
+
+'restart')
+ killproc nmbd
+ killproc smbd
+ BASE=/usr/local/samba
+ $BASE/bin/smbd -D -s$BASE/lib/smb.conf
+ $BASE/bin/nmbd -D -l$BASE/var/log -s$BASE/lib/smb.conf
+ ;;
+
+*)
+ echo "Usage: /etc/init.d/samba.server { start | stop | restart }"
+ ;;
+esac
diff --git a/packaging/Solaris/services b/packaging/Solaris/services
new file mode 100644
index 00000000000..fc691200c8d
--- /dev/null
+++ b/packaging/Solaris/services
@@ -0,0 +1 @@
+swat 901/tcp # Samba Web Admin Tool - swat
diff --git a/packaging/SuSE/5.2/samba-1.9.18p5.dif b/packaging/SuSE/5.2/samba-1.9.18p5.dif
new file mode 100644
index 00000000000..39b13f010de
--- /dev/null
+++ b/packaging/SuSE/5.2/samba-1.9.18p5.dif
@@ -0,0 +1,234 @@
+--- Makefile.Linux
++++ Makefile.Linux 1998/05/06 15:58:42
+@@ -0,0 +1,35 @@
++#
++#
++# Makefile.Linux to integrate package into source tree of S.u.S.E.-Linux
++#
++# Copyright (C) 1996 S.u.S.E. GmbH Fuerth, Germany.
++#
++# Please send bug-fixes or comments to feedback@suse.de.
++#
++# Author: Florian La Roche <florian@suse.de>
++# Volker Lendecke <vl@suse.de>
++#
++#
++
++doc=/usr/doc/packages/samba
++
++compile:
++ make -C source
++
++install:
++ make install -C source
++ mkdir -p $(doc)
++ cp -a docs/* $(doc)
++ rm -rf $(doc)/*.[0-9]
++ cp -R examples $(doc)
++ chmod 644 `find $(doc) -type f`
++ chmod 755 `find $(doc) -type d`
++ install -m 644 smb.conf /etc/smb.conf
++ install rc /sbin/init.d/smb
++ install -m 755 source/mksmbpasswd.sh /usr/bin/mksmbpasswd.sh
++ ln -sf ../smb /sbin/init.d/rc2.d/S20smb
++ ln -sf ../smb /sbin/init.d/rc2.d/K20smb
++ ln -sf ../smb /sbin/init.d/rc3.d/S20smb
++ ln -sf ../smb /sbin/init.d/rc3.d/K20smb
++ mkdir -p /var/adm/fillup-templates
++ cp rc.config.samba /var/adm/fillup-templates
+--- doinst.sh
++++ doinst.sh 1998/05/06 15:54:52
+@@ -0,0 +1,15 @@
++#
++# install/doinst.sh - to be done after extraction
++#
++# Copyright (c) 1997 S.u.S.E. GmbH Fuerth, Germany.
++#
++#
++echo "Updating etc/rc.config..."
++if [ -x bin/fillup ] ; then
++ bin/fillup -q -d = etc/rc.config var/adm/fillup-templates/rc.config.samba
++else
++ echo "ERROR: fillup not found. This should not happen. Please compare"
++ echo "etc/rc.config and var/adm/fillup-templates/rc.config.samba and"
++ echo "update by hand."
++fi
++
+--- rc
++++ rc 1998/05/06 15:54:52
+@@ -0,0 +1,32 @@
++#! /bin/sh
++# Copyright (c) 1996 StarDivision GmbH. All rights reserved.
++# Copyright (c) 1996 S.u.S.E. Gmbh Fuerth, Germany. All rights reserved.
++#
++# Author: Bastian Epting, StarDivision GmbH <be@stardivision.de>
++# Florian La Roche, <florian@suse.de>
++# Volker Lendecke, <vl@suse.de>
++#
++
++. /etc/rc.config
++
++test "$START_SMB" = "yes" || exit 0
++
++case "$1" in
++ start)
++ echo -n "Starting SMB services."
++ /usr/sbin/nmbd -D
++ /usr/sbin/smbd -D
++ echo
++ ;;
++ stop)
++ echo -n "Shutting down SMB services."
++ killproc -TERM /usr/sbin/nmbd
++ killproc -TERM /usr/sbin/smbd
++ echo
++ ;;
++ *)
++ echo "Usage: $0 {start|stop}"
++ exit 1
++esac
++
++exit 0
+--- rc.config.samba
++++ rc.config.samba 1998/05/06 15:54:52
+@@ -0,0 +1,5 @@
++#
++# start samba? ("yes" or "no")
++# Windows 95 / NT - File- and Printservices
++#
++START_SMB="no"
+--- smb.conf
++++ smb.conf 1998/05/06 15:54:52
+@@ -0,0 +1,48 @@
++[global]
++ workgroup = arbeitsgruppe
++ guest account = nobody
++ keep alive = 30
++ os level = 2
++ security = user
++ printing = bsd
++ printcap name = /etc/printcap
++ load printers = yes
++
++; Please uncomment the following entry and replace the
++; ip number and netmask with the correct numbers for
++; your ethernet interface.
++; interfaces = 192.168.1.1/255.255.255.0
++
++; If you want Samba to act as a wins server, please set
++; 'wins support = yes'
++ wins support = no
++
++; If you want Samba to use an existing wins server,
++; please uncomment the following line and replace
++; the dummy with the wins server's ip number.
++; wins server = 192.168.1.1
++
++[homes]
++ comment = Heimatverzeichnis
++ browseable = no
++ read only = no
++ create mode = 0750
++
++; The following share gives all users access to the Server's CD drive,
++; assuming it is mounted under /cd. To enable this share, please remove
++; the semicolons before the lines
++;
++; [cdrom]
++; comment = Linux CD-ROM
++; path = /cd
++; read only = yes
++; locking = no
++
++[printers]
++ comment = All Printers
++ browseable = no
++ printable = yes
++ public = no
++ read only = yes
++ create mode = 0700
++ directory = /tmp
+--- source/Makefile
++++ source/Makefile 1998/05/06 15:54:52
+@@ -5,11 +5,11 @@
+ ###########################################################################
+
+ # The base directory for all samba files
+-BASEDIR = /usr/local/samba
++BASEDIR = /usr
+
+ # The base manpages directory to put the man pages in
+ # Note: $(MANDIR)/man1, $(MANDIR)/man5 and $(MANDIR)/man8 must exist.
+-MANDIR = /usr/local/man
++MANDIR = /usr/man
+
+ # The directories to put things in. If you use multiple
+ # architectures or share the samba binaries across NFS then
+@@ -18,16 +18,16 @@
+ # normally only applies to nmbd and smbd
+ # SBINDIR implies a secure binary directory
+ BINDIR = $(BASEDIR)/bin
+-SBINDIR = $(BASEDIR)/bin
+-LIBDIR = $(BASEDIR)/lib
+-VARDIR = $(BASEDIR)/var
++SBINDIR = $(BASEDIR)/sbin
++LIBDIR = $(BASEDIR)/lib/samba
++VARDIR = /var/log
+
+ # The permissions to give the executables
+ INSTALLPERMS = 0755
+
+ # Add any optimisation or debugging flags here
+ # add -DSYSLOG for syslog support
+-FLAGS1 = -O
++FLAGS1 = -O2
+ LIBS1 =
+
+ # You will need to use a ANSI C compiler. This means under SunOS 4 you can't
+@@ -47,15 +47,15 @@
+ # or in smb.conf (see smb.conf(5))
+ SMBLOGFILE = $(VARDIR)/log.smb
+ NMBLOGFILE = $(VARDIR)/log.nmb
+-CONFIGFILE = $(LIBDIR)/smb.conf
+-LMHOSTSFILE = $(LIBDIR)/lmhosts
+-DRIVERFILE = $(LIBDIR)/printers.def
++CONFIGFILE = /etc/smb.conf
++LMHOSTSFILE = /etc/lmhosts
++DRIVERFILE = /etc/printers.def
+ SMB_PASSWD = $(BINDIR)/smbpasswd
+-SMB_PASSWD_FILE = $(BASEDIR)/private/smbpasswd
+-WEB_ROOT = $(BASEDIR)
++SMB_PASSWD_FILE = /etc/smbpasswd
++WEB_ROOT = /etc
+
+ # the directory where lock files go
+-LOCKDIR = $(VARDIR)/locks
++LOCKDIR = /var/lock
+
+ # The directory where code page definition files go
+ CODEPAGEDIR = $(LIBDIR)/codepages
+@@ -206,7 +206,7 @@
+ # contributed by Andrew.Tridgell@anu.edu.au
+ # add -DLINUX_BIGCRYPT is you have shadow passwords but don't have the
+ # right libraries and includes
+-# FLAGSM = -DLINUX -DSHADOW_PWD -DFAST_SHARE_MODES
++FLAGSM = -DLINUX -DSHADOW_PWD -DFAST_SHARE_MODES
+ # LIBSM = -lshadow
+
+ # Use this for Linux without shadow passwords or for any Linux
+--- source/includes.h
++++ source/includes.h 1998/05/06 15:54:52
+@@ -244,13 +244,6 @@
+ #define USE_SETFS
+ #endif
+ #endif
+-#ifdef SHADOW_PWD
+-#if _LINUX_C_LIB_VERSION_MAJOR < 5
+-#ifndef crypt
+-#define crypt pw_encrypt
+-#endif
+-#endif
+-#endif
+ #endif
+
+ #ifdef SUNOS4
diff --git a/packaging/SuSE/5.2/samba.spec b/packaging/SuSE/5.2/samba.spec
new file mode 100644
index 00000000000..5f20875c9ea
--- /dev/null
+++ b/packaging/SuSE/5.2/samba.spec
@@ -0,0 +1,119 @@
+#
+# spec file for package samba (Version 1.9.18p1)
+#
+# Copyright (c) 1997 S.u.S.E. GmbH Fuerth, Germany.
+#
+# please send bugfixes or comments to feedback@suse.de.
+#
+
+Vendor: S.u.S.E. GmbH, Fuerth, Germany
+Distribution: S.u.S.E. Linux 5.1 (i386)
+Name: samba
+Release: 1
+Copyright: 1992-98 Andrew Tridgell, Karl Auer, Jeremy Allison
+Group:
+Provides: samba smbfs
+Requires:
+Conflicts:
+Autoreqprov: on
+Packager: feedback@suse.de
+
+Version: 1.9.18p5
+Summary: Samba is a file server for Unix, similar to LanManager.
+Source: samba-1.9.18p5.tar.gz
+Source1: smbfs-2.0.2.tar.gz
+Patch: samba-1.9.18p5.dif
+Patch1: smbfs-2.0.2.dif
+%prep
+%setup
+%patch
+%setup -T -n smbfs-2.0.2 -b1
+%patch -P 1
+%build
+cd ../samba-1.9.18p5
+make -f Makefile.Linux compile
+cd ../smbfs-2.0.2
+make -f Makefile.Linux compile
+%install
+cd ../samba-1.9.18p5
+make -f Makefile.Linux install
+cd ../smbfs-2.0.2
+make -f Makefile.Linux install
+Check
+%post
+echo "Updating etc/rc.config..."
+if [ -x bin/fillup ] ; then
+ bin/fillup -q -d = etc/rc.config var/adm/fillup-templates/rc.config.samba
+else
+ echo "ERROR: fillup not found. This should not happen. Please compare"
+ echo "etc/rc.config and var/adm/fillup-templates/rc.config.samba and"
+ echo "update by hand."
+fi
+%files
+%docdir /usr/doc/packages/samba
+/usr/doc/packages/samba
+%config /etc/smb.conf
+/usr/lib/samba/codepages
+/sbin/init.d/rc2.d/K20smb
+/sbin/init.d/rc2.d/S20smb
+/sbin/init.d/rc3.d/K20smb
+/sbin/init.d/rc3.d/S20smb
+%config /sbin/init.d/smb
+/usr/bin/addtosmbpass
+/usr/bin/mksmbpasswd.sh
+/usr/bin/make_printerdef
+/usr/bin/make_smbcodepage
+/usr/bin/nmblookup
+/usr/bin/smbclient
+/usr/bin/smbmount
+/usr/bin/smbpasswd
+/usr/bin/smbstatus
+/usr/bin/smbtar
+/usr/bin/smbumount
+/usr/bin/testparm
+/usr/bin/testprns
+%doc /usr/man/man1/smbclient.1.gz
+%doc /usr/man/man1/smbrun.1.gz
+%doc /usr/man/man1/smbstatus.1.gz
+%doc /usr/man/man1/smbtar.1.gz
+%doc /usr/man/man1/testparm.1.gz
+%doc /usr/man/man1/testprns.1.gz
+%doc /usr/man/man1/make_smbcodepage.1.gz
+%doc /usr/man/man5/smb.conf.5.gz
+%doc /usr/man/man7/samba.7.gz
+%doc /usr/man/man8/nmbd.8.gz
+%doc /usr/man/man8/smbd.8.gz
+%doc /usr/man/man8/smbmount.8.gz
+%doc /usr/man/man8/smbumount.8.gz
+%doc /usr/man/man8/smbmnt.8.gz
+%doc /usr/man/man8/smbpasswd.8.gz
+/usr/sbin/nmbd
+/usr/sbin/smbd
+/var/adm/fillup-templates/rc.config.samba
+%description
+Samba is a suite of programs which work together to allow clients to
+access Unix filespace and printers via the SMB protocol (Seerver Message
+Block).
+CAUTION: The samba daemons are started by the init script
+/sbin/init.d/samba, not by inetd. The entries for /usr/sbin/smbd
+and /usr/sbin/nmbd must be commented out in /etc/inetd.conf.
+In practice, this means that you can redirect disks and printers to
+Unix disks and printers from LAN Manager clients, Windows for
+Workgroups 3.11 clients, Windows'95 clients, Windows NT clients
+and OS/2 clients. There is
+also a Unix client program supplied as part of the suite which allows
+Unix users to use an ftp-like interface to access filespace and
+printers on any other SMB server.
+Samba includes the following programs (in summary):
+* smbd, the SMB server. This handles actual connections from clients.
+* nmbd, the Netbios name server, which helps clients locate servers.
+* smbclient, the Unix-hosted client program.
+* testprns, a program to test server access to printers.
+* testparm, a program to test the Samba configuration file for correctness.
+* smb.conf, the Samba configuration file.
+* smbprint, a sample script to allow a Unix host to use smbclient
+to print to an SMB server.
+The suite is supplied with full source and is GPLed.
+This package expects its config file under /etc/smb.conf .
+Documentation: /usr/doc/packages/samba
+
diff --git a/packaging/SuSE/7.1/samba-2.2.0-alpha0.dif b/packaging/SuSE/7.1/samba-2.2.0-alpha0.dif
new file mode 100644
index 00000000000..75bfdf18c66
--- /dev/null
+++ b/packaging/SuSE/7.1/samba-2.2.0-alpha0.dif
@@ -0,0 +1,224 @@
+--- lmhosts
++++ lmhosts 2000/08/28 07:32:33
+@@ -0,0 +1,8 @@
++# This file provides the same function that the
++# lmhosts file does for Windows.
++# It provides another way to map netbios names to ip addresses.
++# See the section on 'name resolve order' in the manual page to
++# smb.conf for more information.
++
++# Sample entry:
++# 192.168.1.1 samba
+--- mount.smbfs
++++ mount.smbfs 2000/08/28 07:32:55
+@@ -0,0 +1,14 @@
++#!/bin/sh
++#
++# Copyright (c) 1999 SuSE GmbH Nuernberg, Germany. All rights reserved.
++#
++# Author: Carsten Hoeger <choeger@suse.de>
++#
++# /sbin/mount.smbfs
++#
++# I'm called by the mount-command and smbmount want's to get
++# called by me, so lets do it.
++#
++# P.S.: This is a very very raw solution and I don't know, if this
++# is intentionally.
++smbmount "$@"
+--- rc
++++ rc 2000/08/28 07:32:33
+@@ -0,0 +1,53 @@
++#! /bin/sh
++# Copyright (c) 1996 StarDivision GmbH. All rights reserved.
++# Copyright (c) 1996 S.u.S.E. Gmbh Fuerth, Germany. All rights reserved.
++#
++# Author: Bastian Epting, StarDivision GmbH <be@stardivision.de>
++# Florian La Roche, <florian@suse.de>
++# Volker Lendecke, <vl@suse.de>
++#
++
++. /etc/rc.config
++
++# Determine the base and follow a runlevel link name.
++base=${0##*/}
++link=${base#*[SK][0-9][0-9]}
++
++# Force execution if not called by a runlevel directory.
++test $link = $base && START_SMB=yes
++test "$START_SMB" = "yes" || exit 0
++
++# The echo return value for success (defined in /etc/rc.config).
++return=$rc_done
++case "$1" in
++ start)
++ echo -n "Starting SMB services:"
++ startproc /usr/sbin/nmbd -D || return=$rc_failed
++ startproc /usr/sbin/smbd -D || return=$rc_failed
++ echo -e "$return"
++ ;;
++ stop)
++ echo -n "Shutting down SMB services:"
++ killproc -TERM /usr/sbin/nmbd || return=$rc_failed
++ killproc -TERM /usr/sbin/smbd || return=$rc_failed
++ echo -e "$return"
++ ;;
++ restart|reload)
++ echo -n "Reloading SMB services:"
++ killproc -HUP /usr/sbin/nmbd || return=$rc_failed
++ killproc -HUP /usr/sbin/smbd || return=$rc_failed
++ echo -e "$return"
++ ;;
++ status)
++ echo -n "Checking for service smb: "
++ checkproc /usr/sbin/nmbd && echo -n "OK " || echo -n "No process "
++ checkproc /usr/sbin/smbd && echo "OK " || echo "No process"
++ ;;
++ *)
++ echo "Usage: $0 {start|stop|restart|reload|status}"
++ exit 1
++esac
++
++# Inform the caller not only verbosely and set an exit status.
++test "$return" = "$rc_done" || exit 1
++exit 0
+--- rc.config.samba
++++ rc.config.samba 2000/08/28 07:32:33
+@@ -0,0 +1,5 @@
++#
++# start samba? ("yes" or "no")
++# Windows 95 / NT - File- and Printservices
++#
++START_SMB="no"
+--- smb.conf
++++ smb.conf 2000/08/28 07:32:33
+@@ -0,0 +1,80 @@
++;
++; /etc/smb.conf
++;
++; Copyright (c) 1999 SuSE GmbH Nuernberg, Germany.
++;
++[global]
++ workgroup = arbeitsgruppe
++ guest account = nobody
++ keep alive = 30
++ os level = 2
++ kernel oplocks = false
++ security = user
++
++; Uncomment the following, if you want to use an existing
++; NT-Server to authenticate users, but don't forget that
++; you also have to create them locally!!!
++; security = server
++; password server = 192.168.1.10
++; encrypt passwords = yes
++
++ printing = bsd
++ printcap name = /etc/printcap
++ load printers = yes
++
++ socket options = TCP_NODELAY
++
++ map to guest = Bad User
++
++; Uncomment this, if you want to integrate your server
++; into an existing net e.g. with NT-WS to prevent nettraffic
++; local master = no
++
++; Please uncomment the following entry and replace the
++; ip number and netmask with the correct numbers for
++; your ethernet interface.
++; interfaces = 192.168.1.1/255.255.255.0
++
++; If you want Samba to act as a wins server, please set
++; 'wins support = yes'
++ wins support = no
++
++; If you want Samba to use an existing wins server,
++; please uncomment the following line and replace
++; the dummy with the wins server's ip number.
++; wins server = 192.168.1.1
++
++; Do you wan't samba to act as a logon-server for
++; your windows 95/98 clients, so uncomment the
++; following:
++; logon script =%U.bat
++; domain logons = yes
++; domain master = yes
++; [netlogon]
++; path = /netlogon
++
++
++[homes]
++ comment = Heimatverzeichnis
++ browseable = no
++ read only = no
++ create mode = 0750
++
++; The following share gives all users access to the Server's CD drive,
++; assuming it is mounted under /cd. To enable this share, please remove
++; the semicolons before the lines
++;
++; [cdrom]
++; comment = Linux CD-ROM
++; path = /cdrom
++; read only = yes
++; locking = no
++
++[printers]
++ comment = All Printers
++ browseable = no
++ printable = yes
++ public = no
++ read only = yes
++ create mode = 0700
++ directory = /tmp
+--- smbfs
++++ smbfs 2000/08/28 07:32:33
+@@ -0,0 +1,40 @@
++#! /bin/bash
++# Copyright (c) 1996 SuSE GmbH Nuernberg, Germany. All rights reserved.
++#
++# Author: Thomas Fehr <fehr@suse.de>, 1999
++#
++# /sbin/init.d/smbfs
++#
++
++smbfs=no
++if [ `cat /proc/mounts | grep " smbfs " | wc -l` -gt 0 ]
++then
++ smbfs=yes
++fi
++
++return=$rc_done
++case "$1" in
++ start|reload)
++ ;;
++ stop)
++ if [ "$smbfs" = "yes" ]
++ then
++ echo -n "Remove SMB File System"
++ #
++ # Unmount in background because during long timeouts
++ #
++ umount -at smbfs &
++ sleep 2
++ echo -e "$return"
++ fi
++ ;;
++ restart)
++ $0 stop && $0 start || return=$rc_failed
++ ;;
++ status)
++ ;;
++ *)
++ echo "Usage: $0 {start|stop|status|reload|restart}"
++ exit 1
++esac
++exit 0
+--- smbpasswd
++++ smbpasswd 2000/08/28 07:32:33
+@@ -0,0 +1,3 @@
++# Sample smbpasswd file.
++# To use this, set 'encrypt passwords = yes' in the [global]-section
++# of /etc/smb.conf
diff --git a/packaging/SuSE/7.1/samba.pamd b/packaging/SuSE/7.1/samba.pamd
new file mode 100644
index 00000000000..d9e7088bea3
--- /dev/null
+++ b/packaging/SuSE/7.1/samba.pamd
@@ -0,0 +1,3 @@
+#%PAM-1.0
+auth required /lib/security/pam_unix.so
+account required /lib/security/pam_unix.so
diff --git a/packaging/SuSE/7.1/samba.spec b/packaging/SuSE/7.1/samba.spec
new file mode 100644
index 00000000000..60d8099edbf
--- /dev/null
+++ b/packaging/SuSE/7.1/samba.spec
@@ -0,0 +1,381 @@
+#
+# spec file for package samba (Version 2.0.7)
+#
+# Copyright (c) 2000 SuSE GmbH Nuernberg, Germany.
+#
+# please send bugfixes or comments to feedback@suse.de.
+#
+
+# neededforbuild automake openldap
+# usedforbuild aaa_base aaa_dir autoconf automake base bash bindutil binutils bison bzip compress cpio cracklib devs diff ext2fs file fileutil find flex gawk gcc gdbm gettext gpm gppshare groff gzip kbd less libc libtool libz lx_suse make mktemp modules ncurses net_tool netcfg nkita nkitb nssv1 openldap pam patch perl pgp ps rcs rpm sendmail sh_utils shadow shlibs strace syslogd sysvinit texinfo textutil timezone unzip util vim xdevel xf86 xshared
+
+Vendor: SuSE GmbH, Nuernberg, Germany
+Distribution: SuSE Linux 7.1a (i386)
+Name: samba
+Release: 0
+Packager: feedback@suse.de
+
+Copyright: 1992-95 Andrew Tridgell, Karl Auer, Jeremy Allison
+Group: Networking/Daemons
+Url: http://www.samba.org
+Provides: samba smbfs
+Requires: smbclnt
+Autoreqprov: on
+Version: 2.2
+Summary: An SMB file server for Unix
+Source: samba-2.2.0-alpha0.tar.gz
+Source1: samba.pamd
+Patch: samba-2.2.0-alpha0.dif
+%package -n smbclnt
+Summary: Samba client utilities
+Autoreqprov: on
+Group: Networking
+%prep
+%setup -n samba-2.2.0-alpha0
+%patch
+
+%build
+cd source
+%{?suse_update_config:%{suse_update_config -f}}
+LIBS=-lnsl \
+./configure --prefix=/usr --libdir=/etc \
+ --with-privatedir=/etc --localstatedir=/var/log \
+ --with-smbmount --with-pam \
+ --mandir=%{_mandir} \
+ --with-swatdir=/usr/lib/samba/swat \
+ --with-sambabook=/usr/lib/samba/swat/using_samba
+cd ..
+make LOCKDIR=/var/lock/samba SBINDIR=/usr/sbin \
+ CODEPAGEDIR=/usr/lib/samba/codepages -C source
+
+%install
+mkdir -p /usr/lib/samba
+make install LOCKDIR=/var/lock/samba SBINDIR=/usr/sbin \
+ CODEPAGEDIR=/usr/lib/samba/codepages -C source
+# cleanup docs
+rm -rf docs/*.[0-9]
+chmod 644 `find docs examples -type f`
+chmod 755 `find docs examples -type d`
+#utility scripts
+mkdir -p /usr/lib/samba/scripts
+cp -a source/script/* /usr/lib/samba/scripts
+# configuration files
+install -m 644 smb.conf /etc/smb.conf
+install -m 644 lmhosts /etc/lmhosts
+install -m 600 smbpasswd -o root -g root /etc/smbpasswd
+install -d 755 /etc/pam.d
+install -m 644 $RPM_SOURCE_DIR/samba.pamd /etc/pam.d/samba
+install -m 755 mount.smbfs /sbin/mount.smbfs
+# start script
+install rc /sbin/init.d/smb
+ln -sf ../smb /sbin/init.d/rc2.d/S20smb
+ln -sf ../smb /sbin/init.d/rc2.d/K20smb
+ln -sf ../smb /sbin/init.d/rc3.d/S20smb
+ln -sf ../smb /sbin/init.d/rc3.d/K20smb
+ln -sf ../../sbin/init.d/smb /usr/sbin/rcsmb
+install smbfs /sbin/init.d/smbfs
+ln -sf ../smbfs /sbin/init.d/rc2.d/S21smbfs
+ln -sf ../smbfs /sbin/init.d/rc2.d/K19smbfs
+ln -sf ../smbfs /sbin/init.d/rc3.d/S21smbfs
+ln -sf ../smbfs /sbin/init.d/rc3.d/K19smbfs
+ln -sf ../../sbin/init.d/smbfs /usr/sbin/rcsmbfs
+# rc.config fragment
+mkdir -p /var/adm/fillup-templates
+cp rc.config.samba /var/adm/fillup-templates
+%{?suse_check}
+
+%post
+echo "Updating etc/rc.config..."
+if [ -x bin/fillup ] ; then
+ bin/fillup -q -d = etc/rc.config var/adm/fillup-templates/rc.config.samba
+else
+ echo "ERROR: fillup not found. This should not happen. Please compare"
+ echo "etc/rc.config and var/adm/fillup-templates/rc.config.samba and"
+ echo "update by hand."
+fi
+if grep -q '^[#[:space:]]*swat' etc/inetd.conf ; then
+ echo /etc/inetd.conf is up to date
+else
+ echo updating inetd.conf
+ cat >> etc/inetd.conf << EOF
+# swat is the Samba Web Administration Tool
+swat stream tcp nowait.400 root /usr/sbin/swat swat
+EOF
+fi
+if grep -q '^swat' etc/services ; then
+ echo /etc/services is up to date
+else
+ echo updating services
+ cat >> etc/services << EOF
+swat 901/tcp # swat is the Samba Web Administration Tool
+EOF
+fi
+mkdir -p var/adm/notify/messages
+cat << EOF > var/adm/notify/messages/samba-notify
+Achtung!
+========
+Die Syntax des smbmount Kommandos hat sich geaendert!
+smbmount kann nicht mehr direkt aufgerufen werden. Es wird von einem
+Shellscript /sbin/mount.smbfs aufgerufen, welches wiederum von mount
+aufgerufen wird.
+Hier ein Beispielaufruf:
+mount -t smbfs -o username=uname,password=passwd //smbserv/share /destination
+*****************************************************************************
+Attention!
+==========
+The syntax of smbmount has changed!
+smbmount can not be called direct anymore. It will be called by a shell
+script /sbin/mount.smbfs, which will be called by mount.
+A sample call to smbfs:
+mount -t smbfs -o username=uname,password=passwd //smbserv/share /destination
+EOF
+
+%files
+%config(noreplace) /etc/smb.conf
+%config(noreplace) /etc/lmhosts
+%config(noreplace) /etc/smbpasswd
+%config /etc/pam.d/samba
+/usr/lib/samba
+/sbin/init.d/rc2.d/K20smb
+/sbin/init.d/rc2.d/S20smb
+/sbin/init.d/rc3.d/K20smb
+/sbin/init.d/rc3.d/S20smb
+%config /sbin/init.d/smb
+/usr/bin/addtosmbpass
+/usr/bin/convert_smbpasswd
+/usr/bin/make_printerdef
+/usr/bin/make_smbcodepage
+/usr/bin/make_unicodemap
+/usr/bin/smbpasswd
+/usr/bin/smbstatus
+/usr/bin/testparm
+/usr/bin/testprns
+%doc docs/* examples
+%doc %{_mandir}/man1/make_smbcodepage.1.gz
+%doc %{_mandir}/man1/make_unicodemap.1.gz
+%doc %{_mandir}/man1/smbrun.1.gz
+%doc %{_mandir}/man1/smbsh.1.gz
+%doc %{_mandir}/man1/smbstatus.1.gz
+%doc %{_mandir}/man1/testparm.1.gz
+%doc %{_mandir}/man1/testprns.1.gz
+%doc %{_mandir}/man5/lmhosts.5.gz
+%doc %{_mandir}/man5/smb.conf.5.gz
+%doc %{_mandir}/man5/smbpasswd.5.gz
+%doc %{_mandir}/man7/samba.7.gz
+%doc %{_mandir}/man8/nmbd.8.gz
+%doc %{_mandir}/man8/smbd.8.gz
+%doc %{_mandir}/man8/smbpasswd.8.gz
+%doc %{_mandir}/man8/swat.8.gz
+/usr/sbin/nmbd
+/usr/sbin/rcsmb
+/usr/sbin/smbd
+/usr/sbin/swat
+/var/adm/fillup-templates/rc.config.samba
+
+%files -n smbclnt
+/sbin/init.d/rc2.d/K19smbfs
+/sbin/init.d/rc2.d/S21smbfs
+/sbin/init.d/rc3.d/K19smbfs
+/sbin/init.d/rc3.d/S21smbfs
+%config /sbin/init.d/smbfs
+/usr/sbin/rcsmbfs
+/sbin/mount.smbfs
+/usr/bin/nmblookup
+/usr/bin/rpcclient
+/usr/bin/smbclient
+/usr/bin/smbmnt
+/usr/bin/smbmount
+/usr/bin/smbumount
+/usr/bin/smbspool
+/usr/bin/smbtar
+%doc %{_mandir}/man1/nmblookup.1.gz
+%doc %{_mandir}/man1/smbclient.1.gz
+%doc %{_mandir}/man1/smbtar.1.gz
+%doc %{_mandir}/man8/smbmnt.8.gz
+%doc %{_mandir}/man8/smbmount.8.gz
+%doc %{_mandir}/man8/smbspool.8.gz
+%doc %{_mandir}/man8/smbumount.8.gz
+
+%description
+Samba is a suite of programs which work together to allow clients to
+access Unix filespace and printers via the SMB protocol (Server Message
+Block).
+In practice, this means that you can redirect disks and printers to
+Unix disks and printers from LAN Manager clients, Windows for
+Workgroups 3.11 clients, Windows'95 clients, Windows NT clients
+and OS/2 clients. There is
+also a Unix client program supplied as part of the suite which allows
+Unix users to use an ftp-like interface to access filespace and
+printers on any other SMB server.
+Samba includes the following programs (in summary):
+* smbd, the SMB server. This handles actual connections from clients.
+* nmbd, the Netbios name server, which helps clients locate servers.
+* smbclient, the Unix-hosted client program.
+* smbrun, a little 'glue' program to help the server run external
+programs.
+* testprns, a program to test server access to printers.
+* testparm, a program to test the Samba configuration file for correctness.
+* smb.conf, the Samba configuration file.
+* smbprint, a sample script to allow a Unix host to use smbclient
+to print to an SMB server.
+The suite is supplied with full source and is GPLed.
+This package expects its config file under /etc/smb.conf .
+
+Authors:
+--------
+ Andrew Tridgell <Andrew.Tridgell@anu.edu.au>
+ Karl Auer <Karl.Auer@anu.edu.au>
+ Jeremy Allison <jeremy@netcom.com>
+
+SuSE series: n
+
+
+%description -n smbclnt
+This package contains all programs, that are needed to act as a samba
+client. This includes also smbmount, of course.
+
+Authors:
+--------
+ Andrew Tridgell <Andrew.Tridgell@anu.edu.au>
+ Karl Auer <Karl.Auer@anu.edu.au>
+ Jeremy Allison <jeremy@netcom.com>
+
+SuSE series: n
+
+
+%changelog -n samba
+* Mon Aug 28 2000 - choeger@suse.de
+- changed $* to "$@" in mount.smbfs to make it also
+ possible to mount shares with spaces
+* Mon Jul 31 2000 - choeger@suse.de
+- improvement for rcsmb
+- fix for spec-file to compile with NIS netgroups
+* Thu Jul 20 2000 - choeger@suse.de
+- added smbfs initscript that has been removed
+ by an error
+* Tue Jul 11 2000 - choeger@suse.de
+- split package into client and server parts
+ client package name: smbclnt
+* Wed Apr 26 2000 - choeger@suse.de
+- new version, 2.0.7
+* Thu Apr 06 2000 - ro@suse.de
+- removed pam,cracklib from neededforbuild: build handles this
+* Wed Apr 05 2000 - bk@suse.de
+- s390 team added config.{sub,guess} update macro for s390
+* Mon Mar 27 2000 - choeger@suse.de
+- fixed bug in specfile
+ the multilined configure call missed a "" :-(
+* Thu Mar 09 2000 - choeger@suse.de
+- fixed typo in specfile
+* Wed Mar 01 2000 - choeger@suse.de
+- added %{_mandir}
+* Tue Feb 08 2000 - choeger@suse.de
+- removed /sbin/init.d/smbfs because it is no longer needed
+* Mon Jan 03 2000 - choeger@suse.de
+- bugfix for ipc.c
+ to make roaming profiles work again.
+* Tue Nov 30 1999 - choeger@suse.de
+- changed kernel oplocks = off to
+ kernel oplocks = false
+* Tue Nov 16 1999 - choeger@suse.de
+- added kernel oplocks = off in smb.conf
+* Fri Nov 12 1999 - choeger@suse.de
+- new version, 2.0.6
+* Fri Nov 05 1999 - choeger@suse.de
+- Fix for the smbmount lost-connection problem
+ _seems_ to work...
+* Fri Oct 29 1999 - choeger@suse.de
+- removed comment sign in /etc/inetd.conf for swat
+* Mon Sep 13 1999 - bs@suse.de
+- ran old prepare_spec on spec file to switch to new prepare_spec.
+* Tue Aug 10 1999 - fehr@suse.de
+- set execute permissions for mksmbpasswd.sh and changesmbpasswd.sh
+* Thu Jul 29 1999 - fehr@suse.de
+- fixed typo in /sbin/init.d/smbfs
+* Thu Jul 22 1999 - fehr@suse.de
+- changed to new version 2.0.5a
+* Wed Jul 21 1999 - fehr@suse.de
+- changed to new version 2.0.5
+* Tue Jul 20 1999 - fehr@suse.de
+- install /sbin/init.d/smbfs
+- changed to new version 2.0.5pre4
+* Mon Jul 19 1999 - fehr@suse.de
+- add /sbin/init.d/smbfs
+- changed to new version 2.0.5pre3
+* Fri Jul 02 1999 - fehr@suse.de
+- removed "umount -a -t smbfs" from start sscript
+* Tue Jun 22 1999 - kukuk@suse.de
+- 2.0.4b changed default values, enable PAM again
+* Fri Jun 18 1999 - kukuk@suse.de
+- changed to new version 2.0.4b
+* Mon Jun 14 1999 - kukuk@suse.de
+- Enable PAM, add samba.pamd
+* Mon May 03 1999 - fehr@suse.de
+- add umount -a -t smbfs to shutdown sequence of samba
+* Thu Mar 11 1999 - ro@suse.de
+- smbmount: define NR_OPEN to 1024 if undefined (GLIBC-2.1)
+* Wed Mar 10 1999 - choeger@suse.de
+- some enhancements for smb.conf
+* Wed Mar 10 1999 - choeger@suse.de
+- new version 2.0.3 and smbmount now seems to work
+* Tue Mar 09 1999 - ro@suse.de
+- use samba-2.0.2 for STABLE
+- use smbfs-2.1 with kernel 2.2.2
+* Sun Feb 28 1999 - ro@suse.de
+- for glibc-2.1 strncat uses strcat for one subcase, so don't
+ redefine strcat to "ERROR" for glibc-2.1
+* Mon Feb 15 1999 - fehr@suse.de
+- fix for umount problem from Volker
+* Tue Feb 09 1999 - fehr@suse.de
+- changed to version 2.0.2 of samba
+* Fri Jan 15 1999 - bs@suse.de
+- replaced /sbin/init.d/smb with newer style version (again)
+* Fri Jan 15 1999 - fehr@suse.de
+- switched to new version 2.0.0
+* Wed Jan 13 1999 - bs@suse.de
+- fixed entry in inetd.conf
+* Wed Jan 13 1999 - bs@suse.de
+- replaced /sbin/init.d/smb with newer style version
+* Mon Jan 11 1999 - vl@suse.de
+- make 2.0.0beta5 package of samba
+* Mon Aug 24 1998 - vl@suse.de
+- changed to version 1.9.18p10
+* Mon Jun 29 1998 - vl@suse.de
+- changed to version 1.9.18p8
+* Mon Apr 20 1998 - vl@suse.de
+- changed to version 1.9.18p4
+* Thu Feb 19 1998 - vl@suse.de
+- changed to version 1.9.18p3
+* Tue Feb 03 1998 - vl@suse.de
+- changed to version 1.9.18p2
+- fixed some problems in spec-file, some files were missing :-(
+- fixed smbfs-2.0.2/Makefile.Linux
+* Tue Jan 13 1998 - vl@suse.de
+- changed to version 1.9.18p1
+* Fri Jan 09 1998 - vl@suse.de
+- changed to version 1.9.18
+* Tue Dec 02 1997 - bs@suse.de
+- disable samba by default in /etc/rc.config
+* Mon Oct 06 1997 - fehr@suse.de
+- package prepared for automatic building
+* Mon Sep 29 1997 - fehr@suse.de
+- updated to version 1.9.17p2 due to security hole.
+* Wed Jul 16 1997 - fehr@suse.de
+- add fillup-template for rc.config and install it in doinst.sh
+* Fri Jun 27 1997 - bs@suse.de
+- update to smbfs-2.0.2, due to security hole.
+* Tue Jun 17 1997 - fehr@suse.de
+- changed init-skript to recognize entry START_SMB of rc.config
+* Mon Jun 02 1997 - vl@suse.de
+- update to version 1.9.16p11
+- Starting Samba from /sbin/init.d, not from inetd.conf
+* Sun Feb 02 1997 - vl@suse.de
+- update to version 1.9.16p10
+- Adapted /etc/smb.conf.sample to 4.4.1 manual
+* Thu Jan 02 1997 - florian@suse.de
+- update to version 1.9.16p9
+- configuration file is now /etc/smb.conf
+- smbd and nmbd are now in /usr/sbin
+- added start-script /sbin/init.d/smb and entry in /etc/rc.config
+* Thu Jan 02 1997 - florian@suse.de
+- Update auf neue Version 1.9.16p6.
diff --git a/packaging/bin/update-pkginfo b/packaging/bin/update-pkginfo
new file mode 100755
index 00000000000..8432173cc88
--- /dev/null
+++ b/packaging/bin/update-pkginfo
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+VERSION=$1
+RELEASE=$2
+
+if [ $# -ne 2 ]; then
+ echo Usage: update-pkginfo VERSION RELEASE
+ exit 1
+fi
+
+for f in */*/*.tmpl; do
+ f2=`echo $f | sed s/.tmpl//g`
+ echo $f2
+ sed -e s/PVERSION/$VERSION/g -e s/PRELEASE/$RELEASE/g < $f > $f2
+done
+for f in */*.tmpl; do
+ f2=`echo $f | sed s/.tmpl//g`
+ echo $f2
+ sed -e s/PVERSION/$VERSION/g -e s/PRELEASE/$RELEASE/g < $f > $f2
+done