summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-04-03 23:18:23 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-04-03 23:47:25 +0200
commit13a6aee591e972413a522944d168257e17808ca3 (patch)
tree8af6dfe0578bc1b0337f94a9941b8f4eba55b81b
parent3ec8147105267f2f890b4e605221a4347f51c644 (diff)
downloadsamba-13a6aee591e972413a522944d168257e17808ca3.tar.gz
samba-13a6aee591e972413a522944d168257e17808ca3.tar.bz2
samba-13a6aee591e972413a522944d168257e17808ca3.zip
s4-python: Remove duplicate definition of GUID_DRS_* constants.
-rw-r--r--source4/scripting/python/pyglue.c15
-rw-r--r--source4/scripting/python/samba/__init__.py16
-rw-r--r--source4/scripting/python/samba/netcmd/dsacl.py19
-rw-r--r--source4/scripting/python/samba/netcmd/netacl.py3
4 files changed, 10 insertions, 43 deletions
diff --git a/source4/scripting/python/pyglue.c b/source4/scripting/python/pyglue.c
index 8fe764c808..7b813a069a 100644
--- a/source4/scripting/python/pyglue.c
+++ b/source4/scripting/python/pyglue.c
@@ -757,21 +757,6 @@ void initglue(void)
PyModule_AddObject(m, "SECINFO_DACL", PyInt_FromLong(SECINFO_DACL));
PyModule_AddObject(m, "SECINFO_SACL", PyInt_FromLong(SECINFO_SACL));
- /* control access rights guids */
- PyModule_AddObject(m, "GUID_DRS_ALLOCATE_RIDS", PyString_FromString(GUID_DRS_ALLOCATE_RIDS));
- PyModule_AddObject(m, "GUID_DRS_CHANGE_DOMAIN_MASTER", PyString_FromString(GUID_DRS_CHANGE_DOMAIN_MASTER));
- PyModule_AddObject(m, "GUID_DRS_CHANGE_INFR_MASTER", PyString_FromString(GUID_DRS_CHANGE_INFR_MASTER));
- PyModule_AddObject(m, "GUID_DRS_CHANGE_PDC", PyString_FromString(GUID_DRS_CHANGE_PDC));
- PyModule_AddObject(m, "GUID_DRS_CHANGE_RID_MASTER", PyString_FromString(GUID_DRS_CHANGE_RID_MASTER));
- PyModule_AddObject(m, "GUID_DRS_CHANGE_SCHEMA_MASTER", PyString_FromString(GUID_DRS_CHANGE_SCHEMA_MASTER));
- PyModule_AddObject(m, "GUID_DRS_GET_CHANGES", PyString_FromString(GUID_DRS_GET_CHANGES));
- PyModule_AddObject(m, "GUID_DRS_GET_ALL_CHANGES", PyString_FromString(GUID_DRS_GET_ALL_CHANGES));
- PyModule_AddObject(m, "GUID_DRS_GET_FILTERED_ATTRIBUTES", PyString_FromString(GUID_DRS_GET_FILTERED_ATTRIBUTES));
- PyModule_AddObject(m, "GUID_DRS_MANAGE_TOPOLOGY", PyString_FromString(GUID_DRS_MANAGE_TOPOLOGY));
- PyModule_AddObject(m, "GUID_DRS_MONITOR_TOPOLOGY", PyString_FromString(GUID_DRS_MONITOR_TOPOLOGY));
- PyModule_AddObject(m, "GUID_DRS_REPL_SYNCRONIZE", PyString_FromString(GUID_DRS_REPL_SYNCRONIZE));
- PyModule_AddObject(m, "GUID_DRS_RO_REPL_SECRET_SYNC", PyString_FromString(GUID_DRS_RO_REPL_SECRET_SYNC));
-
/* 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
diff --git a/source4/scripting/python/samba/__init__.py b/source4/scripting/python/samba/__init__.py
index 50ecde2829..08c229eef4 100644
--- a/source4/scripting/python/samba/__init__.py
+++ b/source4/scripting/python/samba/__init__.py
@@ -461,19 +461,3 @@ SECINFO_OWNER = glue.SECINFO_OWNER
SECINFO_GROUP = glue.SECINFO_GROUP
SECINFO_DACL = glue.SECINFO_DACL
SECINFO_SACL = glue.SECINFO_SACL
-
-#control access rights guids
-GUID_DRS_ALLOCATE_RIDS = glue.GUID_DRS_ALLOCATE_RIDS
-GUID_DRS_CHANGE_DOMAIN_MASTER = glue.GUID_DRS_CHANGE_DOMAIN_MASTER
-GUID_DRS_CHANGE_INFR_MASTER = glue.GUID_DRS_CHANGE_INFR_MASTER
-GUID_DRS_CHANGE_PDC = glue.GUID_DRS_CHANGE_PDC
-GUID_DRS_CHANGE_RID_MASTER = glue.GUID_DRS_CHANGE_RID_MASTER
-GUID_DRS_CHANGE_SCHEMA_MASTER = glue.GUID_DRS_CHANGE_SCHEMA_MASTER
-GUID_DRS_GET_CHANGES = glue.GUID_DRS_GET_CHANGES
-GUID_DRS_GET_ALL_CHANGES = glue.GUID_DRS_GET_ALL_CHANGES
-GUID_DRS_GET_FILTERED_ATTRIBUTES = glue.GUID_DRS_GET_FILTERED_ATTRIBUTES
-GUID_DRS_MANAGE_TOPOLOGY = glue.GUID_DRS_MANAGE_TOPOLOGY
-GUID_DRS_MONITOR_TOPOLOGY = glue.GUID_DRS_MONITOR_TOPOLOGY
-GUID_DRS_REPL_SYNCRONIZE = glue.GUID_DRS_REPL_SYNCRONIZE
-GUID_DRS_RO_REPL_SECRET_SYNC = glue.GUID_DRS_RO_REPL_SECRET_SYNC
-
diff --git a/source4/scripting/python/samba/netcmd/dsacl.py b/source4/scripting/python/samba/netcmd/dsacl.py
index d5d39aa69a..f846b26345 100644
--- a/source4/scripting/python/samba/netcmd/dsacl.py
+++ b/source4/scripting/python/samba/netcmd/dsacl.py
@@ -18,21 +18,22 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-from samba.credentials import DONT_USE_KERBEROS
import samba.getopt as options
from samba.dcerpc import security
-from samba import Ldb
from samba.samdb import SamDB
from samba.ndr import ndr_unpack, ndr_pack
-from samba import GUID_DRS_ALLOCATE_RIDS, GUID_DRS_CHANGE_DOMAIN_MASTER, \
- GUID_DRS_CHANGE_INFR_MASTER, GUID_DRS_CHANGE_PDC, GUID_DRS_CHANGE_RID_MASTER, \
- GUID_DRS_CHANGE_SCHEMA_MASTER, GUID_DRS_GET_CHANGES, GUID_DRS_GET_ALL_CHANGES, \
- GUID_DRS_GET_FILTERED_ATTRIBUTES, GUID_DRS_MANAGE_TOPOLOGY, \
- GUID_DRS_MONITOR_TOPOLOGY, GUID_DRS_REPL_SYNCRONIZE, GUID_DRS_RO_REPL_SECRET_SYNC
+from samba.dcerpc.security import (
+ GUID_DRS_ALLOCATE_RIDS, GUID_DRS_CHANGE_DOMAIN_MASTER,
+ GUID_DRS_CHANGE_INFR_MASTER, GUID_DRS_CHANGE_PDC,
+ GUID_DRS_CHANGE_RID_MASTER, GUID_DRS_CHANGE_SCHEMA_MASTER,
+ GUID_DRS_GET_CHANGES, GUID_DRS_GET_ALL_CHANGES,
+ GUID_DRS_GET_FILTERED_ATTRIBUTES, GUID_DRS_MANAGE_TOPOLOGY,
+ GUID_DRS_MONITOR_TOPOLOGY, GUID_DRS_REPL_SYNCRONIZE,
+ GUID_DRS_RO_REPL_SECRET_SYNC)
+
import ldb
-from ldb import SCOPE_BASE, SCOPE_SUBTREE
-import os
+from ldb import SCOPE_BASE
import re
from samba.auth import system_session
diff --git a/source4/scripting/python/samba/netcmd/netacl.py b/source4/scripting/python/samba/netcmd/netacl.py
index 48e353a75f..41764a56e1 100644
--- a/source4/scripting/python/samba/netcmd/netacl.py
+++ b/source4/scripting/python/samba/netcmd/netacl.py
@@ -19,9 +19,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-import samba.getopt as options
-import os
-
from samba.netcmd import (
SuperCommand,
)