/src/gss-ntlmssp/src/debug.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* Copyright (C) 2014 GSS-NTLMSSP contributors, see COPYING for license */ |
2 | | |
3 | | #ifndef _GSSNTLMSSP_DEBUG_H_ |
4 | | #define _GSSNTLMSSP_DEBUG_H_ |
5 | | |
6 | | #include <stdbool.h> |
7 | | #include <time.h> |
8 | | |
9 | | extern gss_OID_desc gssntlm_debug_oid; |
10 | | extern bool gssntlm_debug_initialized; |
11 | | extern int gssntlm_debug_fd; |
12 | | |
13 | | void gssntlm_debug_init(void); |
14 | | void gssntlm_debug_printf(const char *fmt, ...); |
15 | | |
16 | 19.9k | #define unlikely(x) __builtin_expect(!!(x), 0) |
17 | | |
18 | | static inline int debug_gss_errors(const char *function, |
19 | | const char *file, |
20 | | unsigned int line, |
21 | | unsigned int maj, |
22 | | unsigned int min) |
23 | 9.98k | { |
24 | 9.98k | if (unlikely(gssntlm_debug_initialized == false)) { |
25 | 1 | gssntlm_debug_init(); |
26 | 1 | } |
27 | 9.98k | if (unlikely(gssntlm_debug_fd != -1)) { |
28 | 0 | gssntlm_debug_printf("[%ld] %s: %s() @ %s:%u [%u:%u]\n", |
29 | 0 | (long)time(NULL), |
30 | 0 | GSS_ERROR(maj) ? "ERROR" : "ALLOK", |
31 | 0 | function, file, line, maj, min); |
32 | 0 | } |
33 | 9.98k | return 0; |
34 | 9.98k | } Unexecuted instantiation: fuzz-accept-sec-context.c:debug_gss_errors Unexecuted instantiation: gss_spi.c:debug_gss_errors gss_names.c:debug_gss_errors Line | Count | Source | 23 | 6.57k | { | 24 | 6.57k | if (unlikely(gssntlm_debug_initialized == false)) { | 25 | 1 | gssntlm_debug_init(); | 26 | 1 | } | 27 | 6.57k | if (unlikely(gssntlm_debug_fd != -1)) { | 28 | 0 | gssntlm_debug_printf("[%ld] %s: %s() @ %s:%u [%u:%u]\n", | 29 | 0 | (long)time(NULL), | 30 | 0 | GSS_ERROR(maj) ? "ERROR" : "ALLOK", | 31 | 0 | function, file, line, maj, min); | 32 | 0 | } | 33 | 6.57k | return 0; | 34 | 6.57k | } |
gss_creds.c:debug_gss_errors Line | Count | Source | 23 | 80 | { | 24 | 80 | if (unlikely(gssntlm_debug_initialized == false)) { | 25 | 0 | gssntlm_debug_init(); | 26 | 0 | } | 27 | 80 | if (unlikely(gssntlm_debug_fd != -1)) { | 28 | 0 | gssntlm_debug_printf("[%ld] %s: %s() @ %s:%u [%u:%u]\n", | 29 | 0 | (long)time(NULL), | 30 | 0 | GSS_ERROR(maj) ? "ERROR" : "ALLOK", | 31 | 0 | function, file, line, maj, min); | 32 | 0 | } | 33 | 80 | return 0; | 34 | 80 | } |
gss_sec_ctx.c:debug_gss_errors Line | Count | Source | 23 | 3.32k | { | 24 | 3.32k | if (unlikely(gssntlm_debug_initialized == false)) { | 25 | 0 | gssntlm_debug_init(); | 26 | 0 | } | 27 | 3.32k | if (unlikely(gssntlm_debug_fd != -1)) { | 28 | 0 | gssntlm_debug_printf("[%ld] %s: %s() @ %s:%u [%u:%u]\n", | 29 | 0 | (long)time(NULL), | 30 | 0 | GSS_ERROR(maj) ? "ERROR" : "ALLOK", | 31 | 0 | function, file, line, maj, min); | 32 | 0 | } | 33 | 3.32k | return 0; | 34 | 3.32k | } |
Unexecuted instantiation: gss_signseal.c:debug_gss_errors Unexecuted instantiation: gss_serialize.c:debug_gss_errors Unexecuted instantiation: external.c:debug_gss_errors Unexecuted instantiation: gss_auth.c:debug_gss_errors Unexecuted instantiation: gss_ntlmssp.c:debug_gss_errors Unexecuted instantiation: gss_err.c:debug_gss_errors |
35 | | #define DEBUG_GSS_ERRORS(maj, min) \ |
36 | 10.0k | debug_gss_errors(__FUNCTION__, __FILE__, __LINE__, maj, min) |
37 | | |
38 | | int gssntlm_debug_invoke(gss_buffer_t value); |
39 | | |
40 | | #endif /* _GSSNTLMSSP_DEBUG_H_ */ |