]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
CVE-2022-3437 source4/heimdal: Remove __func__ compatibility workaround
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Wed, 12 Oct 2022 00:56:08 +0000 (13:56 +1300)
committerJule Anger <janger@samba.org>
Mon, 24 Oct 2022 05:27:02 +0000 (07:27 +0200)
As described by the C standard, __func__ is a variable, not a macro.
Hence this #ifndef check does not work as intended, and only serves to
unconditionally disable __func__. A nonoperating __func__ prevents
cmocka operating correctly, so remove this definition.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15134

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/heimdal/lib/krb5/krb5_locl.h

index 49c614d5efe1fa19038484cbc362cb25f71efa34..d3360c556cea2c17eb874ca506d721465ed219d2 100644 (file)
@@ -188,10 +188,6 @@ struct _krb5_krb_auth_data;
 #define ALLOC(X, N) (X) = calloc((N), sizeof(*(X)))
 #define ALLOC_SEQ(X, N) do { (X)->len = (N); ALLOC((X)->val, (N)); } while(0)
 
-#ifndef __func__
-#define __func__ "unknown-function"
-#endif
-
 #define krb5_einval(context, argnum) _krb5_einval((context), __func__, (argnum))
 
 #ifndef PATH_SEP