1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

Remove obsolete SGI packaging

This has not worked since before the source3 and source4 trees were imported many years ago

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
This commit is contained in:
Andrew Bartlett 2015-02-10 12:30:32 +13:00
parent 2f4998113e
commit 35be7fa027
22 changed files with 0 additions and 1679 deletions

View File

@ -1,44 +0,0 @@
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

View File

@ -1,141 +0,0 @@
#!/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 {
/(.{1,15})\s+<00>\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 ($_) {
/(.{1,15})\s+<00>\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";
}
}

View File

@ -1,373 +0,0 @@
#!/usr/bin/perl
require "pwd.pl" || die "Required pwd.pl not found";
# This perl script automatically generates the idb file
$PKG = 'samba';
$SRCDIR = '../..';
$SRCPFX = '.';
&initpwd;
$curdir = $ENV{"PWD"};
if ($PKG eq "samba_irix") {
open(BOOKS,"IDB.books") || die "Unable to open IDB.books file\n";
@books = sort idbsort <BOOKS>;
close BOOKS;
}
# We don't want the files listed in .cvsignore in the source tree
open(IGNORES,"$SRCDIR/source/.cvsignore") || die "Unable to open .cvsignore file\n";
while (<IGNORES>) {
chop;
next if /cvs\.log/;
$ignores{$_}++;
}
close IGNORES;
# We don't want the files listed in .cvsignore in the source/include tree
open(IGNORES,"$SRCDIR/source/include/.cvsignore") || die "Unable to open include/.cvsignore file\n";
while (<IGNORES>) {
chop;
$ignores{$_}++;
}
close IGNORES;
# get the names of all the binary files to be installed
open(MAKEFILE,"$SRCDIR/source/Makefile") || die "Unable to open Makefile\n";
while (not eof(MAKEFILE)) {
$_ = <MAKEFILE>;
chomp;
last if /^# object file lists/ ;
if (/^srcdir/) {
/^.*=(.*)/;
$srcdir = $1;
}
if (/^builddir/) {
/^.*=(.*)/;
$builddir = $1;
}
if (/^SBIN_PROGS/) { @sbinprogs = get_line($_); }
if (/^BIN_PROGS1/) { @binprogs1 = get_line($_); }
if (/^BIN_PROGS2/) { @binprogs2 = get_line($_); }
if (/^BIN_PROGS3/) { @binprogs3 = get_line($_); }
if (/^BIN_PROGS/) { @binprogs = get_line($_); }
if (/^SCRIPTS/) { @scripts = get_line($_); }
if (/^TORTURE_PROGS/) { @tortureprogs = get_line($_); }
if (/^SHLIBS/) { @shlibs = get_line($_); }
}
close MAKEFILE;
# add my local files to the list of binaries to install
@bins = sort byfilename (@sbinprogs,@binprogs,@binprogs1,@binprogs2,@binprogs3,@scripts,("sambalp","smbprint"));
@nsswitch = sort byfilename (@shlibs);
# install the swat files
chdir "$SRCDIR/source";
system("chmod +x ./script/installswat.sh");
system("./script/installswat.sh ../packaging/SGI/swat ./ ../packaging/SGI/swat/using_samba");
system("cp -f ../swat/README ../packaging/SGI/swat");
chdir $curdir;
# get a complete list of all files in the tree
chdir "$SRCDIR/";
&dodir('.');
chdir $curdir;
# the files installed in docs include all the original files in docs plus all
# the "*.doc" files from the source tree
@docs = sort bynextdir grep (!/CVS/ & (/^source\/.*\.doc$/ | /^docs\/\w/),@allfiles);
@docs = grep(!/htmldocs/ & !/manpages/, @docs);
@docs = grep(!/docbook/, @docs);
@libfiles = sort byfilename (grep (/^source\/codepages\/\w/,@allfiles),("packaging/SGI/smb.conf","source/bin/libsmbclient.a","source/bin/libsmbclient.so"));
@swatfiles = sort grep(/^packaging\/SGI\/swat/, @allfiles);
@catman = sort grep(/^packaging\/SGI\/catman/ & !/\/$/, @allfiles);
@catman = sort bydirnum @catman;
# strip out all the generated directories and the "*.o" files from the source
# release
@allfiles = grep(!/^.*\.o$/ & !/^.*\.po$/ & !/^.*\.po32$/ & !/^.*\.so$/ & !/^source\/bin/ & !/^packaging\/SGI\/bins/ & !/^packaging\/SGI\/catman/ & !/^packaging\/SGI\/html/ & !/^packaging\/SGI\/codepages/ & !/^packaging\/SGI\/swat/, @allfiles);
open(IDB,"> $curdir/$PKG.idb") || die "Unable to open $PKG.idb for output\n";
print IDB "f 0644 root sys etc/config/samba $SRCPFX/packaging/SGI/samba.config $PKG.sw.base config(update)\n";
print IDB "f 0644 root sys etc/config/winbind $SRCPFX/packaging/SGI/winbindd.config $PKG.sw.base config(update)\n";
print IDB "f 0755 root sys etc/init.d/samba $SRCPFX/packaging/SGI/samba.rc $PKG.sw.base\n";
print IDB "f 0755 root sys etc/init.d/winbind $SRCPFX/packaging/SGI/winbindd.rc $PKG.sw.base\n";
print IDB "l 0000 root sys etc/rc0.d/K36winbind $SRCPFX/packaging/SGI $PKG.sw.base symval(../init.d/winbind)\n";
print IDB "l 0000 root sys etc/rc0.d/K37samba $SRCPFX/packaging/SGI $PKG.sw.base symval(../init.d/samba)\n";
print IDB "l 0000 root sys etc/rc2.d/S81samba $SRCPFX/packaging/SGI $PKG.sw.base symval(../init.d/samba)\n";
print IDB "l 0000 root sys etc/rc2.d/S82winbind $SRCPFX/packaging/SGI $PKG.sw.base symval(../init.d/winbind)\n";
if ($PKG eq "samba_irix") {
print IDB "d 0755 root sys usr/relnotes/samba_irix $SRCPFX/packaging/SGI $PKG.man.relnotes\n";
print IDB "f 0644 root sys usr/relnotes/samba_irix/TC relnotes/TC $PKG.man.relnotes\n";
print IDB "f 0644 root sys usr/relnotes/samba_irix/ch1.z relnotes/ch1.z $PKG.man.relnotes\n";
print IDB "f 0644 root sys usr/relnotes/samba_irix/ch2.z relnotes/ch2.z $PKG.man.relnotes\n";
print IDB "f 0644 root sys usr/relnotes/samba_irix/ch3.z relnotes/ch3.z $PKG.man.relnotes\n";
}
else {
@copyfile = grep (/^COPY/,@allfiles);
print IDB "d 0755 root sys usr/relnotes/samba $SRCPFX/packaging/SGI $PKG.man.relnotes\n";
print IDB "f 0644 root sys usr/relnotes/samba/@copyfile[0] $SRCPFX/@copyfile[0] $PKG.man.relnotes\n";
print IDB "f 0644 root sys usr/relnotes/samba/legal_notice.html $SRCPFX/packaging/SGI/legal_notice.html $PKG.man.relnotes\n";
print IDB "f 0644 root sys usr/relnotes/samba/samba-relnotes.html $SRCPFX/packaging/SGI/relnotes.html $PKG.man.relnotes\n";
}
print IDB "d 0755 root sys usr/samba $SRCPFX/packaging/SGI $PKG.sw.base\n";
print IDB "d 0755 root sys usr/samba/bin $SRCPFX/packaging/SGI $PKG.sw.base\n";
while(@bins) {
$nextfile = shift @bins;
($filename = $nextfile) =~ s/^.*\///;;
if (index($nextfile,'$')) {
if ($filename eq "smbpasswd") {
print IDB "f 0755 root sys usr/samba/bin/$filename $SRCPFX/source/$nextfile $PKG.sw.base \n";
}
elsif ($filename eq "swat") {
print IDB "f 4755 root sys usr/samba/bin/$filename $SRCPFX/source/$nextfile $PKG.sw.base preop(\"chroot \$rbase /etc/init.d/samba stop\") exitop(\"chroot \$rbase /usr/samba/scripts/startswat.sh\") removeop(\"chroot \$rbase /sbin/cp /etc/inetd.conf /etc/inetd.conf.O ; chroot \$rbase /sbin/sed -e '/^swat/D' -e '/^#SWAT/D' /etc/inetd.conf.O >/etc/inetd.conf; /etc/killall -HUP inetd || true\")\n";
}
elsif ($filename eq "sambalp") {
print IDB "f 0755 root sys usr/samba/bin/$filename $SRCPFX/packaging/SGI/$filename $PKG.sw.base \n";
}
elsif ($filename eq "smbprint") {
print IDB "f 0755 root sys usr/samba/bin/$filename $SRCPFX/packaging/SGI/$filename $PKG.sw.base\n";
}
elsif ($filename eq "smbd") {
print IDB "f 0755 root sys usr/samba/bin/$filename $SRCPFX/source/$nextfile $PKG.sw.base \n";
if (-e "$SRCDIR/source/$nextfile.noquota") {
print IDB "f 0755 root sys usr/samba/bin/$filename.noquota $SRCPFX/source/$nextfile.noquota $PKG.sw.base \n";
}
if (-e "$SRCDIR/source/$nextfile.profile") {
print IDB "f 0755 root sys usr/samba/bin/$filename.profile $SRCPFX/source/$nextfile.profile $PKG.sw.base \n";
}
}
elsif ($filename eq "nmbd") {
print IDB "f 0755 root sys usr/samba/bin/$filename $SRCPFX/source/$nextfile $PKG.sw.base \n";
if (-e "$SRCDIR/source/$nextfile.profile") {
print IDB "f 0755 root sys usr/samba/bin/$filename.profile $SRCPFX/source/$nextfile.profile $PKG.sw.base \n";
}
}
else {
print IDB "f 0755 root sys usr/samba/bin/$filename $SRCPFX/source/$nextfile $PKG.sw.base \n";
}
}
}
print IDB "d 0755 root sys usr/samba/docs $SRCPFX/docs $PKG.man.doc\n";
while (@docs) {
$nextfile = shift @docs;
($junk,$file) = split(/\//,$nextfile,2);
if (grep(/\/$/,$nextfile)) {
$file =~ s/\/$//;
$nextfile =~ s/\/$//;
print IDB "d 0755 root sys usr/samba/docs/$file $SRCPFX/$nextfile $PKG.man.doc\n";
}
else {
print IDB "f 0644 root sys usr/samba/docs/$file $SRCPFX/$nextfile $PKG.man.doc\n";
}
}
print IDB "d 0755 root sys usr/samba/include $SRCPFX/packaging/SGI $PKG.sw.base\n";
print IDB "f 0644 root sys usr/samba/include/libsmbclient.h $SRCPFX/source/include/libsmbclient.h $PKG.sw.base\n";
print IDB "d 0755 root sys usr/samba/lib $SRCPFX/packaging/SGI $PKG.sw.base\n";
while (@libfiles) {
$nextfile = shift @libfiles;
($file = $nextfile) =~ s/.*\///;
if ($file eq "smb.conf") {
print IDB "f 0644 root sys usr/samba/lib/$file $SRCPFX/$nextfile $PKG.sw.base config(suggest)\n";
} else {
print IDB "f 0644 root sys usr/samba/lib/$file $SRCPFX/$nextfile $PKG.sw.base nostrip \n";
}
}
print IDB "d 0755 lp sys usr/samba/printer $SRCPFX/packaging/SGI $PKG.sw.base\n";
print IDB "d 0755 lp sys usr/samba/printer/W32ALPHA $SRCPFX/packaging/SGI $PKG.sw.base\n";
print IDB "d 0755 lp sys usr/samba/printer/W32MIPS $SRCPFX/packaging/SGI $PKG.sw.base\n";
print IDB "d 0755 lp sys usr/samba/printer/W32PPC $SRCPFX/packaging/SGI $PKG.sw.base\n";
print IDB "d 0755 lp sys usr/samba/printer/W32X86 $SRCPFX/packaging/SGI $PKG.sw.base\n";
print IDB "d 0755 lp sys usr/samba/printer/WIN40 $SRCPFX/packaging/SGI $PKG.sw.base\n";
print IDB "d 0644 root sys usr/samba/private $SRCPFX/packaging/SGI $PKG.sw.base\n";
print IDB "f 0600 root sys usr/samba/private/smbpasswd $SRCPFX/packaging/SGI/smbpasswd $PKG.sw.base config(suggest)\n";
print IDB "d 0755 root sys usr/samba/scripts $SRCPFX/packaging/SGI $PKG.src.samba\n";
print IDB "f 0755 root sys usr/samba/scripts/inetd.sh $SRCPFX/packaging/SGI/inetd.sh $PKG.sw.base\n";
print IDB "f 0755 root sys usr/samba/scripts/inst.msg $SRCPFX/packaging/SGI/inst.msg $PKG.sw.base exitop(\"chroot \$rbase /usr/samba/scripts/inst.msg\")\n";
print IDB "f 0755 root sys usr/samba/scripts/mkprintcap.sh $SRCPFX/packaging/SGI/mkprintcap.sh $PKG.sw.base\n";
print IDB "f 0755 root sys usr/samba/scripts/removeswat.sh $SRCPFX/packaging/SGI/removeswat.sh $PKG.sw.base\n";
print IDB "f 0755 root sys usr/samba/scripts/startswat.sh $SRCPFX/packaging/SGI/startswat.sh $PKG.sw.base\n";
print IDB "d 0755 root sys usr/samba/src $SRCPFX/packaging/SGI $PKG.src.samba\n";
@sorted = sort(@allfiles);
while (@sorted) {
$nextfile = shift @sorted;
($file = $nextfile) =~ s/^.*\///;
next if grep(/packaging\/SGI/& (/Makefile/ | /samba\.spec/ | /samba\.idb/),$nextfile);
next if grep(/source/,$nextfile) && ($ignores{$file});
next if ($nextfile eq "CVS");
if (grep(/\/$/,$nextfile)) {
$nextfile =~ s/\/$//;
print IDB "d 0755 root sys usr/samba/src/$nextfile $SRCPFX/$nextfile $PKG.src.samba\n";
}
else {
if (grep((/\.sh$/ | /configure$/ | /configure\.developer/ | /config\.guess/ | /config\.sub/ | /\.pl$/ | /mkman$/ | /pcp\/Install/ | /pcp\/Remove/),$nextfile)) {
print IDB "f 0755 root sys usr/samba/src/$nextfile $SRCPFX/$nextfile $PKG.src.samba\n";
}
else {
print IDB "f 0644 root sys usr/samba/src/$nextfile $SRCPFX/$nextfile $PKG.src.samba\n";
}
}
}
print IDB "d 0755 root sys usr/samba/swat $SRCPFX/packaging/SGI/swat $PKG.sw.base\n";
while (@swatfiles) {
$nextfile = shift @swatfiles;
($file = $nextfile) =~ s/^packaging\/SGI\/swat\///;
next if !$file;
if (grep(/\/$/,$file)) {
$file =~ s/\/$//;
print IDB "d 0755 root sys usr/samba/swat/$file $SRCPFX/packaging/SGI/swat/$file $PKG.sw.base\n";
}
else {
print IDB "f 0444 root sys usr/samba/swat/$file $SRCPFX/packaging/SGI/swat/$file $PKG.sw.base\n";
}
}
print IDB "d 0755 root sys usr/samba/var $SRCPFX/packaging/SGI $PKG.sw.base\n";
print IDB "d 0755 root sys usr/samba/var/locks $SRCPFX/packaging/SGI $PKG.sw.base\n";
if ($PKG eq "samba_irix") {
while(@books) {
$nextfile = shift @books;
print IDB $nextfile;
}
}
print IDB "d 0755 root sys usr/share/catman/u_man $SRCPFX/packaging/SGI $PKG.man.manpages\n";
$olddirnum = "0";
while (@catman) {
$nextfile = shift @catman;
($file = $nextfile) =~ s/^packaging\/SGI\/catman\///;
($dirnum = $file) =~ s/^[\D]*//;
$dirnum =~ s/\.z//;
if ($dirnum ne $olddirnum) {
print IDB "d 0755 root sys usr/share/catman/u_man/cat$dirnum $SRCPFX/packaging/SGI $PKG.man.manpages\n";
$olddirnum = $dirnum;
}
print IDB "f 0664 root sys usr/share/catman/u_man/cat$dirnum/$file $SRCPFX/$nextfile $PKG.man.manpages\n";
}
if (@nsswitch) {
print IDB "d 0755 root sys var/ns/lib $SRCPFX/packaging/SGI $PKG.sw.base\n";
while(@nsswitch) {
$nextfile = shift @nsswitch;
next if $nextfile eq 'libsmbclient';
($filename = $nextfile) =~ s/^.*\///;
$filename =~ s/libnss/libns/;
print IDB "f 0644 root sys var/ns/lib/$filename $SRCPFX/source/$nextfile $PKG.sw.base \n";
}
}
print IDB "d 01777 lp sys var/spool/samba $SRCPFX/packaging/SGI $PKG.sw.base\n";
close IDB;
print "\n\n$PKG.idb file has been created\n";
sub dodir {
local($dir, $nlink) = @_;
local($dev,$ino,$mode,$subcount);
($dev,$ino,$mode,$nlink) = stat('.') unless $nlink;
opendir(DIR,'.') || die "Can't open current directory";
local(@filenames) = sort readdir(DIR);
closedir(DIR);
if ($nlink ==2) { # This dir has no subdirectories.
for (@filenames) {
next if $_ eq '.';
next if $_ eq '..';
$this = substr($dir,2)."/$_";
push(@allfiles,$this);
}
}
else {
$subcount = $nlink -2;
for (@filenames) {
next if $_ eq '.';
next if $_ eq '..';
next if $_ eq 'CVS';
($dev,$ino,$mode,$nlink) = lstat($_);
$name = "$dir/$_";
$this = substr($name,2);
$this .= '/' if -d;
push(@allfiles,$this);
next if $subcount == 0; # seen all the subdirs?
next unless -d _;
chdir $_ || die "Can't cd to $name";
&dodir($name,$nlink);
chdir '..';
--$subcount;
}
}
}
sub bynextdir {
($f0,$f1) = split(/\//,$a,2);
($f0,$f2) = split(/\//,$b,2);
$f1 cmp $f2;
}
sub byfilename {
($f0,$f1) = split(/.*\//,$a,2);
if ($f1 eq "") { $f1 = $f0 };
($f0,$f2) = split(/.*\//,$b,2);
if ($f2 eq "") { $f2 = $f0 };
$f1 cmp $f2;
}
sub bydirnum {
($f1 = $a) =~ s/^.*\///;
($f2 = $b) =~ s/^.*\///;
($dir1 = $a) =~ s/^[\D]*//;
($dir2 = $b) =~ s/^[\D]*//;
if (!($dir1 <=> $dir2)) {
$f1 cmp $f2;
}
else {
$dir1 <=> $dir2;
}
}
sub idbsort {
($f0,$f1,$f2,$f3) = split(/ /,$a,4);
($f0,$f1,$f2,$f4) = split(/ /,$b,4);
$f3 cmp $f4;
}
sub get_line {
local ($line) = @_;
$line =~ s/^.*=//;
while (($cont = index($line,"\\")) > 0) {
$_ = <MAKEFILE>;
chomp;
s/^\s*/ /;
substr($line,$cont,1) = $_;
}
$line =~ s/\$\(srcdir\)//g;
$line =~ s/\$\(builddir\)//g;
$line =~ s/\$\(\S*\)\s*//g;
$line =~ s/\s\s*/ /g;
@line = split(' ',$line);
return @line;
}

View File

@ -1,37 +0,0 @@
#! /bin/sh
#
# kill any running samba processes
#
/etc/killall smbd nmbd
chkconfig samba off
#
# add SAMBA deamons to inetd.conf
#
cp /etc/inetd.conf /etc/inetd.conf.O
if [ $? -ne 0 ]; then exit 1; fi
if [ ! -r /etc/inetd.conf.O -o ! -w /etc/inetd.conf ]; then exit 1; fi
sed -e "/^netbios/D" -e "/^#SAMBA/D" /etc/inetd.conf.O > /etc/inetd.conf
echo '#SAMBA services' >> /etc/inetd.conf
echo netbios-ssn stream tcp nowait root /usr/samba/bin/smbd smbd >> /etc/inetd.conf
echo netbios-ns dgram udp wait root /usr/samba/bin/nmbd nmbd -S >> /etc/inetd.conf
#
# add SAMBA service ports to /etc/services
#
cp /etc/services /etc/services.O
if [ $? -ne 0 ]; then exit 1; fi
if [ ! -r /etc/services.O -o ! -w /etc/services ]; then exit 1; fi
sed -e "/^netbios/D" -e "/^#SAMBA/D" /etc/services.O > /etc/services
echo '#SAMBA services' >> /etc/services
echo 'netbios-ns 137/udp # SAMBA' >> /etc/services
echo 'netbios-ssn 139/tcp # SAMBA' >> /etc/services
#
# restart inetd to start SAMBA
#
/etc/killall -HUP inetd

View File

@ -1,31 +0,0 @@
#! /bin/sh
echo
echo
echo Samba has been installed on your system.
echo
echo Your /etc/services and /etc/inetd.conf files have
echo been modified to automatically start the
echo Samba Web Administration Tool \(SWAT\) when you
echo connect with a web browser to
echo
echo http://`hostname`:901
echo
echo The original versions of /etc/services and
echo /etc/inetd.conf were saved with a .O extension.
echo
echo If you do not wish SWAT to be enabled you may
echo run the script /usr/samba/scripts/removeswat.sh
echo which will remove the entries from /etc/services
echo and /etc/inetd.conf
echo
echo Please review your configuration settings by
echo connecting to SWAT or editing the file
echo /usr/samba/lib/smb.conf and then starting
echo the smbd and nmbd daemons to complete the
echo installation. You may start the daemons from
echo the SWAT "Status" page or by executing the
echo following command as root.
echo
echo /etc/init.d/samba start
echo

View File

@ -1,53 +0,0 @@
<!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>

View File

@ -1,15 +0,0 @@
#!/bin/sh
if [ ! -d catman ]; then
mkdir catman
fi
FILES="*.?"
cd ../../docs/manpages
for FILE in $FILES ; do
neqn $FILE | tbl | nroff -man > ../../packaging/SGI/catman/`basename $FILE`
pack -f ../../packaging/SGI/catman/`basename $FILE`
done
cd ../../packaging/SGI

View File

@ -1,15 +0,0 @@
#! /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

View File

@ -1,126 +0,0 @@
#!/bin/sh
# This file goes through all the necessary steps to build a release package.
# syntax:
# mkrelease.sh [clean]
#
# You can specify clean to do a make clean before building. Make clean
# will also run configure and generate the required Makefile.
#
# This will build an smbd.noquota, smbd.profile, nmbd.profile and the
# entire package with quota support and acl support.
doclean=""
SGI_ABI=-n32
ISA=-mips3
CC=cc
if [ ! -f ../../source/Makefile ]; then
doclean="clean"
fi
if [ "$1" = "clean" ] || [ "$1" = "cleanonly" ]; then
doclean=$1
shift
fi
export SGI_ABI ISA CC
if [ "$doclean" = "clean" ] || [ "$doclean" = "cleanonly" ]; then
cd ../../source
if [ -f Makefile ]; then
make distclean
fi
rm -rf bin/*.profile bin/*.noquota
cd ../packaging/SGI
rm -rf bins catman html codepages swat samba.idb samba.spec
if [ "$doclean" = "cleanonly" ]; then exit 0 ; fi
fi
# create the catman versions of the manual pages
#
if [ "$doclean" = "clean" ]; then
echo Making manual pages
./mkman
errstat=$?
if [ $errstat -ne 0 ]; then
echo "Error $errstat making manual pages\n";
exit $errstat;
fi
fi
cd ../../source
if [ "$doclean" = "clean" ]; then
echo Create SGI specific Makefile
./configure --prefix=/usr/samba --sbindir=/usr/samba/bin --mandir=/usr/share/catman --with-acl-support --with-quotas --with-smbwrapper
errstat=$?
if [ $errstat -ne 0 ]; then
echo "Error $errstat creating Makefile\n";
exit $errstat;
fi
fi
# build the sources
#
echo Making binaries
echo "===================== Making Profile versions ======================="
make clean
make headers
make -P "CFLAGS=-O -g3 -woff 1188 -D WITH_PROFILE" bin/smbd bin/nmbd
errstat=$?
if [ $errstat -ne 0 ]; then
echo "Error $errstat building profile sources\n";
exit $errstat;
fi
mv bin/smbd bin/smbd.profile
mv bin/nmbd bin/nmbd.profile
echo "===================== Making No Quota versions ======================="
make clean
make headers
make -P "CFLAGS=-O -g3 -woff 1188 -D QUOTAOBJS=smbd/noquotas.o" bin/smbd
errstat=$?
if [ $errstat -ne 0 ]; then
echo "Error $errstat building noquota sources\n";
exit $errstat;
fi
mv bin/smbd bin/smbd.noquota
echo "===================== Making Regular versions ======================="
make -P "CFLAGS=-O -g3 -woff 1188" all libsmbclient
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
sort +4 samba.idb > xxx
mv xxx samba.idb
if [ ! -d bins ]; then
mkdir bins
fi
# do the packaging
/usr/sbin/gendist -rbase / -sbase ../.. -idb samba.idb -spec samba.spec -dist ./bins -all

View File

@ -1,5 +0,0 @@
#
# 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

View File

@ -1,233 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>Samba Release Notes</TITLE>
</HEAD>
<BODY>
<H1>Samba Release Notes</H1>
<P>
<HR></P>
<H2>Table of Contents</H2>
<MENU>
<LI><B><A HREF="#WHATIS">What is Samba?</A></B> </LI>
<LI><B><A HREF="#Support">Support Policy</A> </B></LI>
<LI><B><A HREF="#Installation">Installation Information</A> </B></LI>
<LI><B><A HREF="legal_notice.html">Silicon
Graphics Legal Notice</A> </B></LI>
<LI><B><A HREF="#AUTHORNOTES">Author's Notice(s)</A> </B></LI>
<LI><B><A HREF="#Documentation">Documentation Information</A> </B></LI>
</MENU>
<P>
<HR></P>
<H2><A NAME="WHATIS"></A>What is Samba?</H2>
<P>Samba is an SMB client and server for Unix. It makes it possible for
client machines running Windows 95 and Windows for Workgroups to access
files and/or print services on a Unix system. Samba includes an SMB server
to provide LanManager-style file and print services to PCs, a Netbios (RFC10001/1002)
name server, and an FTP-like client application for accessing PC resources
from Unix. </P>
<P>To make Samba work you'll need to configure your server host to run
<B>smbd</B> and <B>nmbd</B> whenever you connect to a certain Internet
port from the client machine. <B>Smbd</B> and <B>nmbd</B> can be started
either as daemons or from inetd.</P>
<P>By default <B>smbd</B> and <B>nmbd</B> are started as daemons by the
file <I>/etc/init.d/samba</I> in conjunction with the chkconfig variable
samba being set to on. If you set chkconfig samba off then the deamons
will not be automatically started on reboot. In this case you must type
the following at a shell prompt to start samba after a reboot: </P>
<PRE><B> chkconfig samba on
/etc/init.d/samba start</B>
</PRE>
<P>If you make changes to your configuration files, <B>smbd</B> and <B>nmbd</B>
may be restarted by typing the following at a shell prompt: </P>
<PRE><B> /etc/init.d/samba start</B>
</PRE>
<P><B>smbd</B> and <B>nmbd</B> may be killed by typing the following at
a shell prompt: </P>
<PRE><B> /etc/init.d/samba stop</B>
</PRE>
<P>To have <B>smbd</B> and <B>nmbd</B> started by inetd you can execute
the shell script <I>/usr/samba/inetd.sh</I> to automatically configure
the various files and start the processes. This shell script first kills
any running <B>smbd</B> and <B>nmbd</B> processes. It then removes any
existing entries for &quot;netbios*&quot; from <I>/etc/inetd.conf</I> and
adds the following lines </P>
<PRE><B> netbios-ssn stream tcp nowait root /usr/samba/bin/smbd smbd
netbios-ns dgram udp wait root /usr/samba/bin/nmbd nmbd -S</B>
</PRE>
<P>It then removes any existing entries for &quot;netbios*&quot; from <I>/etc/services</I>
and adds the following lines </P>
<PRE><B> netbios-ns 137/udp # SAMBA
netbios-ssn 139/tcp # SAMBA</B>
</PRE>
<P><I>Inetd</I> is then restarted by executing:</P>
<PRE><B> /etc/killall -HUP inetd</B>
</PRE>
<P>If you make changes to your configuration files, <B>smbd</B> and <B>nmbd</B>
may be restarted by typing the following at a shell prompt: </P>
<PRE><B> /etc/killall smbd nmbd
/etc/killall -HUP inetd</B>
</PRE>
<H3><A NAME="AUTHORNOTES"></A>Author's Notice(s):</H3>
<P>The author of this product is: Andrew Tridgell </P>
<P>Samba is distributed freely under the <A HREF="COPYING">GNU
public license</A>. </P>
<H3><A NAME="Support"></A>Support:</H3>
<P>The software in this package is considered unsupported by Silicon Graphics.
Neither the authors or Silicon Graphics are compelled to help resolve problems
you may encounter in the installation, setup, or execution of this software.
To be more to the point, if you call us with an issue regarding products
in the Freeware package, we'll have to gracefully terminate the call. The
<A HREF="http://samba.org/pub/samba/">
Samba Web Page</A> has a listing of companies and individuals that offer
commercial support for a fee.
</P>
<H2><A NAME="Installation"></A>Installation Information</H2>
<P>Samba includes these subsystems: </P>
<TABLE>
<TR>
<TD ALIGN=LEFT><B>samba.sw.base</B> (<I>default</I>)</TD>
<TD>Execution environment for Samba.</TD>
</TR>
<TR>
<TD ALIGN=left><B>samba.man.manpages</B>(<I>default</I>)</TD>
<TD>Samba's online manual pages (preformatted).</TD>
</TR>
<TR>
<TD ALIGN=LEFT VALIGN=TOP><B>samba.man.doc</B> (<I>default</I>)</TD>
<TD>Samba documentation: hints on installation and configuration, an FAQ
(Frequently Asked Questions), help in diagnosing problems, etc..</TD>
</TR>
<TR>
<TD ALIGN=left><B>samba.man.relnotes</B> (<I>default</I>) </TD>
<TD>Samba online release notes.</TD>
</TR>
<TR>
<TD ALIGN=LEFT VALIGN=TOP><B>samba.src.samba</B> </TD>
<TD>The Samba software distribution from which this product was
built (including the packaging/SGI directory which will allow this distribution
to be rebuilt).</TD>
</TR>
</TABLE>
<H3>Installation Method</H3>
<P>All of the subsystems for Samba can be installed using IRIX. You do
not need to use the miniroot. Refer to the <I>Software Installation Administrator's
Guide</I> for complete installation instructions. </P>
<H3>Prerequisites</H3>
<P>Your workstation must be running IRIX 5.3 or later in order to use this
product. </P>
<H3>Configuration Files</H3>
<P>Because configuration files often contain modifications, inst treats
them specially during the installation process. If they have not been modified,
inst removes the old file and installs the new version during software
updates. For configuration files that have been modified, the new version
is installed and the old version is renamed by adding the suffix .O (for
older) to the name. The no-suffix version contains changes that are required
for compatibility with the rest of the newly installed software, that increase
functionality, or that fix bugs. You should use diff(1) or gdiff(1) to
compare the two versions of the files and transfer information that you
recognize as machine or site-specific from the .O version to the no-suffix
version. </P>
<DL>
<DT><B>/usr/samba/lib/smb.conf</B> </DT>
<DD>Configuration definitions for the <B>smbd</B> program; the SMB server
process. The default configuration sets up password-based access to home
directories on a machine as well as open access to to all printers and
/tmp. The workgroup is set by default to &quot;workgroup&quot;. It is highly
recommended that administrators review the content of this file when installing
Samba for the first time.</DD>
<DT><B>/usr/samba/printcap</B> </DT>
<DD>A file that specifies the available printers on a system. It is included
as an example; administrators may want to replace it or override the reference
to it in the <B>smb.conf</B> file. The script <B>/usr/samba/mkprintcap.sh</B>
was used by inst to create a printcap file that contains all printers on
your system. You may wish to remove some printers or add a comment to each
printer name to describe its location.</DD>
</DL>
<H2><A NAME="Documentation"></A>Documentation Information</H2>
<P>Preformatted manual pages are installed by default as are the contents
of the <B>docs</B> directory from the Samba distribution; consult <I>samba</I>(7)
for an introduction. </P>
<P>There is a mailing list for discussion of Samba. To subscribe send mail
to <A HREF="mailto:listproc@samba.org">listproc@samba.org</A>
with a body of &quot;subscribe samba Your Name&quot; </P>
<P>To send mail to everyone on the list mail to <A HREF="mailto:samba@samba.org">samba@samba.org</A>.
</P>
<P>There is also an announcement mailing list where new versions are announced.
To subscribe send mail to <A HREF="mailto:listproc@samba.org">listproc@samba.org</A>
with a body of &quot;subscribe samba-announce Your Name&quot;. All announcements
also go to the samba list. </P>
<P>You might also like to look at the Usenet news group <A HREF="news:comp.protocols.smb">comp.protocols.smb</A>
as it often contains lots of useful info and is frequented by lots of Samba
users. The newsgroup was initially setup by people on the Samba mailing
list. It is not, however, exclusive to Samba, it is a forum for discussing
the SMB protocol (which Samba implements). </P>
<P>A Samba WWW site has been setup with lots of useful info. Connect to:
<A HREF="http://samba.org/pub/samba/">http://samba.org/pub/samba/</A>.
It is maintained by Paul Blackman (thanks Paul!). You can contact him at
<A HREF="mailto:ictinus@lake.canberra.edu.au">ictinus@lake.canberra.edu.au</A>.
</P>
</BODY>
</HTML>

View File

@ -1,25 +0,0 @@
#! /bin/sh
#
# remove SWAT deamon from inetd.conf
#
cp /etc/inetd.conf /etc/inetd.conf.O
if [ $? -ne 0 ]; then exit 1; fi
if [ ! -r /etc/inetd.conf.O -o ! -w /etc/inetd.conf ]; then exit 1; fi
sed -e "/^swat/D" -e "/^#SWAT/D" /etc/inetd.conf.O > /etc/inetd.conf
#
# remove SWAT service port from /etc/services
#
cp /etc/services /etc/services.O
if [ $? -ne 0 ]; then exit 1; fi
if [ ! -r /etc/services.O -o ! -w /etc/services ]; then exit 1; fi
sed -e "/^swat/D" -e "/^#SWAT/D" /etc/services.O > /etc/services
#
# restart inetd to reread config files
#
/etc/killall -HUP inetd

View File

@ -1 +0,0 @@
on

View File

@ -1,67 +0,0 @@
#! /bin/sh
#
# Samba server control
#
IS_ON=/etc/chkconfig
KILLALL=/sbin/killall
SAMBAD=/usr/samba/bin/smbd
PROFILE_SAMBAD=/usr/samba/bin/smbd.profile
#SAMBA_OPTS=-d2
NMBD=/usr/samba/bin/nmbd
PROFILE_NMBD=/usr/samba/bin/nmbd.profile
#NMBD_OPTS=-d1
SMBCONTROL=/usr/samba/bin/smbcontrol
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
if $IS_ON sambaprofiling ; then
enable_profiling=yes
fi
if test "$enable_profiling" -o "$1" = "profile" ; then
SAMBAD=$PROFILE_SAMBAD
NMBD=$PROFILE_NMBD
enable_profiling="yes"
fi
case $1 in
start|profile)
if $IS_ON samba && test -x $SAMBAD; then
/etc/init.d/samba stop
$ECHO "Samba:\c"
$SAMBAD $SAMBA_OPTS -D; $ECHO " smbd\c"
$NMBD $NMBD_OPTS -D; $ECHO " nmbd\c"
$ECHO "."
fi
if $IS_ON samba && test "$enable_profiling" ; then
if test -x $SMBCONTROL; then
$ECHO "Enabling Samba profiling."
$SMBCONTROL smbd profile on > /dev/null 2>&1
$SMBCONTROL nmbd profile on > /dev/null 2>&1
fi
$KILLALL -HUP pmcd
fi
;;
stop)
$ECHO "Stopping Samba Servers."
$KILLALL -15 smbd nmbd
$KILLALL -15 smbd.profile nmbd.profile
$KILLALL -15 pmdasamba
exit 0
;;
*)
echo "usage: /etc/init.d/samba {start|stop|profile}"
;;
esac

View File

@ -1,161 +0,0 @@
#!/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);
print "$#ARGV ".scalar(@ARGV)."\n";
if (scalar(@ARGV) < 2) {
print STDERR "usage: $PROG printer file [user] [system]\n";
exit;
}
$printer = $ARGV[0];
$file = $ARGV[1];
$user = $ARGV[2];
$system = $ARGV[3];
$user = "nobody" unless($user);
$system = `hostname` unless($system);
open(LPSTAT,"/usr/bin/lpstat -t|") || die("Can't get printer list.\n");
@printers = ();
while (<LPSTAT>) {
next unless /^printer (\w+)/;
push(@printers,$1);
}
close LPSTAT;
# Create a hash list
@printers{@printers} = @printers;
# Untaint the printer name
if (defined($prtname = $printers{$printer})) {
$printer = $prtname;
} else {
die("Unknown printer: \"$printer\"\n");
}
if ($> == 0) { # are we root?
# yes -- then perform a taint checks and possibly do a suid check
# Untaint the file and system names (pretend to filter them)
$file = $file =~ /^(.*)/ ? $1 : die("Bad file: $file\n");
$system = $system =~ /^(.*)/ ? $1 : die("Bad system: $system\n");
# Get the valid users
setpwent;
%users = ();
while (@pwe = getpwent()) {
$uids{$pwe[0]} = $pwe[2];
$users{$pwe[2]} = $pwe[0];
}
endpwent();
# Check out the user -- if the user is a real user on this system,
# then become that user so that the printer header page looks right
# otherwise, remain as the default user (probably "nobody").
if (defined($uid = $uids{$user})) {
# before we change UID, we must ensure that the file is still
# readable after the UID change.
chown($uid, 9, $file); # make the file owned by the user
# Now, go ahead and become the user
$name = $users{$uid};
$> = $uid; # become the user
$< = $uid;
} else { # do untaint filtering
$name = $user =~ /^(\w+)/ ? $1 : die("Bad user: $user\n");
}
} else { # otherwise, just be me
$name = $user; # whomever that is
}
$lpcommand = "/usr/bin/lp -c -d$printer -t'$name on $system'";
# This code is from the original "psfix" but it has been completely
# rewritten for speed.
if ($PSFIX) { # are we running a "psfix"?
open(FILE, $file) || die("Can't read $file: $!\n");
open(LP, "|$lpcommand -") || die("Can't open pipe to \"lp\": $!\n");
select(LP);
while (<FILE>) { #
$_ =~ s/^\004//; # strip any ctrl-d's
if (/^\e%/) { # get rid of any non-postscript commands
while (<FILE>) { # remove text until next %!PS
s/^\001M//; # lenmark driver prefixes Ctrl-A M to %!PS
last if /^%!PS/;
}
last if eof(FILE);
} elsif (/^%%Title:/) { # fix bug in long titles from MS Word
s/.\r$/\r/; # remove trailing character on the title
} elsif (/^\/VM\?/) { # remove VM test
print "/VM? { pop } bind def\r\n";
while (<FILE>) { last if /def\r/; }
next; # don't print
}
print;
}
close FILE;
close LP;
} else { # we're not running psfix?
system("$lpcommand $file");
}
if ($file =~ m(^/)) {
# $file is a fully specified path
# Remove the file only if it lives in a directory ending in /tmp.
unlink($file) if ($file =~ m(/tmp/[^/]+$));
} else {
# $file is NOT a fully specified path
# Remove the file only if current directory ends in /tmp.
unlink($file) if (`pwd` =~ m(/tmp$));
}

View File

@ -1,132 +0,0 @@
; Configuration file for smbd.
; ============================================================================
; For the format of this file and comprehensive descriptions of all the
; configuration option, please refer to the man page for smb.conf(5).
; This is a sample configuration for IRIX 6.x systems
;
; The following configuration should suit most systems for basic usage and
; initial testing. It gives all clients access to their home directories and
; /usr/tmp and allows access to all printers returned by lpstat.
;
[global]
comment = Samba %v
workgroup = workgroup
printing = sysv
;
; The default for printcap name is lpstat which will export all printers.
; If you want to limit the printers that are visible to clients, you can
; use a printcap file. The script mkprintcap.sh will create a printcap
; file that contains all your printers. Edit this file to only contain the
; printers that you wish to be visible. Names longer than 15 characters
; in the printcap file will not be visible to clients.
;
; printcap name = /usr/samba/printcap
printcap name = lpstat
;
; If you are using Impressario 1.x then you'll want to use the
; sambalp script provided with this package. It works around
; a problem in the PostScript generated by the standard Windows
; drivers--there is a check to verify sufficient virtual memory
; is available in the printer to print the job, but this fails
; under Impressario because of a bug in Impressario 1.x. The sambalp
; script strips out the vmstatus check. BTW, when using this
; setup to print be sure to configure a Windows printer driver
; that generates PostScript--QMS-PS 810 is one that should work
; with the sambalp script. This version of sambalp (if installed
; as a setuid script - see the comments at the beginning of the
; script) will setuid to the username if valid on the system. This
; makes the banner pages print the proper username. You can disable
; the PostScript fixes by changing a variable in sambalp.
;
print command = /usr/samba/bin/sambalp %p %s %U %m
; print command = /usr/bin/lp -c -d%p -t"%U on machine %m" %s ; rm %s
; clear the default lppause and lpresume commands since these are not
; supported in IRIX
lppause command =
lpresume command =
load printers = yes
guest account = nobody
browseable = yes
; this tells Samba to use a separate log file for each machine
; that connects - default is single file named /usr/samba/var/log.smb
; log file = /usr/samba/var/log.%m
; Set a max size for log files in Kb
max log size = 50
; You will need a world readable lock directory
; if you want to support the file sharing modes for multiple users
; of the same files
locking = yes
lock directory = /usr/samba/var/locks
security = user
; You need to test to see if this makes a difference on your system
socket options = TCP_NODELAY
; Set the os level to > 32 if there is no NT server for your workgroup
os level = 0
preferred master = no
domain master = no
local master = no
wins support = no
wins server =
preserve case = yes
short preserve case = yes
; These are the settings required for IRIX password sync
passwd program = /usr/bin/passwd %u
passwd chat = *ew*password:* %n\n *e-enter*new*password:* %n\n
; Uncomment the following if you wish to use encrypted passwords.
; encrypt passwords = yes
; Uncomment the following if you wish to sync unix and smbpasswd
; unix password sync = yes
; Sample winbindd configuration parameters - uncomment and
; change if necessary for your desired configuration
; winbind uid = 50000-60000
; winbind gid = 50000-60000
; winbind separator = +
; winbind cache time = 10
; password server = *
; Sample add user command for automatically adding machine accounts
; add user script = /usr/sbin/passmgmt -a -h/dev/null -g20 -s/usr/bin/false %u
[homes]
comment = Home Directories
browseable = no
writeable = yes
; Share for printer drivers for automatic driver download
;
[print$]
comment = printer driver directory
path = /usr/samba/printer
guest ok = yes
browseable = yes
read only = yes
write list = lp
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
printable = yes
guest ok = yes
writeable = no
create mask = 0700
[tmp]
comment = Temporary file space
path = /usr/tmp
writeable = yes
guest ok = yes

View File

@ -1 +0,0 @@
# Samba SMB password file

View File

@ -1,54 +0,0 @@
#!/bin/sh
#
# @(#) smbprint.sysv version 1.0 Ross Wakelin <r.wakelin@march.co.uk>
#
# Version 1.0 13 January 1995
# modified from the original smbprint (bsd) script
#
# this script is a System 5 printer interface script. It uses the smbclient
# program to print the file to the specified smb-based server and service.
#
# To add this to your lp system, modify the server and service variables
# and then execute the following command (as root):
#
# lpadmin -punixprintername -v/dev/null -i/usr/samba/bin/smbprint
#
# where unixprintername is the name that the printer will be known as
# on your unix box.
#
# the script smbprint will be copied into your printer administration
# directory (/usr/spool/lp) as a new interface (interface/unixprintername)
# Then you have to execute the following commands:
#
# enable unixprintername
# accept unixprintername
#
# This script will then be called by the lp service to print the files.
# This script will have 6 or more parameters passed to it by the lp service.
# The first five will contain details of the print job, who queued it etc,
# while parameters 6 onwards are a list of files to print. We just
# cat these to the samba client.
#
# clear out the unwanted parameters
shift;shift;shift;shift;shift
# now the argument list is just the files to print
# Set these to the server and service you wish to print to
# In this example I have a PC called "admin" that has a printer
# exported called "hplj2" with no password.
#
server=admin
service=hplj2
password=""
# NOTE: The line `echo translate' provides automatic CR/LF translation
# when printing.
(
echo translate
echo "print -"
cat $*
) | /usr/samba/bin/smbclient "//$server/$service" $password -N > /dev/null
exit $?

View File

@ -1,97 +0,0 @@
#!/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";
while ( <VER> ) {
chomp;
if ( /SAMBA_VERSION_OFFICIAL_STRING/ ) {
s/^.*SAMBA_VERSION_OFFICIAL_STRING "//;
s/".*$//;
$SambaVersion = $_;
}
}
close (VER);
# create the package name
$vername = " id \"Samba Version ".$SambaVersion."\"\n";
$_ = $SambaVersion;
s/^.* //;
$patch = 0;
#create the subsystem version numbers
if (/alpha/) {
$_ =~ s/alpha/.00./;
}
elsif (/-HEAD/) {
$_ =~ s/-HEAD/.01/;
$_ .= '.99';
}
elsif (/pre-/) {
$_ =~ s/pre-//;
$_ .= '.00';
}
elsif (/p/) {
$_ =~ s/p/./;
$_ .= '.00';
$patch = 1;
}
else {
$_ .='.01.00';
}
($v1,$v2,$v3,$v4,$v5) = split('\.');
$v4 = $v4 + $patch;
$vernum = sprintf(" version %02d%02d%02d%02d%02d\n",$v1,$v2,$v3,$v4,$v5);
# generate the samba.spec file
open(SPEC,">samba.spec") || die "Unable to open samba.spec for output\n";
print SPEC "product samba\n";
print SPEC $vername;
print SPEC " image sw\n";
print SPEC " id \"Samba Execution Environment\"\n";
print SPEC $vernum;
print SPEC " order 0\n";
print SPEC " subsys base default\n";
print SPEC " id \"Samba Execution Environment\"\n";
print SPEC " replaces fw_samba.sw.base 0 9999999999\n";
print SPEC " replaces fw_samba.sw.samba 0 9999999999\n";
print SPEC " exp samba.sw.base\n";
print SPEC " endsubsys\n";
print SPEC " endimage\n";
print SPEC " image man\n";
print SPEC " id \"Samba Online Documentation\"\n";
print SPEC $vernum;
print SPEC " order 1\n";
print SPEC " subsys manpages default\n";
print SPEC " id \"Samba Man Page\"\n";
print SPEC " replaces fw_samba.man.manpages 0 9999999999\n";
print SPEC " replaces fw_samba.man.samba 0 9999999999\n";
print SPEC " exp samba.man.manpages\n";
print SPEC " endsubsys\n";
print SPEC " subsys doc default\n";
print SPEC " id \"Samba Documentation\"\n";
print SPEC " replaces fw_samba.man.doc 0 9999999999\n";
print SPEC " exp samba.man.doc\n";
print SPEC " endsubsys\n";
print SPEC " subsys relnotes default\n";
print SPEC " id \"Samba Release Notes\"\n";
print SPEC " replaces fw_samba.man.relnotes 0 9999999999\n";
print SPEC " exp samba.man.relnotes\n";
print SPEC " endsubsys\n";
print SPEC " endimage\n";
print SPEC " image src\n";
print SPEC " id \"Samba Source Code\"\n";
print SPEC $vernum;
print SPEC " order 2\n";
print SPEC " subsys samba\n";
print SPEC " id \"Samba Source Code\"\n";
print SPEC " replaces fw_samba.src.samba 0 9999999999\n";
print SPEC " exp samba.src.samba\n";
print SPEC " endsubsys\n";
print SPEC " endimage\n";
print SPEC "endproduct\n";
close SPEC || die "Error on close of samba.spec\n";
print "\nsamba.spec file has been created\n\n";

View File

@ -1,29 +0,0 @@
#! /bin/sh
#
# add SWAT deamon to inetd.conf
#
cp /etc/inetd.conf /etc/inetd.conf.O
if [ $? -ne 0 ]; then exit 1; fi
if [ ! -r /etc/inetd.conf.O -o ! -w /etc/inetd.conf ]; then exit 1; fi
sed -e "/^swat/D" -e "/^#SWAT/D" /etc/inetd.conf.O > /etc/inetd.conf
echo '#SWAT services' >> /etc/inetd.conf
echo swat stream tcp nowait root /usr/samba/bin/swat swat >> /etc/inetd.conf
#
# add SWAT service port to /etc/services
#
cp /etc/services /etc/services.O
if [ $? -ne 0 ]; then exit 1; fi
if [ ! -r /etc/services.O -o ! -w /etc/services ]; then exit 1; fi
sed -e "/^swat/D" -e "/^#SWAT/D" /etc/services.O > /etc/services
echo '#SWAT services' >> /etc/services
echo 'swat 901/tcp # SWAT' >> /etc/services
#
# restart inetd to start SWAT
#
/etc/killall -HUP inetd

View File

@ -1 +0,0 @@
off

View File

@ -1,38 +0,0 @@
#! /bin/sh
#
# winbindd control
#
IS_ON=/etc/chkconfig
KILLALL=/sbin/killall
WINBINDD=/usr/samba/bin/winbindd
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 winbind && test -x $WINBINDD; then
$KILLALL -15 winbindd
$ECHO "winbindd:\c"
$WINBINDD ; $ECHO " winbindd."
fi
;;
'stop')
$ECHO "Stopping winbindd."
$KILLALL -15 winbindd
exit 0
;;
*)
echo "usage: /etc/init.d/winbind {start|stop}"
;;
esac