diff options
Diffstat (limited to 'packaging/Mandrake')
-rwxr-xr-x | packaging/Mandrake/findsmb | 23 | ||||
-rw-r--r-- | packaging/Mandrake/samba2.spec.tmpl | 24 |
2 files changed, 32 insertions, 15 deletions
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) |