1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

added check for one more error case

This commit is contained in:
Herb Lewis 0001-01-01 00:00:00 +00:00
parent 607c64fadb
commit 6cba6919eb

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.