summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/monitor/monitor.c3
-rw-r--r--src/util/util.c8
-rw-r--r--src/util/util.h2
3 files changed, 11 insertions, 2 deletions
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c
index a164ede8a..5e6eb37fd 100644
--- a/src/monitor/monitor.c
+++ b/src/monitor/monitor.c
@@ -888,8 +888,7 @@ done:
static char *check_services(char **services)
{
- const char *known_services[] = { "nss", "pam", "sudo", "autofs", "ssh",
- "pac", "ifp", NULL };
+ const char * const *known_services = get_known_services();
int i;
int ii;
diff --git a/src/util/util.c b/src/util/util.c
index fc37aad22..ad93ca1a0 100644
--- a/src/util/util.c
+++ b/src/util/util.c
@@ -806,3 +806,11 @@ bool check_ipv6_addr(struct in6_addr *addr, uint8_t flags)
return true;
}
+
+const char * const * get_known_services(void)
+{
+ static const char *svc[] = {"nss", "pam", "sudo", "autofs",
+ "ssh", "pac", "ifp", NULL };
+
+ return svc;
+}
diff --git a/src/util/util.h b/src/util/util.h
index f682f50fe..38d9fca4c 100644
--- a/src/util/util.h
+++ b/src/util/util.h
@@ -378,6 +378,8 @@ errno_t check_and_open_readonly(const char *filename, int *fd,
bool check_ipv4_addr(struct in_addr *addr, uint8_t check);
bool check_ipv6_addr(struct in6_addr *addr, uint8_t check);
+const char * const * get_known_services(void);
+
int split_on_separator(TALLOC_CTX *mem_ctx, const char *str,
const char sep, bool trim, bool skip_empty,
char ***_list, int *size);