* [PATCH] autofs-5.1.9 - fix ldap_parse_page_control() check
@ 2024-03-20 0:59 David Disseldorp
2024-03-20 3:43 ` Ian Kent
2024-03-20 7:51 ` Paul Menzel
0 siblings, 2 replies; 6+ messages in thread
From: David Disseldorp @ 2024-03-20 0:59 UTC (permalink / raw)
To: autofs; +Cc: David Disseldorp
The final @cookie parameter should be a struct berval ** type. The
check currently fails when -Werror=incompatible-pointer-types is set:
conftest.c: In function 'main':
conftest.c:54:47: error: passing argument 4 of 'ldap_parse_page_control'
from incompatible pointer type [-Werror=incompatible-pointer-types]
54 | ret = ldap_parse_page_control(ld,clp,ct,c);
| ^
| |
| struct berval *
In file included from /usr/include/lber_types.h:24,
from /usr/include/lber.h:29,
from /usr/include/ldap.h:30,
from conftest.c:45:
/usr/include/ldap.h:2155:25: note: expected 'struct berval **' but
argument is of type 'struct berval *'
2155 | ldap_parse_page_control LDAP_P((
Signed-off-by: David Disseldorp <ddiss@suse.de>
---
aclocal.m4 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/aclocal.m4 b/aclocal.m4
index 1046d72..fa18eb1 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -424,7 +424,7 @@ AC_LINK_IFELSE(
#include <ldap.h> ]],
[[ LDAP *ld;
ber_int_t *ct;
- struct berval *c;
+ struct berval **c;
int ret;
LDAPControl **clp;
ret = ldap_parse_page_control(ld,clp,ct,c); ]])],
--
2.35.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] autofs-5.1.9 - fix ldap_parse_page_control() check
2024-03-20 0:59 [PATCH] autofs-5.1.9 - fix ldap_parse_page_control() check David Disseldorp
@ 2024-03-20 3:43 ` Ian Kent
2024-04-16 14:23 ` David Disseldorp
2024-03-20 7:51 ` Paul Menzel
1 sibling, 1 reply; 6+ messages in thread
From: Ian Kent @ 2024-03-20 3:43 UTC (permalink / raw)
To: David Disseldorp, autofs
On 20/3/24 08:59, David Disseldorp wrote:
> The final @cookie parameter should be a struct berval ** type. The
> check currently fails when -Werror=incompatible-pointer-types is set:
>
> conftest.c: In function 'main':
> conftest.c:54:47: error: passing argument 4 of 'ldap_parse_page_control'
> from incompatible pointer type [-Werror=incompatible-pointer-types]
> 54 | ret = ldap_parse_page_control(ld,clp,ct,c);
> | ^
> | |
> | struct berval *
> In file included from /usr/include/lber_types.h:24,
> from /usr/include/lber.h:29,
> from /usr/include/ldap.h:30,
> from conftest.c:45:
> /usr/include/ldap.h:2155:25: note: expected 'struct berval **' but
> argument is of type 'struct berval *'
> 2155 | ldap_parse_page_control LDAP_P((
>
> Signed-off-by: David Disseldorp <ddiss@suse.de>
> ---
> aclocal.m4 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/aclocal.m4 b/aclocal.m4
> index 1046d72..fa18eb1 100644
> --- a/aclocal.m4
> +++ b/aclocal.m4
> @@ -424,7 +424,7 @@ AC_LINK_IFELSE(
> #include <ldap.h> ]],
> [[ LDAP *ld;
> ber_int_t *ct;
> - struct berval *c;
> + struct berval **c;
> int ret;
> LDAPControl **clp;
> ret = ldap_parse_page_control(ld,clp,ct,c); ]])],
Thanks David, looks ok to me, will have a closer look and (I expect)
will apply it.
Ian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] autofs-5.1.9 - fix ldap_parse_page_control() check
2024-03-20 0:59 [PATCH] autofs-5.1.9 - fix ldap_parse_page_control() check David Disseldorp
2024-03-20 3:43 ` Ian Kent
@ 2024-03-20 7:51 ` Paul Menzel
2024-03-21 0:01 ` David Disseldorp
1 sibling, 1 reply; 6+ messages in thread
From: Paul Menzel @ 2024-03-20 7:51 UTC (permalink / raw)
To: David Disseldorp; +Cc: autofs
Dear David,
Thank you for your patch.
Am 20.03.24 um 01:59 schrieb David Disseldorp:
> The final @cookie parameter should be a struct berval ** type. The
> check currently fails when -Werror=incompatible-pointer-types is set:
>
> conftest.c: In function 'main':
> conftest.c:54:47: error: passing argument 4 of 'ldap_parse_page_control'
> from incompatible pointer type [-Werror=incompatible-pointer-types]
> 54 | ret = ldap_parse_page_control(ld,clp,ct,c);
> | ^
> | |
> | struct berval *
> In file included from /usr/include/lber_types.h:24,
> from /usr/include/lber.h:29,
> from /usr/include/ldap.h:30,
> from conftest.c:45:
> /usr/include/ldap.h:2155:25: note: expected 'struct berval **' but
> argument is of type 'struct berval *'
> 2155 | ldap_parse_page_control LDAP_P((
I wouldn’t wrap the lines of the pasted parts, and use a more specific
commit message summary instead of just *fix … check*. Maybe:
ldap_parse_page_control(): Use correct type for @cookie
> Signed-off-by: David Disseldorp <ddiss@suse.de>
> ---
> aclocal.m4 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/aclocal.m4 b/aclocal.m4
> index 1046d72..fa18eb1 100644
> --- a/aclocal.m4
> +++ b/aclocal.m4
> @@ -424,7 +424,7 @@ AC_LINK_IFELSE(
> #include <ldap.h> ]],
> [[ LDAP *ld;
> ber_int_t *ct;
> - struct berval *c;
> + struct berval **c;
> int ret;
> LDAPControl **clp;
> ret = ldap_parse_page_control(ld,clp,ct,c); ]])],
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Kind regards,
Paul
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] autofs-5.1.9 - fix ldap_parse_page_control() check
2024-03-20 7:51 ` Paul Menzel
@ 2024-03-21 0:01 ` David Disseldorp
0 siblings, 0 replies; 6+ messages in thread
From: David Disseldorp @ 2024-03-21 0:01 UTC (permalink / raw)
To: Paul Menzel; +Cc: autofs
Hi Paul,
On Wed, 20 Mar 2024 08:51:30 +0100, Paul Menzel wrote:
...
> > /usr/include/ldap.h:2155:25: note: expected 'struct berval **' but
> > argument is of type 'struct berval *'
> > 2155 | ldap_parse_page_control LDAP_P((
>
> I wouldn’t wrap the lines of the pasted parts, and use a more specific
> commit message summary instead of just *fix … check*. Maybe:
>
> ldap_parse_page_control(): Use correct type for @cookie
I'm fine with it either way, but I think the commit summary should
indicate that it's the config-time ldap_parse_page_control() call that's
problematic, not the modules/lookup_ldap.c invocation.
@Ian: feel free to update the commit message as you see fit.
...
> Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Thanks for the review!
David
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] autofs-5.1.9 - fix ldap_parse_page_control() check
2024-03-20 3:43 ` Ian Kent
@ 2024-04-16 14:23 ` David Disseldorp
2024-04-17 3:10 ` Ian Kent
0 siblings, 1 reply; 6+ messages in thread
From: David Disseldorp @ 2024-04-16 14:23 UTC (permalink / raw)
To: Ian Kent; +Cc: autofs
On Wed, 20 Mar 2024 11:43:19 +0800, Ian Kent wrote:
> On 20/3/24 08:59, David Disseldorp wrote:
...
> > - struct berval *c;
> > + struct berval **c;
> > int ret;
> > LDAPControl **clp;
> > ret = ldap_parse_page_control(ld,clp,ct,c); ]])],
>
>
> Thanks David, looks ok to me, will have a closer look and (I expect)
> will apply it.
Thanks for the feedback Ian. Is there anything holding this one up from
being merged?
Cheers, David
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] autofs-5.1.9 - fix ldap_parse_page_control() check
2024-04-16 14:23 ` David Disseldorp
@ 2024-04-17 3:10 ` Ian Kent
0 siblings, 0 replies; 6+ messages in thread
From: Ian Kent @ 2024-04-17 3:10 UTC (permalink / raw)
To: David Disseldorp; +Cc: autofs
On 16/4/24 22:23, David Disseldorp wrote:
> On Wed, 20 Mar 2024 11:43:19 +0800, Ian Kent wrote:
>
>> On 20/3/24 08:59, David Disseldorp wrote:
> ...
>>> - struct berval *c;
>>> + struct berval **c;
>>> int ret;
>>> LDAPControl **clp;
>>> ret = ldap_parse_page_control(ld,clp,ct,c); ]])],
>>
>> Thanks David, looks ok to me, will have a closer look and (I expect)
>> will apply it.
> Thanks for the feedback Ian. Is there anything holding this one up from
> being merged?
No, only me, actually I want to do a release but (just a couple of days
ago) I was thinking I need
to push this and a couple of other patches to the repo. before I start
the round of testing.
I have a bit to do (unrelated to this) before I get to it so sorry for
the hold up.
Ian
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-04-17 3:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-20 0:59 [PATCH] autofs-5.1.9 - fix ldap_parse_page_control() check David Disseldorp
2024-03-20 3:43 ` Ian Kent
2024-04-16 14:23 ` David Disseldorp
2024-04-17 3:10 ` Ian Kent
2024-03-20 7:51 ` Paul Menzel
2024-03-21 0:01 ` David Disseldorp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).