summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-06-17 18:36:36 +0000
committerGerald Carter <jerry@samba.org>2002-06-17 18:36:36 +0000
commit1e6e5b299c235b513095a76a4cd9fffc41e8fc9c (patch)
tree9f741529073ad411cc7328334e26d3e35b1d33f1 /packaging
parenta11c5d7ad07d259d764aede4745d13f8163a8212 (diff)
downloadsamba-1e6e5b299c235b513095a76a4cd9fffc41e8fc9c.tar.gz
beginning to sync up for 2.2.5 release....
Diffstat (limited to 'packaging')
-rwxr-xr-xpackaging/Caldera/OpenLinux/findsmb23
-rw-r--r--packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl23
-rw-r--r--packaging/Caldera/OpenLinux/samba2.spec-sam.tmpl31
-rw-r--r--packaging/Caldera/OpenLinux/samba2.spec-team.tmpl23
-rw-r--r--packaging/Caldera/OpenLinux/samba2.spec.tmpl1
-rwxr-xr-xpackaging/Caldera/OpenServer/Compile15
-rwxr-xr-xpackaging/Caldera/OpenServer/Configure25
-rwxr-xr-xpackaging/Caldera/OpenServer/Install9
-rw-r--r--packaging/Caldera/OpenServer/example.block.smb.conf5
-rwxr-xr-xpackaging/Caldera/OpenServer/findsmb8
-rw-r--r--packaging/Caldera/OpenServer/pkg/cdmt.config2
-rwxr-xr-xpackaging/Caldera/OpenServer/pkg/cntl/packages/SambaDOC/ccs8
-rw-r--r--packaging/Caldera/OpenServer/pkg/input/Samba.pkg39
-rw-r--r--packaging/Caldera/OpenServer/pkg/input/SambaDOC.pkg9
-rw-r--r--packaging/Caldera/OpenServer/samba.desktop7
-rw-r--r--packaging/Caldera/OpenServer/samba.directory3
-rwxr-xr-xpackaging/Caldera/UnixWare/findsmb27
-rw-r--r--packaging/LSB/lsb-samba.spec4
-rwxr-xr-xpackaging/Mandrake/findsmb23
-rw-r--r--packaging/Mandrake/samba2.spec.tmpl24
-rwxr-xr-xpackaging/PHT/TurboLinux/findsmb23
-rwxr-xr-xpackaging/RedHat/findsmb150
-rw-r--r--packaging/RedHat/samba2-devel.spec.tmpl75
-rw-r--r--packaging/RedHat/samba2.spec.tmpl75
-rwxr-xr-xpackaging/RedHat/smb.init16
-rw-r--r--packaging/RedHat/winbind.init91
-rwxr-xr-xpackaging/SGI/findsmb150
-rwxr-xr-xpackaging/SGI/idb.pl5
-rw-r--r--packaging/Solaris/i.swat2
-rw-r--r--packaging/SuSE/8.0/samba.spec1
30 files changed, 460 insertions, 437 deletions
diff --git a/packaging/Caldera/OpenLinux/findsmb b/packaging/Caldera/OpenLinux/findsmb
index fb178f91c1c..04bc6080508 100755
--- a/packaging/Caldera/OpenLinux/findsmb
+++ b/packaging/Caldera/OpenLinux/findsmb
@@ -63,17 +63,8 @@ foreach $ip (@ipaddrs) # loop through each IP address found
# get the first <00> name
- @name = grep(/<00> - /,@nmblookup);
+ @name = grep(/<00>/,@nmblookup);
$_ = @name[0];
- if (not $_) {
-# try without the -r option
- open(NMBLOOKUP,"$SAMBABIN/nmblookup -A $ip|") ||
- die("Can't get nmb name list.\n");
- @nmblookup = <NMBLOOKUP>;
- close NMBLOOKUP;
- @name = grep(/<00> - /,@nmblookup);
- $_ = @name[0];
- }
if ($_) { # we have a netbios name
if (/GROUP/) { # is it a group name
($name, $aliases, $type, $length, @addresses) =
@@ -82,13 +73,16 @@ foreach $ip (@ipaddrs) # loop through each IP address found
$name = "unknown nis name";
}
} else {
- /(\S+)/;
+# The Netbios name can contain lot of characters also '<' '>'
+# and spaces. The follwing cure inside name space but not
+# names starting or ending with spaces
+ /(.{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% |") ||
+ open(SMB,"$SAMBABIN/smbclient -N -L $name -I $ip -U% |") ||
die("Can't do smbclient command.\n");
@smb = <SMB>;
close SMB;
@@ -104,7 +98,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found
@info = grep(/OS=/,@smb);
$_ = @info[0];
if ($_) { # we found response
- s/.*Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter
+ s/Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter
} else { # no OS= string in response (WIN95 client)
@@ -112,7 +106,8 @@ foreach $ip (@ipaddrs) # loop through each IP address found
@name = grep(/<00> - <GROUP>/,@nmblookup);
$_ = @name[0];
if ($_) {
- /(\S+)/;
+# Same as before for space and characters
+ /(.{1,15})\s+<00>\s+/;
$_ = "[$1]";
} else {
$_ = "Unknown Workgroup";
diff --git a/packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl b/packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl
index df0b6bff4d2..8af6974b58f 100644
--- a/packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl
+++ b/packaging/Caldera/OpenLinux/samba2.spec-lsb.tmpl
@@ -295,10 +295,15 @@ make LOGFILEBASE=/var/log/samba.d all nsswitch/libnss_wins.so debug2html bin/smb
# Now build the VFS modules
cd ../examples/VFS
-make
+CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" ./configure \
+ --with-fhs \
+ --prefix='$(DESTDIR)/usr' \
+ --localstatedir='$(DESTDIR)/var' \
+ --libdir='$(DESTDIR)%{EtcSamba}'
cd block
mv block.c block.c.old
-sed 's/etc\/samba/etc\/samba\.d/g' < block.c.old > block.c
+sed 's/etc\/samba/etc\/samba\.d\/vfs/g' < block.c.old > block.c
+cd ..
make
@@ -314,7 +319,7 @@ mkdir -p $DESTDIR/%{LSBservedir}/{netlogon,profiles,Public}
mkdir -p $DESTDIR/etc/skel/Samba
mkdir -p $DESTDIR/usr/share/samba/codepages/src $DESTDIR/sbin
mkdir -p $DESTDIR/%{SVIdir}
-mkdir -p $DESTDIR/usr/{include,lib/samba}
+mkdir -p $DESTDIR/usr/{include,lib/samba/vfs}
make LOGFILEBASE=/var/log/samba.d -C source install
@@ -338,10 +343,13 @@ ln -s libnss_winbind.so.2.0 $DESTDIR/lib/libnss_winbind.so.2
ln -s libnss_winbind.so.2.0 $DESTDIR/lib/libnss_winbind.so
# Adding VFS modules
-install -m 755 examples/VFS/audit.so $DESTDIR/usr/lib/samba
-install -m 755 examples/VFS/recycle.so $DESTDIR/usr/lib/samba
-install -m 755 examples/VFS/skel.so $DESTDIR/usr/lib/samba
-install -m 755 examples/VFS/block/block.so $DESTDIR/usr/lib/samba
+install -m 755 examples/VFS/audit.so $DESTDIR/usr/lib/samba/vfs
+install -m 755 examples/VFS/recycle/recycle.so $DESTDIR/usr/lib/samba/vfs
+install -m 755 examples/VFS/recycle/recycle.conf $DESTDIR/usr/lib/samba/vfs
+install -m 755 examples/VFS/skel.so $DESTDIR/usr/lib/samba/vfs
+install -m 755 examples/VFS/block/block.so $DESTDIR/usr/lib/samba/vfs
+install -m 644 examples/VFS/block/samba-block.conf $DESTDIR/etc/samba.d/samba-block.conf.example
+install -m 644 examples/VFS/block/smb.conf $DESTDIR/etc/samba.d/smb.conf.example-with-block-use
install -m 755 source/nsswitch/pam_winbind.so $DESTDIR/lib/security
install -m 755 source/bin/wbinfo $DESTDIR/usr/bin
@@ -363,7 +371,6 @@ cp -p $VVS/smbadduser $DESTDIR/usr/bin/smbadduser
#cp -p $VVS/convertsmbpasswd.perl $DESTDIR/usr/bin/convertsmbpasswd
#cp -p $VVS/updatesmbpasswd.perl $DESTDIR/usr/bin/updatesmbpasswd
-cp -p $VVS/findsmb $DESTDIR/usr/bin
cp -p $VVS/samba.daemon $DESTDIR/etc/sysconfig/daemons/samba
cp -p $VVS/winbind.daemon $DESTDIR/etc/sysconfig/daemons/winbind
cp -p $VVS/samba.pam $DESTDIR/etc/pam.d/samba
diff --git a/packaging/Caldera/OpenLinux/samba2.spec-sam.tmpl b/packaging/Caldera/OpenLinux/samba2.spec-sam.tmpl
index a46d4cac062..07b188d81be 100644
--- a/packaging/Caldera/OpenLinux/samba2.spec-sam.tmpl
+++ b/packaging/Caldera/OpenLinux/samba2.spec-sam.tmpl
@@ -1,4 +1,4 @@
-%define Version PVERSION
+%define Version PVERSIONsam
%define date PRELEASE
%define Vendor Caldera
%define Dist OpenLinux
@@ -287,16 +287,25 @@ CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" ./configure \
--with-syslog \
--with-vfs \
--with-msdfs \
- --with-tdbsam
+ --with-tdbsam \
+ --with-ldapsam \
+ --with-nisplussam \
+ --with-nisplushome \
+ --with-krb5=/usr/athena
make LOGFILEBASE=/var/log/samba.d everything nsswitch/libnss_wins.so
# Now build the VFS modules
cd ../examples/VFS
-make
+CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" ./configure \
+ --with-fhs \
+ --prefix='$(DESTDIR)/usr' \
+ --localstatedir='$(DESTDIR)/var' \
+ --libdir='$(DESTDIR)%{EtcSamba}'
cd block
mv block.c block.c.old
-sed 's/etc\/samba/etc\/samba\.d/g' < block.c.old > block.c
+sed 's/etc\/samba/etc\/samba\.d\/vfs/g' < block.c.old > block.c
+cd ..
make
@@ -313,7 +322,7 @@ mkdir -p $DESTDIR/%{LSBservedir}/{netlogon,profiles,Public}
mkdir -p $DESTDIR/etc/skel/Samba
mkdir -p $DESTDIR/usr/share/samba/codepages/src $DESTDIR/sbin
mkdir -p $DESTDIR/%{SVIdir}
-mkdir -p $DESTDIR/usr/{include,lib}
+mkdir -p $DESTDIR/usr/{include,lib/samba/vfs}
make LOGFILEBASE=/var/log/samba.d -C source install
@@ -353,16 +362,18 @@ install -m 755 source/bin/smbwrapper.so $DESTDIR/usr/bin
install -m 755 source/bin/smbtorture $DESTDIR/usr/sbin
# Adding VFS modules
-install -m 755 examples/VFS/audit.so $DESTDIR/usr/lib/samba
-install -m 755 examples/VFS/recycle.so $DESTDIR/usr/lib/samba
-install -m 755 examples/VFS/skel.so $DESTDIR/usr/lib/samba
-install -m 755 examples/VFS/block/block.so $DESTDIR/usr/lib/samba
+install -m 755 examples/VFS/audit.so $DESTDIR/usr/lib/samba/vfs
+install -m 755 examples/VFS/recycle/recycle.so $DESTDIR/usr/lib/samba/vfs
+install -m 755 examples/VFS/recycle/recycle.conf $DESTDIR/usr/lib/samba/vfs
+install -m 755 examples/VFS/skel.so $DESTDIR/usr/lib/samba/vfs
+install -m 755 examples/VFS/block/block.so $DESTDIR/usr/lib/samba/vfs
+install -m 644 examples/VFS/block/samba-block.conf $DESTDIR/etc/samba.d/samba-block.conf.example
+install -m 644 examples/VFS/block/smb.conf $DESTDIR/etc/samba.d/smb.conf.example-with-block-use
cp -p $VVS/smb.conf.sample $DESTDIR%{EtcSamba}/smb.conf.sample
cp -p $VVS/smb.conf $DESTDIR%{EtcSamba}/smb.conf
cp -p $VVS/smbusers $DESTDIR%{EtcSamba}
cp -p $VVS/smbprint $DESTDIR/usr/bin
-cp -p $VVS/findsmb $DESTDIR/usr/bin
cp -p $VVS/samba.daemon $DESTDIR/etc/sysconfig/daemons/samba
cp -p $VVS/winbind.daemon $DESTDIR/etc/sysconfig/daemons/winbind
cp -p $VVS/samba.pam $DESTDIR/etc/pam.d/samba
diff --git a/packaging/Caldera/OpenLinux/samba2.spec-team.tmpl b/packaging/Caldera/OpenLinux/samba2.spec-team.tmpl
index b4842fc3f79..216d23e6162 100644
--- a/packaging/Caldera/OpenLinux/samba2.spec-team.tmpl
+++ b/packaging/Caldera/OpenLinux/samba2.spec-team.tmpl
@@ -290,10 +290,15 @@ make LOGFILEBASE=/var/log/samba.d everything nsswitch/libnss_wins.so
# Now build the VFS modules
cd ../examples/VFS
-make
+CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="-s" ./configure \
+ --with-fhs \
+ --prefix='$(DESTDIR)/usr' \
+ --localstatedir='$(DESTDIR)/var' \
+ --libdir='$(DESTDIR)%{EtcSamba}'
cd block
mv block.c block.c.old
-sed 's/etc\/samba/etc\/samba\.d/g' < block.c.old > block.c
+sed 's/etc\/samba/etc\/samba\.d\/vfs/g' < block.c.old > block.c
+cd ..
make
@@ -309,7 +314,7 @@ mkdir -p $DESTDIR/%{LSBservedir}/{netlogon,profiles,Public}
mkdir -p $DESTDIR/etc/skel/Samba
mkdir -p $DESTDIR/usr/share/samba/codepages/src $DESTDIR/sbin
mkdir -p $DESTDIR/%{SVIdir}
-mkdir -p $DESTDIR/usr/{include,lib/samba}
+mkdir -p $DESTDIR/usr/{include,lib/samba/vfs}
make LOGFILEBASE=/var/log/samba.d -C source install
@@ -350,16 +355,18 @@ install -m 755 source/bin/smbtorture $DESTDIR/usr/sbin
install -m 755 $VVS/smbadduser $DESTDIR/usr/bin
# Adding VFS modules
-install -m 755 examples/VFS/audit.so $DESTDIR/usr/lib/samba
-install -m 755 examples/VFS/recycle.so $DESTDIR/usr/lib/samba
-install -m 755 examples/VFS/skel.so $DESTDIR/usr/lib/samba
-install -m 755 examples/VFS/block/block.so $DESTDIR/usr/lib/samba
+install -m 755 examples/VFS/audit.so $DESTDIR/usr/lib/samba/vfs
+install -m 755 examples/VFS/recycle/recycle.so $DESTDIR/usr/lib/samba/vfs
+install -m 755 examples/VFS/recycle/recycle.conf $DESTDIR/usr/lib/samba/vfs
+install -m 755 examples/VFS/skel.so $DESTDIR/usr/lib/samba/vfs
+install -m 755 examples/VFS/block/block.so $DESTDIR/usr/lib/samba/vfs
+install -m 644 examples/VFS/block/samba-block.conf $DESTDIR/etc/samba.d/samba-block.conf.example
+install -m 644 examples/VFS/block/smb.conf $DESTDIR/etc/samba.d/smb.conf.example-with-block-use
cp -p $VVS/smb.conf.sample $DESTDIR%{EtcSamba}/smb.conf.sample
cp -p $VVS/smb.conf $DESTDIR%{EtcSamba}/smb.conf
cp -p $VVS/smbusers $DESTDIR%{EtcSamba}
cp -p $VVS/smbprint $DESTDIR/usr/bin
-cp -p $VVS/findsmb $DESTDIR/usr/bin
cp -p $VVS/samba.daemon $DESTDIR/etc/sysconfig/daemons/samba
cp -p $VVS/winbind.daemon $DESTDIR/etc/sysconfig/daemons/winbind
cp -p $VVS/samba.pam $DESTDIR/etc/pam.d/samba
diff --git a/packaging/Caldera/OpenLinux/samba2.spec.tmpl b/packaging/Caldera/OpenLinux/samba2.spec.tmpl
index 58dad3e9b0b..9b5299867c8 100644
--- a/packaging/Caldera/OpenLinux/samba2.spec.tmpl
+++ b/packaging/Caldera/OpenLinux/samba2.spec.tmpl
@@ -333,7 +333,6 @@ cp -p $VVS/smbadduser $DESTDIR/usr/bin/smbadduser
#cp -p $VVS/convertsmbpasswd.perl $DESTDIR/usr/bin/convertsmbpasswd
#cp -p $VVS/updatesmbpasswd.perl $DESTDIR/usr/bin/updatesmbpasswd
-cp -p $VVS/findsmb $DESTDIR/usr/bin
cp -p $VVS/samba.daemon $DESTDIR/etc/sysconfig/daemons/samba
cp -p $VVS/samba.pam $DESTDIR/etc/pam.d/samba
cp -p $VVS/samba.logrotate $DESTDIR/etc/logrotate.d/samba
diff --git a/packaging/Caldera/OpenServer/Compile b/packaging/Caldera/OpenServer/Compile
index 7628704f0d3..d3f5ed957df 100755
--- a/packaging/Caldera/OpenServer/Compile
+++ b/packaging/Caldera/OpenServer/Compile
@@ -7,10 +7,10 @@
V=
[ "$1" = "-n" ] && V=echo
-CC="gcc -I/usr/local/include -L/usr/local/lib"
-CFLAGS="-O3 -I/usr/local/include -L/usr/local/lib"
+CC="gcc"
+CFLAGS="-O3"
CXX="g++"
-CXXFLAGS="-O3 -I/usr/local/include/stl -I/usr/local/include -L/usr/local/lib"
+CXXFLAGS="-O3"
RANLIB=true
MAKE=/usr/gnu/bin/make
if [ "$V" = "echo" ]
@@ -33,12 +33,21 @@ then
echo "make all 2>&1 | tee mout-1"
echo "make smbfilter debug2html 2>&1 | tee mout-2"
echo "make bin/smbspool bin/wbinfo 2>&1 | tee mout-3"
+ echo "cd ../examples/VFS"
+ echo "rm -f mout-1"
+ echo "gmake 2>&1 | tee mout-1"
+ echo "cd block"
+ echo "rm -f mout-1"
+ echo "gmake 2>&1 | tee mout-1"
else
cd ../../../source
rm -f mout-1 mout-2 mout-3 mout-4
make all 2>&1 | tee mout-1
make smbfilter debug2html 2>&1 | tee mout-2
make bin/smbspool bin/wbinfo 2>&1 | tee mout-3
+ cd ../examples/VFS
+ rm -f mout-1
+ gmake 2>&1 | tee mout-1
fi
#
# Not building :
diff --git a/packaging/Caldera/OpenServer/Configure b/packaging/Caldera/OpenServer/Configure
index 9e303c1dd2e..0c63f7ff5b4 100755
--- a/packaging/Caldera/OpenServer/Configure
+++ b/packaging/Caldera/OpenServer/Configure
@@ -7,10 +7,11 @@
V=
[ "$1" = "-n" ] && V=echo
-CC="gcc -I/usr/local/include -L/usr/local/lib"
-CFLAGS="-O3 -I/usr/local/include -L/usr/local/lib"
+CC="gcc"
+CFLAGS="-O3"
CXX="g++"
-CXXFLAGS="-O3 -I/usr/local/include/stl -I/usr/local/include -L/usr/local/lib"
+#CXXFLAGS="-O3 -I/usr/local/include/stl -I/usr/local/include -L/usr/local/lib"
+CXXFLAGS="-O3"
RANLIB=true
MAKE=/usr/gnu/bin/make
PREFIX=/usr/lib/samba
@@ -54,6 +55,7 @@ then
--with-utmp \
--with-vfs \
--with-msdfs \
+ --with-readline=/usr \
--with-sambabook=${PREFIX}/swat/using_samba \
2>&1 | tee mout-config"
else
@@ -68,6 +70,7 @@ else
--with-utmp \
--with-vfs \
--with-msdfs \
+ --with-readline=/usr \
--with-sambabook=${PREFIX}/swat/using_samba \
2>&1 | tee mout-config
fi
@@ -81,3 +84,19 @@ EOF
sed -e "s/nobody/nouser/" include/local.h > /tmp/nouser$$
cp /tmp/nouser$$ include/local.h
rm -f /tmp/nouser$$
+
+cd ../examples/VFS
+[ -f mout-config ] && {
+ if [ "$V" = "echo" ]
+ then
+ echo "mv mout-config mout-config$$"
+ else
+ mv mout-config mout-config$$
+ fi
+}
+if [ "$V" = "echo" ]
+then
+ echo "./configure 2>&1 | tee mout-config"
+else
+ ./configure 2>&1 | tee mout-config
+fi
diff --git a/packaging/Caldera/OpenServer/Install b/packaging/Caldera/OpenServer/Install
index 8fc79bcac5c..67ea438cd0c 100755
--- a/packaging/Caldera/OpenServer/Install
+++ b/packaging/Caldera/OpenServer/Install
@@ -67,6 +67,11 @@ do
$V install -m755 -s source/bin/$i ${BLDFIX}/sbin
done
+# Install VFS libraries
+$V install -m644 -s examples/VFS/block/block.so ${BLDFIX}/lib
+$V install -m644 -s examples/VFS/audit.so ${BLDFIX}/lib
+$V install -m644 -s examples/VFS/recycle/recycle.so ${BLDFIX}/lib
+$V install -m644 -s examples/VFS/skel.so ${BLDFIX}/lib
# Install level 1 man pages
for i in *.1
@@ -124,6 +129,9 @@ $V install -m644 docs/manpages/swat.8 ${BLDFIX}/man/man.8
$V install -m644 docs/manpages/smbmount.8 ${BLDFIX}/man/man.8
$V install -m644 docs/manpages/smbmnt.8 ${BLDFIX}/man/man.8
$V install -m644 docs/manpages/smbumount.8 ${BLDFIX}/man/man.8
+$V install -m644 examples/VFS/recycle/recycle.conf ${BLDFIX}/lib
+$V install -m644 examples/VFS/block/samba-block.conf ${BUILD_ROOT}/etc/samba.d
+$V install -m644 ${PKGDIR}/example.block.smb.conf ${BUILD_ROOT}/etc/samba.d
$V install -m644 ${PKGDIR}/smb.conf $BUILD_ROOT/etc/samba.d/smb.conf.default
$V install -m644 ${PKGDIR}/smbusers $BUILD_ROOT/etc/samba.d/smbusers
$V install -m644 ${PKGDIR}/lmhosts $BUILD_ROOT/etc/samba.d/lmhosts
@@ -137,6 +145,7 @@ $V install -m644 ${PKGDIR}/docview.html $BUILD_ROOT/doc/index.html
$V install -m644 ${PKGDIR}/osr5config.html $BUILD_ROOT/doc
$V install -m644 ${PKGDIR}/callogo.gif $BUILD_ROOT/doc
$V install -m644 ${PKGDIR}/samba.desktop $BUILD_ROOT/doc
+$V install -m644 ${PKGDIR}/samba.directory $BUILD_ROOT/doc
$V install -m644 ${PKGDIR}/swat.readme ${BLDFIX}/swat/README
# The following is now done in the postinstall script
diff --git a/packaging/Caldera/OpenServer/example.block.smb.conf b/packaging/Caldera/OpenServer/example.block.smb.conf
new file mode 100644
index 00000000000..793fbeb52b1
--- /dev/null
+++ b/packaging/Caldera/OpenServer/example.block.smb.conf
@@ -0,0 +1,5 @@
+[homes]
+ comment = Home Directories
+ vfs object = /usr/lib/samba/lib/block.so
+ browseable = yes
+ writable = yes
diff --git a/packaging/Caldera/OpenServer/findsmb b/packaging/Caldera/OpenServer/findsmb
index 2e831c5f11a..08c5df11250 100755
--- a/packaging/Caldera/OpenServer/findsmb
+++ b/packaging/Caldera/OpenServer/findsmb
@@ -73,7 +73,10 @@ foreach $ip (@ipaddrs) # loop through each IP address found
$name = "unknown nis name";
}
} else {
- /(\S+)/;
+# The Netbios name can contain lot of characters also '<' '>'
+# and spaces. The follwing cure inside name space but not
+# names starting or ending with spaces
+ /(.{1,15})\s+<00>\s+/;
$name = $1;
}
@@ -103,7 +106,8 @@ foreach $ip (@ipaddrs) # loop through each IP address found
@name = grep(/<00> - <GROUP>/,@nmblookup);
$_ = @name[0];
if ($_) {
- /(\S+)/;
+# Same as before for space and characters
+ /(.{1,15})\s+<00>\s+/;
$_ = "[$1]";
} else {
$_ = "Unknown Workgroup";
diff --git a/packaging/Caldera/OpenServer/pkg/cdmt.config b/packaging/Caldera/OpenServer/pkg/cdmt.config
index 9bf3f203f93..a93ac0ce18b 100644
--- a/packaging/Caldera/OpenServer/pkg/cdmt.config
+++ b/packaging/Caldera/OpenServer/pkg/cdmt.config
@@ -1,7 +1,7 @@
MACROS:
Samba_NAME = Samba File and Print Server
-Samba_VER = 2.2.4a
+Samba_VER = 2.2.5a
DEFAULT_EXEC_MODE = 0755
diff --git a/packaging/Caldera/OpenServer/pkg/cntl/packages/SambaDOC/ccs b/packaging/Caldera/OpenServer/pkg/cntl/packages/SambaDOC/ccs
index ea86e009025..36b40d681d2 100755
--- a/packaging/Caldera/OpenServer/pkg/cntl/packages/SambaDOC/ccs
+++ b/packaging/Caldera/OpenServer/pkg/cntl/packages/SambaDOC/ccs
@@ -13,14 +13,18 @@ ccs_return_value=0
PostExport()
{
if [ -x /usr/bin/doctool ]; then
- /usr/bin/doctool --add NetworkDoc/WinConnect/samba.desktop >&- 2>&-
+ /usr/bin/doctool --add NetworkDoc/WinConnect/Samba/.directory >&- 2>&-
+ /usr/bin/doctool --add \
+ NetworkDoc/WinConnect/Samba/samba.desktop >&- 2>&-
fi
}
PreUnexport()
{
if [ -x /usr/bin/doctool ]; then
- /usr/bin/doctool --remove NetworkDoc/WinConnect/samba.desktop >&- 2>&-
+ /usr/bin/doctool --remove \
+ NetworkDoc/WinConnect/Samba/samba.desktop >&- 2>&-
+ /usr/bin/doctool --remove NetworkDoc/WinConnect/Samba/.directory >&- 2>&-
fi
}
diff --git a/packaging/Caldera/OpenServer/pkg/input/Samba.pkg b/packaging/Caldera/OpenServer/pkg/input/Samba.pkg
index eabf026eb4d..d2f21b8a006 100644
--- a/packaging/Caldera/OpenServer/pkg/input/Samba.pkg
+++ b/packaging/Caldera/OpenServer/pkg/input/Samba.pkg
@@ -280,18 +280,53 @@ group = sys
flags =
exportPath = /usr/lib/samba/sbin/smbfilter
+FILE:Samba:SHARED:etc/samba.d/smb.conf.default:
+mode = 0644
+owner = root
+group = sys
+flags =
+exportPath = /etc/samba.d/smb.conf.default
+
+FILE:Samba:SHARED:etc/samba.d/example.block.smb.conf:
+mode = 0644
+owner = root
+group = sys
+flags =
+exportPath = /etc/samba.d/example.block.smb.conf
+
DIR:Samba:SHARED:usr/lib/samba/lib:
mode = 0755
owner = root
group = sys
flags =
-FILE:Samba:SHARED:etc/samba.d/smb.conf.default:
+FILE:Samba:SHARED:usr/lib/samba/lib/audit.so:
mode = 0644
owner = root
group = sys
flags =
-exportPath = /etc/samba.d/smb.conf.default
+exportPath = /usr/lib/samba/lib/audit.so
+
+FILE:Samba:SHARED:usr/lib/samba/lib/block.so:
+mode = 0644
+owner = root
+group = sys
+flags =
+exportPath = /usr/lib/samba/lib/block.so
+
+FILE:Samba:SHARED:usr/lib/samba/lib/recycle.so:
+mode = 0644
+owner = root
+group = sys
+flags =
+exportPath = /usr/lib/samba/lib/recycle.so
+
+FILE:Samba:SHARED:usr/lib/samba/lib/skel.so:
+mode = 0644
+owner = root
+group = sys
+flags =
+exportPath = /usr/lib/samba/lib/skel.so
DIR:Samba:SHARED:usr/lib/samba/lib/codepages:
mode = 0755
diff --git a/packaging/Caldera/OpenServer/pkg/input/SambaDOC.pkg b/packaging/Caldera/OpenServer/pkg/input/SambaDOC.pkg
index 0ed9bdb72b8..abbd1e83f75 100644
--- a/packaging/Caldera/OpenServer/pkg/input/SambaDOC.pkg
+++ b/packaging/Caldera/OpenServer/pkg/input/SambaDOC.pkg
@@ -11,12 +11,19 @@ owner = root
group = sys
flags =
+FILE:SambaDOC:SHARED:doc/samba.directory:
+mode = 0644
+owner = root
+group = sys
+flags =
+exportPath = /usr/share/meta/doc/NetworkDoc/WinConnect/Samba/.directory
+
FILE:SambaDOC:SHARED:doc/samba.desktop:
mode = 0644
owner = root
group = sys
flags =
-exportPath = /usr/share/meta/doc/NetworkDoc/WinConnect/samba.desktop
+exportPath = /usr/share/meta/doc/NetworkDoc/WinConnect/Samba/samba.desktop
FILE:SambaDOC:SHARED:doc/index.html:
mode = 0644
diff --git a/packaging/Caldera/OpenServer/samba.desktop b/packaging/Caldera/OpenServer/samba.desktop
index cd34e08ac5c..33512125141 100644
--- a/packaging/Caldera/OpenServer/samba.desktop
+++ b/packaging/Caldera/OpenServer/samba.desktop
@@ -1,7 +1,4 @@
[Desktop Entry]
-Name=Samba
+Name=Samba Documentation
DocPath=/usr/share/doc/samba/help/index.html
-X-COL-Weight=2.0
-# listed in DocView under:
-# Networking group (NetworkDoc)
-# Windows Connectivity category (WinConnect)
+X-COL-Weight=1.0
diff --git a/packaging/Caldera/OpenServer/samba.directory b/packaging/Caldera/OpenServer/samba.directory
new file mode 100644
index 00000000000..bdc6fa8af41
--- /dev/null
+++ b/packaging/Caldera/OpenServer/samba.directory
@@ -0,0 +1,3 @@
+[Desktop Entry]
+Name=Samba File and Print Server
+Type=group
diff --git a/packaging/Caldera/UnixWare/findsmb b/packaging/Caldera/UnixWare/findsmb
index 4871b24ea4b..04bc6080508 100755
--- a/packaging/Caldera/UnixWare/findsmb
+++ b/packaging/Caldera/UnixWare/findsmb
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl
+#!/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
@@ -15,7 +15,7 @@
# that workgroup.
#
-$SAMBABIN = "/usr/local/samba/bin";
+$SAMBABIN = "/usr/bin";
for ($i = 0; $i < 2; $i++) { # test for -d option and broadcast address
$_ = shift;
@@ -63,17 +63,8 @@ foreach $ip (@ipaddrs) # loop through each IP address found
# get the first <00> name
- @name = grep(/<00> - /,@nmblookup);
+ @name = grep(/<00>/,@nmblookup);
$_ = @name[0];
- if (not $_) {
-# try without the -r option
- open(NMBLOOKUP,"$SAMBABIN/nmblookup -A $ip|") ||
- die("Can't get nmb name list.\n");
- @nmblookup = <NMBLOOKUP>;
- close NMBLOOKUP;
- @name = grep(/<00> - /,@nmblookup);
- $_ = @name[0];
- }
if ($_) { # we have a netbios name
if (/GROUP/) { # is it a group name
($name, $aliases, $type, $length, @addresses) =
@@ -82,13 +73,16 @@ foreach $ip (@ipaddrs) # loop through each IP address found
$name = "unknown nis name";
}
} else {
- /(\S+)/;
+# The Netbios name can contain lot of characters also '<' '>'
+# and spaces. The follwing cure inside name space but not
+# names starting or ending with spaces
+ /(.{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% |") ||
+ open(SMB,"$SAMBABIN/smbclient -N -L $name -I $ip -U% |") ||
die("Can't do smbclient command.\n");
@smb = <SMB>;
close SMB;
@@ -104,7 +98,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found
@info = grep(/OS=/,@smb);
$_ = @info[0];
if ($_) { # we found response
- s/.*Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter
+ s/Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter
} else { # no OS= string in response (WIN95 client)
@@ -112,7 +106,8 @@ foreach $ip (@ipaddrs) # loop through each IP address found
@name = grep(/<00> - <GROUP>/,@nmblookup);
$_ = @name[0];
if ($_) {
- /(\S+)/;
+# Same as before for space and characters
+ /(.{1,15})\s+<00>\s+/;
$_ = "[$1]";
} else {
$_ = "Unknown Workgroup";
diff --git a/packaging/LSB/lsb-samba.spec b/packaging/LSB/lsb-samba.spec
index c35550a3fdd..7394213d253 100644
--- a/packaging/LSB/lsb-samba.spec
+++ b/packaging/LSB/lsb-samba.spec
@@ -4,8 +4,8 @@
Summary: SAMBA
Name: lsb-samba
-Version: 2.2.1
-Release: 0
+Version: PVERSION
+Release: PRELEASE
Copyright: GPL
Group: System Environment/Daemons
Source: ftp://ftp.samba.org/pub/samba/samba-%{version}.tar.gz
diff --git a/packaging/Mandrake/findsmb b/packaging/Mandrake/findsmb
index fb178f91c1c..04bc6080508 100755
--- a/packaging/Mandrake/findsmb
+++ b/packaging/Mandrake/findsmb
@@ -63,17 +63,8 @@ foreach $ip (@ipaddrs) # loop through each IP address found
# get the first <00> name
- @name = grep(/<00> - /,@nmblookup);
+ @name = grep(/<00>/,@nmblookup);
$_ = @name[0];
- if (not $_) {
-# try without the -r option
- open(NMBLOOKUP,"$SAMBABIN/nmblookup -A $ip|") ||
- die("Can't get nmb name list.\n");
- @nmblookup = <NMBLOOKUP>;
- close NMBLOOKUP;
- @name = grep(/<00> - /,@nmblookup);
- $_ = @name[0];
- }
if ($_) { # we have a netbios name
if (/GROUP/) { # is it a group name
($name, $aliases, $type, $length, @addresses) =
@@ -82,13 +73,16 @@ foreach $ip (@ipaddrs) # loop through each IP address found
$name = "unknown nis name";
}
} else {
- /(\S+)/;
+# The Netbios name can contain lot of characters also '<' '>'
+# and spaces. The follwing cure inside name space but not
+# names starting or ending with spaces
+ /(.{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% |") ||
+ open(SMB,"$SAMBABIN/smbclient -N -L $name -I $ip -U% |") ||
die("Can't do smbclient command.\n");
@smb = <SMB>;
close SMB;
@@ -104,7 +98,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found
@info = grep(/OS=/,@smb);
$_ = @info[0];
if ($_) { # we found response
- s/.*Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter
+ s/Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter
} else { # no OS= string in response (WIN95 client)
@@ -112,7 +106,8 @@ foreach $ip (@ipaddrs) # loop through each IP address found
@name = grep(/<00> - <GROUP>/,@nmblookup);
$_ = @name[0];
if ($_) {
- /(\S+)/;
+# Same as before for space and characters
+ /(.{1,15})\s+<00>\s+/;
$_ = "[$1]";
} else {
$_ = "Unknown Workgroup";
diff --git a/packaging/Mandrake/samba2.spec.tmpl b/packaging/Mandrake/samba2.spec.tmpl
index 0ba49db0833..321f075864e 100644
--- a/packaging/Mandrake/samba2.spec.tmpl
+++ b/packaging/Mandrake/samba2.spec.tmpl
@@ -335,6 +335,16 @@ CFLAGS="$RPM_OPT_FLAGS"
#make CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE" all
make CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" all smbfilter smbwrapper smbcacls pam_smbpass nsswitch nsswitch/libnss_wins.so debug2html
+cd ../examples/VFS
+%configure --prefix=%{prefix} \
+ --with-fhs \
+ --libdir=/etc/samba \
+ --sysconfdir=/etc/samba \
+ --localstatedir=/var
+make
+cd block
+make
+
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT
@@ -353,7 +363,7 @@ mkdir -p $RPM_BUILD_ROOT/var/spool/samba
mkdir -p $RPM_BUILD_ROOT/var/lib/samba/{netlogon,profiles,printers}
mkdir -p $RPM_BUILD_ROOT/var/lib/samba/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC}
mkdir -p $RPM_BUILD_ROOT/var/lib/samba/codepages/src
-mkdir -p $RPM_BUILD_ROOT/lib/security
+mkdir -p $RPM_BUILD_ROOT/lib/{security,samba}
mkdir -p $RPM_BUILD_ROOT%prefix/lib
# Install standard binary files
@@ -465,6 +475,13 @@ done
#
install -m644 $RPM_SOURCE_DIR/samba.log $RPM_BUILD_ROOT/etc/logrotate.d/samba
+# Install VFS Modules
+ install -m755 examples/VFS/audit.so $RPM_BUILD_ROOT/lib/samba/
+ install -m755 examples/VFS/recycle.so $RPM_BUILD_ROOT/lib/samba/
+ install -m755 examples/VFS/block/block.so $RPM_BUILD_ROOT/lib/samba/
+ install -m644 examples/VFS/block/smb-block.conf $RPM_BUILD_ROOT/etc/samba/
+ install -m644 examples/VFS/block/smb.conf $RPM_BUILD_ROOT/etc/samba/smb.conf.example-with-block
+
# Link smbmount to /sbin/mount.smb and /sbin/mount.smbfs
ln -s /%{prefix}/bin/smbmount $RPM_BUILD_ROOT/sbin/mount.smb
@@ -696,6 +713,8 @@ fi
%{prefix}/bin/smbstatus
%{prefix}/bin/convert_smbpasswd
%attr(755,root,root) /lib/security/pam_smbpass*
+# Samba VFS modules
+%{prefix}/lib/samba/*
#/usr/share/swat
%attr(-,root,root) %config(noreplace) /etc/samba/smbusers
%attr(-,root,root) %config /etc/rc.d/init.d/smb
@@ -811,6 +830,9 @@ fi
%endif
%changelog
+* Sun Jun 02 2002 John H Terpstra <jht@samba.org>
+- Added VFS modules
+
* Fri Apr 26 2002 Buchan Milne <bgmilne@cae.co.za> 2.2.3a-12mdk
- Final changes for 2.2.4 release
- Removed patches 4(nsl),11(smbspool-guest)
diff --git a/packaging/PHT/TurboLinux/findsmb b/packaging/PHT/TurboLinux/findsmb
index fb178f91c1c..04bc6080508 100755
--- a/packaging/PHT/TurboLinux/findsmb
+++ b/packaging/PHT/TurboLinux/findsmb
@@ -63,17 +63,8 @@ foreach $ip (@ipaddrs) # loop through each IP address found
# get the first <00> name
- @name = grep(/<00> - /,@nmblookup);
+ @name = grep(/<00>/,@nmblookup);
$_ = @name[0];
- if (not $_) {
-# try without the -r option
- open(NMBLOOKUP,"$SAMBABIN/nmblookup -A $ip|") ||
- die("Can't get nmb name list.\n");
- @nmblookup = <NMBLOOKUP>;
- close NMBLOOKUP;
- @name = grep(/<00> - /,@nmblookup);
- $_ = @name[0];
- }
if ($_) { # we have a netbios name
if (/GROUP/) { # is it a group name
($name, $aliases, $type, $length, @addresses) =
@@ -82,13 +73,16 @@ foreach $ip (@ipaddrs) # loop through each IP address found
$name = "unknown nis name";
}
} else {
- /(\S+)/;
+# The Netbios name can contain lot of characters also '<' '>'
+# and spaces. The follwing cure inside name space but not
+# names starting or ending with spaces
+ /(.{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% |") ||
+ open(SMB,"$SAMBABIN/smbclient -N -L $name -I $ip -U% |") ||
die("Can't do smbclient command.\n");
@smb = <SMB>;
close SMB;
@@ -104,7 +98,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found
@info = grep(/OS=/,@smb);
$_ = @info[0];
if ($_) { # we found response
- s/.*Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter
+ s/Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter
} else { # no OS= string in response (WIN95 client)
@@ -112,7 +106,8 @@ foreach $ip (@ipaddrs) # loop through each IP address found
@name = grep(/<00> - <GROUP>/,@nmblookup);
$_ = @name[0];
if ($_) {
- /(\S+)/;
+# Same as before for space and characters
+ /(.{1,15})\s+<00>\s+/;
$_ = "[$1]";
} else {
$_ = "Unknown Workgroup";
diff --git a/packaging/RedHat/findsmb b/packaging/RedHat/findsmb
deleted file mode 100755
index fb178f91c1c..00000000000
--- a/packaging/RedHat/findsmb
+++ /dev/null
@@ -1,150 +0,0 @@
-#!/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 (not $_) {
-# try without the -r option
- open(NMBLOOKUP,"$SAMBABIN/nmblookup -A $ip|") ||
- die("Can't get nmb name list.\n");
- @nmblookup = <NMBLOOKUP>;
- close NMBLOOKUP;
- @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/samba2-devel.spec.tmpl b/packaging/RedHat/samba2-devel.spec.tmpl
index d60b91ff566..5f48051d8d7 100644
--- a/packaging/RedHat/samba2-devel.spec.tmpl
+++ b/packaging/RedHat/samba2-devel.spec.tmpl
@@ -8,6 +8,8 @@ Source: ftp://samba.org/pub/samba/samba-%{version}.tar.gz
Packager: John H Terpstra [Samba-Team] <jht@samba.org>
Requires: pam >= 0.72 kernel >= 2.2.1 glibc >= 2.1.2
Prereq: chkconfig fileutils
+Provides: samba = %{version}
+Obsoletes: samba-common, samba-client, samba-swat
BuildRoot: /var/tmp/samba
Prefix: /usr
@@ -43,6 +45,13 @@ for Shadow passwords and quotas. Do NOT recompile with the
SHADOW_PWD option enabled
%changelog
+* Sun Jun 2 2002 Gerald Carter <jerry@samba.org>
+ - include audit and recycle VFS modules in /usr/lib/samba
+
+* Mon May 6 2002 Gerald Carter <jerry@samba.org>
+ - moved findsmb to a standard component in samba's
+ "make install". Removed from specfile.
+
* Sun Oct 14 2001 Andrew Bartlett <abartlet@samba.org>
- Set SBINDIR for codepage/manpage install, cope with
broken Makefile
@@ -145,6 +154,7 @@ SHADOW_PWD option enabled
%setup
%build
+## Build main Samba source
cd source
%ifarch ia64
@@ -162,6 +172,7 @@ CFLAGS="$RPM_OPT_FLAGS $EXTRA" ./configure \
--with-codepagedir=/etc/codepages \
--with-fhs \
--with-quotas \
+ --with-msdfs \
--with-smbmount \
--with-pam \
--with-syslog \
@@ -173,6 +184,13 @@ make -j${NUMCPU} all nsswitch/libnss_wins.so
make -j${NUMCPU} debug2html
make -j${NUMCPU} bin/smbspool everything
+## Build VFS modules
+cd ../examples/VFS
+CFLAGS="$RPM_OPT_FLAGS $EXTRA" ./configure \
+ --prefix=%{prefix} \
+ --localstatedir=/var
+make
+
%install
rm -rf $RPM_BUILD_ROOT
@@ -187,9 +205,10 @@ mkdir -p $RPM_BUILD_ROOT%{prefix}/share/swat/{images,help,include,using_samba}
mkdir -p $RPM_BUILD_ROOT%{prefix}/share/swat/using_samba/{figs,gifs}
mkdir -p $RPM_BUILD_ROOTMANDIR_MACRO
mkdir -p $RPM_BUILD_ROOT/var/cache/samba
-mkdir -p $RPM_BUILD_ROOT/var/log/samba
+mkdir -p $RPM_BUILD_ROOT/var/{log,run}/samba
mkdir -p $RPM_BUILD_ROOT/var/spool/samba
mkdir -p $RPM_BUILD_ROOT/lib/security
+mkdir -p $RPM_BUILD_ROOT%{prefix}/lib/samba/vfs
# Install standard binary files
for i in nmblookup smbclient smbpasswd smbstatus testparm testprns \
@@ -198,15 +217,15 @@ for i in nmblookup smbclient smbpasswd smbstatus testparm testprns \
do
install -m755 source/bin/$i $RPM_BUILD_ROOT%{prefix}/bin
done
-for i in mksmbpasswd.sh smbtar
+for i in mksmbpasswd.sh smbtar findsmb
do
-install -m755 source/script/$i $RPM_BUILD_ROOT%{prefix}/bin
+ install -m755 source/script/$i $RPM_BUILD_ROOT%{prefix}/bin
done
# Install secure binary files
for i in smbd nmbd swat smbmount smbumount smbmnt debug2html winbindd
do
-install -m755 source/bin/$i $RPM_BUILD_ROOT%{prefix}/sbin
+ install -m755 source/bin/$i $RPM_BUILD_ROOT%{prefix}/sbin
done
# we need a symlink for mount to recognise the smb and smbfs filesystem types
@@ -230,7 +249,7 @@ cd ..
# Install codepage source files
for i in source/codepages/codepage_def.* source/codepages/*.TXT
do
-install -m644 $i $RPM_BUILD_ROOT/etc/codepages/src
+ install -m644 $i $RPM_BUILD_ROOT/etc/codepages/src
done
# Install the nsswitch wins library
@@ -243,24 +262,29 @@ install -m755 source/nsswitch/libnss_wins.so $RPM_BUILD_ROOT/lib
install -m755 source/nsswitch/libnss_winbind.so $RPM_BUILD_ROOT/lib
install -m755 source/nsswitch/pam_winbind.so $RPM_BUILD_ROOT/lib/security
+# Install the VFS modules
+install -m755 examples/VFS/recycle.so $RPM_BUILD_ROOT%{prefix}/lib/samba/vfs
+install -m755 examples/VFS/audit.so $RPM_BUILD_ROOT%{prefix}/lib/samba/vfs
+# clean out VFS directory since it will get installed as documentation later
+(cd examples/VFS; make clean)
+
# Install SWAT helper files
for i in swat/help/*.html docs/htmldocs/*.html
do
-install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/help
+ install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/help
done
for i in swat/images/*.gif
do
-install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/images
+ install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/images
done
for i in swat/include/*.html
do
-install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/include
+ install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/include
done
# Install the miscellany
install -m644 swat/README $RPM_BUILD_ROOT%{prefix}/share/swat
install -m755 packaging/RedHat/smbprint $RPM_BUILD_ROOT%{prefix}/bin
-install -m755 packaging/RedHat/findsmb $RPM_BUILD_ROOT%{prefix}/bin
install -m755 packaging/RedHat/smb.init $RPM_BUILD_ROOT/etc/rc.d/init.d/smb
install -m755 packaging/RedHat/smb.init $RPM_BUILD_ROOT%{prefix}/sbin/samba
install -m644 packaging/RedHat/samba.log $RPM_BUILD_ROOT/etc/logrotate.d/samba
@@ -467,10 +491,35 @@ fi
%doc docs
%doc swat/README
%doc examples
-%{prefix}/sbin/*
-/sbin/*
-%{prefix}/bin/*
+%{prefix}/sbin/smbd
+%{prefix}/sbin/nmbd
+%{prefix}/sbin/swat
+%{prefix}/sbin/smbmnt
+%{prefix}/sbin/smbmount
+%{prefix}/sbin/smbumount
+%{prefix}/sbin/winbindd
+/sbin/mount.smbfs
+/sbin/mount.smb
+%{prefix}/bin/mksmbpasswd.sh
+%{prefix}/bin/smbclient
+%{prefix}/bin/smbspool
+%{prefix}/bin/rpcclient
+%{prefix}/bin/testparm
+%{prefix}/bin/testprns
+%{prefix}/bin/findsmb
+%{prefix}/bin/smbstatus
+%{prefix}/bin/nmblookup
+%{prefix}/bin/make_smbcodepage
+%{prefix}/bin/make_unicodemap
+%{prefix}/bin/make_printerdef
+%{prefix}/bin/smbpasswd
+%{prefix}/bin/smbtar
+%{prefix}/bin/smbprint
+%{prefix}/bin/smbcontrol
+%{prefix}/bin/smbcacls
+%{prefix}/bin/wbinfo
%attr(755,root,root) /lib/libnss_wins.s*
+%attr(755,root,root) %{prefix}/lib/samba/*.so
%{prefix}/share/swat/help/*
%{prefix}/share/swat/images/*
%{prefix}/share/swat/include/header.html
@@ -491,6 +540,8 @@ MANDIR_MACRO/man8/*
%dir /etc/codepages/*
%attr(755,root,root) %dir /var/cache/samba
%dir /var/log/samba
+%dir /var/run/samba
%attr(1777,root,root) %dir /var/spool/samba
%attr(-,root,root) /lib/libnss_winbind.so
%attr(-,root,root) /lib/security/pam_winbind.so
+%attr(755,root,root) %{prefix}/lib/samba/*.so
diff --git a/packaging/RedHat/samba2.spec.tmpl b/packaging/RedHat/samba2.spec.tmpl
index 88dbe9204b7..61a00e5f7e5 100644
--- a/packaging/RedHat/samba2.spec.tmpl
+++ b/packaging/RedHat/samba2.spec.tmpl
@@ -8,7 +8,8 @@ Source: ftp://samba.org/pub/samba/samba-%{version}.tar.gz
Packager: John H Terpstra [Samba-Team] <jht@samba.org>
Requires: pam >= 0.72 kernel >= 2.2.1 glibc >= 2.1.2
Prereq: chkconfig fileutils
-Provides: samba = %{version}, samba-common = %{version}, samba-client = %{version}, samba-swat = %{version}
+Provides: samba = %{version}
+Obsoletes: samba-common, samba-client, samba-swat
BuildRoot: /var/tmp/samba
Prefix: /usr
@@ -44,6 +45,17 @@ for Shadow passwords and quotas. Do NOT recompile with the
SHADOW_PWD option enabled
%changelog
+* Thu Jun 6 2002 Gerald Carter <jerry@samba.org>
+ - add separate winbindd init script
+ - build and install libsmbclient
+
+* Sun Jun 2 2002 Gerald Carter <jerry@samba.org>
+ - include audit and recycle VFS modules in /usr/lib/samba
+
+* Mon May 6 2002 Gerald Carter <jerry@samba.org>
+ - moved findsmb to a standard component in samba's
+ "make install". Removed from specfile.
+
* Sun Oct 14 2001 Andrew Bartlett <abartlet@samba.org>
- Set SBINDIR for codepage/manpage install, cope with
broken Makefile
@@ -146,6 +158,7 @@ SHADOW_PWD option enabled
%setup
%build
+## Build main Samba source
cd source
%ifarch ia64
@@ -163,17 +176,28 @@ CFLAGS="$RPM_OPT_FLAGS $EXTRA" ./configure \
--with-codepagedir=/etc/codepages \
--with-fhs \
--with-quotas \
+ --with-msdfs \
--with-smbmount \
--with-pam \
+ --with-pam_smbpass \
--with-syslog \
--with-utmp \
--with-sambabook=%{prefix}/share/swat/using_samba \
- --with-swatdir=%{prefix}/share/swat
+ --with-swatdir=%{prefix}/share/swat \
+ --with-libsmbclient
make -j${NUMCPU} proto
make -j${NUMCPU} all nsswitch/libnss_wins.so
make -j${NUMCPU} debug2html
make -j${NUMCPU} bin/smbspool
+## Build VFS modules
+cd ../examples/VFS
+CFLAGS="$RPM_OPT_FLAGS $EXTRA" ./configure \
+ --prefix=%{prefix} \
+ --localstatedir=/var
+make
+
+
%install
rm -rf $RPM_BUILD_ROOT
@@ -191,6 +215,8 @@ mkdir -p $RPM_BUILD_ROOT/var/cache/samba
mkdir -p $RPM_BUILD_ROOT/var/{log,run}/samba
mkdir -p $RPM_BUILD_ROOT/var/spool/samba
mkdir -p $RPM_BUILD_ROOT/lib/security
+mkdir -p $RPM_BUILD_ROOT%{prefix}/lib/samba/vfs
+mkdir -p $RPM_BUILD_ROOT%{prefix}/{lib,include}
# Install standard binary files
for i in nmblookup smbclient smbpasswd smbstatus testparm testprns \
@@ -199,15 +225,15 @@ for i in nmblookup smbclient smbpasswd smbstatus testparm testprns \
do
install -m755 source/bin/$i $RPM_BUILD_ROOT%{prefix}/bin
done
-for i in mksmbpasswd.sh smbtar
+for i in mksmbpasswd.sh smbtar findsmb
do
-install -m755 source/script/$i $RPM_BUILD_ROOT%{prefix}/bin
+ install -m755 source/script/$i $RPM_BUILD_ROOT%{prefix}/bin
done
# Install secure binary files
for i in smbd nmbd swat smbmount smbumount smbmnt debug2html winbindd
do
-install -m755 source/bin/$i $RPM_BUILD_ROOT%{prefix}/sbin
+ install -m755 source/bin/$i $RPM_BUILD_ROOT%{prefix}/sbin
done
# we need a symlink for mount to recognise the smb and smbfs filesystem types
@@ -219,6 +245,7 @@ ln -sf %{prefix}/sbin/smbmount $RPM_BUILD_ROOT/sbin/mount.smb
cd source
make BASEDIR=$RPM_BUILD_ROOT/usr \
LIBDIR=$RPM_BUILD_ROOT/etc/samba \
+ VARDIR=$RPM_BUILD_ROOT/var \
SBINDIR=$RPM_BUILD_ROOT%{prefix}/sbin \
BINDIR=$RPM_BUILD_ROOT%{prefix}/bin \
MANDIR=$RPM_BUILD_ROOTMANDIR_MACRO \
@@ -231,7 +258,7 @@ cd ..
# Install codepage source files
for i in source/codepages/codepage_def.* source/codepages/*.TXT
do
-install -m644 $i $RPM_BUILD_ROOT/etc/codepages/src
+ install -m644 $i $RPM_BUILD_ROOT/etc/codepages/src
done
# Install the nsswitch wins library
@@ -244,25 +271,43 @@ install -m755 source/nsswitch/libnss_wins.so $RPM_BUILD_ROOT/lib
install -m755 source/nsswitch/libnss_winbind.so $RPM_BUILD_ROOT/lib
install -m755 source/nsswitch/pam_winbind.so $RPM_BUILD_ROOT/lib/security
+# Install pam_smbpass.so
+install -m755 source/bin/pam_smbpass.so $RPM_BUILD_ROOT/lib/security
+
+# Install the VFS modules
+install -m755 examples/VFS/recycle/recycle.so $RPM_BUILD_ROOT%{prefix}/lib/samba/vfs
+install -m644 examples/VFS/recycle/recycle.conf $RPM_BUILD_ROOT/etc/samba/
+install -m755 examples/VFS/block/block.so $RPM_BUILD_ROOT%{prefix}/lib/samba/vfs
+install -m644 examples/VFS/block/samba-block.conf $RPM_BUILD_ROOT/etc/samba/
+install -m755 examples/VFS/audit.so $RPM_BUILD_ROOT%{prefix}/lib/samba/vfs
+
+# clean out VFS directory since it will get installed as documentation later
+(cd examples/VFS; make clean)
+
+# libsmbclient
+install -m 755 source/bin/libsmbclient.so $RPM_BUILD_ROOT%{prefix}/lib/
+install -m 755 source/bin/libsmbclient.a $RPM_BUILD_ROOT%{prefix}/lib/
+install -m 644 source/include/libsmbclient.h $RPM_BUILD_ROOT%{prefix}/include/
+
# Install SWAT helper files
for i in swat/help/*.html docs/htmldocs/*.html
do
-install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/help
+ install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/help
done
for i in swat/images/*.gif
do
-install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/images
+ install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/images
done
for i in swat/include/*.html
do
-install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/include
+ install -m644 $i $RPM_BUILD_ROOT%{prefix}/share/swat/include
done
# Install the miscellany
install -m644 swat/README $RPM_BUILD_ROOT%{prefix}/share/swat
install -m755 packaging/RedHat/smbprint $RPM_BUILD_ROOT%{prefix}/bin
-install -m755 packaging/RedHat/findsmb $RPM_BUILD_ROOT%{prefix}/bin
install -m755 packaging/RedHat/smb.init $RPM_BUILD_ROOT/etc/rc.d/init.d/smb
+install -m755 packaging/RedHat/winbind.init $RPM_BUILD_ROOT/etc/rc.d/init.d/winbind
install -m755 packaging/RedHat/smb.init $RPM_BUILD_ROOT%{prefix}/sbin/samba
install -m644 packaging/RedHat/samba.log $RPM_BUILD_ROOT/etc/logrotate.d/samba
install -m644 packaging/RedHat/smb.conf $RPM_BUILD_ROOT/etc/samba/smb.conf
@@ -277,7 +322,9 @@ rm -rf $RPM_BUILD_ROOT
%post
/sbin/chkconfig --add smb
+/sbin/chkconfig --add winbind
/sbin/chkconfig smb off
+/sbin/chkconfig winbind off
echo "Looking for old /etc/smb.conf..."
if [ -f /etc/smb.conf -a ! -f /etc/samba/smb.conf ]; then
@@ -496,6 +543,10 @@ fi
%{prefix}/bin/smbcacls
%{prefix}/bin/wbinfo
%attr(755,root,root) /lib/libnss_wins.s*
+%attr(755,root,root) %{prefix}/lib/samba/vfs/*.so
+%{prefix}/include/libsmbclient.h
+%{prefix}/lib/libsmbclient.a
+%{prefix}/lib/libsmbclient.so
%{prefix}/share/swat/help/*
%{prefix}/share/swat/images/*
%{prefix}/share/swat/include/header.html
@@ -503,10 +554,13 @@ fi
%{prefix}/share/swat/using_samba/*
%config(noreplace) /etc/samba/lmhosts
%config(noreplace) /etc/samba/smb.conf
+%config(noreplace) /etc/samba/recycle.conf
+%config(noreplace) /etc/samba/samba-block.conf
%config(noreplace) /etc/samba/smbusers
/etc/samba/samba.stack
/etc/samba/samba.xinetd
/etc/rc.d/init.d/smb
+/etc/rc.d/init.d/winbind
/etc/logrotate.d/samba
%config(noreplace) /etc/pam.d/samba
MANDIR_MACRO/man1/*
@@ -520,3 +574,4 @@ MANDIR_MACRO/man8/*
%attr(1777,root,root) %dir /var/spool/samba
%attr(-,root,root) /lib/libnss_winbind.so
%attr(-,root,root) /lib/security/pam_winbind.so
+%attr(-,root,root) /lib/security/pam_smbpass.so
diff --git a/packaging/RedHat/smb.init b/packaging/RedHat/smb.init
index 260439281a3..f50da2c6b2a 100755
--- a/packaging/RedHat/smb.init
+++ b/packaging/RedHat/smb.init
@@ -13,8 +13,10 @@
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
+CONFIG=/etc/samba/smb.conf
+
# Check that smb.conf exists.
-[ -f /etc/samba/smb.conf ] || exit 0
+[ -f $CONFIG ] || exit 0
# See how we were called.
case "$1" in
@@ -27,8 +29,16 @@ case "$1" in
;;
stop)
echo -n "Shutting down SMB services: "
- killproc smbd
- killproc nmbd
+
+ ## we have to get all the smbd process here instead of just the
+ ## main parent (i.e. killproc) because it can take a long time
+ ## for an individual process to process a TERM signal
+ smbdpids=`ps guax | grep smbd | grep -v grep | awk '{print $2}'`
+ for pid in $smbdpids; do
+ kill -TERM $pid
+ done
+ ## nmbd is ok to kill using killproc()
+ killproc nmbd -TERM
rm -f /var/lock/subsys/smb
echo ""
;;
diff --git a/packaging/RedHat/winbind.init b/packaging/RedHat/winbind.init
new file mode 100644
index 00000000000..291c351df3a
--- /dev/null
+++ b/packaging/RedHat/winbind.init
@@ -0,0 +1,91 @@
+#!/bin/sh
+#
+# chkconfig: 345 81 45
+# description: Starts and stops the Samba winbind daemon to provide \
+# user and group information from a domain controller to linux.
+
+# Source function library.
+if [ -f /etc/init.d/functions ] ; then
+ . /etc/init.d/functions
+elif [ -f /etc/rc.d/init.d/functions ] ; then
+ . /etc/rc.d/init.d/functions
+else
+ exit 0
+fi
+
+# Source networking configuration.
+. /etc/sysconfig/network
+
+# Check that networking is up.
+[ ${NETWORKING} = "no" ] && exit 0
+
+# Check that smb.conf exists.
+[ -f /etc/samba/smb.conf ] || exit 0
+
+RETVAL=0
+
+
+start() {
+ echo -n "Starting Winbind services: "
+ RETVAL=1
+ if [ "`grep -i 'winbind uid' /etc/samba/smb.conf | egrep -v [\#\;]`" ]; then
+ daemon winbindd
+ RETVAL=$?
+ fi
+ echo
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/winbind || \
+ RETVAL=1
+ return $RETVAL
+}
+stop() {
+ echo -n "Shutting down Winbind services: "
+ RETVAL=1
+ if [ "`grep -i 'winbind uid' /etc/samba/smb.conf | egrep -v [\#\;]`" ]; then
+ killproc winbindd
+ RETVAL=$?
+ fi
+ echo
+ [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/winbind
+ return $RETVAL
+}
+restart() {
+ stop
+ start
+}
+reload() {
+ export TMPDIR="/var/tmp"
+ echo -n "Checking domain trusts: "
+ killproc winbindd -HUP
+ RETVAL=$?
+ echo
+ return $RETVAL
+}
+mdkstatus() {
+ status winbindd
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ restart
+ ;;
+ reload)
+ reload
+ ;;
+ status)
+ mdkstatus
+ ;;
+ condrestart)
+ [ -f /var/lock/subsys/winbindd ] && restart || :
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|status|condrestart}"
+ exit 1
+esac
+
+exit $?
diff --git a/packaging/SGI/findsmb b/packaging/SGI/findsmb
deleted file mode 100755
index c71837e3757..00000000000
--- a/packaging/SGI/findsmb
+++ /dev/null
@@ -1,150 +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 "\n *=DMB\n";
-print " +=LMB\n";
-print "IP 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 non group <00> name
-
- @name = grep(/<00> - /,@nmblookup);
- $_ = @name[0];
- if (not $_) {
-# try without the -r option
- open(NMBLOOKUP,"$SAMBABIN/nmblookup -A $ip|") ||
- die("Can't get nmb name list.\n");
- @nmblookup = <NMBLOOKUP>;
- close NMBLOOKUP;
- @name = grep(/<00> - /,@nmblookup);
- $_ = @name[0];
- }
- /(\S+)/;
- $name = $1;
-
- if (not $name) { # 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 name";
- }
- if (length($name) > 15) {
- $name = substr($name,0,15);
- }
-# do an smbclient command on the ip address
-
- open(SMB,"$SAMBABIN/smbclient -N -L '$ip' -I $ip -U% |") ||
- die("Can't do smbclient command.\n");
- @smb = <SMB>;
- close SMB;
- } else { # netbios name found
-
-# 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(16-length($name))."$master"."$_\n";
-
- }
-}
-
diff --git a/packaging/SGI/idb.pl b/packaging/SGI/idb.pl
index 0c903ea93f5..6b4785a2ac3 100755
--- a/packaging/SGI/idb.pl
+++ b/packaging/SGI/idb.pl
@@ -111,7 +111,7 @@ system("cp -f ../swat/README ../packaging/SGI/swat");
chdir $curdir;
# add my local files to the list of binaries to install
-@bins = sort byfilename (@sprogs,@progs,@progs1,@progs2,@mprogs,@scripts,@winbind_progs,@winbind_sprogs,("/findsmb","/sambalp","/smbprint"));
+@bins = sort byfilename (@sprogs,@progs,@progs1,@progs2,@mprogs,@scripts,@winbind_progs,@winbind_sprogs,("/sambalp","/smbprint"));
@nsswitch = sort byfilename (@winbind_lprogs,@winbind_pam_progs);
@@ -178,9 +178,6 @@ while(@bins) {
if ($filename eq "smbpasswd") {
print IDB "f 0755 root sys usr/samba/bin/$filename $SRCPFX/source/$nextfile $PKG.sw.base \n";
}
- elsif ($filename eq "findsmb") {
- print IDB "f 0755 root sys usr/samba/bin/$filename $SRCPFX/packaging/SGI/$filename $PKG.sw.base\n";
- }
elsif ($filename eq "swat") {
print IDB "f 4755 root sys usr/samba/bin/$filename $SRCPFX/source/$nextfile $PKG.sw.base preop(\"chroot \$rbase /etc/init.d/samba stop; exit 0\") exitop(\"chroot \$rbase /usr/samba/scripts/startswat.sh; exit 0\") 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; exit 0\")\n";
}
diff --git a/packaging/Solaris/i.swat b/packaging/Solaris/i.swat
index 047f0e17200..d07d2798d85 100644
--- a/packaging/Solaris/i.swat
+++ b/packaging/Solaris/i.swat
@@ -33,7 +33,7 @@ EOF
if [ ! -z "$PKG_INSTALL_ROOT" ]
then
- CAT <<EOF
+ cat <<EOF
The SWAT settings will not take effect till you send a hangup (HUP) signal
to inetd on the target system.
diff --git a/packaging/SuSE/8.0/samba.spec b/packaging/SuSE/8.0/samba.spec
index b0ebfaad942..37a3aeb9e24 100644
--- a/packaging/SuSE/8.0/samba.spec
+++ b/packaging/SuSE/8.0/samba.spec
@@ -153,6 +153,7 @@ make \
PIDDIR=%{PIDDIR}
make nsswitch
make nsswitch/libnss_wins.so
+( cd ../example/VFS; ./configure --prefix=%{_prefix} --libdir=%{LIBDIR} --sbindir=%{_sbindir} )
make -C ../examples/VFS
make -C ../examples/VFS/block