54 lines
1.9 KiB
Diff
54 lines
1.9 KiB
Diff
|
From 766fe6235083d38bc25ae5562cd67113262af015 Mon Sep 17 00:00:00 2001
|
|||
|
From: Alexey Tikhonov <atikhono@redhat.com>
|
|||
|
Date: Mon, 18 Oct 2021 22:25:31 +0200
|
|||
|
Subject: [PATCH 05/17] GPO: fixed compilation warning
|
|||
|
MIME-Version: 1.0
|
|||
|
Content-Type: text/plain; charset=UTF-8
|
|||
|
Content-Transfer-Encoding: 8bit
|
|||
|
|
|||
|
Fixes following compilation warning:
|
|||
|
```
|
|||
|
../src/providers/ad/ad_gpo.c: In function ‘ad_gpo_access_send’:
|
|||
|
../src/util/debug.h:138:5: warning: ‘%s’ directive argument is null [-Wformat-overflow=]
|
|||
|
138 | sss_debug_fn(__FILE__, __LINE__, __FUNCTION__, \
|
|||
|
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|||
|
139 | level, \
|
|||
|
| ~~~~~~~~
|
|||
|
140 | format, ##__VA_ARGS__); \
|
|||
|
| ~~~~~~~~~~~~~~~~~~~~~~
|
|||
|
../src/providers/ad/ad_gpo.c:1847:5: note: in expansion of macro ‘DEBUG’
|
|||
|
1847 | DEBUG(SSSDBG_TRACE_FUNC, "service %s maps to %s\n", service,
|
|||
|
| ^~~~~
|
|||
|
```
|
|||
|
|
|||
|
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
|
|||
|
---
|
|||
|
src/providers/ad/ad_gpo.c | 4 ++--
|
|||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|||
|
|
|||
|
diff --git a/src/providers/ad/ad_gpo.c b/src/providers/ad/ad_gpo.c
|
|||
|
index 219f3984912086a61bf79525e6740ed4c9bc247b..f3452176af1275ea393957a8e8c667c1376bf314 100644
|
|||
|
--- a/src/providers/ad/ad_gpo.c
|
|||
|
+++ b/src/providers/ad/ad_gpo.c
|
|||
|
@@ -250,7 +250,7 @@ struct gpo_map_option_entry gpo_map_option_entries[] = {
|
|||
|
{GPO_MAP_DENY, AD_GPO_MAP_DENY, gpo_map_deny_defaults, NULL, NULL},
|
|||
|
};
|
|||
|
|
|||
|
-const char* gpo_map_type_string(int gpo_map_type)
|
|||
|
+static const char* gpo_map_type_string(int gpo_map_type)
|
|||
|
{
|
|||
|
switch(gpo_map_type) {
|
|||
|
case GPO_MAP_INTERACTIVE: return "Interactive";
|
|||
|
@@ -261,7 +261,7 @@ const char* gpo_map_type_string(int gpo_map_type)
|
|||
|
case GPO_MAP_PERMIT: return "Permitted";
|
|||
|
case GPO_MAP_DENY: return "Denied";
|
|||
|
}
|
|||
|
- return NULL;
|
|||
|
+ return "-unknown-"; /* this helper is only used in logs */
|
|||
|
}
|
|||
|
|
|||
|
static inline bool
|
|||
|
--
|
|||
|
2.31.1
|
|||
|
|