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
commitff71b96f4265e16f128b3aab61993daca2309211 (patch)
tree0e010455f9de6d864f4b35b2dc678afe55a30a8a /packaging/SGI
parent8c5c093b9692a31530e1858e676c9843b5472083 (diff)
downloadsamba-ff71b96f4265e16f128b3aab61993daca2309211.tar.gz
samba-ff71b96f4265e16f128b3aab61993daca2309211.tar.bz2
samba-ff71b96f4265e16f128b3aab61993daca2309211.zip
added check for one more error case
(This used to be commit 6cba6919ebf65691d2fb6a880da038a6dff9f6b1)
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 82aeb28dab..4cb3c80a42 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.