7c69675
From 8c5b63069dfbf36ac662369d9ba3fb4ab0d2efb2 Mon Sep 17 00:00:00 2001
7c69675
From: Ray Strode <rstrode@redhat.com>
7c69675
Date: Thu, 15 Dec 2022 14:46:01 -0500
7c69675
Subject: [PATCH 2/2] kerberos-identity: Fix buglet in update_identity
7c69675
7c69675
The update_identity function is supposed to transfer the identity
7c69675
form one object to another.
7c69675
7c69675
In practice, this is currently always a noop because only objects
7c69675
with the same identities get copied to each other.
7c69675
7c69675
Nevertheless, there is a bug in the function. It grabs the identity
7c69675
from the target object instead of from the source object.
7c69675
7c69675
This commit fixes that.
7c69675
---
7c69675
 src/goaidentity/goakerberosidentity.c | 2 +-
7c69675
 1 file changed, 1 insertion(+), 1 deletion(-)
7c69675
7c69675
diff --git a/src/goaidentity/goakerberosidentity.c b/src/goaidentity/goakerberosidentity.c
7c69675
index a20c0438..bc607966 100644
7c69675
--- a/src/goaidentity/goakerberosidentity.c
7c69675
+++ b/src/goaidentity/goakerberosidentity.c
7c69675
@@ -1507,7 +1507,7 @@ update_identifier (GoaKerberosIdentity *self, GoaKerberosIdentity *new_identity)
7c69675
 {
7c69675
   char *new_identifier;
7c69675
 
7c69675
-  new_identifier = get_identifier (self, NULL);
7c69675
+  new_identifier = get_identifier (new_identity, NULL);
7c69675
   if (g_strcmp0 (self->identifier, new_identifier) != 0 && new_identifier != NULL)
7c69675
     {
7c69675
       g_free (self->identifier);
7c69675
-- 
7c69675
GitLab
7c69675