OpenBSD CVS

CVS log for src/usr.sbin/ldapd/search.c


[BACK] Up to [local] / src / usr.sbin / ldapd

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.26 / (download) - annotate - [select for diffs], Tue Jan 28 15:51:26 2020 UTC (4 years, 4 months ago) by bket
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, HEAD
Changes since 1.25: +5 -10 lines
Diff to previous 1.25 (colored)

usr.sbin/ldapd: replace TAILQ concatenation loop with TAILQ_CONCAT

OK florian@

Revision 1.24.4.1 / (download) - annotate - [select for diffs], Sun Oct 27 20:05:13 2019 UTC (4 years, 7 months ago) by tb
Branch: OPENBSD_6_6
Changes since 1.24: +87 -87 lines
Diff to previous 1.24 (colored) next main 1.25 (colored)

The ber_* namespace is used by liblber since time immemorial,
so move our BER API to the unused ober_* prefix to avoid some
breakage in ports.

Problem diagnosed by jmatthew with ber_free() in samba, but
there are many others as pointed out by sthen.

tests & ok rob
ok sthen (who had an almost identical diff for libutil)
"go head hit it" deraadt

OpenBSD 6.6 errata 002

Revision 1.25 / (download) - annotate - [select for diffs], Thu Oct 24 12:39:26 2019 UTC (4 years, 7 months ago) by tb
Branch: MAIN
Changes since 1.24: +87 -87 lines
Diff to previous 1.24 (colored)

The ber_* namespace is used by liblber since time immemorial,
so move our BER API to the unused ober_* prefix to avoid some
breakage in ports.

Problem diagnosed by jmatthew with ber_free() in samba, but
there are many others as pointed out by sthen.

tests & ok rob
ok sthen (who had an almost identical diff for libutil)
"go head hit it" deraadt

Revision 1.24 / (download) - annotate - [select for diffs], Wed Dec 5 06:44:09 2018 UTC (5 years, 5 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_5_BASE, OPENBSD_6_5
Branch point for: OPENBSD_6_6
Changes since 1.23: +7 -4 lines
Diff to previous 1.23 (colored)

key.data is a void *, on gcc archs doing a %s printf with such a pointer
results in a warning. Use either the original string value or use a cast.
This makes both clang and gcc happy.
OK guenther@

Revision 1.23 / (download) - annotate - [select for diffs], Tue Jul 31 11:01:00 2018 UTC (5 years, 10 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.22: +4 -4 lines
Diff to previous 1.22 (colored)

Make ber type and encoding a unsigned int instead of unsigned long.
This way the size is the same on all archs and 32bit should be good enough.
OK rob@

Revision 1.22 / (download) - annotate - [select for diffs], Fri May 18 12:36:30 2018 UTC (6 years ago) by reyk
Branch: MAIN
Changes since 1.21: +15 -3 lines
Diff to previous 1.21 (colored)

Add support for attribute filter rules on search/read operations.

OK jmatthew@

Revision 1.21 / (download) - annotate - [select for diffs], Wed May 16 10:08:47 2018 UTC (6 years ago) by reyk
Branch: MAIN
Changes since 1.20: +5 -5 lines
Diff to previous 1.20 (colored)

Fix the client search request time and size limits.

ldapd failed when the specified limits were reached instead of
exceeded.  This fixes search queries that define such a limit, for
example with "ldapsearch -z 1".

Thanks to Christophe Simon for the bug report, analysis, and fix!

OK jmatthew@

Revision 1.20 / (download) - annotate - [select for diffs], Tue May 15 11:19:21 2018 UTC (6 years ago) by reyk
Branch: MAIN
Changes since 1.19: +6 -6 lines
Diff to previous 1.19 (colored)

Fix format string errors in log messages and update ldapd to use relayd's log.c

OK benno@ jmatthew@

Revision 1.19 / (download) - annotate - [select for diffs], Mon May 14 07:53:47 2018 UTC (6 years ago) by reyk
Branch: MAIN
Changes since 1.18: +5 -5 lines
Diff to previous 1.18 (colored)

Add support to filter on attributes.

This can be used to allow users to change their password (and a few
other things) but not their entire dn. For example:

        allow read access to any by self
        allow write access to any attribute userPassword by self

This is currently only supported for "write" (modify, add, delete) and
not "read" (search) filter rules.

OK jmatthew@

Revision 1.18 / (download) - annotate - [select for diffs], Fri Jan 20 11:55:08 2017 UTC (7 years, 4 months ago) by benno
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.17: +2 -1 lines
Diff to previous 1.17 (colored)

work on making log.c similar in all daemons:

move daemon-local functions into new logmsg.c, and reduce
the (mostly whitespace) differences so that log.c's can be diffed easily.

ok krw@ jmatthew@

Revision 1.17 / (download) - annotate - [select for diffs], Thu Dec 24 17:47:57 2015 UTC (8 years, 5 months ago) by mmcc
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.16: +7 -7 lines
Diff to previous 1.16 (colored)

bzero -> memset. No binary change.

Revision 1.16 / (download) - annotate - [select for diffs], Thu Dec 24 17:23:44 2015 UTC (8 years, 5 months ago) by mmcc
Branch: MAIN
Changes since 1.15: +3 -4 lines
Diff to previous 1.15 (colored)

use strndup instead of malloc/strncpy/nul

ok krw@

Revision 1.15 / (download) - annotate - [select for diffs], Wed Jun 3 02:24:36 2015 UTC (9 years ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.14: +7 -2 lines
Diff to previous 1.14 (colored)

Do not assume that asprintf() clears the pointer on failure, which
is non-portable.  Also add missing asprintf() return value checks.
OK deraadt@ guenther@ doug@

Revision 1.14 / (download) - annotate - [select for diffs], Wed Nov 10 08:00:54 2010 UTC (13 years, 6 months ago) by martinh
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.13: +4 -1 lines
Diff to previous 1.13 (colored)

Make -dvv flags produce debug traces of decoded BER messages on stderr.
Also shows a hexdump of the input buffer if BER decoding fails.
Useful when debugging protocol issues.

Revision 1.13 / (download) - annotate - [select for diffs], Fri Nov 5 08:17:46 2010 UTC (13 years, 6 months ago) by martinh
Branch: MAIN
Changes since 1.12: +7 -2 lines
Diff to previous 1.12 (colored)

If the base DN in a search request doesn't exist, return early.

Revision 1.12 / (download) - annotate - [select for diffs], Thu Nov 4 15:35:00 2010 UTC (13 years, 7 months ago) by martinh
Branch: MAIN
Changes since 1.11: +17 -2 lines
Diff to previous 1.11 (colored)

Publish matching rules in the cn=schema subentry as the matchingRules
attribute. This is an operational attribute and only returned if explicitly
asked for. Required by RFC 4517.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Nov 3 10:33:17 2010 UTC (13 years, 7 months ago) by martinh
Branch: MAIN
Changes since 1.10: +95 -14 lines
Diff to previous 1.10 (colored)

Evaluate filters according to the three-valued logic of X.511, as required
by RFC 4511. A filter term can now be evaluated as undefined if the
attribute description is not recognized, the attribute type doesn't define
the appropriate matching rule, or the filtering is not implemented.

This also implements the NOT filter in the query planner.

Revision 1.10 / (download) - annotate - [select for diffs], Fri Jul 2 05:23:40 2010 UTC (13 years, 11 months ago) by martinh
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.9: +46 -11 lines
Diff to previous 1.9 (colored)

Dump parsed schema to buffer and send in requests for the cn=schema
subschema namespace. Only do this if 'objectClasses' and 'attributeTypes'
are expicitly requested. This allows clients to for example present custom
editing forms.

Revision 1.9 / (download) - annotate - [select for diffs], Thu Jul 1 02:19:11 2010 UTC (13 years, 11 months ago) by martinh
Branch: MAIN
Changes since 1.8: +5 -6 lines
Diff to previous 1.8 (colored)

Remove dead assignments. Found by clang static analyzer.

Revision 1.8 / (download) - annotate - [select for diffs], Tue Jun 29 21:54:38 2010 UTC (13 years, 11 months ago) by martinh
Branch: MAIN
Changes since 1.7: +9 -1 lines
Diff to previous 1.7 (colored)

Add support for referrals. Referrals are configured in the config file,
either in the global context or in a namespace. The latter can be used to
delegate requests to different servers for specific parts of the DIT. The
former is a global catch-all referral.

Revision 1.7 / (download) - annotate - [select for diffs], Tue Jun 29 02:45:46 2010 UTC (13 years, 11 months ago) by martinh
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

Rewrite the schema parser, as it's not a context-free grammar.
This also brings the config parser more in line with other parse.y in the
tree. The new schema parser also supports symbolic OID names.

You need to update your /etc/ldapd.conf. Schema files are no longer
included with the 'include' keyword, you have to use 'schema' for that.

Moves schema-related structures to a separate include file to ease reuse.

Revision 1.6 / (download) - annotate - [select for diffs], Wed Jun 23 13:10:14 2010 UTC (13 years, 11 months ago) by martinh
Branch: MAIN
Changes since 1.5: +28 -29 lines
Diff to previous 1.5 (colored)

Set errno to appropriate values when returning failure in btree. Make btree
functions only return success or failure (-1 or NULL). Update callers to
check errno.

Revision 1.5 / (download) - annotate - [select for diffs], Tue Jun 15 15:47:56 2010 UTC (13 years, 11 months ago) by martinh
Branch: MAIN
Changes since 1.4: +20 -11 lines
Diff to previous 1.4 (colored)

Make modify and simple auth requests open their own transactions, as search
already does. Trigger a reopen imsg request if either the data or index
databases are compacted. Queue the failed request and try again when the
file is reopened.

Compaction can now be done by a separate process, and ldapd will pick up
the change and reopen the file.

Revision 1.4 / (download) - annotate - [select for diffs], Fri Jun 11 12:02:03 2010 UTC (13 years, 11 months ago) by martinh
Branch: MAIN
Changes since 1.3: +25 -10 lines
Diff to previous 1.3 (colored)

Wrap searches in a read-only transaction so it is guaranteed to see a
consistent snapshot of the database.

Also fixes a couple of format string errors for long long ints.

Revision 1.3 / (download) - annotate - [select for diffs], Thu Jun 3 17:32:25 2010 UTC (14 years ago) by martinh
Branch: MAIN
Changes since 1.2: +6 -2 lines
Diff to previous 1.2 (colored)

Fix compilation on gcc2. Check a return value from malloc while at it.

"that compiles!" deraadt@

Revision 1.2 / (download) - annotate - [select for diffs], Mon May 31 18:29:04 2010 UTC (14 years ago) by martinh
Branch: MAIN
Changes since 1.1: +3 -3 lines
Diff to previous 1.1 (colored)

Remove trailing whitespace and spaces before tabs.

ok gilles@

Revision 1.1 / (download) - annotate - [select for diffs], Mon May 31 17:36:31 2010 UTC (14 years ago) by martinh
Branch: MAIN

Initial import of ldapd, a small LDAP daemon. Work in progress.

ok deraadt@ jacekm@ gilles@ back@ henning@ blambert@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.