summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
Diffstat (limited to 'packaging')
-rw-r--r--packaging/README34
-rw-r--r--packaging/RedHat/README11
-rwxr-xr-xpackaging/RedHat/findsmb141
-rw-r--r--packaging/RedHat/makefile-path.patch43
-rw-r--r--packaging/RedHat/makerpms.sh.tmpl14
-rw-r--r--packaging/RedHat/samba.log11
-rw-r--r--packaging/RedHat/samba.pamd2
-rw-r--r--packaging/RedHat/samba2.spec.tmpl274
-rw-r--r--packaging/RedHat/smb.conf281
-rwxr-xr-xpackaging/RedHat/smb.init49
-rwxr-xr-xpackaging/RedHat/smbadduser73
-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.pl262
-rwxr-xr-xpackaging/SGI/inetd.sh29
-rw-r--r--packaging/SGI/legal_notice.html53
-rwxr-xr-xpackaging/SGI/makefile.pl38
-rwxr-xr-xpackaging/SGI/mkman27
-rwxr-xr-xpackaging/SGI/mkprintcap.sh15
-rwxr-xr-xpackaging/SGI/mkrelease.sh82
-rw-r--r--packaging/SGI/printcap5
-rw-r--r--packaging/SGI/relnotes.html233
-rw-r--r--packaging/SGI/samba.config1
-rw-r--r--packaging/SGI/samba.rc42
-rw-r--r--packaging/SGI/sambalp150
-rw-r--r--packaging/SGI/smb.conf122
-rw-r--r--packaging/SGI/smbpasswd1
-rw-r--r--packaging/SGI/smbprint54
-rwxr-xr-xpackaging/SGI/spec.pl87
-rwxr-xr-xpackaging/SGI/startswat.sh21
-rw-r--r--packaging/Solaris/pkg-specs/Packaging.script5
-rw-r--r--packaging/Solaris/pkg-specs/mkprototype31
-rw-r--r--packaging/Solaris/pkg-specs/pkginfo12
-rw-r--r--packaging/Solaris/pkg-specs/postinstall37
-rw-r--r--packaging/Solaris/pkg-specs/postremove30
-rw-r--r--packaging/SuSE/5.2/samba-1.9.18p5.dif234
-rw-r--r--packaging/SuSE/5.2/samba.spec122
40 files changed, 2899 insertions, 0 deletions
diff --git a/packaging/README b/packaging/README
new file mode 100644
index 00000000000..1adb809ae5a
--- /dev/null
+++ b/packaging/README
@@ -0,0 +1,34 @@
+Copyright (C) 1997 - Samba-Team
+Date: August 19, 1997
+Updates: First Release - 19970819
+===============================================================================
+
+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.
+
+As such, the files contained here are intended for use only by those wishing
+to build their own 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-bugs@samba.anu.edu.au 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/RedHat/README b/packaging/RedHat/README
new file mode 100644
index 00000000000..3b85f5e0a76
--- /dev/null
+++ b/packaging/RedHat/README
@@ -0,0 +1,11 @@
+Preparation Date: Fri Aug 21, 1998
+Preparer: John H Terpstra <jht@samba.anu.edu.au>
+
+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/makefile-path.patch b/packaging/RedHat/makefile-path.patch
new file mode 100644
index 00000000000..b9f5984a782
--- /dev/null
+++ b/packaging/RedHat/makefile-path.patch
@@ -0,0 +1,43 @@
+--- samba-2.0.0/source/Makefile.in.orig Sat Aug 22 02:48:36 1998
++++ samba-2.0.0/source/Makefile.in Fri Aug 21 22:19:32 1998
+@@ -23,11 +23,11 @@
+ .SUFFIXES:
+ .SUFFIXES: .c .o
+
+-BASEDIR=$(prefix)/samba
++BASEDIR= /usr
+ BINDIR = $(BASEDIR)/bin
+-SBINDIR = $(BASEDIR)/bin
+-LIBDIR = $(BASEDIR)/lib
+-VARDIR = $(BASEDIR)/var
++SBINDIR = $(BASEDIR)/sbin
++LIBDIR = /etc
++VARDIR = /var
+ MANDIR = $(BASEDIR)/man
+
+ # The permissions to give the executables
+@@ -36,19 +36,19 @@
+ # set these to where to find various files
+ # These can be overridden by command line switches (see smbd(8))
+ # or in smb.conf (see smb.conf(5))
+-SMBLOGFILE = $(VARDIR)/log.smb
+-NMBLOGFILE = $(VARDIR)/log.nmb
++SMBLOGFILE = $(VARDIR)/log/samba/log.smb
++NMBLOGFILE = $(VARDIR)/log/samba/log.nmb
+ CONFIGFILE = $(LIBDIR)/smb.conf
+ LMHOSTSFILE = $(LIBDIR)/lmhosts
+ DRIVERFILE = $(LIBDIR)/printers.def
+ SMB_PASSWD = $(BINDIR)/smbpasswd
+-SMB_PASSWD_FILE = $(BASEDIR)/private/smbpasswd
++SMB_PASSWD_FILE = $(LIBDIR)/smbpasswd
+
+ # This is where SWAT images and help files go
+-SWATDIR = $(BASEDIR)/swat
++SWATDIR = $(BASEDIR)/share/swat
+
+ # the directory where lock files go
+-LOCKDIR = $(VARDIR)/locks
++LOCKDIR = $(VARDIR)/lock/samba
+
+ # The directory where code page definition files go
+ CODEPAGEDIR = $(LIBDIR)/codepages
diff --git a/packaging/RedHat/makerpms.sh.tmpl b/packaging/RedHat/makerpms.sh.tmpl
new file mode 100644
index 00000000000..fa69370dff0
--- /dev/null
+++ b/packaging/RedHat/makerpms.sh.tmpl
@@ -0,0 +1,14 @@
+#!/bin/sh
+# Copyright (C) John H Terpstra 1998
+#
+RPMDIR=`rpm --showrc | awk '/^rpmdir/ { print $3}'`
+SPECDIR=`rpm --showrc | awk '/^specdir/ { print $3}'`
+SRCDIR=`rpm --showrc | awk '/^sourcedir/ { print $3}'`
+
+( cd ../../.. ; tar czvf ${SRCDIR}/samba-PVERSION.tar.gz samba-PVERSION )
+cp -a *.spec $SPECDIR
+cp -a *.patch smb.* samba.log $SRCDIR
+cd $SRCDIR
+chown -R root.root samba-PVERSION
+cd $SPECDIR
+rpm -ba -v samba2.spec
diff --git a/packaging/RedHat/samba.log b/packaging/RedHat/samba.log
new file mode 100644
index 00000000000..c5f2a5b45bc
--- /dev/null
+++ b/packaging/RedHat/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/RedHat/samba.pamd b/packaging/RedHat/samba.pamd
new file mode 100644
index 00000000000..f38e70184af
--- /dev/null
+++ b/packaging/RedHat/samba.pamd
@@ -0,0 +1,2 @@
+auth required /lib/security/pam_pwdb.so nullok shadow
+account required /lib/security/pam_pwdb.so
diff --git a/packaging/RedHat/samba2.spec.tmpl b/packaging/RedHat/samba2.spec.tmpl
new file mode 100644
index 00000000000..cc6e8bc33ca
--- /dev/null
+++ b/packaging/RedHat/samba2.spec.tmpl
@@ -0,0 +1,274 @@
+Summary: Samba SMB client and server
+Name: samba
+Version: PVERSION
+Release: PRELEASE
+Copyright: GNU GPL version 2
+Group: Networking
+Source: ftp://samba.anu.edu.au/pub/samba/samba-PVERSION.tar.gz
+Patch: makefile-path.patch
+Packager: John H Terpstra [Samba-Team] <jht@samba.anu.edu.au>
+Requires: pam >= 0.64
+BuildRoot: /tmp/samba
+
+%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.
+
+This a work in progress release only. This is NOT a production
+stable release and it is VERY VERY pre-alpha.
+
+Samba-2 features an almost working NT Domain Control
+capability and includes the new 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.
+
+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 5.X Uses PAM which has integrated support
+for Shadow passwords. Do NOT recompile with the SHADOW_PWD option
+enabled. Red Hat Linux has built in support for quotas in PAM.
+
+%changelog
+* Fri Aug 21 1998 John H Terpstra <jht@samba.anu.edu.au>
+ - Updated for Samba version 2.0 building
+
+* Sat Jul 4 1998 John H Terpstra <jht@samba.anu.edu.au>
+ - fixed codepage preservation during update via -Uvh
+
+* Sun Apr 26 1998 John H Terpstra <jht@samba.anu.edu.au>
+ - Tidy up for early alpha releases
+ - added findsmb from SGI packaging
+
+* Thu Apr 9 1998 John H Terpstra <jht@samba.anu.edu.au>
+ - Updated spec file
+ - Included new codepage.936
+
+* Sat Mar 20 1998 John H Terpstra <jht@samba.anu.edu/au>
+ - Added swat facility
+
+* Sat Jan 24 1998 John H Terpstra <jht@samba.anu.edu.au>
+ - 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
+./configure
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT/etc/codepages/src
+mkdir -p $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d}
+mkdir -p $RPM_BUILD_ROOT/etc/rc.d/{init.d,rc0.d,rc1.d,rc2.d,rc3.d,rc5.d,rc6.d}
+mkdir -p $RPM_BUILD_ROOT/home/samba
+mkdir -p $RPM_BUILD_ROOT/usr/{bin,sbin}
+mkdir -p $RPM_BUILD_ROOT/usr/share/swat/{images,help,include}
+mkdir -p $RPM_BUILD_ROOT/usr/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 smbrun smbstatus testparm testprns \
+ make_smbcodepage make_printerdef
+do
+install -m755 -s source/bin/$i $RPM_BUILD_ROOT/usr/bin
+done
+for i in addtosmbpass mksmbpasswd.sh smbtar
+do
+install -m755 source/script/$i $RPM_BUILD_ROOT/usr/bin
+done
+
+# Install secure binary files
+for i in smbd nmbd swat
+do
+install -m755 -s source/bin/$i $RPM_BUILD_ROOT/usr/sbin
+done
+
+# Install level 1 man pages
+for i in smbclient.1 smbrun.1 smbstatus.1 smbtar.1 testparm.1 testprns.1 make_smbcodepage.1
+do
+install -m644 docs/$i $RPM_BUILD_ROOT/usr/man/man1
+done
+
+# Install codepage source files
+for i in 437 737 850 852 861 866 932 936 949 950
+do
+install -m644 source/codepages/codepage_def.$i $RPM_BUILD_ROOT/etc/codepages/src
+done
+
+# Install SWAT helper files
+for i in swat/help/*.html
+do
+install -m644 $i $RPM_BUILD_ROOT/usr/share/swat/help
+done
+for i in swat/images/*.{jpg,gif}
+do
+install -m644 $i $RPM_BUILD_ROOT/usr/share/swat/images
+done
+for i in swat/include/*.html
+do
+install -m644 $i $RPM_BUILD_ROOT/usr/share/swat/include
+done
+
+# Install the miscellany
+install -m644 swat/README $RPM_BUILD_ROOT/usr/share/swat
+install -m644 docs/smb.conf.5 $RPM_BUILD_ROOT/usr/man/man5
+install -m644 docs/samba.7 $RPM_BUILD_ROOT/usr/man/man7
+install -m644 docs/smbd.8 $RPM_BUILD_ROOT/usr/man/man8
+install -m644 docs/nmbd.8 $RPM_BUILD_ROOT/usr/man/man8
+install -m644 docs/smbpasswd.8 $RPM_BUILD_ROOT/usr/man/man8
+install -m644 packaging/RedHat/smb.conf $RPM_BUILD_ROOT/etc/smb.conf
+install -m644 packaging/RedHat/smbusers $RPM_BUILD_ROOT/etc/smbusers
+install -m755 packaging/RedHat/smbprint $RPM_BUILD_ROOT/usr/bin
+install -m755 packaging/RedHat/findsmb $RPM_BUILD_ROOT/usr/bin
+install -m755 packaging/RedHat/smbadduser $RPM_BUILD_ROOT/usr/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/usr/sbin/samba
+install -m644 packaging/RedHat/samba.pamd $RPM_BUILD_ROOT/etc/pam.d/samba
+install -m644 packaging/RedHat/samba.log $RPM_BUILD_ROOT/etc/logrotate.d/samba
+echo 127.0.0.1 localhost > $RPM_BUILD_ROOT/etc/lmhosts
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+/sbin/chkconfig --add smb
+
+# Build codepage load files
+for i in 437 737 850 852 861 866 932 936 949 950
+do
+/usr/bin/make_smbcodepage c $i /etc/codepages/src/codepage_def.$i /etc/codepages/codepage.$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 /usr/sbin/swat swat' >> /etc/inetd.conf
+killall -1 inetd
+fi
+
+
+%preun
+/sbin/chkconfig --del smb
+
+%postun
+if [ -x /etc/pam.d/samba ]; then
+ rm -f /etc/pam.d/samba
+fi
+if [ -e /etc/codepages ]; then
+ rm -rf /etc/codepages
+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/inetd.conf > $tmpfile
+mv $tmpfile inetd.conf
+sed -e '/^[:space:]*swat.*$/d' /etc/services > $tmpfile
+mv $tmpfile services
+
+%files
+%doc README COPYING Manifest Read-Manifest-Now
+%doc WHATSNEW.txt Roadmap
+%doc docs
+%doc swat/README
+%doc examples
+%attr(-,root,root) /usr/sbin/smbd
+%attr(-,root,root) /usr/sbin/nmbd
+%attr(-,root,root) /usr/sbin/swat
+%attr(755,root,root) /usr/sbin/samba
+%attr(-,root,root) /usr/bin/addtosmbpass
+%attr(-,root,root) /usr/bin/mksmbpasswd.sh
+%attr(-,root,root) /usr/bin/smbclient
+%attr(-,root,root) /usr/bin/testparm
+%attr(-,root,root) /usr/bin/testprns
+%attr(-,root,root) /usr/bin/smbrun
+%attr(-,root,root) /usr/bin/findsmb
+%attr(-,root,root) /usr/bin/smbstatus
+%attr(-,root,root) /usr/bin/nmblookup
+%attr(-,root,root) /usr/bin/make_smbcodepage
+%attr(-,root,root) /usr/bin/make_printerdef
+%attr(-,root,root) /usr/bin/smbpasswd
+%attr(-,root,root) /usr/bin/smbtar
+%attr(-,root,root) /usr/bin/smbprint
+%attr(-,root,root) /usr/bin/smbadduser
+%attr(-,root,root) /usr/share/swat/help/parameters.html
+%attr(-,root,root) /usr/share/swat/help/welcome.html
+%attr(-,root,root) /usr/share/swat/images/background.jpg
+%attr(-,root,root) /usr/share/swat/images/background.gif
+%attr(-,root,root) /usr/share/swat/images/globals.gif
+%attr(-,root,root) /usr/share/swat/images/home.gif
+%attr(-,root,root) /usr/share/swat/images/printers.gif
+%attr(-,root,root) /usr/share/swat/images/shares.gif
+%attr(-,root,root) /usr/share/swat/images/samba.gif
+%attr(-,root,root) /usr/share/swat/images/status.gif
+%attr(-,root,root) /usr/share/swat/images/viewconfig.gif
+%attr(-,root,root) /usr/share/swat/include/header.html
+%attr(-,root,root) /usr/share/swat/include/footer.html
+%attr(-,root,root) %config /etc/lmhosts
+%attr(-,root,root) %config /etc/smb.conf
+%attr(-,root,root) %config /etc/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) /etc/codepages/src/codepage_def.437
+%attr(-,root,root) /etc/codepages/src/codepage_def.737
+%attr(-,root,root) /etc/codepages/src/codepage_def.850
+%attr(-,root,root) /etc/codepages/src/codepage_def.852
+%attr(-,root,root) /etc/codepages/src/codepage_def.861
+%attr(-,root,root) /etc/codepages/src/codepage_def.866
+%attr(-,root,root) /etc/codepages/src/codepage_def.932
+%attr(-,root,root) /etc/codepages/src/codepage_def.936
+%attr(-,root,root) /etc/codepages/src/codepage_def.949
+%attr(-,root,root) /etc/codepages/src/codepage_def.950
+%attr(-,root,root) /usr/man/man1/smbstatus.1
+%attr(-,root,root) /usr/man/man1/smbclient.1
+%attr(-,root,root) /usr/man/man1/make_smbcodepage.1
+%attr(-,root,root) /usr/man/man1/smbrun.1
+%attr(-,root,root) /usr/man/man1/smbtar.1
+%attr(-,root,root) /usr/man/man1/testparm.1
+%attr(-,root,root) /usr/man/man1/testprns.1
+%attr(-,root,root) /usr/man/man5/smb.conf.5
+%attr(-,root,root) /usr/man/man7/samba.7
+%attr(-,root,root) /usr/man/man8/smbd.8
+%attr(-,root,root) /usr/man/man8/nmbd.8
+%attr(-,root,root) /usr/man/man8/smbpasswd.8
+%attr(-,root,nobody) %dir /home/samba
+%attr(-,root,root) %dir /etc/codepages
+%attr(-,root,root) %dir /etc/codepages/src
+%attr(-,root,root) %dir /var/lock/samba
+%attr(-,root,root) %dir /var/log/samba
+%attr(777,root,root) %dir /var/spool/samba
diff --git a/packaging/RedHat/smb.conf b/packaging/RedHat/smb.conf
new file mode 100644
index 00000000000..1e5b920b11e
--- /dev/null
+++ b/packaging/RedHat/smb.conf
@@ -0,0 +1,281 @@
+# 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
+
+# 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
+
+# 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/RedHat/smb.init b/packaging/RedHat/smb.init
new file mode 100755
index 00000000000..6529977d236
--- /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/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/smbadduser b/packaging/RedHat/smbadduser
new file mode 100755
index 00000000000..2f38bf28f1a
--- /dev/null
+++ b/packaging/RedHat/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/RedHat/smbprint b/packaging/RedHat/smbprint
new file mode 100755
index 00000000000..51b15706add
--- /dev/null
+++ b/packaging/RedHat/smbprint
@@ -0,0 +1,77 @@
+#!/bin/sh -x
+
+# 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..c10efbf22a7
--- /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..f071e1809b9
--- /dev/null
+++ b/packaging/SGI/idb.pl
@@ -0,0 +1,262 @@
+#!/usr/bin/perl
+require "pwd.pl" || die "Required pwd.pl not found";
+
+# This perl script automatically generates the samba.idb file
+
+&initpwd;
+$curdir = $ENV{"PWD"};
+
+# We don't want the files listed in .cvsignore in the source tree
+open(IGNORES,"../../source/.cvsignore") || die "Unable to open .cvsignore file\n";
+while (<IGNORES>) {
+ chop;
+ $ignores{$_}++;
+}
+close IGNORES;
+
+# get the names of all the binary files to be installed
+open(MAKEFILE,"../../source/Makefile") || die "Unable to open Makefile\n";
+@makefile = <MAKEFILE>;
+@sprogs = grep(/^SPROGS /,@makefile);
+@progs1 = grep(/^PROGS1 /,@makefile);
+@progs = grep(/^PROGS /,@makefile);
+@scripts = grep(/^SCRIPTS /,@makefile);
+@codepage = grep(/^CODEPAGELIST/,@makefile);
+close MAKEFILE;
+
+if (@sprogs) {
+ @sprogs[0] =~ s/^.*\=//;
+ @sprogs = split(' ',@sprogs[0]);
+}
+if (@progs) {
+ @progs[0] =~ s/^.*\=//;
+ @progs = split(' ',@progs[0]);
+}
+if (@progs1) {
+ @progs1[0] =~ s/^.*\=//;
+ @progs1 = split(' ',@progs1[0]);
+}
+if (@scripts) {
+ @scripts[0] =~ s/^.*\=//;
+ @scripts = split(' ',@scripts[0]);
+}
+if (@codepage) {
+ @codepage[0] =~ s/^.*\=//;
+ chdir '../../source';
+ # if we have codepages we need to create them for the package
+ system("chmod +x ./script/installcp.sh");
+ system("./script/installcp.sh . . ../packaging/SGI/codepages ./bin @codepage[0]");
+ chdir $curdir;
+ @codepage = sort split(' ',@codepage[0]);
+}
+# install the swat files
+chdir '../../source';
+system("chmod +x ./script/installswat.sh");
+system("./script/installswat.sh ../packaging/SGI/swat ./");
+system("cp ../swat/README ../packaging/SGI/swat");
+chdir $curdir;
+
+# add my local files to the list of binaries to install
+@bins = sort byfilename (@sprogs,@progs,@progs1,@scripts,("/findsmb","/sambalp","/smbprint"));
+
+# get a complete list of all files in the tree
+chdir '../../';
+&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);
+
+@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$/ & !/^packaging\/SGI\/bins/ & !/^packaging\/SGI\/catman/ & !/^packaging\/SGI\/html/ & !/^packaging\/SGI\/codepages/ & !/^packaging\/SGI\/swat/, @allfiles);
+
+open(IDB,">samba.idb") || die "Unable to open samba.idb for output\n";
+
+print IDB "f 0644 root sys etc/config/samba packaging/SGI/samba.config samba.sw.base config(update)\n";
+print IDB "f 0755 root sys etc/init.d/samba packaging/SGI/samba.rc samba.sw.base\n";
+print IDB "l 0000 root sys etc/rc0.d/K39samba packaging/SGI samba.sw.base symval(../init.d/samba)\n";
+print IDB "l 0000 root sys etc/rc2.d/S81samba packaging/SGI samba.sw.base symval(../init.d/samba)\n";
+
+@copyfile = grep (/^COPY/,@allfiles);
+print IDB "d 0755 root sys usr/relnotes/samba/ packaging/SGI samba.man.relnotes\n";
+print IDB "f 0644 root sys usr/relnotes/samba/@copyfile[0] @copyfile[0] samba.man.relnotes\n";
+print IDB "f 0644 root sys usr/relnotes/samba/legal_notice.html packaging/SGI/legal_notice.html samba.man.relnotes\n";
+print IDB "f 0644 root sys usr/relnotes/samba/samba-relnotes.html packaging/SGI/relnotes.html samba.man.relnotes\n";
+
+print IDB "d 0755 root sys usr/samba/ packaging/SGI samba.sw.base\n";
+print IDB "f 0444 root sys usr/samba/README packaging/SGI/README samba.sw.base\n";
+
+print IDB "d 0755 root sys usr/samba/bin/ packaging/SGI samba.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 source/$nextfile samba.sw.base\n";
+ }
+ elsif ($filename eq "findsmb") {
+ print IDB "f 0755 root sys usr/samba/bin/$filename packaging/SGI/$filename samba.sw.base\n";
+ }
+ elsif ($filename eq "swat") {
+ print IDB "f 4755 root sys usr/samba/bin/$filename source/$nextfile samba.sw.base\n";
+ }
+ elsif ($filename eq "sambalp") {
+ print IDB "f 0755 root sys usr/samba/bin/$filename packaging/SGI/$filename samba.sw.base\n";
+ }
+ elsif ($filename eq "smbprint") {
+ print IDB "f 0755 root sys usr/samba/bin/$filename packaging/SGI/$filename samba.sw.base\n";
+ }
+ else {
+ print IDB "f 0755 root sys usr/samba/bin/$filename source/$nextfile samba.sw.base\n";
+ }
+ }
+}
+
+print IDB "d 0755 root sys usr/samba/docs/ docs samba.man.doc\n";
+while (@docs) {
+ $nextfile = shift @docs;
+ next if ($nextfile eq "CVS");
+ ($junk,$file) = split(/\//,$nextfile,2);
+ if (grep(/\/$/,$nextfile)) {
+ print IDB "d 0755 root sys usr/samba/docs/$file $nextfile samba.man.doc\n";
+ }
+ else {
+ print IDB "f 0644 root sys usr/samba/docs/$file $nextfile samba.man.doc\n";
+ }
+}
+
+print IDB "f 0755 root sys usr/samba/inetd.sh packaging/SGI/inetd.sh samba.sw.base\n";
+print IDB "d 0755 root sys usr/samba/lib/ packaging/SGI samba.sw.base\n";
+if (@codepage) {
+ print IDB "d 0755 root sys usr/samba/lib/codepages packaging/SGI samba.sw.base\n";
+ while (@codepage) {
+ $nextpage = shift @codepage;
+ print IDB "f 0644 root sys usr/samba/lib/codepages/codepage.$nextpage packaging/SGI/codepages/codepage.$nextpage samba.sw.base\n";
+ }
+}
+print IDB "f 0644 root sys usr/samba/lib/smb.conf packaging/SGI/smb.conf samba.sw.base config(update)\n";
+print IDB "f 0755 root sys usr/samba/mkprintcap.sh packaging/SGI/mkprintcap.sh samba.sw.base\n";
+
+print IDB "d 0644 root sys usr/samba/private/ packaging/SGI samba.sw.base\n";
+print IDB "f 0600 root sys usr/samba/private/smbpasswd packaging/SGI/smbpasswd samba.sw.base config(update)\n";
+print IDB "d 0755 root sys usr/samba/src/ packaging/SGI samba.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)) {
+ print IDB "d 0755 root sys usr/samba/src/$nextfile $nextfile samba.src.samba\n";
+ }
+ else {
+ if (grep((/\.sh$/ | /\.pl$/ | /mkman$/),$nextfile)) {
+ print IDB "f 0755 root sys usr/samba/src/$nextfile $nextfile samba.src.samba\n";
+ }
+ else {
+ print IDB "f 0644 root sys usr/samba/src/$nextfile $nextfile samba.src.samba\n";
+ }
+ }
+}
+
+print IDB "f 0755 root sys usr/samba/startswat.sh packaging/SGI/startswat.sh samba.sw.base\n";
+print IDB "d 0755 root sys usr/samba/swat/ packaging/SGI/swat samba.sw.base\n";
+while (@swatfiles) {
+ $nextfile = shift @swatfiles;
+ ($file = $nextfile) =~ s/^packaging\/SGI\/swat\///;
+ next if !$file;
+ if (grep(/\/$/,$file)) {
+ print IDB "d 0755 root sys usr/samba/swat/$file packaging/SGI/swat/$file samba.sw.base\n";
+ }
+ else {
+ print IDB "f 0444 root sys usr/samba/swat/$file packaging/SGI/swat/$file samba.sw.base\n";
+ }
+}
+
+print IDB "d 0755 root sys usr/samba/var/ packaging/SGI samba.sw.base\n";
+print IDB "d 0755 root sys usr/samba/var/locks/ packaging/SGI samba.sw.base\n";
+
+print IDB "d 0755 root sys usr/share/catman/u_man/ packaging/SGI samba.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 packaging/SGI samba.man.manpages\n";
+ $olddirnum = $dirnum;
+ }
+ print IDB "f 0664 root sys usr/share/catman/u_man/cat$dirnum/$file $nextfile samba.man.manpages\n";
+}
+
+close IDB;
+print "\n\nsamba.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 $dir";
+ 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;
+ }
+}
diff --git a/packaging/SGI/inetd.sh b/packaging/SGI/inetd.sh
new file mode 100755
index 00000000000..8c4c6cb8d8b
--- /dev/null
+++ b/packaging/SGI/inetd.sh
@@ -0,0 +1,29 @@
+#! /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.O
+sed -e "/^netbios/D" -e "/^#SAMBA/D" /etc/inetd.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
+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/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/makefile.pl b/packaging/SGI/makefile.pl
new file mode 100755
index 00000000000..d621097a227
--- /dev/null
+++ b/packaging/SGI/makefile.pl
@@ -0,0 +1,38 @@
+#!/usr/bin/perl
+
+# This perl script creates the SGI specific Makefile.
+# The BASEDIR is set to /usr/samba, MANDIR is set to /usr/share/man, and
+# the lines are uncommented for the requested OS version. If no version
+# is specified, IRIX 6 is used.
+
+if (!@ARGV) {
+ $OSver = "6";
+}
+else {
+ $OSver = $ARGV[0];
+}
+
+open(MAKEIN,"../../source/Makefile") || die "Unable to open source Makefile\n";
+open(MAKEOUT,">Makefile") || die "Unable to open Makefile for output\n";
+while (<MAKEIN>) {
+ if (/^BASEDIR =/) {
+ print MAKEOUT "BASEDIR = /usr/samba\n";
+ }
+ elsif (/^MANDIR =/) {
+ print MAKEOUT "MANDIR = /usr/share/man\n";
+ }
+ elsif (/^# FOR SGI IRIX $OSver/) {
+ print MAKEOUT;
+ while (<MAKEIN>) {
+ last if ($_ eq "\n");
+ if (/^# (FLAGSM|LIBSM|FLAGS1)/) {
+ s/^# //;
+ }
+ print MAKEOUT;
+ }
+ print MAKEOUT;
+ }
+ else {
+ print MAKEOUT;
+ }
+}
diff --git a/packaging/SGI/mkman b/packaging/SGI/mkman
new file mode 100755
index 00000000000..4f14fafcdce
--- /dev/null
+++ b/packaging/SGI/mkman
@@ -0,0 +1,27 @@
+#!/bin/sh
+# if you wish to make html versions of the man pages then add the
+# argument html when calling this script. You must have rman installed.
+#
+
+if [ ! -d catman ]; then
+ mkdir catman
+fi
+
+if [ "$1" = "html" ]; then
+ if [ ! -d html ]; then
+ mkdir html
+ fi
+fi
+
+
+FILES="*.?"
+
+cd ../../docs
+for FILE in $FILES ; do
+ neqn $FILE | tbl | nroff -man > ../packaging/SGI/catman/`basename $FILE`
+ compress -f ../packaging/SGI/catman/`basename $FILE`
+ if [ "$1" = "html" ]; then
+ rman -f html -r "%s.%s.html" $FILE > ../packaging/SGI/html/$FILE.html
+ fi
+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..d298095ae9e
--- /dev/null
+++ b/packaging/SGI/mkrelease.sh
@@ -0,0 +1,82 @@
+#!/bin/sh
+
+# This file goes through all the necessary steps to build a release package.
+# You may specify a OS major version number (4, 5, or 6) to specify which
+# OS release to build. If no version number is given it will default to 6.
+
+doclean=""
+
+if [ "$1" = "clean" ]; then
+ doclean=$1
+ shift
+fi
+
+if [ "$doclean" = "clean" ]; then
+ cd ../../source
+ make distclean
+ cd ../packaging/SGI
+ rm -rf bins catman html codepages swat samba.idb samba.spec
+fi
+
+# create the catman versions of the manual pages
+#
+echo Making manual pages
+./mkman
+errstat=$?
+if [ $errstat -ne 0 ]; then
+ echo "Error $errstat making manual pages\n";
+ exit $errstat;
+fi
+
+cd ../../source
+echo Create SGI specific Makefile
+./configure --prefix=/usr --mandir=/usr/src/man
+errstat=$?
+if [ $errstat -ne 0 ]; then
+ echo "Error $errstat creating Makefile\n";
+ exit $errstat;
+fi
+
+
+# build the sources
+#
+echo Making binaries
+
+if [ "$1" = "5" ]; then
+ make "CFLAGS=-O -g3" all
+else
+ make "CFLAGS=-O -g3 -n32" all
+fi
+
+errstat=$?
+if [ $errstat -ne 0 ]; then
+ echo "Error $errstat building sources\n";
+ exit $errstat;
+fi
+
+cd ../packaging/SGI
+
+# 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..7477d28c27d
--- /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.anu.edu.au/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.anu.edu.au">listproc@samba.anu.edu.au</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.anu.edu.au">samba@samba.anu.edu.au</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.anu.edu.au">listproc@samba.anu.edu.au</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.anu.edu.au/pub/samba/">http://samba.anu.edu.au/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/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..121b3400a38
--- /dev/null
+++ b/packaging/SGI/samba.rc
@@ -0,0 +1,42 @@
+#! /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
+ ;;
+*)
+ 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..fd0cef8f933
--- /dev/null
+++ b/packaging/SGI/sambalp
@@ -0,0 +1,150 @@
+#!/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");
+}
+
+# Remove the file only if it lives in /usr/tmp, /tmp, or /var/tmp.
+unlink($file) if $file =~ m=^(/(usr|var))?/tmp=;
diff --git a/packaging/SGI/smb.conf b/packaging/SGI/smb.conf
new file mode 100644
index 00000000000..b7cbae63d15
--- /dev/null
+++ b/packaging/SGI/smb.conf
@@ -0,0 +1,122 @@
+; 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
+;
+; 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
+
+ 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 and "share modes=yes"
+; if you want to support the file sharing modes for multiple users
+; of the same files
+ locking = yes
+ lock directory = /usr/samba/var/locks
+ share modes = yes
+
+; 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
+
+[homes]
+ comment = Home Directories
+ browseable = no
+ writable = yes
+
+; To allow Win95 clients to automatically load printer drivers, uncomment
+; the following section (and the lines in the printers section below).
+; Run the make_printerdef command to create the /usr/samba/lib/printers.def
+; file (see the PRINTER_DRIVER.txt file in the docs directory for info).
+; Copy all the required files to the /usr/samba/printer directory
+;
+;[printer$]
+; comment = printer driver directory
+; path=/usr/samba/printer
+; public=yes
+; writable=no
+; browseable=yes
+
+[printers]
+ comment = All Printers
+ path = /usr/tmp
+ browseable = no
+ printable = yes
+ public = yes
+ writable = no
+ create mask = 0700
+;
+; this specifies the location of the share containing the printer driver
+; files - see the printer$ section above
+;
+; printer driver location = \\%h\printer$
+;
+; the following line will make all printers default to the QMS-PS 810 Turbo
+; driver - which works quite well for Impressario. If you need a diferent
+; driver for a specific printer, create a section for that printer and
+; specify the correct printer driver.
+;
+; printer driver = QMS-PS 810 Turbo
+
+
+[tmp]
+ comment = Temporary file space
+ path = /usr/tmp
+ read only = no
+ public = yes
diff --git a/packaging/SGI/smbpasswd b/packaging/SGI/smbpasswd
new file mode 100644
index 00000000000..79c834dc354
--- /dev/null
+++ b/packaging/SGI/smbpasswd
@@ -0,0 +1 @@
+username:uid:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:Long name:user home dir:user shell
diff --git a/packaging/SGI/smbprint b/packaging/SGI/smbprint
new file mode 100644
index 00000000000..0db8b6f7e3a
--- /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 -P > /dev/null
+exit $?
+
diff --git a/packaging/SGI/spec.pl b/packaging/SGI/spec.pl
new file mode 100755
index 00000000000..3bd643eef6e
--- /dev/null
+++ b/packaging/SGI/spec.pl
@@ -0,0 +1,87 @@
+#!/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 (/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..c2fc9fb467d
--- /dev/null
+++ b/packaging/SGI/startswat.sh
@@ -0,0 +1,21 @@
+#! /bin/sh
+#
+# add SWAT deamon to inetd.conf
+#
+cp /etc/inetd.conf /etc/inetd.O
+sed -e "/^swat/D" -e "/^#SWAT/D" /etc/inetd.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
+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/pkg-specs/Packaging.script b/packaging/Solaris/pkg-specs/Packaging.script
new file mode 100644
index 00000000000..6f182c33e52
--- /dev/null
+++ b/packaging/Solaris/pkg-specs/Packaging.script
@@ -0,0 +1,5 @@
+#!/bin/sh
+./mkprototype
+pkgmk -o -d /tmp -b `pwd` -f ./prototype
+cd /tmp
+pkgtrans . samba.pkg samba
diff --git a/packaging/Solaris/pkg-specs/mkprototype b/packaging/Solaris/pkg-specs/mkprototype
new file mode 100644
index 00000000000..5ca0746beea
--- /dev/null
+++ b/packaging/Solaris/pkg-specs/mkprototype
@@ -0,0 +1,31 @@
+#!/bin/sh
+# this creates prototype files
+pkgproto * > prototype
+nawk 'BEGIN { print "# d directory"
+ print "# e a file to be edited upon installation or removal"
+ print "# f a standard executable or data file"
+ print "# i installation script or information file"
+ print "# l linked file"
+ print "# s symbolic link"
+ print "# v volatile file (one whose contents are expected to
+change)"
+ print "#" }
+/ pkginfo / { print "i pkginfo" ; next }
+/ postinstall / { print "i postinstall" ; next }
+/ postremove / { print "i postremove" ; next }
+/d none usr / { print "d none usr ? ? ?" ; next }
+/d none usr\/local / { print "d none usr/local ? ? ?" ; next }
+/d none etc / { print "d none etc ? ? ?" ; next }
+/f none etc\// { $1 = "v" }
+/d none opt / { print "d none opt ? ? ?" ; next }
+/d none var / { print "d none var ? ? ?" ; next }
+/none prototype / { next }
+/none mkprototype / { next }
+/ src[ \/]/ { next }
+/^[dfv]/ { $5 = "bin"
+ $6 = "bin"
+ print
+ next }
+{ print }' prototype >/tmp/prototype.$$
+mv /tmp/prototype.$$ prototype
+
diff --git a/packaging/Solaris/pkg-specs/pkginfo b/packaging/Solaris/pkg-specs/pkginfo
new file mode 100644
index 00000000000..ab06b3fffab
--- /dev/null
+++ b/packaging/Solaris/pkg-specs/pkginfo
@@ -0,0 +1,12 @@
+PSTAMP=Mon Sep 29 17:26:14 BST 1997
+PKG=samba
+NAME=SMB based file/printer sharing
+VERSION=1.9.17p2,REV=1
+ARCH=sparc
+CATEGORY=system
+VENDOR=samba group
+DESC=File and printer sharing for NT workstations
+CLASSES=none
+INTONLY=1
+HOTLINE=Please contact your local UNIX support group
+BASEDIR=/
diff --git a/packaging/Solaris/pkg-specs/postinstall b/packaging/Solaris/pkg-specs/postinstall
new file mode 100644
index 00000000000..0fbe9da10b5
--- /dev/null
+++ b/packaging/Solaris/pkg-specs/postinstall
@@ -0,0 +1,37 @@
+#!/bin/sh
+# install samba
+
+nawk '/^netbios-[ns]*[ ]/ {next}
+{print}
+END { print "netbios-ssn 139/tcp"
+ print "netbios-ns 137/udp # samba service" }' \
+ ${PKG_INSTALL_ROOT}/etc/inet/services > /tmp/services.$$ && \
+ mv -f /tmp/services.$$ ${PKG_INSTALL_ROOT}/etc/inet/services &&
+\
+ chmod 644 ${PKG_INSTALL_ROOT}/etc/inet/services && \
+ echo "Updated ${PKG_INSTALL_ROOT}/etc/inet/services"
+
+nawk '/samba.*mbd[ ]/ { next }
+{print}
+END { print "# samba connections are handled by smbd and nmbd"
+ print "netbios-ssn stream tcp nowait root /opt/samba/bin/smbd
+smbd"
+ print "netbios-ns dgram udp wait root /opt/samba/bin/nmbd nmbd" }'
+\
+ ${PKG_INSTALL_ROOT}/etc/inet/inetd.conf > /tmp/inetd.conf.$$ &&
+\
+ mv -f /tmp/inetd.conf.$$ ${PKG_INSTALL_ROOT}/etc/inet/inetd.conf
+&& \
+ chmod 644 ${PKG_INSTALL_ROOT}/etc/inet/inetd.conf && \
+ echo "Updated ${PKG_INSTALL_ROOT}/etc/inet/inetd.conf"
+
+echo "Installed samba service into ${PKG_INSTALL_ROOT:-/}"
+
+inetpid=`/bin/ps -ef | awk '/ \/usr\/sbin\/inetd / { print $2 } '`
+if [ "X$inetpid" = "X" ]; then
+ echo "inetd not running"
+else
+ echo "Restarting inetd($inetpid)"
+ kill -HUP $inetpid
+fi
+
diff --git a/packaging/Solaris/pkg-specs/postremove b/packaging/Solaris/pkg-specs/postremove
new file mode 100644
index 00000000000..7f7a5c1f8e4
--- /dev/null
+++ b/packaging/Solaris/pkg-specs/postremove
@@ -0,0 +1,30 @@
+#!/bin/sh
+# remove samba
+
+nawk '/^netbios-[ns]*[ ]/ {next}
+{print} ' \
+ ${PKG_INSTALL_ROOT}/etc/inet/services > /tmp/services.$$ && \
+ mv -f /tmp/services.$$ ${PKG_INSTALL_ROOT}/etc/inet/services &&
+\
+ chmod 644 ${PKG_INSTALL_ROOT}/etc/inet/services && \
+ echo "Updated ${PKG_INSTALL_ROOT}/etc/inet/services"
+
+nawk '/samba.*mbd[ ]/ { next }
+{print} ' \
+ ${PKG_INSTALL_ROOT}/etc/inet/inetd.conf > /tmp/inetd.conf.$$ &&
+\
+ mv -f /tmp/inetd.conf.$$ ${PKG_INSTALL_ROOT}/etc/inet/inetd.conf
+&& \
+ chmod 644 ${PKG_INSTALL_ROOT}/etc/inet/inetd.conf && \
+ echo "Updated ${PKG_INSTALL_ROOT}/etc/inet/inetd.conf"
+
+echo "Removed samba service from ${PKG_INSTALL_ROOT:-/}"
+
+inetpid=`/bin/ps -ef | awk '/ \/usr\/sbin\/inetd / { print $2 } '`
+if [ "X$inetpid" = "X" ]; then
+ echo "inetd not running"
+else
+ echo "Restarting inetd($inetpid)"
+ kill -HUP $inetpid
+fi
+
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..637af1781e1
--- /dev/null
+++ b/packaging/SuSE/5.2/samba.spec
@@ -0,0 +1,122 @@
+#
+# 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/smbrun
+/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.
+* 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 .
+Documentation: /usr/doc/packages/samba
+