From ebd2db737485d334cd54316e05f848f3ccfd2fee Mon Sep 17 00:00:00 2001 From: Pavel Březina Date: Tue, 6 May 2014 10:54:47 +0200 Subject: utils: add get_known_services() Reviewed-by: Jakub Hrozek --- src/util/util.c | 8 ++++++++ src/util/util.h | 2 ++ 2 files changed, 10 insertions(+) (limited to 'src/util') diff --git a/src/util/util.c b/src/util/util.c index fc37aad2..ad93ca1a 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 f682f50f..38d9fca4 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); -- cgit