diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-04-03 23:33:47 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-04-03 23:47:26 +0200 |
commit | 5a026219a97e396284d30a33e1ab57c059be67e0 (patch) | |
tree | e7aa064fff19d254c14871a90468d63f648b9ae8 | |
parent | 13a6aee591e972413a522944d168257e17808ca3 (diff) | |
download | samba-5a026219a97e396284d30a33e1ab57c059be67e0.tar.gz samba-5a026219a97e396284d30a33e1ab57c059be67e0.tar.bz2 samba-5a026219a97e396284d30a33e1ab57c059be67e0.zip |
s4-python: Remove unused imports, duplicate definitions of SECINFO_ constants.
-rwxr-xr-x | source4/lib/ldb/tests/python/sec_descriptor.py | 12 | ||||
-rw-r--r-- | source4/scripting/python/pyglue.c | 6 |
2 files changed, 5 insertions, 13 deletions
diff --git a/source4/lib/ldb/tests/python/sec_descriptor.py b/source4/lib/ldb/tests/python/sec_descriptor.py index 4d03c0bd94..8b2a87992f 100755 --- a/source4/lib/ldb/tests/python/sec_descriptor.py +++ b/source4/lib/ldb/tests/python/sec_descriptor.py @@ -1,31 +1,29 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -import getopt import optparse import sys import os import base64 import re import random -import time sys.path.append("bin/python") import samba.getopt as options # Some error messages that are being tested -from ldb import SCOPE_SUBTREE, SCOPE_ONELEVEL, SCOPE_BASE, LdbError -from ldb import ERR_NO_SUCH_OBJECT, ERR_INVALID_DN_SYNTAX, ERR_UNWILLING_TO_PERFORM -from ldb import ERR_INSUFFICIENT_ACCESS_RIGHTS +from ldb import SCOPE_SUBTREE, SCOPE_BASE, LdbError +from ldb import ERR_NO_SUCH_OBJECT # For running the test unit from samba.ndr import ndr_pack, ndr_unpack from samba.dcerpc import security from samba.auth import system_session -from samba import Ldb, DS_DOMAIN_FUNCTION_2008, SECINFO_OWNER, \ - SECINFO_GROUP, SECINFO_DACL, SECINFO_SACL +from samba import Ldb, DS_DOMAIN_FUNCTION_2008 +from samba.dcerpc.security import ( + SECINFO_OWNER, SECINFO_GROUP, SECINFO_DACL, SECINFO_SACL) from subunit.run import SubunitTestRunner import unittest diff --git a/source4/scripting/python/pyglue.c b/source4/scripting/python/pyglue.c index 7b813a069a..37d75cd5a1 100644 --- a/source4/scripting/python/pyglue.c +++ b/source4/scripting/python/pyglue.c @@ -751,12 +751,6 @@ void initglue(void) PyModule_AddObject(m, "DS_DC_FUNCTION_2008", PyInt_FromLong(DS_DC_FUNCTION_2008)); PyModule_AddObject(m, "DS_DC_FUNCTION_2008_R2", PyInt_FromLong(DS_DC_FUNCTION_2008_R2)); - /* "LDAP_SERVER_SD_FLAGS_OID" */ - PyModule_AddObject(m, "SECINFO_OWNER", PyInt_FromLong(SECINFO_OWNER)); - PyModule_AddObject(m, "SECINFO_GROUP", PyInt_FromLong(SECINFO_GROUP)); - PyModule_AddObject(m, "SECINFO_DACL", PyInt_FromLong(SECINFO_DACL)); - PyModule_AddObject(m, "SECINFO_SACL", PyInt_FromLong(SECINFO_SACL)); - /* one of the most annoying things about python scripts is that they don't die when you hit control-C. This fixes that sillyness. As we do all database operations using |