Andrew Tridgell
f6a9708b54
s4-ldb: increase minor version for 2 new functions
...
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Oct 19 01:27:44 UTC 2010 on sn-devel-104
2010-10-19 01:27:44 +00:00
Andrew Tridgell
d16fe72585
s4-ldb: cope with NULL oid in controls
...
the ldap server will mark a control with a NULL oid in order to remove
it. This prevents a O(n^2) cost in control handling.
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-19 11:22:35 +11:00
Andrew Tridgell
5f6c004dec
s4-ldb: added --relax cmdline option
...
this adds the relax control
2010-10-19 11:22:35 +11:00
Andrew Tridgell
ff456cd100
s4-ldb: added ldb_req_mark_untrusted() and ldb_req_is_untrusted()
...
these will be used to determine if a ldb request comes from an
untrusted source. We want requests over ldap:// to be marked untrusted
so we can reject unregistered controls
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-19 11:22:35 +11:00
Matthias Dieter Wallnöfer
dcbfcbbceb
ldb: always return PROTOCOL_ERROR if an operation is unsupported
...
That's exactly the behaviour of various LDAP servers.
2010-10-18 19:51:19 +00:00
Matthias Dieter Wallnöfer
8556602b04
ldb:"ldb_schema_attribute_by_name_internal" - switch back to 32bit counters
...
Use the signed counter for the binary search but use an unsigned one for
accessing the entry.
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Mon Oct 18 19:01:31 UTC 2010 on sn-devel-104
2010-10-18 19:01:31 +00:00
Matthias Dieter Wallnöfer
48cd89e25d
ldb:ldb_tdb.c - fix up counter variables
...
"find_element" returns an "int" since there is also the possibility that a
certain element doesn't exist - then "-1" is returned. But beside this
exception treat all other return values as unsigned.
2010-10-18 20:14:56 +02:00
Matthias Dieter Wallnöfer
94a445869c
ldb:ldb_tdb.c - improve the error outputs
...
- Fix indentation
- Include always the failing DN
- Reorder the outputs to make them consistent
2010-10-18 20:10:14 +02:00
Matthias Dieter Wallnöfer
3ead246062
s4:"util_ldb" - remove some really unused dependancies
2010-10-18 19:35:11 +02:00
Andrew Bartlett
034832ccd5
s4-ldb Add LDB_REQ_SET_LOCATION to help track handler use
...
This greatly assists in debugging what is going on with the
ldb handle, as it indicates where it was created.
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Oct 18 11:54:46 UTC 2010 on sn-devel-104
2010-10-18 11:54:46 +00:00
Andrew Bartlett
48c54f9ec8
ldb Ensure we mark ongoing LDAP requests as PENDING
2010-10-18 11:13:04 +00:00
Andrew Bartlett
dab426476f
Revert "s4:dsdb - make the RELAX control private"
...
This must be available to the OpenLDAP backend, to set the GUID values
in some situations. We need a proper ACL mechanism to control the use
or abuse of this control.
This reverts commit 10adee8936
.
2010-10-18 00:16:17 +00:00
Matthias Dieter Wallnöfer
a3f61dea40
Revert "s4:remove "util_ldb" submodule and integrate the three gendb_* calls in "dsdb/common/util.c""
...
This reverts commit 8a2ce5c47c
.
Jelmer pointed out that these are also in use by other LDB databases - not only
SAMDB ones.
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Oct 17 13:37:16 UTC 2010 on sn-devel-104
2010-10-17 13:37:16 +00:00
Matthias Dieter Wallnöfer
8a2ce5c47c
s4:remove "util_ldb" submodule and integrate the three gendb_* calls in "dsdb/common/util.c"
...
They're only in use by SAMDB code.
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Oct 17 09:40:13 UTC 2010 on sn-devel-104
2010-10-17 09:40:13 +00:00
Matthias Dieter Wallnöfer
e1078d2de2
s4:ldb-samba/ldb_wrap.c - fix indentation and trailing whitespaces
2010-10-17 10:23:41 +02:00
Matthias Dieter Wallnöfer
be4a0d35ac
s4:"wrap_casefold" - move it to "ldb_wrap.c" since it's only used there
2010-10-17 10:20:40 +02:00
Matthias Dieter Wallnöfer
10adee8936
s4:dsdb - make the RELAX control private
...
This makes our LDAP much more secure and less error-prone.
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sat Oct 16 19:43:36 UTC 2010 on sn-devel-104
2010-10-16 19:43:36 +00:00
Matthias Dieter Wallnöfer
c4739f7be8
ldb:ldb.h - reorder controls/extended operations
...
This makes it easier to read
2010-10-16 20:45:08 +02:00
Matthias Dieter Wallnöfer
dd0f22d446
ldb:pyldb.c - remove pointless comment
...
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sat Oct 16 14:38:58 UTC 2010 on sn-devel-104
2010-10-16 14:38:58 +00:00
Matthias Dieter Wallnöfer
39d11a977d
ldb:"ldb_dn_compare_base" - use "unsigned int" counters
...
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sat Oct 16 13:54:13 UTC 2010 on sn-devel-104
2010-10-16 13:54:13 +00:00
Matthias Dieter Wallnöfer
531d7f569e
ldb:"ldb_dn_add_child" - use "unsigned int" counters
2010-10-16 15:11:45 +02:00
Matthias Dieter Wallnöfer
1557acb44a
ldb:"ldb_dn_remove_base_components" - use an "unsigned int" counter
2010-10-16 15:04:57 +02:00
Matthias Dieter Wallnöfer
19e94349b3
ldb:"ldb_dn_canonical" - use an "unsigned int" counter
...
Convert it to use an "unsigned int" counter which represents the exact length
of the DN components.
2010-10-16 14:57:52 +02:00
Matthias Dieter Wallnöfer
88e5375ad3
s4:ldif_handlers.c - fix a typo
2010-10-16 12:42:06 +02:00
Matthias Dieter Wallnöfer
f794563267
s4:lib/registry/util.c - cosmetic - fix indentation, trailing whitespaces
...
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Fri Oct 15 07:27:07 UTC 2010 on sn-devel-104
2010-10-15 07:27:07 +00:00
Matthias Dieter Wallnöfer
7be36a0bd9
s4:lib/registry/util.c - strtoll call - better say explicitly that data is in hex format
...
Template is commit deebc934ed
from Wilco.
2010-10-15 08:45:15 +02:00
Andrew Bartlett
353d9bc3e4
s4-acl Merge sec_access_check() with se_access_check() from source3/
...
Andrew Bartlett
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2010-10-14 02:35:05 +00:00
Jelmer Vernooij
18ea6c5dce
ldb: Only build LIBLDB_MAIN when building ldb itself.
...
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Wed Oct 13 15:41:29 UTC 2010 on sn-devel-104
2010-10-13 15:41:29 +00:00
Matthias Dieter Wallnöfer
9bdea1b384
ldb:ldb_match.c - fix a counter type
2010-10-13 13:35:21 +00:00
Andrew Tridgell
d5e599204c
ldb: raise minor version number for new ldb_msg_match_error() function
...
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Oct 13 11:42:18 UTC 2010 on sn-devel-104
2010-10-13 11:42:17 +00:00
Andrew Tridgell
269143fa00
s4-ldb: take advantage of ldb_match_msg_error() in more places
...
this gives better error checking
2010-10-13 11:00:04 +00:00
Andrew Tridgell
180304516d
s4-ldb: use operator_fn syntax function in ldb_match code
...
this also fixes error handling in case of bad syntax, memory error
etc, which was previously conidered as a mismatch, but should return
an error
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-13 11:00:04 +00:00
Andrew Tridgell
d267c8b478
s4-ldb: implement an operator_fn for the ldb-samba syntaxes
...
this allows us to properly handle the LDB_OP_PRESENT operator on
deleted linked attributes
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-13 11:00:04 +00:00
Andrew Tridgell
3d75111fd6
s4-ldb: added an optional operator_fn in the schema syntax
...
this function takes the operator being invoked, which will allow
schema functions to provide more fine grained control over
comparisons.
The key bug this was introduced to fix is the incorrect handling of
the LDB_OP_PRESENT test for deleted linked attributes. The backends
are unaware of the deleted state of these links, so they cannot do a
LDB_OP_PRESENT test on their own.
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-13 11:00:04 +00:00
Andrew Tridgell
d95160ca2f
ldb: when running from build directory, use the build modules
...
we need to use the build modules, not the installed modules, so tests
run from the source directory are valid
Pair-Programmed-With: Jelmer Vernooij <jelmer@samba.org>
2010-10-13 11:00:03 +00:00
Andrew Bartlett
f768b32e37
libcli/security Provide a common, top level libcli/security/security.h
...
This will reduce the noise from merges of the rest of the
libcli/security code, without this commit changing what code
is actually used.
This includes (along with other security headers) dom_sid.h and
security_token.h
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Oct 12 05:54:10 UTC 2010 on sn-devel-104
2010-10-12 05:54:10 +00:00
Jelmer Vernooij
9d2e777e18
ldb: Build ildap module as shared object.
2010-10-11 15:13:16 +00:00
Jelmer Vernooij
837bcb9e0f
popt_credentials: Implement pending machine account manually, rather than through credentials.
2010-10-11 15:13:16 +00:00
Andrew Bartlett
13ba3464c0
ldb The use of a private event context isn't a hack
...
This is deliberate behaviour.
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Oct 11 13:45:14 UTC 2010 on sn-devel-104
2010-10-11 13:45:13 +00:00
Andrew Bartlett
7013a3e390
s4-ldb Allow a NULL event context in samba_ldb_init()
2010-10-11 13:02:16 +00:00
Andrew Bartlett
1555d5acf5
s4-ldb Don't use talloc_autofree_context() in ldb
...
The private event context only needs to live as long as ldb itself.
Andrew Bartlett
2010-10-11 13:02:16 +00:00
Andrew Bartlett
69199a96d1
s4-tevent Remove event_contex_find() and event_context_set_default()
...
It is considered that it is better to create a new event context
rather than 'finding' some other event context, in the case
where we do not have one specified.
Andrew Bartlett
2010-10-11 13:02:16 +00:00
Jelmer Vernooij
d74e0adb30
credentials: Split up into several subsystems.
2010-10-11 02:06:03 +00:00
Jelmer Vernooij
5324b943e7
wafsamba: Fix handling of pyembed/pyext.
2010-10-10 23:54:04 +00:00
Jelmer Vernooij
e2f3e10b1a
ldb-samba: Rename samdb_relative_path to ldb_relative_path, as it's not samdb-specific.
2010-10-10 23:45:23 +02:00
Jelmer Vernooij
c1884f31ea
ldb-samba: Add ldb_wrap_add, remove last schema reference from ldb_wrap.
2010-10-10 23:25:38 +02:00
Jelmer Vernooij
7f68870bc9
ldb-samba: Split up ldb_wrap_connect() a bit.
2010-10-10 23:09:06 +02:00
Jelmer Vernooij
938cb40290
ldb-samba: Add convenience function for doing a Samba-style LDB init.
2010-10-10 23:09:06 +02:00
Jelmer Vernooij
6280725b47
samdb: Handle schema setup in samdb, not in more generic ldbsamba.
2010-10-10 23:08:45 +02:00
Jelmer Vernooij
614c8ea986
tls: add missing dependency on util_tevent.
2010-10-10 23:08:12 +02:00
Jelmer Vernooij
c15e919a09
wafsamba: Clarify needs_python argument name, use pyembed/pyext where
...
applicable.
Allow using both pyembed and pyext, to prevent unresolved symbols.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Oct 10 03:54:01 UTC 2010 on sn-devel-104
2010-10-10 03:54:01 +00:00
Stefan Metzmacher
9300f922ae
s4:lib/tls: buffer writes in tstream_tls_push_function()
...
This works arround bugs in gnutls_handshake(),
which diesn't handle EAGAIN correctly, when they use the
push function.
Thanks to Marcel.Ritter@rrze.uni-erlangen.de and
Matthieu Patou <mat@samba.org> for the debugging work
on bug #7218 .
metze
2010-10-08 11:53:08 +02:00
Stefan Metzmacher
a3d44d5504
s4:lib/tls: make more clear what the immediate event is for
...
metze
2010-10-08 11:53:06 +02:00
Stefan Metzmacher
cce2f9dde4
s4:lib/tls: fix enabled logic in tstream_tls_params_server()
...
metze
2010-10-08 11:53:06 +02:00
Andrew Tridgell
bb0017615d
waf: fixed exit status of test suites
...
use RUN_COMMAND() to handle signal errors and exit status
2010-10-07 14:29:21 +11:00
Matthias Dieter Wallnöfer
933aef0bf4
s4:ldb_modules.c - fix a typo
2010-10-05 08:43:19 +00:00
Jelmer Vernooij
5548d3d41e
Add missing dependencies for com_err.
2010-10-05 00:38:35 +02:00
Jelmer Vernooij
6ea99a237d
ldb: Refer to ldb(3), not ldb(7).
2010-10-05 00:38:35 +02:00
Matthieu Patou
d09cfc04fb
unittests: add a test to avoid regression on previous fix
...
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Mon Oct 4 20:23:31 UTC 2010 on sn-devel-104
2010-10-04 20:23:31 +00:00
Matthieu Patou
9dcad792b6
pyldb: test return code before trying to talloc_steal
...
Otherwise you can have an error on the talloc_steal as the req can have
been not talloced yet
2010-10-04 19:42:19 +00:00
Jelmer Vernooij
8cec67fe61
registry: Make a two more functions static.
2010-10-04 13:52:09 +02:00
Matthias Dieter Wallnöfer
fba8e326f8
s4:patchfile_dotreg.c - use "size_t" when counting characters in DATA_BLOBs
...
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Oct 3 16:03:41 UTC 2010 on sn-devel-104
2010-10-03 16:03:41 +00:00
Jelmer Vernooij
beed95e3a2
heimdal: convert some subsystems to libraries, consistent with upstream heimdal.
2010-10-03 16:25:37 +02:00
Wilco Baan Hofman
e2eae17961
Make sure REG_SZ is properly written to a .reg file (not as hex(1)), fix trailing comma REG_BINARY.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-10-03 15:31:38 +02:00
Wilco Baan Hofman
a8adadbe5b
Fix issues addressed by Jelmer:
...
* Add a comment about why the reg_strhex_to_data_blob was added
* Fix int which should've been a boolean
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-10-03 15:31:38 +02:00
Wilco Baan Hofman
6e881dd86a
Fix patchfile_dotreg to write proper .reg files: 'hex(1..B):', 'dword:', etc
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-10-03 15:31:38 +02:00
Wilco Baan Hofman
2d4500deea
Fix registry editor to be compatible with Windows 7.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-10-03 15:31:37 +02:00
Wilco Baan Hofman
90d82870b0
5 uint32_t's should be set, not 5 bytes.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-10-03 15:31:37 +02:00
Wilco Baan Hofman
b3d2345bd1
The root key should be created as a root key, not subkey.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-10-03 15:31:37 +02:00
Wilco Baan Hofman
bc2098c459
Do not include the closing doublequote in .reg files.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-10-03 15:31:37 +02:00
Wilco Baan Hofman
deebc934ed
Fix hex():00,00,00 bugs and strtol dword bugs, these values are explicitly hex.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-10-03 15:31:37 +02:00
Wilco Baan Hofman
1ed896407f
Make sure we write the value stored in value, not line (doublequoted).
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-10-03 15:31:37 +02:00
Wilco Baan Hofman
a23aa3f5f1
Make sure that regf only writes to disk every five seconds or when flushed or destroyed
...
Brings speed up on a large .reg import from 17.5s to 0.95s, over 18 times faster
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-10-03 15:31:37 +02:00
Wilco Baan Hofman
927e4db090
Fix .reg file format parsing.
...
* multiline data
* doublequoted value name
* handle windows format CRLF
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-10-03 15:31:37 +02:00
Wilco Baan Hofman
4356f09d7f
Fix registry parsing of strings to also support the windows method.
...
Specifically: dword:00000000, hex:00,00,00,00, hex(0..B):00,00,00,00
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-10-03 15:31:37 +02:00
Andrew Tridgell
e36f20d39d
s4-ldif: get rid of the ndr_pull_error message on startup
...
detect if the prefixmap blob is text or binary using the first 4 bytes
2010-10-02 21:11:52 -07:00
Günther Deschner
0ff7e0c998
samba: share readline wrappers among all buildsystems.
...
Guenther
2010-10-01 22:30:22 +02:00
Günther Deschner
b38d0542e1
samba: share select wrappers.
...
Guenther
2010-10-01 22:30:22 +02:00
Andrew Tridgell
c83775d524
ldb-dn: don't crash on NULL in ldb_binary_encode_string()
...
Thanks to Nadya for finding this one!
2010-09-28 19:25:51 -07:00
Andrew Tridgell
491e89fa1c
ldb-tdb: ignore failure to register control on rootdse
...
this is expected for non-sam LDBs
2010-09-28 11:36:40 -07:00
Jelmer Vernooij
b4a5ece84a
ldb: Fix path to alternative buildtools.
2010-09-28 09:16:03 +02:00
Jelmer Vernooij
63928c82c1
ldb/tevent: Fix detection of waf paths.
2010-09-28 09:12:41 +02:00
Jelmer Vernooij
85443e0850
ldb: Update autogen-waf.sh to no longer overwrite existing files.
2010-09-28 09:12:40 +02:00
Jelmer Vernooij
72a41cc820
ldb: Remove samba-specific targets from Makefile.
2010-09-28 09:12:40 +02:00
Jelmer Vernooij
78b4b21b40
ldb: Bump version because of addition of ldb_req_location.
2010-09-28 09:12:40 +02:00
Stefan Metzmacher
ca360fba10
s4:lib/tls: add gnutls backend for tstream
...
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Sep 28 02:29:42 UTC 2010 on sn-devel-104
2010-09-28 02:29:42 +00:00
Andrew Tridgell
6676142347
s4-ildap: two more places that need talloc_reparent()
...
these contexts can have references
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Sep 28 00:04:03 UTC 2010 on sn-devel-104
2010-09-28 00:04:03 +00:00
Nadezhda Ivanova
aeedd29d39
s4-ldb: Added ldb_request_replace_control
...
It is the same as ldb_request_add_control, except it will replace
an existing control.
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Sep 27 19:00:38 UTC 2010 on sn-devel-104
2010-09-27 19:00:38 +00:00
Anatoliy Atanasov
ed7bbc993d
s4/irpc: Add function to add security token to the binding handle
2010-09-27 09:59:21 -07:00
Stefan Metzmacher
d9d4ded71a
s4:irpc: optionaly pass the security_token via IRPC requests.
...
metze
2010-09-27 09:59:21 -07:00
Jelmer Vernooij
296ff486e4
Check in configure/Makefile for those projects that have waf as primary build system.
2010-09-25 12:20:57 -07:00
Andrew Tridgell
f4893e7d33
ldb: added request location tracking
...
this is used to help debug async ldb requests. The ldb request handle
now contains a location string and the parent request pointer. This
allows us to print a backtrace of ldb requests in the dsdb modules.
2010-09-25 10:38:45 -07:00
Matthias Dieter Wallnöfer
9ca8214978
ldb:ldb_match.c - fix counter variable type
...
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-09-24 09:25:41 +10:00
Matthias Dieter Wallnöfer
0f163eb611
ldb:ldb_msg_add_linearized_dn - handle NULL DNs
...
Don't let the routine crash
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-09-24 09:25:41 +10:00
Stefan Metzmacher
224fbbe33f
s4:irpc: use LIBNDR_FLAG_REF_ALLOC for the server side when pulling
...
The dcerpc server also uses it, so it was surprising that the
IRPC server side doesn't used it.
The reason to have this is that we want to handle error cases
and returns like NT_STATUS_NOT_SUPPORTED sane, without crashing
while marshalling the response.
metze
Signed-off-by: Anatoliy Atanasov <anatoliy.atanasov@postpath.com>
2010-09-23 08:41:05 -07:00
Jelmer Vernooij
8dd0c8c546
ldb: Use waf as default build system.
2010-09-22 17:48:24 -07:00
Jelmer Vernooij
c031329af1
ldb: Depend directly on replace, fixes the build on systems with
...
tdb and tevent installed in the system.
2010-09-22 17:48:24 -07:00
Jelmer Vernooij
1c3c9a483b
s4-param: Fix more memory leaks, invalid memory context.
2010-09-22 17:48:24 -07:00
Jelmer Vernooij
e12e661f35
s4-selftest: Move more tests to scripting/python, simplifies running of tests.
2010-09-21 22:54:38 -07:00
Jelmer Vernooij
10da4b0422
pymessaging: Remove unused older python irpc bindings.
2010-09-21 22:54:32 -07:00
wilco@baanhofman.nl
1fc1be4685
Fix regf.idl, subkey and rootkey types were switched.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-09-19 12:34:55 -07:00
wilco@baanhofman.nl
7efcb3ca66
Fix file corruption (non-updated header) on new allocation.
...
Also fixes debug messages to use hex offsets.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-09-19 12:34:54 -07:00
wilco@baanhofman.nl
d0cef92532
Fix crash when no subkeys exist. Fix writing outside of buffer error by regf backend.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-09-19 12:34:54 -07:00
wilco@baanhofman.nl
2c3f56098b
Add python bindings for open_hive function to be able to load REGF files.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-09-19 12:34:54 -07:00
Kamen Mazdrashki
7b20b795ab
s4-irpc: Don't install endtime-timer in case timeout is INFINITE for the call
2010-09-16 00:15:38 +03:00
Kamen Mazdrashki
839ed051fc
s4-irpc: Add value for "infinite" timeout for IRPC calls
2010-09-16 00:15:37 +03:00
Andrew Tridgell
ce2004d631
s4: fixed some printf format errors
2010-09-15 15:39:35 +10:00
Andrew Tridgell
f6d85be528
s4-messaging: add support for no_reply in irpc messages
...
It can be useful for a irpc message to be one-way, where the client
sends a messages and the server does not reply. This will be used for
things like a triger message from an auth context to the drepl server
to tell it to try a REPL_SECRET on a user in a RODC.
Previously we've used raw messaging for messages that have no reply,
but that doesn't allow us to use messages described by IDL
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-15 15:39:34 +10:00
Matthias Dieter Wallnöfer
6e720ecd25
s4:SID handling - always encode the SID using "ldap_encode_ndr_dom_sid" for LDAP filters
...
This makes also lookups through special backends as "samba3sam" work.
2010-09-13 22:41:06 +02:00
Matthias Dieter Wallnöfer
1ddd63bddb
ldb:tools/cmdline.c - reorganise imports
2010-09-11 18:07:47 +02:00
Matthias Dieter Wallnöfer
5f98d31fc0
ldb:tools/cmdline.c - make a counter unsigned where appropriate
2010-09-11 17:43:44 +02:00
Matthias Dieter Wallnöfer
c0a863b6f3
s4:ldb_register_samba_handlers - fix up and convert result codes to LDB/LDAP results
2010-09-11 17:41:38 +02:00
Matthias Dieter Wallnöfer
9d4dc69627
s4:lib/policy/gp_filesys.c - remove dead code
...
Found out by Solaris cc
2010-09-10 22:45:50 +02:00
Andrew Tridgell
c95c3863df
pyldb: expose PyLdbDn_FromDn()
...
This is needed by the dsdb python interface
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-09 21:39:24 +10:00
Jelmer Vernooij
17e96d8194
popt_common: Add missing dependency on libsamba-hostconfig.
2010-09-08 22:11:23 +02:00
Andrew Tridgell
a8bac4a09a
s4-packet: make packet_recv_disable() a lot more efficient
...
this avoids doing an epoll system call when we want to prevent receipt
of packets on a socket, unless there actually is a packet to receive.
2010-09-07 12:55:27 +10:00
Matthieu Patou
e2d575ee80
python-ldb: allow ldb_rename to take optional control(s)
2010-09-05 12:29:20 +04:00
Jelmer Vernooij
261d9aaff0
ldb: Add missing aliases for ldb_ildap.
2010-09-04 17:59:48 +02:00
Stefan Metzmacher
0879571897
s4:lib/messaging: implement irpc_bh_set_timeout
...
metze
2010-09-04 09:01:14 +02:00
Stefan Metzmacher
31d3227074
s4:lib/messaging: make irpc_request private and remove unused code
...
metze
2010-09-03 17:02:11 +02:00
Stefan Metzmacher
a9078aad3c
s4:lib/messaging/tests: make use of irpc_binding_handle()
...
metze
2010-09-03 17:02:10 +02:00
Stefan Metzmacher
a65d1eb05c
s4:lib/messaging: use irpc_binding_handle() for python bindings
...
metze
2010-09-03 17:02:10 +02:00
Stefan Metzmacher
611357aee3
s4:lib/messaging: add irpc_binding_handle_by_name() helper function
...
metze
2010-09-03 17:00:18 +02:00
Stefan Metzmacher
e26f0abe91
s4:lib/messaging: add irpc dcerpc_binding_handle backend
...
metze
2010-09-03 17:00:18 +02:00
Stefan Metzmacher
328c7084f2
s4:lib/messaging: move messaging prototypes from irpc.h to messaging.h
...
metze
2010-09-03 17:00:17 +02:00
Stefan Metzmacher
8740caece0
s4:lib/messaging/tests: fix some compiler warnings
...
metze
2010-09-03 17:00:17 +02:00
Jelmer Vernooij
0bc53f7d9f
pidl: Keep only a single copy of samba.dcerpc.base.ClientConnection.
2010-09-03 02:39:38 +02:00
Björn Jacke
d45f901b93
s4/ldb: fix standalone build
2010-09-01 11:23:50 +02:00
Björn Jacke
60002600b8
s4/ldb: use monotonic clock for time deltas in ldbtest
2010-08-31 10:26:36 +02:00
Stefan Metzmacher
b4610cdb3b
s4:lib/messaging: add some const to messaging_send()
...
metze
2010-08-30 21:01:19 +02:00
Andrew Tridgell
470d87701b
s4-pyregistry: use s4_event_context_init()
...
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-23 15:55:39 +10:00
Andrew Tridgell
68fe347592
s4-event: event_context_find() should use s4_event_context_init()
...
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-23 15:55:39 +10:00
Andrew Bartlett
6cf29b3e4f
s4:security Change struct security_token->sids from struct dom_sid * to struct dom_sid
...
This makes the structure much more like NT_USER_TOKEN in the source3/
code. (The remaining changes are that privilages still need to be merged)
Andrew Bartlett
2010-08-23 08:50:55 +10:00
Jelmer Vernooij
bc69a9d0d8
Avoid use of Samba DTD, which requires net access.
2010-08-22 14:05:58 +02:00
Andrew Tridgell
d55b19b56a
pyldb: do type checking on the list form of ldb add
...
Pair-Programmed-With: Jelmer Vernooij <jelmer@samba.org>
2010-08-22 14:57:34 +10:00
Andrew Tridgell
a662bdc024
s4-ldb: added support for rodc_control in ldb
...
this allows you to specify the RODC join control in python ldb calls
or on the command line
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-20 20:34:11 +10:00
Andrew Bartlett
7c6ca95bec
s4:security Remove use of user_sid and group_sid from struct security_token
...
This makes the structure more like Samba3's NT_USER_TOKEN
2010-08-18 09:50:38 +10:00
Andrew Tridgell
56f04188df
s4-ldb: ensure element flags are zero in ldb search return
...
the distinguishedName element was getting an uninitialised flags value
2010-08-17 21:21:51 +10:00
Andrew Tridgell
bb2ba90663
s4-ldbwrap: ensure session_info in ldb opaque remains valid
...
A DRS DsBind handle can be re-used in a later connection. This implies
reuse of the session_info for the connection. If the first connection
is shutdown then the session_info in the sam context on the 2nd
connection must remain valid.
2010-08-17 21:21:51 +10:00
Andrew Tridgell
0caf347098
s4-ldb: added LDB_FLAG_INTERNAL_DISABLE_VALIDATION
...
When this flag is set on an element in an add/modify request then the
normal validate_ldb() call that checks the element against schema
constraints is disabled
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17 21:21:50 +10:00
Andrew Tridgell
9e27201b24
s4-ldb: added LDB_FLAG_INTERNAL_MASK
...
This ensures that internal bits for the element flags in add/modify
requests are not set via the ldb API
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17 21:21:50 +10:00
Andrew Tridgell
6baa834ebe
s4-ldb: use LDB_FLAG_MOD_TYPE() to extract element type from messages
...
The flags field of message elements is part of a set of flags. We had
LDB_FLAG_MOD_MASK for extracting the type, but it was only rarely
being used (only 1 call used it correctly). This adds
LDB_FLAG_MOD_MASK() to make it more obvious what is going on.
This will allow us to use some of the other flags bits for internal
markers on elements
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17 21:21:50 +10:00
Andrew Tridgell
191d632e23
s4-dsdb: added support for LDB_CONTROL_RODC_DCPROMO_OID
...
this control adds a unique msDS-SecondaryKrbTgtNumber attribute to a
user object.
There is some 'interesting' interaction with the rangeLower and
rangeUpper attributes and this add. We don't implementat
rangeLower/rangeUpper yet, but when we do we'll need an override for
this control (or be careful about module ordering).
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17 21:21:49 +10:00
Andrew Tridgell
045e04a2c6
s4-ldb: test the 'displayName=a,b' bug
...
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-08-17 08:44:28 +10:00
Andrew Tridgell
fd59a7c4af
s4-ldb: fixed the ldb 'displayName=a,b' indexing bug
...
the problem was the inconsistency between the key form of DNs between
the itdb used for indexing and the on disk form
Thanks to Matthieu Patou for finding this bug!
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-08-17 08:44:28 +10:00
Andrew Tridgell
1cc471d69f
s4-ldb: add some comments explaining the ltdb_index_idxptr() function
...
this function copes with alignment sensitive CPUs
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-08-17 08:44:28 +10:00
Andrew Tridgell
56db40d5fd
s4-build: use @PACKAGE_VERSION@ in s4 pc.in files
...
this gets replaced by vnum from the build rule
2010-08-09 12:27:23 +10:00
Andrew Tridgell
febd35ecd2
s4-dns: fix dnsp for old build
2010-08-05 17:31:29 +10:00
Andrew Tridgell
1a701914fd
s4-ldb: added ldif handler for the dnsRecord attribute
2010-08-05 17:31:29 +10:00
Kamen Mazdrashki
88f1798100
s4-ldb: use TALLOC_CTX type instead of 'void'
2010-07-29 00:53:49 +03:00
Kamen Mazdrashki
35b1e00ba3
s4: Remove trailing whitespaces
...
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:35 +10:00
Kamen Mazdrashki
11a44ce6f8
ldb: Mark _DEPRECATED_ ldb_msg_diff() and ldb_msg_canonicalize() functions
...
They are not quite safe to use (requires caller to steal
resulting message in own context) and may lead to holding
memory for too long.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:35 +10:00
Kamen Mazdrashki
31aeb841c9
s4-dsdb: use ldb_msg_normalize() in ldb_msg_difference()
...
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:35 +10:00
Kamen Mazdrashki
1e20dbd812
s4-test: Use ldb_msg_normalize() in sqlite3 backend
...
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:35 +10:00
Kamen Mazdrashki
d71b20e8dc
s4-dsdb: use ldb_msg_normalize() in ldbadd-process_file()
...
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:35 +10:00
Kamen Mazdrashki
2ad701911e
s4-dsdb: use ldb_msg_normalize() in source4/lib/ldb/common/ldb.c
...
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:34 +10:00
Kamen Mazdrashki
e5a9469a88
s4-ldb: Add ldb_msg_normalize() to accept a memory context from client
...
Previos implementation from ldb_msg_canonicalize()
was moved into this function and now ldb_msg_canonicalize()
is based on ldb_msg_normalize()
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:34 +10:00
Kamen Mazdrashki
48574ccc3f
s4-ldb: Use _ldb_msg_add_el() in ldb_msg_add()
...
Previous implementation was 'leaking' attribute name
string, that is allocated by ldb_msg_add_empty()
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:34 +10:00
Kamen Mazdrashki
3944c81d08
s4-ldb: Use _ldb_msg_add_el() in ldb_msg_add_empty()
...
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:34 +10:00
Kamen Mazdrashki
8d523d46f5
s4-ldb: Add separate function to add empty element into ldb_msg
...
It just adds another element, nothing more.
Caller is responsible to fill-in the added element and
determine how to handle data allocation contexts.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:34 +10:00
Kamen Mazdrashki
a95fd4ef64
s4-ldb: Write more explanatory comment for ldb_msg_add()
...
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:34 +10:00
Kamen Mazdrashki
8deae13313
s4-pyldb: Use ldb_msg_difference() in py_ldb_msg_diff()
...
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:34 +10:00
Kamen Mazdrashki
fa0db46af1
s4-tools: use ldb_msg_difference() in ldbedit - modify_record()
...
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:33 +10:00
Kamen Mazdrashki
65b967a706
s4-ldb: Implement ldb_msg_difference() function to accept a memory context from client
...
Old implementation from ldb_msg_diff() was moved into
this this function but with changed interface
so that a memory context may be passed.
ldb_msg_diff() function is now based on ldb_msg_difference(),
which fixes a hidden leak - internal ldb_msg object
(returned from ldb_msg_canonicalize) wasn't freed
and stays attached to ldb_context for the connection lifetime.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:33 +10:00
Andrew Tridgell
6b266b85cf
s4-loadparm: 2nd half of lp_ to lpcfg_ conversion
...
this converts all callers that use the Samba4 loadparm lp_ calling
convention to use the lpcfg_ prefix.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-16 18:24:27 +10:00
Andrew Bartlett
3e8dba1703
s4:pyldb whitespace fix
2010-07-15 22:08:22 +10:00
Andrew Bartlett
fcdf619b36
s4:pyldb Fix memory handling for ldb_message_element
...
The problem here is that we need to use the array, not the individual
message element as the memory context.
Andrew Bartlett
2010-07-15 22:08:22 +10:00
Matthieu Patou
b67a71f00b
ldb: allow ldb_sequence_number to be called in python
...
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:20 +10:00
Matthias Dieter Wallnöfer
514c596561
ldb:common/ldb_dn.c - "ldb_dn_get_parent" - no need to manipulate the real DN
...
Since the parent DN is a duplication of the passed DN parameter.
2010-07-09 09:02:44 +02:00
Kamen Mazdrashki
6a0d3665e2
s4: fix warning: unused variable ‘i’
2010-07-09 07:01:26 +03:00
Andrew Tridgell
fc68558ab9
s4-ldb: added ldb_error() and ldb_operr()
...
These will be used to help avoid the problem we have with hundreds of
places that do "return LDB_ERR_OPERATIONS_ERROR" without an
explanation. It is very difficult to track down ldb errors which don't
have any explanation.
By replacing "return LDB_ERR_OPERATIONS_ERROR;" with "return ldb_operr(ldb);"
we at least get a file:line message in the ldb error string. It isn't
an ideal error message, but it is much better than just "operations
error"
This change also makes ldb_oom() return the error code
(LDB_ERR_OPERATIONS_ERROR) so you can do:
return ldb_oom(ldb);
instead of:
ldb_oom(ldb);
return LDB_ERR_OPERATIONS_ERROR;
2010-07-07 20:14:55 +10:00
Andrew Tridgell
9c3a9824a9
s4-ldb: added support for simple binds on ldb_ldap backend
...
this uses the options[] array to pass in bindMech, bindID and
bindSecret. Currently only "simple" is supported.
2010-07-07 17:26:03 +10:00
Andrew Tridgell
7f9153f7e8
s4-ldb: added ldb_options_find()
...
ldb_options_find() allows backends to find options in the options[]
array passed to the connect operation.
This will be used by the ldb_ldap bind code
2010-07-07 17:26:03 +10:00
Andrew Tridgell
84c5dd1e4b
s4-ldb: fixed error handling in openldap backend
...
fixed several bugs in error handling. the ldb context was used without
being initialised in the error paths, and several error paths did not
set an ldb error string.
2010-07-02 12:49:04 +10:00
Andrew Tridgell
277a9b4aac
s4-ldb: fixed the parsing of references in the openldap backend
...
We need to use ldap_parse_reference() not ldap_parse_result()
2010-07-02 12:49:04 +10:00
Matthias Dieter Wallnöfer
21c2155126
s4:lib/registry/ldb.c - free some "msg" objects earlier through explicit "talloc_free"s
...
No other functional change
2010-07-01 16:35:12 +02:00
Matthias Dieter Wallnöfer
de8a339cdf
s4:registry - move some common constraint checks to the "local" backend
...
They should also be enforced when we don't use "ldb".
2010-07-01 15:48:06 +02:00
Matthias Dieter Wallnöfer
d81e2af69d
s4:lib/registry/tests/registry.c - test recursive key generation
2010-07-01 15:48:05 +02:00
Matthias Dieter Wallnöfer
ae50385d52
s4:registry - on key add operations we have to handle with paths not always only a name
...
Recursive key generations are allowed.
2010-07-01 15:48:05 +02:00
Matthias Dieter Wallnöfer
781ea5be13
s4:lib/registry/local.c - support recursive key generation
...
Code taken from "local_open_key".
2010-07-01 15:48:05 +02:00
Matthias Dieter Wallnöfer
809c747900
s4:lib/registry/ldb.c - refactor "reg_path_to_ldb"
...
This makes it easier to understand and would also support splitting in more
DN components.
2010-07-01 15:48:04 +02:00
Matthias Dieter Wallnöfer
50ae292e60
s4:lib/registry/ldb.c - use "ldb_path" rather than "ldap_path" as LDB key varibale identifiers
2010-07-01 15:48:04 +02:00
Matthias Dieter Wallnöfer
d0e877e785
s4:lib/registry/ldb.c - "ldb_add_key" - fix talloc handling
...
- free "msg" when possible
- prevent "talloc_strdup"s where not necessary
2010-07-01 15:48:04 +02:00
Stefan Metzmacher
14f8953aa4
s4:dsdb: move dsdb python tests from lib/ldb/ to dsdb/
...
metze
2010-06-30 11:10:28 +02:00
Stefan Metzmacher
19d93c6a1e
s4:ldb/python: make it possible to run tests standalone
...
metze
2010-06-30 10:59:57 +02:00
Matthias Dieter Wallnöfer
17a5c876a6
ldb:ldb_map_outbound.c - "ldb_parse_tree_collect_attrs" - remove unneeded return value
2010-06-29 22:21:22 +02:00
Matthias Dieter Wallnöfer
8e9d7e84f6
ldb:ldb_modules.c - "ldb_dso_load_symbol" - remove unneeded caste before "dlsym"
2010-06-29 22:16:15 +02:00
Matthias Dieter Wallnöfer
657045ca9a
s4:ldb - "ldb_dn_update_components" - fix free of invalid DN parts
...
Use "LDB_FREE" for such free operations and in addition wipe also the casefolded
DN out.
2010-06-29 22:13:05 +02:00
Matthias Dieter Wallnöfer
f1e92c91b2
ldb:ldb_dn.c - "ldb_dn_set_extended_component" - free the linearized string when the components change
2010-06-29 22:07:51 +02:00
Matthias Dieter Wallnöfer
0f0d9aa9b5
s4:ldb_dn.c - make the code parts which free extended components consistent
...
Cosmetic
2010-06-29 22:07:01 +02:00
Matthias Dieter Wallnöfer
1e04f49ddb
ldb:ldb_dn - "ldb_dn_explode" - move the "dn->comp_num" initalisation upwards and use "LDB_FREE" for freeing "dn->components"
...
Mostly cosmetic - no behaviour change
2010-06-29 21:59:37 +02:00
Andrew Bartlett
cc7c572b3d
s4:secrets Ensure secrets.ldb uses the same hooks as the rest of Samba
...
This ensures that, for example, the utf8 functions are the same,
the GUID handler is the same and the NOSYNC flag is applied.
Andrew Bartlett
2010-06-29 16:59:31 +10:00
Matthias Dieter Wallnöfer
e6371246ef
s4:lib/registry/ldb.c - add a missing brace
...
Sorry didn't check that earlier.
2010-06-28 23:13:04 +02:00
Matthias Dieter Wallnöfer
ba01b216e2
s4:lib/registry/ldb.c - fix memory handling in "ldb_open_key"
2010-06-28 23:02:56 +02:00
Matthias Dieter Wallnöfer
094c1034d2
s4:lib/ldb/registry.c - handle the classname in the right way
...
This is for "ldb_get_key_info".
2010-06-28 23:02:56 +02:00
Matthias Dieter Wallnöfer
2fb3d8a6cc
s4:lib/registry/ldb.c - remove really useless "local_ctx"
...
"mem_ctx" should fit for these few local allocations.
2010-06-28 23:02:56 +02:00
Matthias Dieter Wallnöfer
3935502c67
s4:lib/registry/ldb.c - retrieve the classname correctly in "ldb_get_subkey_by_id"
2010-06-28 23:02:56 +02:00
Matthias Dieter Wallnöfer
77e87e66b0
s4:lib/registry/ldb.c - change the "ldb_get_value" implementation to use the value cache and not an LDB lookup
...
In addition this fixes the use of special characters in registry object names.
2010-06-28 23:02:55 +02:00
Nadezhda Ivanova
5a18fc2b2a
Implementation of self membership validated right.
...
When this right is granted, the user can add or remove themselves from a group even
if they dont have write property right.
2010-06-28 10:43:50 +03:00
Matthieu Patou
3fc9675e93
ldb: Fix a wrong changetype in unit test
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-25 11:33:26 +02:00
Matthias Dieter Wallnöfer
408a3aa308
s4:lib/registry/ldb.c - cosmetic - fix comment
2010-06-25 08:48:31 +02:00
Matthias Dieter Wallnöfer
14386e6ec5
s4:lib/registry/ldb.c - cosmetic - wrap lines
2010-06-25 08:48:08 +02:00
Andrew Tridgell
0be1820718
s4-ldb: use CHECK_XSLTPROC_MANPAGES()
2010-06-24 18:46:57 +10:00
Andrew Tridgell
4cb423f527
s4-python: python is not always in /usr/bin
...
Using "#!/usr/bin/env python" is more portable. It still isn't ideal
though, as we should really use the python path found at configure
time. We do that in many places already, but some don't.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-06-24 18:46:57 +10:00
Endi S. Dewata
e228b67e56
s4/ldb: ldb_msg_el_map_remote() should rename the remote attribute names into local names as defined in simple_ldap_map.c.
2010-06-24 10:04:51 +02:00
Andrew Bartlett
c4482bf53e
libds:common Remove DS_DC_* domain functionality flags
...
These are just a subset of the DS_DOMAIN_ functionality flags, are compared and often confused with each other. Just make them one set.
Andrew Bartlett
2010-06-23 20:10:03 +10:00
Kamen Mazdrashki
efe65cd7b7
s4/dsdb-test: fix usage comment
2010-06-22 04:50:19 +03:00
James Peach
12e15b0ac8
smbtorture: Add history support to shell mode.
2010-06-21 08:58:10 -07:00
Matthias Dieter Wallnöfer
05f31c3f6d
s4:registry/regf.c - add some casts to suppress build warnings on Solaris
2010-06-20 22:33:02 +02:00
Matthias Dieter Wallnöfer
2adfe47303
s4:registry/rpc.c - fix Solaris warnings by casts
2010-06-20 22:33:02 +02:00
Matthias Dieter Wallnöfer
58715dd365
s4:libpolicy - fix printf output specifiers to suppress warning
2010-06-20 20:34:48 +02:00
Matthias Dieter Wallnöfer
26bcbf6e35
s4:libpolicy - Solaris compatibility fix
2010-06-20 20:25:00 +02:00
Matthias Dieter Wallnöfer
91c49c2fb2
s4:ldap.py - test subtree deletes through a new testcase
2010-06-20 18:52:31 +02:00
Matthias Dieter Wallnöfer
ad5e19f29e
ldb:controls - add the "TREE_DELETE" control for allowing subtree deletes
2010-06-20 18:52:29 +02:00
Matthias Dieter Wallnöfer
065579b4c6
ldb:ldb.h - add classifications to the control declarations
...
This makes it easier to understand which standard specifies which control.
2010-06-20 18:52:28 +02:00
Matthias Dieter Wallnöfer
d7ad7eed24
ldb:pyldb.c - introduce a "mem_ctx" also on "py_ldb_search"
...
To prevent memory leaks
2010-06-20 18:52:27 +02:00
Matthias Dieter Wallnöfer
00bf608481
ldb:pyldb.c - some cleanups and adequations also in "py_ldb_modify" and "py_ldb_rename"
...
To make them consistent.
2010-06-20 18:52:26 +02:00
Stefan Metzmacher
a87561613a
Revert "s4:ldb-samba: fix the build without a system ldb"
...
This reverts commit 44c01a5eb4
.
This caused problems when using a system ldb and as we don't
do ABI checks for ldb-samba4 any more, we don't need this change.
metze
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:42:22 +02:00
Stefan Metzmacher
e812832db3
s4:ldb: only do ABI checking for the standalone build for now
...
Otherwise we fail to build samba4 with a system ldb.
metze
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:42:22 +02:00
Jelmer Vernooij
52307a11e1
libpolicy: Fix the build.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:19:13 +02:00
Wilco Baan Hofman
e18a172207
Add preliminary support for storing changed Group Policies.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:19:13 +02:00
Wilco Baan Hofman
04133225c1
Refactor policy filesystem code.
...
* It now uses reusable code to download the GPT.
* It creates a list before copying for better error handling.
* String_replace is now used instead of manually replacing '\\' with '/'
for local paths.
* A security check has been added for file names with "../".
* It adheres to the 80 column rule, if at all possible.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:19:13 +02:00
Wilco Baan Hofman
b9b85d6b0e
Fix memory allocation with error handling.
...
Also moved pypolicy.c headers around so as not to generate compile warnings
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:19:13 +02:00
Wilco Baan Hofman
c09922cfae
Code cleanups: GUID generation, lp_dnsdomain instead of lp_realm, missing spaces.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:19:12 +02:00
Wilco Baan Hofman
5c2c8dfc5a
Set inherit flag type to bool.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:19:12 +02:00
Wilco Baan Hofman
d61f0240ee
Fix 'magic' numbers to be strlen(something)
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:19:12 +02:00
Wilco Baan Hofman
e86ef688ee
Change talloc_steal to strdup because function might not expect it.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:19:12 +02:00
Wilco Baan Hofman
674d559f37
Add GP ini functions.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:19:12 +02:00
Wilco Baan Hofman
3fe793fce7
Remove iconv convenience in used functions, which were deleted in commit f9ca9e46ad
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:19:12 +02:00
Wilco Baan Hofman
8f74ee01d9
Add ini parser for GPO's.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:19:12 +02:00
Wilco Baan Hofman
c36bd5de6a
Add net gpo setacl support. Create gp_set_acl function. Show ACL in net gpo show.
...
Cleanup memory allocation of gp_create_gpo
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:19:12 +02:00
Wilco Baan Hofman
5434171296
Fix set GPT security descriptor to match windows' behaviour.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:19:12 +02:00
Wilco Baan Hofman
31aeddfa43
Fix crash when get_gpo_info returns incorrect data.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:19:12 +02:00
Wilco Baan Hofman
299531ce32
Add preliminary NT ACL support for GPT (GPO on filesystem).
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:19:11 +02:00
Jelmer Vernooij
60bc5fe0ed
samba4: Add python bindings for samba.policy.get_gplink_options.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:19:11 +02:00
Jelmer Vernooij
381e824658
policy: Add samba.policy.get_gpo_flags binding.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:19:11 +02:00
Wilco Baan Hofman
41fae89daf
Add gpo create functionality. Also fix gPLink handling bugs
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:19:11 +02:00
Wilco Baan Hofman
32ee6f8cfd
Fix mode_t in mkdir.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:19:11 +02:00
Wilco Baan Hofman
2b761c3def
Optimize the backslash logic in the path traversal.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:19:11 +02:00
Wilco Baan Hofman
f24f472d44
Fix error in logic, making recursion work past the first level.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:19:11 +02:00
Wilco Baan Hofman
3b11a53304
Add fetch function for GPO which fetches all relevant files from the sysvol share.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:19:11 +02:00
Wilco Baan Hofman
698144851a
Add getinheritance and setinheritance to net gpo util and library.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:19:11 +02:00
Wilco Baan Hofman
a4cb72790c
Implemented delete group policy link function and corresponding feature in net gpo.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:19:11 +02:00
Wilco Baan Hofman
f0353fddde
Changed add_gplink to set_gplink, so we can change gPLink options as well.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:19:11 +02:00
Wilco Baan Hofman
40d7181507
Add add gPLink function and corresponding net gpo linkadd call.
...
Also added some definitions for future functions in policy.h
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:19:10 +02:00
Wilco Baan Hofman
a1fceac844
Rename files to reflect the libpolicy naming convention. Also fix the GNU make build.
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:19:10 +02:00
Wilco Baan Hofman
b025715419
Rename libgpo to lib/policy to avoid confusion with samba3 and add waf build
...
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-06-20 17:19:10 +02:00
Jelmer Vernooij
a2540fb3cb
ldb: Add ABI file for use when including ildap in the build.
2010-06-20 13:54:51 +02:00
Jelmer Vernooij
9bcd0daba2
ldb: Change LDBSAMBA back to subsystem, update comments, use different
...
ABI file based on whether ldb_ildap is included.
2010-06-20 11:49:08 +02:00
Stefan Metzmacher
44c01a5eb4
s4:ldb-samba: fix the build without a system ldb
...
metze
2010-06-20 11:33:43 +02:00