diff options
| author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-10 10:29:45 +0100 |
|---|---|---|
| committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:49:10 +0100 |
| commit | eba25f5d1897fbe61e8d7c623fcacb647629bf07 (patch) | |
| tree | 43add324bb10abc923038f858cb8f08dc542757a /source4/scripting/python/samba/__init__.py | |
| parent | 2e5f282a7eb6eca63e7a20d7830adb937ed32be4 (diff) | |
| download | samba-eba25f5d1897fbe61e8d7c623fcacb647629bf07.tar.gz samba-eba25f5d1897fbe61e8d7c623fcacb647629bf07.tar.bz2 samba-eba25f5d1897fbe61e8d7c623fcacb647629bf07.zip | |
r26375: Move provision-independent utility function to main samba python module.
(This used to be commit 9d0ff47be069422de7ef2794357c6f3e9c540e67)
Diffstat (limited to 'source4/scripting/python/samba/__init__.py')
| -rw-r--r-- | source4/scripting/python/samba/__init__.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/scripting/python/samba/__init__.py b/source4/scripting/python/samba/__init__.py index 46d8ff7d372..00b82e18007 100644 --- a/source4/scripting/python/samba/__init__.py +++ b/source4/scripting/python/samba/__init__.py @@ -55,3 +55,12 @@ def substitute_var(text, values): return text + +def valid_netbios_name(name): + """Check whether a name is valid as a NetBIOS name. """ + # FIXME: There are probably more constraints here. + # crh has a paragraph on this in his book (1.4.1.1) + if len(name) > 13: + return False + return True + |
