summaryrefslogtreecommitdiff
path: root/source4/scripting/python/samba/netcmd/netacl.py
diff options
context:
space:
mode:
authorNadezhda Ivanova <nadezhda.ivanova@postpath.com>2010-03-16 13:06:08 +0200
committerNadezhda Ivanova <nadezhda.ivanova@postpath.com>2010-03-16 13:37:48 +0200
commita212c1dedb749b98d17c67db4278d1f1bb66d468 (patch)
treeff76fd7e68c2f91c4a3de65318512095c61147c8 /source4/scripting/python/samba/netcmd/netacl.py
parent4379b082b80e4976120860310259248eea09f863 (diff)
downloadsamba-a212c1dedb749b98d17c67db4278d1f1bb66d468.tar.gz
samba-a212c1dedb749b98d17c67db4278d1f1bb66d468.tar.bz2
samba-a212c1dedb749b98d17c67db4278d1f1bb66d468.zip
Added a net acl ds command for modification of ACLs on directory objects
At present the command supports only addition of control access rigts, done so DRS access checks can be tested. It will be expanded to deal with most ways to modify and view a DS ACL. Shifted commands a bit. What used to be net acl is now "net acl nt" as apposed to this, which is "net acl ds" ./bin/net acl ds set --help Usage: set --objectdn=objectdn --car=control right --action=[deny|allow] --trusteedn=trustee-dn Options: -h, --help show this help message and exit --host=HOST LDB URL for database or target server --car=CAR The access control right to allow or deny --action=ACTION Deny or allow access --objectdn=OBJECTDN DN of the object whose SD to modify --trusteedn=TRUSTEEDN DN of the entity that gets access Samba Common Options: -s FILE, --configfile=FILE Configuration file Credentials Options: --simple-bind-dn=DN DN to use for a simple bind --password=PASSWORD Password -U USERNAME, --username=USERNAME Username -W WORKGROUP, --workgroup=WORKGROUP Workgroup -N, --no-pass Don't ask for a password -k KERBEROS, --kerberos=KERBEROS Use Kerberos
Diffstat (limited to 'source4/scripting/python/samba/netcmd/netacl.py')
-rw-r--r--source4/scripting/python/samba/netcmd/netacl.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/source4/scripting/python/samba/netcmd/netacl.py b/source4/scripting/python/samba/netcmd/netacl.py
new file mode 100644
index 0000000000..48e353a75f
--- /dev/null
+++ b/source4/scripting/python/samba/netcmd/netacl.py
@@ -0,0 +1,36 @@
+#!/usr/bin/python
+#
+# Manipulate ACLs
+#
+# Copyright (C) Matthieu Patou <mat@matws.net> 2010
+# Copyright (C) Nadezhda Ivanova <nivanova@samba.org> 2010
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+import samba.getopt as options
+import os
+
+from samba.netcmd import (
+ SuperCommand,
+ )
+from samba.netcmd.ntacl import cmd_nt_acl
+from samba.netcmd.dsacl import cmd_ds_acl
+
+class cmd_acl(SuperCommand):
+ """NT ACLs manipulation"""
+
+ subcommands = {}
+ subcommands["nt"] = cmd_nt_acl()
+ subcommands["ds"] = cmd_ds_acl()