Hi Matthieu,
Author: Matthieu Patou m...@matws.net
Date: Thu Oct 28 13:09:51 2010 +0400
provision: when deriving netbiosname from hostname force the netbiosname
to be compliant
It means no space/_/-/@ and less than 16 chars.
What's wrong with '-'? It's allowed in
Hi Metze
Date: Thu Oct 28 13:09:51 2010 +0400
provision: when deriving netbiosname from hostname force the netbiosname
to be compliant
It means no space/_/-/@ and less than 16 chars.
What's wrong with '-'? It's allowed in netbios and dns names.
See
On Sat, 2010-10-30 at 20:04 +0400, Matthieu Patou wrote:
Hi Metze
Date: Thu Oct 28 13:09:51 2010 +0400
provision: when deriving netbiosname from hostname force the
netbiosname to be compliant
It means no space/_/-/@ and less than 16 chars.
What's wrong with '-'?
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