1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

5423 Commits

Author SHA1 Message Date
Matthias Dieter Wallnöfer
1427895531 ldb:ldb_pack.c - remove superflous "message->elements = NULL"
It's already marked at this at the beginning of the call.
2010-10-20 12:31:05 +00:00
Matthias Dieter Wallnöfer
d652803c12 ldb:"ldb_schema_attribute_by_name_internal" - support the whole unsigned int range
Commit 8556602b04 wasn't quite right - it only
restored the functionality on the positive integer range.

This one however should now really support the whole unsigned range.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Tue Oct 19 10:52:08 UTC 2010 on sn-devel-104
2010-10-19 10:52:08 +00:00
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