Bug 278430 - Error in operator precedence in Heimdal LDAP code
Summary: Error in operator precedence in Heimdal LDAP code
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: Unspecified
Hardware: Any Any
: --- Affects Only Me
Assignee: Cy Schubert
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-18 12:22 UTC by andrew
Modified: 2024-04-29 12:51 UTC (History)
2 users (show)

See Also:


Attachments
Correcting patch (586 bytes, patch)
2024-04-18 12:22 UTC, andrew
no flags Details | Diff
Obtained from upstream c1c7da7f79. (1.76 KB, patch)
2024-04-24 00:03 UTC, Cy Schubert
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description andrew 2024-04-18 12:22:28 UTC
Created attachment 250047 [details]
Correcting patch

Base system does not build with WITH_OPENLDAP defined due to incorrect understanding of C language operator precedence: suffix [] has higher precedence than prefix () as any right-associating operator.

Solution: apply the patch attached.
Comment 1 Ed Maste freebsd_committer freebsd_triage 2024-04-23 23:54:05 UTC
This was fixed along with other changes in upstream https://github.com/heimdal/heimdal/commit/c1c7da7f79d79861a9c48af0a4d5a6734ea0da70
Comment 2 Cy Schubert freebsd_committer freebsd_triage 2024-04-24 00:03:57 UTC
Created attachment 250193 [details]
Obtained from upstream c1c7da7f79.

Instead let's import c1c7da7f79 from upstream. I'll look applying this in the morning.
Comment 3 Cy Schubert freebsd_committer freebsd_triage 2024-04-24 00:04:53 UTC
(In reply to Ed Maste from comment #1)

I was already looking at it. Got a patch ready for commit. I'll push it in the morning.
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-04-24 05:55:30 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=a0d7d68a2dd818ce84e37e1ff20c8849cda6d853

commit a0d7d68a2dd818ce84e37e1ff20c8849cda6d853
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2014-01-10 19:18:06 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2024-04-24 05:54:20 +0000

    heimdal: Fix compiling hdb ldap as a module

    Fix build when WITH_OPENLDAP defined.

    PR:             278430
    Obtained from:  Upstream c1c7da7f79

 crypto/heimdal/lib/hdb/hdb-ldap.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
Comment 5 Cy Schubert freebsd_committer freebsd_triage 2024-04-24 06:10:28 UTC
I've put a calendar entry into plan(1) to MFC this on Monday April 29 at 0800U.
Comment 6 commit-hook freebsd_committer freebsd_triage 2024-04-29 12:51:47 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=8640bd657d841d1307520eca792e959acdf2063f

commit 8640bd657d841d1307520eca792e959acdf2063f
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2014-01-10 19:18:06 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2024-04-29 12:50:19 +0000

    heimdal: Fix compiling hdb ldap as a module

    Fix build when WITH_OPENLDAP defined.

    PR:             278430
    Obtained from:  Upstream c1c7da7f79

    (cherry picked from commit a0d7d68a2dd818ce84e37e1ff20c8849cda6d853)

 crypto/heimdal/lib/hdb/hdb-ldap.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
Comment 7 commit-hook freebsd_committer freebsd_triage 2024-04-29 12:51:53 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=a161f2405f10a5b39e87b7e9fdd5c8405462d133

commit a161f2405f10a5b39e87b7e9fdd5c8405462d133
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2014-01-10 19:18:06 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2024-04-29 12:51:11 +0000

    heimdal: Fix compiling hdb ldap as a module

    Fix build when WITH_OPENLDAP defined.

    PR:             278430
    Obtained from:  Upstream c1c7da7f79

    (cherry picked from commit a0d7d68a2dd818ce84e37e1ff20c8849cda6d853)

 crypto/heimdal/lib/hdb/hdb-ldap.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)