summaryrefslogtreecommitdiff
path: root/packaging/SGI
diff options
context:
space:
mode:
authorHerb Lewis <herb@samba.org>1998-03-25 00:20:52 +0000
committerHerb Lewis <herb@samba.org>1998-03-25 00:20:52 +0000
commit6cba6919ebf65691d2fb6a880da038a6dff9f6b1 (patch)
tree238461c53590e3eb8e6fbeddd2ac273ef6bb7cfa /packaging/SGI
parent607c64fadbf8c33459444466630f676800cba5ee (diff)
downloadsamba-6cba6919ebf65691d2fb6a880da038a6dff9f6b1.tar.gz
added check for one more error case
Diffstat (limited to 'packaging/SGI')
-rwxr-xr-xpackaging/SGI/findsmb14
1 files changed, 11 insertions, 3 deletions
diff --git a/packaging/SGI/findsmb b/packaging/SGI/findsmb
index 82aeb28dab3..4cb3c80a428 100755
--- a/packaging/SGI/findsmb
+++ b/packaging/SGI/findsmb
@@ -65,9 +65,17 @@ foreach $ip (@ipaddrs) # loop through each IP address found
@name = grep(/<00>/,@nmblookup);
$_ = @name[0];
- if ($_) { # we have a netbios name
- /(\S+)/;
- $name = $1;
+ 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.