OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.24 / (download) - annotate - [select for diffs], Mon Dec 20 13:26:11 2021 UTC (2 years, 5 months ago) by claudio
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, HEAD
Changes since 1.23: +3 -2 lines
Diff to previous 1.23 (colored)

When removing the last value from an attribute in ldap_del_values()
the actuall attribute needs to removed instead of leaving back an
empty attribute. Empty attributes are not valid and fail later on
in ldap_modify(). By calling ldap_del_attribute() in this case
properly removes the attribute and with that validate_entry() no
longer fails later on.
OK jmatthew@

Revision 1.22.2.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.22: +21 -21 lines
Diff to previous 1.22 (colored) next main 1.23 (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.23 / (download) - annotate - [select for diffs], Thu Oct 24 12:39:26 2019 UTC (4 years, 7 months ago) by tb
Branch: MAIN
CVS Tags: 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
Changes since 1.22: +21 -21 lines
Diff to previous 1.22 (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.22 / (download) - annotate - [select for diffs], Sat May 18 18:45:53 2019 UTC (5 years ago) by rob
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE
Branch point for: OPENBSD_6_6
Changes since 1.21: +3 -3 lines
Diff to previous 1.21 (colored)

Fix LDAP RFC reference in comment. Also noticed by martijn.

ok guenther@, claudio@

Revision 1.21 / (download) - annotate - [select for diffs], Mon May 14 07:53:47 2018 UTC (6 years ago) by reyk
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.20: +34 -6 lines
Diff to previous 1.20 (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.20 / (download) - annotate - [select for diffs], Fri Jul 28 12:58:52 2017 UTC (6 years, 10 months ago) by florian
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored)

One negation is enough; pointed out by clang.

OK gsoares who says that he forgot about the same diff for months and
that millert@ had OK'ed it.

Revision 1.19 / (download) - annotate - [select for diffs], Sat Feb 11 20:40:03 2017 UTC (7 years, 3 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.18: +12 -3 lines
Diff to previous 1.18 (colored)

Correct handling of requests to delete individual attribute values.

reported by ZHANG Huangbin (zhb (at) iredmail.org)
fix by Robert Klein (roklein (at) roklein.de)

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
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: +2 -2 lines
Diff to previous 1.16 (colored)

bzero -> memset. No binary change.

Revision 1.16 / (download) - annotate - [select for diffs], Wed Feb 11 04:04:30 2015 UTC (9 years, 3 months ago) by pelikan
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.15: +3 -2 lines
Diff to previous 1.15 (colored)

initialize a variable in case "goto done" makes us compare it

found by clang, ok henning

Revision 1.15 / (download) - annotate - [select for diffs], Sun Sep 21 05:33:49 2014 UTC (9 years, 8 months ago) by daniel
Branch: MAIN
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

eliminate the use of a gcc C extension (conditionals with omitted
operands).

ok deraadt@

Revision 1.14 / (download) - annotate - [select for diffs], Wed Jul 28 10:06:19 2010 UTC (13 years, 10 months ago) by martinh
Branch: MAIN
CVS Tags: 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, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.13: +7 -6 lines
Diff to previous 1.13 (colored)

Revert parts of previous change leading to assertion failure for
certain modify operations. Also fix logic error when replacing an attribute
with the empty set.

Revision 1.13 / (download) - annotate - [select for diffs], Tue Jul 13 12:54:51 2010 UTC (13 years, 10 months ago) by martinh
Branch: MAIN
Changes since 1.12: +28 -12 lines
Diff to previous 1.12 (colored)

Avoid double free in ldap modify requests. The values received in the
modify request is linked into the stored ber structure, and then both are
freed. Fix this by unlinking the values from the request.

Revision 1.12 / (download) - annotate - [select for diffs], Tue Jul 6 20:02:33 2010 UTC (13 years, 10 months ago) by martinh
Branch: MAIN
Changes since 1.11: +3 -1 lines
Diff to previous 1.11 (colored)

Plug another memory leak. Forgot to reset key returned from cursor, having
a reference to a cached page.

Revision 1.11 / (download) - annotate - [select for diffs], Tue Jul 6 09:27:05 2010 UTC (13 years, 10 months ago) by martinh
Branch: MAIN
Changes since 1.10: +6 -14 lines
Diff to previous 1.10 (colored)

Check return code from commit. Incorrectly returned success when commit
failed due to disk full.

Revision 1.10 / (download) - annotate - [select for diffs], Mon Jul 5 14:27:06 2010 UTC (13 years, 11 months ago) by martinh
Branch: MAIN
Changes since 1.9: +16 -12 lines
Diff to previous 1.9 (colored)

Close cursor on delete. Fixes memory leak introduced by non-leaf delete
check.

Revision 1.9 / (download) - annotate - [select for diffs], Fri Jul 2 02:42:02 2010 UTC (13 years, 11 months ago) by martinh
Branch: MAIN
Changes since 1.8: +27 -20 lines
Diff to previous 1.8 (colored)

Don't validate modification of immutable attributes if the namespace is
configured with relaxed schema checking.

Revision 1.8 / (download) - annotate - [select for diffs], Fri Jul 2 01:44:45 2010 UTC (13 years, 11 months ago) by martinh
Branch: MAIN
Changes since 1.7: +29 -7 lines
Diff to previous 1.7 (colored)

Disallow deleting non-leaf nodes.

Revision 1.7 / (download) - annotate - [select for diffs], Thu Jul 1 00:43:56 2010 UTC (13 years, 11 months ago) by martinh
Branch: MAIN
Changes since 1.6: +48 -20 lines
Diff to previous 1.6 (colored)

Add checks that we're not adding immutable attributes, just as we're
disallowing modifying immutable attributes. Remove the check for modifying
operational attributes, as there's nothing that disallows that (except that
they're also often marked as immutable).

While here, check the return value from ber_add_* and ldap_add_attribute.

Revision 1.6 / (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.5: +25 -7 lines
Diff to previous 1.5 (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.5 / (download) - annotate - [select for diffs], Tue Jun 29 02:54:20 2010 UTC (13 years, 11 months ago) by martinh
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

don't overwrite the return code from validate_entry

Revision 1.4 / (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.3: +3 -3 lines
Diff to previous 1.3 (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.3 / (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.2: +48 -60 lines
Diff to previous 1.2 (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.2 / (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.1: +62 -25 lines
Diff to previous 1.1 (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.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.