[Freeipa-devel] [PATCH] Fix typo
Sumit Bose
sbose at redhat.com
Mon Jul 9 12:20:50 UTC 2012
On Tue, Jun 26, 2012 at 10:29:00AM +0200, Sumit Bose wrote:
> Hi,
>
> this patch fixes a small typo and silences a compiler warning. I think
> it is right to use authdata instead of &authdata here, but I have to
> admit that I cannot say why we have not seen any issues before.
>
> bye,
> Sumit
I think I have an idea why both versions are working. I would expect
that in the 'authdata' case gcc does not pass the krb5_authdata array
by value but by reference. In the '&authdata' case gcc passes the
pointer to the krb5_authdata array by value. As a result in both case
the same address is on the stack and krb5_encode_authdata_container()
can work as expected. I hope this makes sense.
Nevertheless I still think the 'authdata' version is the correct one.
bye,
Sumit
> From 94ee2395539bad666f0ffea4ccb688d4a5330582 Mon Sep 17 00:00:00 2001
> From: Sumit Bose <sbose at redhat.com>
> Date: Tue, 26 Jun 2012 09:58:01 +0200
> Subject: [PATCH] Fix typo
>
> ---
> daemons/ipa-kdb/ipa_kdb_mspac.c | 2 +-
> 1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)
>
> diff --git a/daemons/ipa-kdb/ipa_kdb_mspac.c b/daemons/ipa-kdb/ipa_kdb_mspac.c
> index f640b545a636a2c58e3eb31951de142e5b0ffbe2..1c7487c3c8f75d02466a2e0746fbef5d36e3d995 100644
> --- a/daemons/ipa-kdb/ipa_kdb_mspac.c
> +++ b/daemons/ipa-kdb/ipa_kdb_mspac.c
> @@ -1267,7 +1267,7 @@ krb5_error_code ipadb_sign_authdata(krb5_context context,
>
> kerr = krb5_encode_authdata_container(context,
> KRB5_AUTHDATA_IF_RELEVANT,
> - &authdata,
> + authdata,
> signed_auth_data);
> if (kerr != 0) {
> goto done;
> --
> 1.7.10.2
>
> _______________________________________________
> Freeipa-devel mailing list
> Freeipa-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/freeipa-devel
More information about the Freeipa-devel
mailing list