summaryrefslogtreecommitdiffstats
path: root/packaging/PHT/TurboLinux/findsmb
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/PHT/TurboLinux/findsmb')
-rwxr-xr-xpackaging/PHT/TurboLinux/findsmb4
1 files changed, 4 insertions, 0 deletions
diff --git a/packaging/PHT/TurboLinux/findsmb b/packaging/PHT/TurboLinux/findsmb
index f70d18dcbdc..04bc6080508 100755
--- a/packaging/PHT/TurboLinux/findsmb
+++ b/packaging/PHT/TurboLinux/findsmb
@@ -73,6 +73,9 @@ foreach $ip (@ipaddrs) # loop through each IP address found
$name = "unknown nis name";
}
} else {
+# 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,6 +106,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found
@name = grep(/<00> - <GROUP>/,@nmblookup);
$_ = @name[0];
if ($_) {
+# Same as before for space and characters
/(.{1,15})\s+<00>\s+/;
$_ = "[$1]";
} else {