1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-11 00:23:51 +03:00
Commit Graph

356 Commits

Author SHA1 Message Date
Andrew Bartlett
f5ce04b904 r25218: After discussion with Simo, remove the subclass support from LDB.
Subclass support was designed to avoid needing to spell out the full
list of objectClasses that an entry was in.  However, Samba4 now
enforces this restriction in the objectClass module, and the way
subclass matching was handled was complex and counter-intuitive in my
opinion (and did not match LDAP).

Andrew Bartlett
2007-10-10 15:06:56 -05:00
Stefan Metzmacher
8f2db3c130 r25215: replace talloc_append_string() with talloc_strdup_append_buffer()
metze
2007-10-10 15:06:55 -05:00
Jelmer Vernooij
917bd737cb r25084: Move samba-specific code out of lib/ldb directory. 2007-10-10 15:06:26 -05:00
Jelmer Vernooij
e672380d21 r25081: Add modules_dir member to ldb_context that is used rather than a global
modulesdir setting. Samba always sets this to lp_modulesdir()/ldb
2007-10-10 15:06:25 -05:00
Andrew Bartlett
2ed782f7ca r24566: Remove trailing newlines in ldb_debug(), these are not required.
Andrew Bartlett
2007-10-10 15:02:16 -05:00
Andrew Bartlett
c4c3afcdcb r24261: Fix the standalone ldb build after I moved the objectclass module out.
Andrew Bartlett
2007-10-10 15:01:32 -05:00
Andrew Bartlett
0fbea30577 r23993: Attempt to fix bug #4808, reported by mwallnoefer@yahoo.de. The issue
is that when we all ldb_msg_add_empty(), we might realloc() the
msg->elements array.  We need to ensure the source pointer (when
copying an element from the same msg) is still valid, or the data
copied.

Andrew Bartlett
2007-10-10 15:01:16 -05:00
Andrew Tridgell
40c0919aaa r23798: updated old Temple Place FSF addresses to new URL 2007-10-10 14:59:15 -05:00
Andrew Tridgell
84b468b2f8 r23795: more v2->v3 conversion 2007-10-10 14:59:14 -05:00
Andrew Bartlett
dcff83ebe4 r23560: - Activate metze's schema modules (from metze's schema-loading-13 patch).
- samba3sam.js: rework the samba3sam test to not use objectCategory,
  as it's has special rules (dnsName a simple match)
- ldap.js: Test the ordering of the objectClass attributes for the baseDN
- schema_init.c: Load the mayContain and mustContain (and system...) attributes when
  reading the schema from ldb
- To make the schema load not suck in terms of performance, write the
  schema into a static global variable
- ldif_handlers.c: Match objectCategory for equality and canonicolisation
  based on the loaded schema, not simple tring manipuation
- ldb_msg.c: don't duplicate attributes when adding attributes to a list
- kludge_acl.c: return allowedAttributesEffective based on schema results
  and privilages

Andrew Bartlett
2007-10-10 14:53:27 -05:00
Stefan Metzmacher
4e32aafb9e r22989: allow '@foo' attributes searchable as we allow '@foo' attributes
in all other places too...

metze
2007-10-10 14:52:36 -05:00
Stefan Metzmacher
f6740c8b7a r22789: fix loading of internal samba4 modules
metze
2007-10-10 14:52:17 -05:00
Jelmer Vernooij
1152a4f56d r22750: dlopen() is always available now (and returns a correct error if not supported by the system), thanks to libreplace. 2007-10-10 14:52:09 -05:00
Simo Sorce
e24812016f r22696: Make sure this is an ascii char
spotted by Volker
2007-10-10 14:52:02 -05:00
Volker Lendecke
75ba82dee0 r22694: It seems that AIX 5.3 with XLC has difficulties with <ctype.h>. This is
an attempt to work around this: Maybe it helps if we include other stuff
first.

This raises a question however: Do we want the DN handling to be locale
dependent? isalpha() can return different things depending on the
current locale.
2007-10-10 14:52:02 -05:00
Jelmer Vernooij
1093875d59 r22681: Fix standalone ldb build when parent directory name != ldb. 2007-10-10 14:52:00 -05:00
Andrew Bartlett
c0fd6f6339 r22557: Simo has long bugged me that the paths in the sam.ldb partitions were
not relative to the location of the sam.ldb, but instead
lp_private_dir().

This fixes that issue.

Andrew Bartlett
2007-10-10 14:51:43 -05:00
Andrew Bartlett
a2848dbf1f r22474: If ldb does not return sucess, then the res variable may not be valid.
It *should* just be NULL from the initialisation above, but I've had
this not be the case...

Andrew Bartlett
2007-10-10 14:51:30 -05:00
Andrew Bartlett
7f115579d2 r21761: - Give more detail on LDAP client library failures (make it clear
where the error is from)

- Make default error string more consistant

Andrew Bartlett
2007-10-10 14:49:24 -05:00
Andrew Bartlett
2e85b1583b r21760: Try to pin down were some errors are coming from. Ensure we at least
name the module.

Andrew Bartlett
2007-10-10 14:49:23 -05:00
Andrew Bartlett
3430d8c072 r21736: Fix the smbclient test to do something more interesting with the last
few authentication tests.  Now that the tests correctly 'fail', I was
able to fix the credentials subsystem to honour USER and PASSWD.

To get --machine-pass working, I needed ldb to always load it's static
modules, so I put this in ldb_connect().

Andrew Bartlett
2007-10-10 14:49:20 -05:00
Andrew Bartlett
2b3df7f38d r21496: A number of ldb control and LDAP changes, surrounding the
'phantom_root' flag in the search_options control

- Add in support for LDB controls to the js layer
- Test the behaviour
- Implement support for the 'phantom_root' flag in the partitions module
- Make the LDAP server set the 'phantom_root' flag in the search_options control
  - This replaces the global_catalog flag passed down as an opaque pointer
- Rework the string-format control parsing function into
  ldb_parse_control_strings(), returning errors by ldb_errorstring()
  method, rather than with printf to stderr
- Rework some of the ldb_control handling logic

Andrew Bartlett
2007-10-10 14:48:44 -05:00
Stefan Metzmacher
beb816fb78 r20952: when a component is changed we need to rebuild the linearized string
metze
2007-10-10 14:43:59 -05:00
Stefan Metzmacher
f0bf86ed66 r20852: add a function to add a ldb control to a ldb_request
metze
2007-10-10 14:43:40 -05:00
Stefan Metzmacher
224a31cdbf r20761: let ldb modules call ldb_set_default_dns()
metze
2007-10-10 14:40:47 -05:00
Stefan Metzmacher
dfdfdd6cef r20731: we need the complex memmove() handling for removing an attribute only in one place
metze
2007-10-10 14:40:33 -05:00
Stefan Metzmacher
b98ca57a65 r20588: handle extended operations in the ldb_next_request() call
metze
2007-10-10 14:37:09 -05:00
Stefan Metzmacher
cfcd05adc0 r20583: implement the frontend calls for extended operations
metze
2007-10-10 14:37:08 -05:00
Stefan Metzmacher
aababcbb05 r20581: - the ldb modules have explicit hooks for extended operations
so call them
- reorder the request operations first all with explixit hooks

metze
2007-10-10 14:37:07 -05:00
Stefan Metzmacher
49c7da812c r20462: add functions to handle UTCTime strings
metze
2007-10-10 14:35:52 -05:00
Andrew Bartlett
ef1ca30180 r20373: When adding a base to a "" DN, don't precede it with a comma (,)
Andrew Bartlett
2007-10-10 14:30:18 -05:00
Stefan Metzmacher
e28cb83904 r20317: store references to all important naming contexts.
add ldb_get_config_basedn(), ldb_get_schema_basedn()
and ldb_get_root_basedn()

metze
2007-10-10 14:29:38 -05:00
Stefan Metzmacher
5ac373c8b8 r20192: I assume a 'break' is the correct thing to do here,
simo,tridge: please check this.

found by the IBM checker

metze
2007-10-10 14:29:21 -05:00
Stefan Metzmacher
d20d1872d5 r20189: remove unused struct element
metze
2007-10-10 14:29:20 -05:00
Stefan Metzmacher
70c4a36743 r20188: move back to an default attribute handler and not use the '*' attribute
to not conflict with the one that maybe added via the @ATTRIBUTES object

this is just to make the test-tdb-feature.sh torture test happy

There's still a bug when a attribute is registered multiple time
without removing old ldb_schema_attribute instances. But this bug
was there before my changes too and was just triggered by my changes

metze
2007-10-10 14:29:19 -05:00
Stefan Metzmacher
b97b8f5dcb 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
2007-10-10 14:29:19 -05:00
Stefan Metzmacher
8dda4342f6 r20168: start separating attributes and syntaxes
metze
2007-10-10 14:29:17 -05:00
Simo Sorce
fdd6ce6b7e r20033: Never commit before testing
Never commit before testing
Never commit before testing

:-)
2007-10-10 14:28:51 -05:00
Simo Sorce
2a2e181e4b r20032: Add ldb_search_exp_fmt()
This functions adds support of a memory context to hook the results to
and a printf style exp_fmt partameter to easily build expressions at once.
2007-10-10 14:28:50 -05:00
Stefan Metzmacher
01e3a5080a r20023: handle <SID=...> <WKGUID=...> dn's also in ldb_dn_new_fmt()
metze
2007-10-10 14:28:48 -05:00
Stefan Metzmacher
98ab0af4ae r19966: we don't need 2 versions of this functions
metze
2007-10-10 14:28:41 -05:00
Stefan Metzmacher
f129d78256 r19964: make debuging easier and report usefull error messages
metze
2007-10-10 14:28:40 -05:00
Stefan Metzmacher
3c087c8970 r19954: allow more special dn's:
this works now against w2k3:

bin/ldbedit -U administrator%test -H ldap://w2k3-101/ -b "<GUID=44087590-dd95-435c-adc1-ec20a50807be>" -s base
bin/ldbedit -U administrator%test -H ldap://w2k3-101/ -b "<SID=S-1-5-21-769185814-1958994947-1641909093-513>" -s base
bin/ldbedit -U administrator%test -H ldap://w2k3-101/ -b "<WKGUID=AB8153B7768811D1ADED00C04FD8D5CD,DC=w2k3,dc=vmnet1,dc=vm,dc=base>" -s base

and we should try to implement this in the server too...

metze
2007-10-10 14:28:40 -05:00
Simo Sorce
b1197dbeeb r19910: Make better use of our set of talloc utility functions 2007-10-10 14:28:35 -05:00
Simo Sorce
67b88e49b8 r19909: Make this one double as fast 2007-10-10 14:28:35 -05:00
Simo Sorce
789e1088c9 r19907: this function is used a lot
use a binary search to get the right handler
2007-10-10 14:28:35 -05:00
Simo Sorce
3ca2586762 r19906: ldb_attr_cmp is used a lot
remove unneded overhead of a function call
2007-10-10 14:28:34 -05:00
Volker Lendecke
75e6fb9654 r19901: Fix a potential NULL dereference 2007-10-10 14:28:33 -05:00
Simo Sorce
627ed8b516 r19888: make it possible to use default attrib handlers from extensions
list more DN attributes as part of samba attribute handlers
(nCName moved here)
2007-10-10 14:28:32 -05:00
Simo Sorce
056f90798f r19887: return "" string only if the dn is a valid one 2007-10-10 14:28:32 -05:00