1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

added check for one more error case

(This used to be commit 6cba6919ebf65691d2fb6a880da038a6dff9f6b1)
This commit is contained in:
Herb Lewis 1998-03-25 00:20:52 +00:00
parent 8c5c093b96
commit ff71b96f42

View File

@ -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.