util.h revision 2efebde7ddd5f1729a70ef4ec9de607cc393214c
97a9a944b5887e91042b019776c41d5dd74557aferikabele Simo Sorce <ssorce@redhat.com>
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive Copyright (C) 2009 Red Hat
fe64b2ba25510d8c9dba5560a2d537763566cf40nd This program is free software; you can redistribute it and/or modify
fe64b2ba25510d8c9dba5560a2d537763566cf40nd it under the terms of the GNU General Public License as published by
fe64b2ba25510d8c9dba5560a2d537763566cf40nd the Free Software Foundation; either version 3 of the License, or
fe64b2ba25510d8c9dba5560a2d537763566cf40nd (at your option) any later version.
fe64b2ba25510d8c9dba5560a2d537763566cf40nd This program is distributed in the hope that it will be useful,
fe64b2ba25510d8c9dba5560a2d537763566cf40nd but WITHOUT ANY WARRANTY; without even the implied warranty of
fe64b2ba25510d8c9dba5560a2d537763566cf40nd MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
fe64b2ba25510d8c9dba5560a2d537763566cf40nd GNU General Public License for more details.
fe64b2ba25510d8c9dba5560a2d537763566cf40nd You should have received a copy of the GNU General Public License
fe64b2ba25510d8c9dba5560a2d537763566cf40nd along with this program. If not, see <http://www.gnu.org/licenses/>.
117c1f888a14e73cdd821dc6c23eb0411144a41cnd/** Default secure umask */
117c1f888a14e73cdd821dc6c23eb0411144a41cnd/** Secure mask with executable bit */
117c1f888a14e73cdd821dc6c23eb0411144a41cnd} while(0);
b00fe3c3354db01001b8eddfd9b88441380f837dwrowe#define PIPE_CLOSE(p) do { \
a38b5f73e7f0f3b8726fb47d27b145f37036ead0jim} while(0);
fe64b2ba25510d8c9dba5560a2d537763566cf40nd#define talloc_zfree(ptr) do { talloc_free(discard_const(ptr)); ptr = NULL; } while(0)
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna#if defined(__intptr_t_defined) || defined(HAVE_INTPTR_T)
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna# define discard_const_p(type, ptr) ((type *)((intptr_t)(ptr)))
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna if (tevent_req_is_error(req, &TRROEstate, &TRROEuint64)) { \
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe if (TRROEerr == 0) { \
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna (id == 0 || (min && (id < min)) || (max && (id > max)))
90efa9f1730742d874edb5a7803adce11c9f08eanoodlvoid ldb_debug_messages(void *context, enum ldb_debug_level level,
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquernaint chown_debug_file(const char *filename, uid_t uid, gid_t gid);
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquernaint open_debug_file_ex(const char *filename, FILE **filep, bool want_cloexec);
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna#define SSS_LOG_ALERT 1 /* action must be taken immediately */
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquerna#define SSS_LOG_NOTICE 5 /* normal but significant condition */
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquernavoid sss_log(int priority, const char *format, ...) SSS_ATTRIBUTE_PRINTF(2, 3);
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquernavoid sss_log_ext(int priority, int facility, const char *format, ...) SSS_ATTRIBUTE_PRINTF(3, 4);
5ae609a8a09239d20f48a4a95c4f21b713995babwroweerrno_t server_common_rotate_logs(struct confdb_ctx *confdb,
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe const char *conf_entry);
5ae609a8a09239d20f48a4a95c4f21b713995babwrowe const char *conf_entry,
7e8f5c6496b3825b6b128e2aacc4b1b09d28553dpquernavoid (*CatchSignal(int signum,void (*handler)(int )))(int);
fe64b2ba25510d8c9dba5560a2d537763566cf40ndtypedef int (void_destructor_fn_t)(void *);
06ba4a61654b3763ad65f52283832ebf058fdf1cslivechar *get_uppercase_realm(TALLOC_CTX *memctx, const char *name);
06ba4a61654b3763ad65f52283832ebf058fdf1cslive/* initialize sss_names_ctx directly from arguments */
fb77c505254b6e9c925e23e734463e87574f8f40kess const char *re_pattern,
06ba4a61654b3763ad65f52283832ebf058fdf1cslive const char *fq_fmt,
06ba4a61654b3763ad65f52283832ebf058fdf1cslive/* initialize sss_names_ctx from domain configuration */
06ba4a61654b3763ad65f52283832ebf058fdf1cslive const char *domain,
06ba4a61654b3763ad65f52283832ebf058fdf1cslivesss_get_cased_name(TALLOC_CTX *mem_ctx, const char *orig_name,
06ba4a61654b3763ad65f52283832ebf058fdf1cslivesss_get_cased_name_list(TALLOC_CTX *mem_ctx, const char * const *orig,
06ba4a61654b3763ad65f52283832ebf058fdf1cslive/* Return fully-qualified name according to the fq_fmt. The name is allocated using
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd * talloc on top of mem_ctx
130d299c4b2b15be45532a176604c71fdc7bea5bndsss_tc_fqname(TALLOC_CTX *mem_ctx, struct sss_names_ctx *nctx,
ef8e89e090461194ecadd31e8796a2c51e0531a2kess/* Return fully-qualified name according to the fq_fmt. The name is allocated using
130d299c4b2b15be45532a176604c71fdc7bea5bnd * talloc on top of mem_ctx. In contrast to sss_tc_fqname() sss_tc_fqname2()
130d299c4b2b15be45532a176604c71fdc7bea5bnd * expects the domain and flat domain name as separate arguments.
fe64b2ba25510d8c9dba5560a2d537763566cf40ndsss_tc_fqname2(TALLOC_CTX *mem_ctx, struct sss_names_ctx *nctx,
fe64b2ba25510d8c9dba5560a2d537763566cf40nd const char *name);
fe64b2ba25510d8c9dba5560a2d537763566cf40nd/* Return fully-qualified name formatted according to the fq_fmt. The buffer in "str" is
fe64b2ba25510d8c9dba5560a2d537763566cf40nd * "size" bytes long. Returns the number of bytes written on success or a negative
fe64b2ba25510d8c9dba5560a2d537763566cf40nd * value of failure.
fe64b2ba25510d8c9dba5560a2d537763566cf40nd * Pass a zero size to calculate the length that would be needed by the fully-qualified
313bb560bc5c323cfd40c9cad7335b4b8e060aedkesssss_fqname(char *str, size_t size, struct sss_names_ctx *nctx,
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess/* Accepts fqname in the format shortname@domname only. */
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd const char *fqname,
06ba4a61654b3763ad65f52283832ebf058fdf1cslive/* Creates internal fqname in format shortname@domname.
06ba4a61654b3763ad65f52283832ebf058fdf1cslive * The domain portion is lowercased. */
06ba4a61654b3763ad65f52283832ebf058fdf1cslive const char *shortname,
06ba4a61654b3763ad65f52283832ebf058fdf1cslive const char *dom_name);
130d299c4b2b15be45532a176604c71fdc7bea5bnd/* Creates internal fqnames list in format shortname@domname.
130d299c4b2b15be45532a176604c71fdc7bea5bnd * The domain portion is lowercased. */
130d299c4b2b15be45532a176604c71fdc7bea5bndchar **sss_create_internal_fqname_list(TALLOC_CTX *mem_ctx,
130d299c4b2b15be45532a176604c71fdc7bea5bnd const char * const *shortname_list,
130d299c4b2b15be45532a176604c71fdc7bea5bnd const char *dom_name);
130d299c4b2b15be45532a176604c71fdc7bea5bnd/* Turn fqname into cased shortname with replaced space. */
fe64b2ba25510d8c9dba5560a2d537763566cf40nd const char *fqname,
fe64b2ba25510d8c9dba5560a2d537763566cf40nd const char replace_space);
fe64b2ba25510d8c9dba5560a2d537763566cf40nd/* check_file()
fe64b2ba25510d8c9dba5560a2d537763566cf40nd * Verify that a file has certain permissions and/or is of a certain
fe64b2ba25510d8c9dba5560a2d537763566cf40nd * file type. This function can be used to determine if a file is a
5224ff8eae5156a05f676f1dad8add2e2f2efe1dnd * symlink.
627c978514c54179736d152923478be7c8707f9bnd * Warning: use of this function implies a potential race condition
fe64b2ba25510d8c9dba5560a2d537763566cf40nd * Opening a file before or after checking it does NOT guarantee that
fe64b2ba25510d8c9dba5560a2d537763566cf40nd * it is still the same file. Additional checks should be performed
fe64b2ba25510d8c9dba5560a2d537763566cf40nd * on the caller_stat_buf to ensure that it has the same device and
fe64b2ba25510d8c9dba5560a2d537763566cf40nd * inode to minimize impact. Permission changes may have occurred,
fe64b2ba25510d8c9dba5560a2d537763566cf40nd * however.
888b616027180cc8aaa4d2bee5ecc6acec175bc5nd/* check_fd()
b95ae799514ad86a15610ad75808d7065e9847c9kess * Verify that an open file descriptor has certain permissions and/or
888b616027180cc8aaa4d2bee5ecc6acec175bc5nd * is of a certain file type. This function CANNOT detect symlinks,
5224ff8eae5156a05f676f1dad8add2e2f2efe1dnd * as the file is already open and symlinks have been traversed. This
5224ff8eae5156a05f676f1dad8add2e2f2efe1dnd * is the safer way to perform file checks and should be preferred
5224ff8eae5156a05f676f1dad8add2e2f2efe1dnd * over check_file for nearly all situations.
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd/* check_and_open_readonly()
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd * Utility function to open a file and verify that it has certain
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd * permissions and is of a certain file type. This function wraps
fe64b2ba25510d8c9dba5560a2d537763566cf40nd * check_fd(), and is considered race-condition safe.
5224ff8eae5156a05f676f1dad8add2e2f2efe1dnderrno_t check_and_open_readonly(const char *filename, int *fd,
5224ff8eae5156a05f676f1dad8add2e2f2efe1dnd (SSS_NO_LINKLOCAL|SSS_NO_LOOPBACK|SSS_NO_MULTICAST|SSS_NO_BROADCAST)
5224ff8eae5156a05f676f1dad8add2e2f2efe1dnd/* These two functions accept addr in network order */
fe64b2ba25510d8c9dba5560a2d537763566cf40ndbool check_ipv4_addr(struct in_addr *addr, uint8_t check);
fe64b2ba25510d8c9dba5560a2d537763566cf40ndbool check_ipv6_addr(struct in6_addr *addr, uint8_t check);
fe64b2ba25510d8c9dba5560a2d537763566cf40ndconst char * const * get_known_services(void);
fb77c505254b6e9c925e23e734463e87574f8f40kesserrno_t sss_user_by_name_or_uid(const char *input, uid_t *_uid, gid_t *_gid);
fe64b2ba25510d8c9dba5560a2d537763566cf40ndint split_on_separator(TALLOC_CTX *mem_ctx, const char *str,
fb77c505254b6e9c925e23e734463e87574f8f40kesserrno_t parse_cert_verify_opts(TALLOC_CTX *mem_ctx, const char *verify_opts,
58699879a562774640b95e9eedfd891f336e38c2nd unsigned long count,
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess unsigned long count,
58699879a562774640b95e9eedfd891f336e38c2nd unsigned int directory_bits,
6b64034fa2a644ba291c484c0c01c7df5b8d982ckess unsigned int segment_bits,
58699879a562774640b95e9eedfd891f336e38c2nd unsigned long min_load_factor,
58699879a562774640b95e9eedfd891f336e38c2nd unsigned long max_load_factor,
58699879a562774640b95e9eedfd891f336e38c2nd/* Returns true if sudoUser value is a username or a groupname */
58699879a562774640b95e9eedfd891f336e38c2nd * @brief Add two list of strings
58699879a562774640b95e9eedfd891f336e38c2nd * Create a new NULL-termintated list of strings by adding two lists together.
58699879a562774640b95e9eedfd891f336e38c2nd * @param[in] mem_ctx Talloc memory context for the new list.
58699879a562774640b95e9eedfd891f336e38c2nd * @param[in] l1 First NULL-termintated list of strings.
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess * @param[in] l2 Second NULL-termintated list of strings.
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnd * @param[in] copy_strings If set to 'true' the list items will be copied
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick * otherwise only the pointers to the items are
604c89126c27104f659d7a51b0113e3bd435faf8fielding * @param[out] new_list New NULL-terminated list of strings. Must be freed
604c89126c27104f659d7a51b0113e3bd435faf8fielding * with talloc_free() by the caller. If copy_strings
604c89126c27104f659d7a51b0113e3bd435faf8fielding * is 'true' the new elements will be freed as well.
4a7affccb2f1f5b94cab395e1bf3825aed715ebcnderrno_t add_strings_lists(TALLOC_CTX *mem_ctx, const char **l1, const char **l2,
fe64b2ba25510d8c9dba5560a2d537763566cf40nd * @brief set file descriptor as nonblocking
fe64b2ba25510d8c9dba5560a2d537763566cf40nd * Set the O_NONBLOCK flag for the input fd
fe64b2ba25510d8c9dba5560a2d537763566cf40nd * @param[in] fd The file descriptor to set as nonblocking
fe64b2ba25510d8c9dba5560a2d537763566cf40nd * @return EOK on success, errno code otherwise
9583adab6bc4b3758e41963c905d9dad9f067131nd/* Copy a NULL-terminated string list
4335f1cbf345c91bb996eec540c11ba8ce5d4268nd * Returns NULL on out of memory error or invalid input
4335f1cbf345c91bb996eec540c11ba8ce5d4268ndconst char **dup_string_list(TALLOC_CTX *memctx, const char **str_list);
4335f1cbf345c91bb996eec540c11ba8ce5d4268nd/* Take two string lists (terminated on a NULL char*)
4335f1cbf345c91bb996eec540c11ba8ce5d4268nd * and return up to three arrays of strings based on
88d86cfadffe2275a3dfb67a4d7bdc018630b661rbowen * shared ownership.
4335f1cbf345c91bb996eec540c11ba8ce5d4268nd * Pass NULL to any return type you don't care about
4335f1cbf345c91bb996eec540c11ba8ce5d4268nd/* Sanitize an input string (e.g. a username) for use in
9b5e2c5e769dc678a1aca06df75c32022b2f1492trawick * an LDAP/LDB filter
4335f1cbf345c91bb996eec540c11ba8ce5d4268nd * Returns a newly-constructed string attached to mem_ctx
4335f1cbf345c91bb996eec540c11ba8ce5d4268nd * It will fail only on an out of memory condition, where it
4335f1cbf345c91bb996eec540c11ba8ce5d4268nd * will return ENOMEM.
4335f1cbf345c91bb996eec540c11ba8ce5d4268nd const char *input,
4335f1cbf345c91bb996eec540c11ba8ce5d4268nd const char *input,
fe64b2ba25510d8c9dba5560a2d537763566cf40nd const char *ignore);
fb77c505254b6e9c925e23e734463e87574f8f40kess const char *input,
fe64b2ba25510d8c9dba5560a2d537763566cf40ndsss_escape_ip_address(TALLOC_CTX *mem_ctx, int family, const char *addr);
fb77c505254b6e9c925e23e734463e87574f8f40kess/* This function only removes first and last
fb77c505254b6e9c925e23e734463e87574f8f40kess * character if the first character was '['.
06ba4a61654b3763ad65f52283832ebf058fdf1cslive * NOTE: This means, that ipv6addr must NOT be followed
313bb560bc5c323cfd40c9cad7335b4b8e060aedkess * by port number.
10673857794a4b3d9568ca2d983722a87ed352f1rbowenerrno_t add_string_to_list(TALLOC_CTX *mem_ctx, const char *string,
fb77c505254b6e9c925e23e734463e87574f8f40kessbool string_in_list(const char *string, char **list, bool case_sensitive);
06ba4a61654b3763ad65f52283832ebf058fdf1cslive * @brief Safely zero a segment of memory,
06ba4a61654b3763ad65f52283832ebf058fdf1cslive * prevents the compiler from optimizing out
06ba4a61654b3763ad65f52283832ebf058fdf1cslive * @param data The address of buffer to wipe
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd * @param size Size of the buffer
06ba4a61654b3763ad65f52283832ebf058fdf1csliveint domain_to_basedn(TALLOC_CTX *memctx, const char *domain, char **basedn);
06ba4a61654b3763ad65f52283832ebf058fdf1cslivebool is_host_in_domain(const char *host, const char *domain);
604c89126c27104f659d7a51b0113e3bd435faf8fieldingsss_tc_utf8_str_tolower(TALLOC_CTX *mem_ctx, const char *s);
604c89126c27104f659d7a51b0113e3bd435faf8fieldingsss_tc_utf8_tolower(TALLOC_CTX *mem_ctx, const uint8_t *s, size_t len, size_t *_nlen);
604c89126c27104f659d7a51b0113e3bd435faf8fieldingbool sss_string_equal(bool cs, const char *s1, const char *s2);
604c89126c27104f659d7a51b0113e3bd435faf8fielding/* len includes terminating '\0' */
909ce17e2bd0faef7b1c294f2307f009793fd493nd const char *str;
06ba4a61654b3763ad65f52283832ebf058fdf1cslivevoid to_sized_string(struct sized_string *out, const char *in);
06ba4a61654b3763ad65f52283832ebf058fdf1cslivestruct sss_domain_info *get_domains_head(struct sss_domain_info *domain);
97a9a944b5887e91042b019776c41d5dd74557aferikabele#define SSS_GND_ALL_DOMAINS (SSS_GND_DESCEND | SSS_GND_INCLUDE_DISABLED)
06ba4a61654b3763ad65f52283832ebf058fdf1cslivestruct sss_domain_info *get_next_domain(struct sss_domain_info *domain,
06ba4a61654b3763ad65f52283832ebf058fdf1cslivestruct sss_domain_info *find_domain_by_name(struct sss_domain_info *domain,
06ba4a61654b3763ad65f52283832ebf058fdf1cslive const char *name,
cb3a1082aec4b3b4f4ed238c93c3cc54933a7f0endstruct sss_domain_info *find_domain_by_sid(struct sss_domain_info *domain,
06ba4a61654b3763ad65f52283832ebf058fdf1cslive const char *sid);
8e31885fc494b603e0650113dde9e29d1b1d2602maczniakenum sss_domain_state sss_domain_get_state(struct sss_domain_info *dom);
8e31885fc494b603e0650113dde9e29d1b1d2602maczniaksss_get_domain_by_sid_ldap_fallback(struct sss_domain_info *domain,
8e31885fc494b603e0650113dde9e29d1b1d2602maczniak const char* sid);
06ba4a61654b3763ad65f52283832ebf058fdf1cslivefind_domain_by_object_name(struct sss_domain_info *domain,
06ba4a61654b3763ad65f52283832ebf058fdf1cslive const char *object_name);
a7f40ca49262952d6dd69d021cf5b0c2b452ae4cnd const char *sd_name);
ed0dae472b518c553c923a86fb4322d4c50d86a6nd const char *domain_name,
ed0dae472b518c553c923a86fb4322d4c50d86a6nd const char *db_path,
da637bcae7b6e150470e701af29da5604a34a17erbowen/* the directory domain - realm mappings and other krb5 config snippers are
da637bcae7b6e150470e701af29da5604a34a17erbowen * written to */
da637bcae7b6e150470e701af29da5604a34a17erbowen#define KRB5_MAPPING_DIR PUBCONF_PATH"/krb5.include.d"
fe64b2ba25510d8c9dba5560a2d537763566cf40nderrno_t sss_get_domain_mappings_content(TALLOC_CTX *mem_ctx,
fe64b2ba25510d8c9dba5560a2d537763566cf40nderrno_t sss_write_domain_mappings(struct sss_domain_info *domain);
fe64b2ba25510d8c9dba5560a2d537763566cf40nderrno_t sss_write_krb5_conf_snippet(const char *path, bool canonicalize);
fe64b2ba25510d8c9dba5560a2d537763566cf40nderrno_t sss_br_lock_file(int fd, size_t start, size_t len,
fe64b2ba25510d8c9dba5560a2d537763566cf40nderrno_t well_known_sid_to_name(const char *sid, const char **dom,
fe64b2ba25510d8c9dba5560a2d537763566cf40nd const char **name);
627c978514c54179736d152923478be7c8707f9bnderrno_t name_to_well_known_sid(const char *dom, const char *name,
fe64b2ba25510d8c9dba5560a2d537763566cf40nd const char **sid);
fe64b2ba25510d8c9dba5560a2d537763566cf40nd const char *orig_name,
fe64b2ba25510d8c9dba5560a2d537763566cf40nd const char replace_char);
fe64b2ba25510d8c9dba5560a2d537763566cf40nd const char *orig_name,
06ba4a61654b3763ad65f52283832ebf058fdf1cslive/* 16 2-digit hex values + 4 dashes + terminating 0 */
06ba4a61654b3763ad65f52283832ebf058fdf1cslive#define GUID_STR_BUF_SIZE (2 * GUID_BIN_LENGTH + 4 + 1)
06ba4a61654b3763ad65f52283832ebf058fdf1csliveerrno_t guid_blob_to_string_buf(const uint8_t *blob, char *str_buf,
06ba4a61654b3763ad65f52283832ebf058fdf1csliveconst char *get_last_x_chars(const char *str, size_t x);
fb77c505254b6e9c925e23e734463e87574f8f40kess/* Please note that libsemange relies on files and directories created with
fe64b2ba25510d8c9dba5560a2d537763566cf40nd * certain permissions. Therefore the caller should make sure the umask is
fe64b2ba25510d8c9dba5560a2d537763566cf40nd * not too restricted (especially when called from the daemon code).
fe64b2ba25510d8c9dba5560a2d537763566cf40ndint set_seuser(const char *login_name, const char *seuser_name,
fe64b2ba25510d8c9dba5560a2d537763566cf40nd const char *mlsrange);
604c89126c27104f659d7a51b0113e3bd435faf8fieldingint get_seuser(TALLOC_CTX *mem_ctx, const char *login_name,
604c89126c27104f659d7a51b0113e3bd435faf8fielding/* convert time from generalized form to unix time */
604c89126c27104f659d7a51b0113e3bd435faf8fieldingerrno_t sss_utc_to_time_t(const char *str, const char *format, time_t *unix_time);
fe64b2ba25510d8c9dba5560a2d537763566cf40nd/* Creates a unique file using mkstemp with provided umask. The template
fe64b2ba25510d8c9dba5560a2d537763566cf40nd * must end with XXXXXX. Returns the fd, sets _err to an errno value on error.
fe64b2ba25510d8c9dba5560a2d537763566cf40nd * Prefer using sss_unique_file() as it uses a secure umask internally.
22265f1724519886e2a2b5e0ebd61477506b7379noodl/* Creates a unique filename using mkstemp with secure umask. The template
604c89126c27104f659d7a51b0113e3bd435faf8fielding * must end with XXXXXX
604c89126c27104f659d7a51b0113e3bd435faf8fielding * path_tmpl must be a talloc context. Destructor would be set on the filename
604c89126c27104f659d7a51b0113e3bd435faf8fielding * so that it's guaranteed the file is removed.
604c89126c27104f659d7a51b0113e3bd435faf8fieldingint sss_unique_filename(TALLOC_CTX *owner, char *path_tmpl);
604c89126c27104f659d7a51b0113e3bd435faf8fieldingint setup_watchdog(struct tevent_context *ev, int interval);
9597f440430d8c876dd64f5f78066804650a18ecnoodl#endif /* __SSSD_UTIL_H__ */