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

2383 Commits

Author SHA1 Message Date
Kamen Mazdrashki
07240e97f8 s4-resolve_oids: Remove redundant check - resolve_oids_need_value() handle this 2010-10-29 02:31:17 +03:00
Kamen Mazdrashki
6b188fbad4 s4-schema_init: we should be able to resolve Syntax OIDs with prefixMap we have
If Syntax OID is not in the prefixMap then we are getting
an unknown Attribute Syntax (which we can't handle anyway)
2010-10-29 02:31:17 +03:00
Nadezhda Ivanova
5bc2b8f0a4 s4-ldb: Added the correct extended check for read access to nTSecurityDescriptor
It does not depend on READ_PROPERTY, but on SECURITY_PRIVILEGE and READ_CONTROL

Autobuild-User: Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date: Wed Oct 27 13:18:50 UTC 2010 on sn-devel-104
2010-10-27 13:18:50 +00:00
Nadezhda Ivanova
3003bd4037 s4-ldb: Changes the aclread module to use LDB_HANDLE_FLAG_UNTRUSTED to determine the source of the request
The aclread module used to use a control to make sure the request comes from the ldap server,
but now the rootdse filters out any unregistered controls comming from ldap, so the control is
lost. Using the LDB_HANDLE_FLAG_UNTRUSTED is a much more elegant solution.

Autobuild-User: Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date: Wed Oct 27 11:55:11 UTC 2010 on sn-devel-104
2010-10-27 11:55:11 +00:00
Kamen Mazdrashki
e5ebc48697 s4-dsdb_syntax: *_OID_oid_ldb_to_drsuapi() functions should use
dsdb_schema_pfm_attid_from_oid() instead of
dsdb_schema_pfm_make_attid() as those functions are
supposed to return ATTIDs only for OIDs we already know about
(i.e. are in prefixMap)

Autobuild-User: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date: Tue Oct 26 22:44:36 UTC 2010 on sn-devel-104
2010-10-26 22:44:36 +00:00
Kamen Mazdrashki
0fc2427224 s4-prefixMap: split dsdb_schema_make_attid() function into read-only and
read-write functions.
dsdb_schema_make_attid() may change prefixMap implicitly
and this is not always desired behavior.
The problem was that
(1) callers had no control on this behavior
(2) callers had no way to know wheter prefixMap has been
    changed which can lead to hard to find bugs like
    prefixMap is changed in read operation
2010-10-26 22:17:41 +03:00
Kamen Mazdrashki
5e108fc5f9 s4-prefixmap: Use WERR_NOT_FOUND when OID is not found in current prefixMap
rather than WERR_DS_NO_MSDS_INTID.
WERR_DS_NO_MSDS_INTID is intended to be used for msDsIntId
attribute values handling
2010-10-26 22:17:40 +03:00
Matthias Dieter Wallnöfer
1b68910d65 s4:ldap.py - add a test for attribute ranges - still very basic
And partially outcommented.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Tue Oct 26 18:53:12 UTC 2010 on sn-devel-104
2010-10-26 18:53:12 +00:00
Matthias Dieter Wallnöfer
dd25f4b83b s4:sam.py - enhance users and groups test 2010-10-26 18:12:00 +00:00
Matthias Dieter Wallnöfer
802e3b4e1f s4:samldb LDB module - enhance the "member"-check trigger
- Also multi-valued "member" attributes are allowed
- When you try to delete a member from a group which has it primary group set
  exactly to this group you get "UNWILLING_TO_PERFORM"
2010-10-26 18:12:00 +00:00
Matthias Dieter Wallnöfer
a839422fc5 s4:ldap.py - enhance and activate the "description" attribute test
It tests only the "description" attribute in particular since it behaves
differently from all others.
2010-10-26 18:12:00 +00:00
Matthias Dieter Wallnöfer
4f25eec5a5 s4:objectclass_attrs.c - rework to support these special "description" constraints
Only the "description" attribute has this special restrictions.
2010-10-26 18:12:00 +00:00
Jelmer Vernooij
a74e8be6d1 waf: Stop automaticaly changing dashes to underscores in library names. 2010-10-26 10:17:18 -07:00
Jelmer Vernooij
8cf61377aa waf: Remove lib prefix from libraries manually. 2010-10-26 10:17:17 -07:00
Jelmer Vernooij
d9cbcdd410 s4: Drop duplicate 'lib' prefix for private libraries. 2010-10-26 10:17:16 -07:00
Matthias Dieter Wallnöfer
6fb64b9c7a s4:"samdb_search_count" - introduce a "mem_ctx" parameter
All other "samdb_search_*" calls do have one - why "samdb_search_count" doesn't?

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Mon Oct 25 17:42:33 UTC 2010 on sn-devel-104
2010-10-25 17:42:33 +00:00
Matthias Dieter Wallnöfer
fd7943bc80 ldb:gendb_* calls: support a "NULL" resultset parameter
This is useful for "samdb_search_count" where only the amount of entries
matters.
2010-10-25 18:58:20 +02:00
Matthias Dieter Wallnöfer
e567d6c9f7 s4:samldb LDB module - other indentation fixes on error messages
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Mon Oct 25 12:31:57 UTC 2010 on sn-devel-104
2010-10-25 12:31:57 +00:00
Matthias Dieter Wallnöfer
c3fa990f21 s4:ldap.py - prove the denied multi-valued replace requests
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Mon Oct 25 11:49:19 UTC 2010 on sn-devel-104
2010-10-25 11:49:19 +00:00
Matthias Dieter Wallnöfer
fedd4aa3cb s4:objectclass_attrs LDB module - deny multi-valued replace requests
This is the AD behaviour. But on attributes with the flag
"FLAG_ATTR_REQ_PARTIAL_SET_MEMBER" it is allowed.
2010-10-25 13:03:17 +02:00
Matthias Dieter Wallnöfer
e24cd13e40 s4:samldb LDB module - fix indentations
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Mon Oct 25 09:48:15 UTC 2010 on sn-devel-104
2010-10-25 09:48:15 +00:00
Matthias Dieter Wallnöfer
edab363466 s4:samldb LDB module - use "uint32_t" for available krbtgt number 2010-10-25 09:06:04 +00:00
Matthias Dieter Wallnöfer
9e6d07e1b3 s4:samldb LDB module - assign better memory contexts in some cases 2010-10-25 09:06:04 +00:00
Matthias Dieter Wallnöfer
7b3dbbde04 s4:dsdb - remove some calls of "samdb_msg_add_string" when we have talloc'ed strings
They can be substituted by "ldb_msg_add_string" if the string was already
talloc'ed.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Oct 24 20:03:27 UTC 2010 on sn-devel-104
2010-10-24 20:03:27 +00:00
Matthias Dieter Wallnöfer
32189689df s4:dsdb - use LDB results in "add_time_element" and "add_uint64_element"
In both the "objectguid" and the "repl_meta_data" DSDB module.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Oct 24 18:39:43 UTC 2010 on sn-devel-104
2010-10-24 18:39:43 +00:00
Matthias Dieter Wallnöfer
49dee0e453 s4:dsdb - use the more safe "samdb_msg_add_(u)int*" calls always where possible
This should prevent all possible integer storage problems in future.
2010-10-24 17:57:06 +00:00
Jelmer Vernooij
92c12a39a9 ldb: Rename pyldb pkg-config file to pyldb-util, to avoid confusion with
'ldb' python module.
2010-10-24 00:20:04 +00:00
Jelmer Vernooij
fc6bfe24fd s4: Rename SMBPASSWD to smbpasswd.
Rename DSDB_MODULE to dsdb_module.
2010-10-24 00:20:04 +00:00
Jelmer Vernooij
833480d3ad s4: Rename LIBSAMBA-* to libsamba-* 2010-10-24 00:20:04 +00:00
Jelmer Vernooij
ca16d805bd s4: Rename LIBSECURITY{_SESSION,} to libsecurity{_session,} 2010-10-24 00:20:04 +00:00
Jelmer Vernooij
7a731ccdfc s4: Rename SAMDB_COMMON to samdb_common. 2010-10-24 00:20:04 +00:00
Jelmer Vernooij
2933fac7c7 s4: Rename NSS_WRAPPER to nss_wrapper.
Only link to nss_wrapper when it is enabled.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Oct 23 23:05:44 UTC 2010 on sn-devel-104
2010-10-23 23:05:43 +00:00
Jelmer Vernooij
cf26d8a958 s4: Rename LIBEVENTS to libevents. 2010-10-23 22:24:06 +00:00
Matthias Dieter Wallnöfer
f9a6ff482c s4/ldb:introduce the LDB_CONTROL_PROVISION_OID control
This control is exactly thought for the actions which previously were performed
using the RELAX one.

We agreed that the RELAX control will only remain for interactions with OpenLDAP.
2010-10-23 16:37:29 +02:00
Matthias Dieter Wallnöfer
89c42a96fc ldb:rename LDB_CONTROL_BYPASSOPERATIONAL_OID into LDB_CONTROL_BYPASS_OPERATIONAL_OID
It's nicer to have this consistent with "BYPASS_PASSWORD_HASH".
2010-10-23 16:37:29 +02:00
Kai Blin
e7358e7582 s4 dsdb kcc: Prefer msDS-hasMasterNCs over hasMasterNCs when replicating 2010-10-23 10:17:05 +00:00
Kamen Mazdrashki
d46ca0eb80 s4-dsdb_syntax: Setup "String(Case Sensitive)" syntax
Currently it is mapped to Octet String LDAP syntax
for comparison purposes.

According to LDAP rfc we should be using same comparison
as Directory String (LDB_SYNTAX_DIRECTORY_STRING), but case sensitive.
But according to ms docs binary compare should do the job:
http://msdn.microsoft.com/en-us/library/cc223200(v=PROT.10).aspx

Autobuild-User: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date: Fri Oct 22 22:19:50 UTC 2010 on sn-devel-104
2010-10-22 22:19:50 +00:00
Kamen Mazdrashki
2a001381e8 s4-dsdb/schema_syntax: Separate validation for numericoid OID values
This implementation doesn't use prefixMap/Schema to validate
numericoid OIDs. We may not have this OID yet, so I see no point
checking schema for if we have it.

Side effect of using prefixMap/Schema for validating numericoids
is that we mistakenly add the OID to the prefixMap.
This led to a corrupted prefixMap in LDB.

Autobuild-User: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date: Thu Oct 21 23:32:26 UTC 2010 on sn-devel-104
2010-10-21 23:32:26 +00:00
Andrew Bartlett
5785f08268 s4-dsdb extended_dn_out: Move lazy dereference control creation to lazy-init
We didn't seem to get the control created by the time we do searches here.

Andrew Bartlett

Autobuild-User: Anatoliy Atanasov <anatoliy@samba.org>
Autobuild-Date: Thu Oct 21 12:29:54 UTC 2010 on sn-devel-104
2010-10-21 12:29:54 +00:00
Andrew Tridgell
6fd9fee502 s4-dsdb: force LDB_ERR_NO_SUCH_ATTRIBUTE on missing schemaInfo
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-21 19:03:27 +11:00
Andrew Tridgell
1711584821 s4-dsdb: fixed depenencies for -no-undefined
added some depenencies needed for -Wl,-no-undefined
2010-10-21 19:03:27 +11:00
Andrew Tridgell
ae5c4cd6f9 s4-dsdb: make ldb_password_hash depend on hdb not HEIMDAL_HDB_KEYS
this prevents a duplicate object file
2010-10-21 19:03:25 +11:00
Andrew Tridgell
47591ea5ec s4-dsdb: moved a bunch of fuctions from schema/schema_info_attr.c to samdb/ldb_modules/schema_util.c
these functions operate on ldb_modules, so they should be in the
ldb_modules directory. They also should return ldb errors codes, not
WERROR codes, as otherwise the error can be hidden from the ldap
caller

This re-arrangement fixes a dependency loop in the schema/samdb code.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Kamen Mazdrashki <kamenim@samba.org>
2010-10-21 19:03:25 +11:00
Andrew Tridgell
9a2c9c2fc2 s4-dsdb: make SAMDB_COMMON into a private library
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-21 19:03:23 +11:00
Kamen Mazdrashki
71ac92b673 s4-schema_init: Print more info about syntax we fail to recognize
Autobuild-User: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date: Wed Oct 20 13:54:01 UTC 2010 on sn-devel-104
2010-10-20 13:54:01 +00:00
Andrew Bartlett
4b4dcaf4b3 s4-dsdb Reset the error string after 'expected' errors.
This helps ensure that we don't get confusing error strings in the
logs on other error cases.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Oct 19 12:16:07 UTC 2010 on sn-devel-104
2010-10-19 12:16:07 +00:00
Andrew Bartlett
439a1fe2d0 s4-dsdb Add module to send only 'simple' DNs to OpenLDAP backends
If we send the full extended DN, then we risk standards-complient LDAP
servers rejecting it as invalid.  Only the DN portion is needed to
resolve the record in any case, and any SID or GUID componenets have
already been evaluated into the DN.

Andrew Bartlett
2010-10-19 22:34:58 +11:00
Andrew Bartlett
5650e8558e s4-dsdb Allow LDB_ERR_INVALID_DN_SYNTAX in dsdb_load_partition_usn
This will happen on an OpenLDAP backend, because @ records are invalid in LDAP.

We don't have these sequence numbers in this case.

Andrew Bartlett
2010-10-19 22:34:58 +11:00
Matthias Dieter Wallnöfer
a6d70ddf86 s4:dsdb/schema/schema_init.c - remove a duplicated "talloc_free" 2010-10-19 10:11:03 +00:00
Andrew Tridgell
640fbf833b s4-dsdb: register the DCPROMO_OID control with the rootdse
this is needed to allow it over ldap

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue Oct 19 04:44:23 UTC 2010 on sn-devel-104
2010-10-19 04:44:23 +00:00