finally:
f.close()
+
MAX_NETBIOS_NAME_LEN = 15
+
+
def is_valid_netbios_char(c):
return (c.isalnum() or c in " !#$%&'()-.@^_{}~")
if in_source_tree():
extra_path = os.path.join(source_tree_topdir(), source_tree_container,
location)
- if not extra_path in sys.path:
+ if extra_path not in sys.path:
sys.path.insert(0, extra_path)
sys.modules[modulename] = __import__(modulename)
else:
"""return a DN from a DNS name domain/forest root"""
return "DC=" + ",DC=".join(dnsdomain.split("."))
+
def current_unix_time():
return int(time.time())
+
def string_to_byte_array(string):
blob = [0] * len(string)
return blob
+
def arcfour_encrypt(key, data):
from samba.crypto import arcfour_crypt_blob
return arcfour_crypt_blob(data, key)
+
version = _glue.version
interface_ips = _glue.interface_ips
fault_setup = _glue.fault_setup