def valid_netbios_name(name):
"""Check whether a name is valid as a NetBIOS name. """
# See crh's book (1.4.1.1)
if len(name)> 15:
return False
for x in name:
if not x.isalnum() and not x in " !#$%&'()-...@^_{}~":
return False
return True
So I guess this function is wrong.
Because I made my function based on this test ...
That function does allow -, it will return false if there are characters
that are not in that list. - is part of the list.
Sorry my fault next time I'll learn how to read :-)
Will fix it soon.
--
Matthieu Patou
Samba Team http://samba.org
Private repo http://git.samba.org/?p=mat/samba.git;a=summary