1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
Commit Graph

58 Commits

Author SHA1 Message Date
Jelmer Vernooij
21ab06f8a2 s4-python: Move samdb_ntds_objectGUID to pydsdb. 2010-04-07 17:39:59 +02:00
Jelmer Vernooij
449bdf3543 s4-python: Move set_session_info to PySambaLdb. 2010-04-06 13:12:43 +02:00
Jelmer Vernooij
55b98e9768 s4-python: Move register_samba_handlers to PySambaLdb. 2010-04-06 13:12:43 +02:00
Jelmer Vernooij
e9c3f2ef13 s4-python: Move ldb_set_utf8_casefold to pyldb-samba. 2010-04-06 13:12:43 +02:00
Jelmer Vernooij
b72a5c0336 Move glue.set_credentials hack to samba.Ldb. 2010-04-06 13:12:43 +02:00
Jelmer Vernooij
099fc00b60 Add C-based Samba-specific subclass of Ldb. 2010-04-06 13:12:43 +02:00
Jelmer Vernooij
55aeb682ba s4-python: Move dsdb_convert_schema_to_openldap to dsdb. 2010-04-04 00:42:52 +02:00
Jelmer Vernooij
2a67eda98f s4-python: Move set_opaque_integer -> dsdb. 2010-04-04 00:40:01 +02:00
Jelmer Vernooij
aed295b97e s4-python: Remove convenience macro PyErr_SetStringError.
This macro assumed that all errors were runtime errors.
2010-04-04 00:22:29 +02:00
Jelmer Vernooij
8afd52a641 s4-python: Move samdb_server_site_name to dsdb module. 2010-04-04 00:21:09 +02:00
Jelmer Vernooij
31a517e172 s4-python: Move dsdb constants to a separate python module. 2010-04-04 00:14:23 +02:00
Jelmer Vernooij
5a026219a9 s4-python: Remove unused imports, duplicate definitions of SECINFO_ constants. 2010-04-03 23:47:26 +02:00
Jelmer Vernooij
13a6aee591 s4-python: Remove duplicate definition of GUID_DRS_* constants. 2010-04-03 23:47:25 +02:00
Andrew Tridgell
2c097b51cb s4-pyglue: setup talloc logging in python modules 2010-04-02 18:52:29 +11:00
Andrew Bartlett
775c5ec1c5 s4:dsdb Remove unused 'dsdb_make_schema_global' call from pyglue 2010-03-22 20:24:40 +11:00
Nadezhda Ivanova
a212c1dedb 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
2010-03-16 13:37:48 +02:00
Andrew Bartlett
2de07761e0 s4:dsdb Change dsdb_get_schema() callers to use new talloc argument
This choses an appropriate talloc context to attach the schema too,
long enough lived to ensure it does not go away before the operation
compleates.

Andrew Bartlett
2010-03-16 19:26:03 +11:00
Andrew Bartlett
3723e32e8c s4:samba_dnsupdate Add a 'file based' mode to samba_dnsupdate
For the testsuite to use DNS like names, we need to write these names
to a file.

Also, to have this run in 'make test' the usual rules about 'no 127.*'
IP addresses in DNS must be skipped, so glue.interface_ips takes two
arguments now
2010-03-11 11:27:48 +11:00
Stefan Metzmacher
d2cd0a783b s4:pyglue: add generate_random_password()
metze
2010-02-26 08:57:30 +01:00
Andrew Tridgell
cb8d1e01f0 samdb: added get_ntds_GUID() method 2010-02-26 13:59:17 +11:00
Andrew Tridgell
1e66ec832e pyglue: added py_samdb_server_site_name() 2010-02-26 13:59:17 +11:00
Andrew Tridgell
abf55033df pyglue: added py_samdb_ntds_invocation_id() 2010-02-26 13:59:17 +11:00
Andrew Tridgell
af70728b51 pyglue: don't return 127.0.0.0/8 IPs in interface_ips()
We don't generally want loopback addresses in the python code
2010-02-26 13:59:16 +11:00
Andrew Tridgell
cb7ab80ee8 s4-pyglue: added interface_ips() call
This allows a python script to query the internal network interface
lists from Samba
2010-02-23 13:48:20 +01:00
Fernando J V da Silva
cf1ed0678a s4-drs: Function for accessing dsdb_load_partition_usn from Python
Returns both uSNHighest and uSNUrgent as a dict object in Python
from a given partition dn.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-02-15 21:57:08 +11:00
Matthias Dieter Wallnöfer
e34637b2a6 s4:Remove "Py_RETURN_NONE" compatibility code
This was needed only by Python 2.3 which we no longer support.
2010-02-09 17:53:09 +01:00
Matthieu Patou
c80ecd9964 s4: add python bindings for wrap_(s|g)etxattr 2010-01-21 07:11:13 +13:00
Jelmer Vernooij
ea5af6e30c pyldb: Add dom_sid.split in favor of less powerful dom_sid_to_rid().
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-12-31 17:33:30 +11:00
Nadezhda Ivanova
a760f169f4 Some changes to allow processing of ldap controls on modify requests.
ldap_backend used to filter out ldap controls on modify. Also, modified
python binding for ldap_modify to allow writing tests for such controls.
2009-11-20 13:22:38 +02:00
Matthias Dieter Wallnöfer
49397a8b3e s4:samdb python bindings - add a wrapper for "dsdb_make_schema_global" 2009-11-05 11:56:22 +01:00
Matthias Dieter Wallnöfer
b2e91d4119 s4:samdb python bindings - Reorder some function bodies to match the order in "ldb_wrap_connect" 2009-11-05 11:56:22 +01:00
Andrew Tridgell
e7d9f5eea5 s4-python: fixed annoyance where control-C doesn't kill our python scripts
We want our scripts to die immediately when a user hits
control-C. Otherwise we not only annoy the hell out of the user, we
also risk db corruption as the control-C could get delivered as an
exception which gets mis-interpreted (eg. as a missing db object). We
use transactions for all our databases, so the right thing to do in
all our command line tools is to die immediately.
2009-10-25 13:15:18 +11:00
Andrew Tridgell
3050f83288 s4-python: we need to include Python.h first
If we don't include Python.h first then we get a pile of warnings due
to broken redefines of XOPEN_SOURCE in the Python includes.
2009-10-23 16:23:01 +11:00
Matthias Dieter Wallnöfer
bfb3eaabe7 s4/python: flags
- Introduce the "userAccountControl", "groupType" and "sAMAccountType" flags
- Corrects the "domain/forestFunctionality" and "domainControllerFunctionality" flags
2009-09-17 12:40:27 +02:00
Matthias Dieter Wallnöfer
aae07390e2 Revert "s4: Let the "setpassword" script finally use the "samdb_set_password" routine"
This reverts commit fdd62e9699.

abartlet and I agreed that this isn't the right way to enforce the password
policies. Sooner or later we've to control them anyway on the directory level.
2009-09-10 00:48:19 +02:00
Matthias Dieter Wallnöfer
fdd62e9699 s4: Let the "setpassword" script finally use the "samdb_set_password" routine
The "setpassword" script should use the "samdb_set_password" call to change
the NT user password. Windows Server tests show that "userPassword" is not the
right place to save the NT password and does not inherit the password complexity.
2009-09-07 12:29:34 +02:00
Andrew Tridgell
617bbd913d allow setting of the debug level in python from C 2009-09-03 18:36:09 +10:00
Andrew Bartlett
160c197b84 s4:python Add helper to get at the domain SID 2009-08-27 19:40:21 +10:00
Andrew Bartlett
a1da91174b s4:provison Add prefixes to ldb using same code a later modify will use
This allows us to test out the code that will do the modify of the
prefixMap, and to provide the bindings that may assist a future
upgrade script.

Andrew Bartlett
2009-08-26 13:49:10 +10:00
Matthias Dieter Wallnöfer
0a46fd630e s4:pyglue Add a wrapper for loading the correct UTF8 casefolder
Needed for special characters (e.g. in German "Umlaute")
2009-08-17 11:58:39 +02:00
Andrew Bartlett
51d2d3df6d s4:schema Allow a schema load on an unconnected database
This helps ensure we don't load the schema too often in the provision
(allowing a reference in of the schema before the modules load).

Andrew Bartlett
2009-08-17 09:50:56 +10:00
Andrew Bartlett
346aa6e093 s4:schema Provide a way to reference a loaded schema between ldbs
This allows us to load the schema against one ldb context, but apply
it to another.  This will be useful in the provision script, as we
need the schema before we start the LDAP server backend.

Adnrew Bartlett
2009-08-17 09:50:56 +10:00
Matthias Dieter Wallnöfer
159a33a7d4 s4:test for "primaryGroupToken"
Tests for the right behaviour of this introduced constructed attribute.
Since we don't support the read-only-ness of those attributes yet, I commented
some lines out.
Also I had to add a function for python which converts domain SIDs in RIDs.
And a small fix for the "groupType" test.
2009-08-11 12:59:17 +02:00
Jelmer Vernooij
d356669492 Remove pyldb_util and simply duplicate the 5-line function it contains,
rather than creating a separate shared library for it.
2009-07-18 16:11:21 +02:00
Andrew Bartlett
271b5af92e s4:dsdb Handle dc/domain/forest functional levels properly
Rather than have the functional levels scattered in 4 different,
unconnected locations, the provision script now sets it, and the
rootdse module maintains it's copy only as a cached view onto the
original values.

We also use the functional level to determine if we should store AES
Kerberos keys.

Andrew Bartlett
2009-07-16 09:23:35 +10:00
Andrew Bartlett
ba58edd0bc Add a way to set an opaque integer onto a samdb
This will allow us to set some more flags into ldb during the provision.
2009-07-16 09:23:35 +10:00
Jelmer Vernooij
6ace18904d Fix more unresolved symbols. 2009-06-02 18:05:41 +02:00
Andrew Bartlett
17aac8cad2 Remove ad2oLschema, insted call it directly from provision-backend
This removes a level of indirection via external binaries in the
provision-backend code, and also makes better use of our internal code
for loading schema from an LDIF file.

Remaining to do: Sort the output again, as the load from LDIF is
unsorted (also needed because the normal LDB load from sorted input is too slow
anyway, and is only needed here).

Andrew Bartlett
2009-03-05 16:52:11 +11:00
Jelmer Vernooij
ba5d6e6d70 Avoid using a utility header for Python replacements included in Samba,
since this will not be shipped with talloc/tdb/tevent/etc.
2009-01-08 12:20:20 +01:00
Tim Prouty
61a23c5eea s3/s4 build: Fix Py_RETURN_NONE to work with python versions < 2.4 2009-01-07 15:03:16 -08:00