Blame SOURCES/nfs-utils-2.5.4-gssd-debug-msg.patch

381c0b
commit cfe41d6f06af0e7744c1ca30503f93d28aca4d8b
381c0b
Author: NeilBrown <neilb@suse.de>
381c0b
Date:   Tue Sep 21 12:47:10 2021 -0400
381c0b
381c0b
    gssd: fix crash in debug message.
381c0b
    
381c0b
    A recent cleanup of debug messages added func and tid format specifiers
381c0b
    to a debug message (when full hostname was different), but the func name
381c0b
    and tid were NOT added as arguments.
381c0b
    
381c0b
    Consequently there weren't enough args, random bytes of the stack were
381c0b
    interpreted as a pointer, and rpc.gssd crashed (when -v was specified).
381c0b
    
381c0b
    Fixes: b538862a5135 ("gssd: Cleaned up debug messages")
381c0b
    Reviewed-by: Petr Vorel <pvorel@suse.cz>
381c0b
    Signed-off-by: NeilBrown <neilb@suse.de>
381c0b
    Signed-off-by: Steve Dickson <steved@redhat.com>
381c0b
381c0b
diff --git a/utils/gssd/krb5_util.c b/utils/gssd/krb5_util.c
381c0b
index 6d059f33..e3f270e9 100644
381c0b
--- a/utils/gssd/krb5_util.c
381c0b
+++ b/utils/gssd/krb5_util.c
381c0b
@@ -673,8 +673,8 @@ get_full_hostname(const char *inhost, char *outhost, int outhostlen)
381c0b
 	    *c = tolower(*c);
381c0b
 
381c0b
 	if (get_verbosity() && strcmp(inhost, outhost))
381c0b
-		printerr(1, "%s(0x%0lx): inhost '%s' different than outhost'%s'\n", 
381c0b
-			inhost, outhost);
381c0b
+		printerr(1, "%s(0x%0lx): inhost '%s' different than outhost '%s'\n", 
381c0b
+			 __func__, tid, inhost, outhost);
381c0b
 
381c0b
 	retval = 0;
381c0b
 out: