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

335 Commits

Author SHA1 Message Date
Andrew Bartlett
400a56d6dd r20315: Implement the server side of DsGetDomainControllerInfo. This is a
supprisingly complex call...

It turns out that the in/out parameter 'level' is not in/out, but set
seperatly by the server-side code from r->req.req1.level.

This commit also breaks out some common code from samldb into samdb.

Andrew Bartlett
(This used to be commit 2eb9e6445c)
2007-10-10 14:29:38 -05:00
Stefan Metzmacher
a624503418 r20307: remove unused vars
metze
(This used to be commit 0352b7bbc6)
2007-10-10 14:29:36 -05:00
Stefan Metzmacher
97d066464b r20306: remove the static oid mapping table
and attach the table to the dsdb_schema

metze
(This used to be commit df63995ec5)
2007-10-10 14:29:36 -05:00
Stefan Metzmacher
291271f226 r20233: add functions to create a dsdb_attribute and dsdb_class from
a drsuapi_DsReplicaObject

metze
(This used to be commit 9168236ddd)
2007-10-10 14:29:26 -05:00
Stefan Metzmacher
e666389c36 r20232: specify attribute name and structure element name always together
there're a view elements where both values doesn't match

LDAP-SCHEMA now successful loads the schema

metze
(This used to be commit 5d7827f45e)
2007-10-10 14:29:26 -05:00
Stefan Metzmacher
549b56b89d r20231: - add more oid => uint32 id mappings
- handle the case where mappings for 1.2.3.4. and 1.2.3.4.5. prefixes
  exist
- extend test suite for the mappings

metze
(This used to be commit 3af0a9b2c4)
2007-10-10 14:29:26 -05:00
Stefan Metzmacher
7aa96e9960 r20226: rename macros with a _LDB at the end, because I'll add macros with _DS
soon

metze
(This used to be commit e5b67046c2)
2007-10-10 14:29:25 -05:00
Stefan Metzmacher
836202f600 r20224: the struct element msDs_Schema_Extensions and the attribute name "msDs-Schema-Extensions"
doesn't match so we need to pass 2 parameters to the GET_BLOB() macro

metze
(This used to be commit e50cf96fea)
2007-10-10 14:29:24 -05:00
Stefan Metzmacher
1fc9c6bf2c r20223: this function is in the torture test now
metze
(This used to be commit 66c4b42f5f)
2007-10-10 14:29:24 -05:00
Stefan Metzmacher
c5571c7c39 r20221: - move the dsdb_schema, dsdb_attribute, dsdb_class structs into
a generic location
- this struct should be also used by the dsdb/samdb/ldb_modules/schema.c
  module later
- add functions to map from LDAP OID values to uint32_t values
- add torture test for the OID => uint32 mapping code

metze
(This used to be commit 58ba6ec195)
2007-10-10 14:29:23 -05:00
Stefan Metzmacher
c69717755a r20184: change ldb_attrib_handler into ldb_schema_attribute, which has a pointer
to a ldb_schema_syntax struct.

the default attribute handler is now registered dynamicly as "*"
attribute, instead of having its own code path.

ldb_schema_attribute's can be added to the ldb_schema given a
ldb_schema_syntax struct or the syntax name

we may also need to introduce a ldb_schema_matching_rule,
and add a pointer to a default ldb_schema_matching_rule
in the ldb_schema_syntax.

metze
(This used to be commit b97b8f5dcb)
2007-10-10 14:29:19 -05:00
Andrew Bartlett
d471e52d23 r20149: Remove the smb.conf distinction between PDC and BDC. Now the correct
way to setup a Samba4 DC is to set 'server role = domain controller'.

We use the fSMORoleOwner attribute in the base DN to determine the PDC.

This patch is quite large, as I have corrected a number of places that
assumed taht we are always the PDC, or that used the smb.conf
lp_server_role() to determine that.

Also included is a warning fix in the SAMR code, where the IDL has
seperated a couple of types for group display enumeration.

We also now use the ldb database to determine if we should run the
global catalog service.

In the near future, I will complete the DRSUAPI
DsGetDomainControllerInfo server-side on the same basis.

Andrew Bartlett
(This used to be commit 67d8365e83)
2007-10-10 14:29:15 -05:00
Simo Sorce
ea212eb00f r20034: Start using ldb_search_exp_fmt()
(This used to be commit 4f07542143)
2007-10-10 14:28:51 -05:00
Stefan Metzmacher
9079448fce r20028: fix typos
metze
(This used to be commit 72f5e0f7ee)
2007-10-10 14:28:49 -05:00
Stefan Metzmacher
524dca68cf r20027: restore instanceType and systemFlags values, which got lost in
http://viewcvs.samba.org/cgi-bin/viewcvs.cgi/branches/SAMBA_4_0/source/dsdb/common/flags.h?p1=branches%2FSAMBA_4_0%2Fsource%2Finclude%2Fads.h&rev=17930&r1=15511&r2=17930

metze
(This used to be commit 5da9dedece)
2007-10-10 14:28:49 -05:00
Simo Sorce
353b968025 r19869: fix memleaks
(This used to be commit 3a662a2d98)
2007-10-10 14:28:28 -05:00
Simo Sorce
a9e31b33b5 r19832: better prototypes for the linearization functions:
- ldb_dn_get_linearized
  returns a const string

- ldb_dn_alloc_linearized
  allocs astring with the linearized dn
(This used to be commit 3929c086d5)
2007-10-10 14:28:22 -05:00
Simo Sorce
4889eb9f7a r19831: Big ldb_dn optimization and interfaces enhancement patch
This patch changes a lot of the code in ldb_dn.c, and also
removes and add a number of manipulation functions around.

The aim is to avoid validating a dn if not necessary as the
validation code is necessarily slow. This is mainly to speed up
internal operations where input is not user generated and so we
can assume the DNs need no validation. The code is designed to
keep the data as a string if possible.

The code is not yet 100% perfect, but pass all the tests so far.
A memleak is certainly present, I'll work on that next.

Simo.
(This used to be commit a580c871d3)
2007-10-10 14:28:22 -05:00
Andrew Bartlett
c9035c6633 r19757: Don't do the strrchr twice. Pointed out by Martin Kuhl.
Andrew Bartlett
(This used to be commit c4bf9cc09b)
2007-10-10 14:28:19 -05:00
Andrew Bartlett
84138215ca r19732: The 'res' from ldb_search is only valid if the call returns LDB_SUCCESS.
This seems to show up (as an abort() from talloc) particularly under
ldb_ildap.

Andrew Bartlett
(This used to be commit 9890af534d)
2007-10-10 14:28:15 -05:00
Andrew Bartlett
adae413042 r19731: Modify the ldb_map infrustructure to always map from requested
attributes to backend (remote) attributes.

We can't do a reverse mapping safely where the remote attribute may be
a source for multiple local attributes.  (We end up with the wrong
attributes returned).

In doing this, I've modified the samba3sam.js test to be more
realistic, and fixed some failures in the handling of primaryGroupID.

I've added a new (private) helper function ldb_msg_remove_element() to
avoid a double lookup of the element name.

I've also re-formatted many of the function headers, to fit into
standard editor widths.

Andrew Bartlett
(This used to be commit 186766e309)
2007-10-10 14:28:15 -05:00
Stefan Metzmacher
76d0193bf3 r19726: when a client explicit asks for the 'netlogon' attriubute on LDAP
the result entry is skipped!

metze
(This used to be commit 62aa73f3d5)
2007-10-10 14:28:14 -05:00
Andrew Bartlett
3c1e780ec7 r19604: This is a massive commit, and I appologise in advance for it's size.
This merges Samba4 with lorikeet-heimdal, which itself has been
tracking Heimdal CVS for the past couple of weeks.

This is such a big change because Heimdal reorganised it's internal
structures, with the mechglue merge, and because many of our 'wishes' have been granted:  we now have DCE_STYLE GSSAPI, send_to_kdc hooks and many other features merged into the mainline code.  We have adapted to upstream's choice of API in these cases.

In gensec_gssapi and gensec_krb5, we either expect a valid PAC, or NO
PAC.  This matches windows behavour.  We also have an option to
require the PAC to be present (which allows us to automate the testing
of this code).

This also includes a restructure of how the kerberos dependencies are
handled, due to the fallout of the merge.

Andrew Bartlett
(This used to be commit 4826f17351)
2007-10-10 14:25:03 -05:00
Andrew Bartlett
13dbee3ffe r19598: Ahead of a merge to current lorikeet-heimdal:
Break up auth/auth.h not to include the world.

Add credentials_krb5.h with the kerberos dependent prototypes.

Andrew Bartlett
(This used to be commit 2b569c42e0)
2007-10-10 14:25:00 -05:00
Simo Sorce
b7774527fa r19531: Make struct ldb_dn opaque and local to ldb_dn.c
(This used to be commit 889fb983ba)
2007-10-10 14:24:44 -05:00
Andrew Bartlett
899ae849e8 r19522: Remove gensec and credentials dependency from the rootdse module (less
dependency loops).

This moves the evaluation of the SASL mechansim list to display in the
rootDSE to the ldap server.

Andrew Bartlett
(This used to be commit 379da475e2)
2007-10-10 14:24:44 -05:00
Jelmer Vernooij
4fa24df98d r19507: Merge my DSO fixes branch. Building Samba's libraries as shared libraries
works again now, by specifying --enable-dso to configure.
(This used to be commit 7a01235067)
2007-10-10 14:24:41 -05:00
Simo Sorce
7f833458ca r19489: Change ldb_msg_add_value and ldb_msg_add_empty to take a foruth argument.
This is a pointer to an element pointer. If it is not null it will be
filled with the pointer of the manipulated element.
Will avoid double searches on the elements list in some cases.
(This used to be commit 0fa5d4bc22)
2007-10-10 14:24:38 -05:00
Andrew Bartlett
9542481727 r19464: Reject passwords that cannot be converted into UCS2.
Andrew Bartlett
(This used to be commit c843fce7a0)
2007-10-10 14:21:37 -05:00
Andrew Tridgell
515c92a759 r19441: work in progress support for NFS4 ACLs in Samba4 on Linux. Still work
to do, particularly with getting the detailed bit mappings right, and
on sid mapping. Does not pass RAW-ACLS yet
(This used to be commit b92553481b)
2007-10-10 14:21:32 -05:00
Simo Sorce
fd82e3f39b r19337: never alloc on module unless you mean to attach a context to
it to keep the data around as long as the module lives
(This used to be commit d2073c1f7e)
2007-10-10 14:21:12 -05:00
Simo Sorce
d9cb938dcd r19333: commit module changes I made some time ago before I loose them
(This used to be commit 524ec78086)
2007-10-10 14:21:11 -05:00
Simo Sorce
549dd10f0f r19332: ldb_parse_tree leaks
(This used to be commit 3e0e2787c1)
2007-10-10 14:21:11 -05:00
Simo Sorce
56bacd2b44 r19330: Fix memleaks
(This used to be commit f163f422e3)
2007-10-10 14:21:10 -05:00
Andrew Tridgell
8b60b7fa2a r19329: fixed a leak in the password hash module
(This used to be commit 3f48bcb058)
2007-10-10 14:21:10 -05:00
Andrew Tridgell
86a549eaca r19328: another leak plugged ....
(This used to be commit f57535b9c2)
2007-10-10 14:21:10 -05:00
Andrew Bartlett
bd8f63a617 r19321: Merge from release branch:
Always set the krb5key from the ntPwdHash, even if we don't have the
cleartext password in sambaPassword.  This fixes kerberos after a
vampire.

Andrew Bartlett
(This used to be commit 1d4d2271c9)
2007-10-10 14:21:08 -05:00
Simo Sorce
b0fadb51b2 r19313: Don't mess with hierarchies!!
There is a reason why we use them :-)
(This used to be commit e3b7e91299)
2007-10-10 14:21:07 -05:00
Andrew Bartlett
379e6598e1 r19308: Merge samsync fixes from SAMBA_4_0_RELEASE
Andrew Bartlett
(This used to be commit 3310032399)
2007-10-10 14:21:06 -05:00
Simo Sorce
59b66744f7 r19299: Fix possible memleaks
(This used to be commit 6fad80bb09)
2007-10-10 14:21:04 -05:00
Stefan Metzmacher
ce02a7e9dc r18945: fix compiler warnings and end-of-non-void function bugs
metze
(This used to be commit ed195999c0)
2007-10-10 14:20:23 -05:00
Simo Sorce
7a1c1a1fd8 r18908: Store the schema structure into an opaque pointer so that it can be reused by multiple connections
(This used to be commit ca8827d8f9)
2007-10-10 14:20:19 -05:00
Andrew Bartlett
77db3973c4 r18781: Move the usnCreated and usnChanged handling around again.
This moves these attributes from objectguid into an optional backend
(objectguid), used by ltdb.  For OpenLDAP, the entryUUID module
converts entryCSN into usnChanged.

This also changes the sequence number API, and uses 'time based'
sequence numbers, when an LDAP or similar backend is detected.

To assist this, we also store the last modified time in the TDB,
whenever we change a value.

Andrew Bartlett
(This used to be commit 72858f8594)
2007-10-10 14:19:11 -05:00
Günther Deschner
8153859fb4 r18636: Excessive testing with pam_winbind within Samba3 revealed a new samr
reject reason code while password changing: SAMR_REJECT_IN_HISTORY which
is different from SAMR_REJECT_COMPLEXITY.

torture test to follow as well.

Guenther
(This used to be commit 7513748208)
2007-10-10 14:18:59 -05:00
Andrew Bartlett
595c141a69 r18504: Handle mappings for RENAME and KEEP attributes better. We don't need
to mess with the values in these cases.

Where we do convert the values, try and convert substrings.  This
isn't going to be perfect, but we should try rather than segfault.

This also avoids using the wrong arm of the union for the attribute
name

The change in the entryUUID module is to correct the case of
sAMAccountName, due to the case sensitive ldap.js test.

Andrew Bartlett
(This used to be commit 81d9a692c1)
2007-10-10 14:18:40 -05:00
Andrew Bartlett
1e4f5a096c r18495: More work on the LDAP backend (which now passes a lot of our tests!)
This adds a list of attributes that are in our wildcard seaches, but
the remote server requires to be explicitly listed.  This also cleans
up the handling of wildcards in ldb_map to be more consistant.

Also fix the partitions module to rebase the search, if on the GC
port, we do a subtree search.  (Otherwise backends can rightly
complain that the search is not in their scope).

Andrew Bartlett
(This used to be commit bc58792b71)
2007-10-10 14:18:38 -05:00
Andrew Bartlett
918db36213 r18441: Allow searching for the high bit in these bitfields, when the client
asks for them as large integers, rather than a negative integer.

Due to an OpenLDAP bug, this only works reliably against OpenLDAP CVS
as of today.  (but mostly works in older versions, depending on a
thread-specific value fo errno in the server).

Andrew Bartlett
(This used to be commit 3b5354aede)
2007-10-10 14:18:30 -05:00
Andrew Bartlett
35d30de095 r18368: Don't list GENSEC mechs that only have client implementations in our
supportedSASLMechanism list.

Andrew Bartlett
(This used to be commit 3e69637b5f)
2007-10-10 14:18:20 -05:00
Andrew Bartlett
a41b696346 r18367: When converting to entryUUID, ensure we don't double-convert a
string-format GUID.

Andrew Bartlett
(This used to be commit 11cc6408c9)
2007-10-10 14:18:19 -05:00
Andrew Tridgell
30ee8beb93 r18301: I discovered how to load the warnings from a build farm build into
emacs compile mode (hint, paste to a file, and compile as "cat
filename").

This allowed me to fix nearly all the warnings for a IA_64 SuSE build
very quickly.
(This used to be commit eba6c84eff)
2007-10-10 14:18:04 -05:00