1 /* $NetBSD: funcs.h,v 1.6 2018/06/14 22:04:28 christos Exp $ */ 2 3 /* 4 * Id: funcs.h,v 1.9 2004/01/23 18:56:42 vixie Exp 5 */ 6 7 /* 8 * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") 9 * Copyright (c) 1997,2000 by Internet Software Consortium, Inc. 10 * 11 * Permission to use, copy, modify, and distribute this software for any 12 * purpose with or without fee is hereby granted, provided that the above 13 * copyright notice and this permission notice appear in all copies. 14 * 15 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES 16 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 17 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR 18 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 19 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 20 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 21 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 22 */ 23 24 /* Notes: 25 * This file has to be included by cron.h after data structure defs. 26 * We should reorg this into sections by module. 27 */ 28 29 void set_cron_uid(void), 30 set_cron_cwd(void), 31 load_database(cron_db *), 32 open_logfile(void), 33 sigpipe_func(void), 34 job_add(entry *, user *, time_t), 35 do_command(entry *, user *), 36 link_user(cron_db *, user *), 37 unlink_user(cron_db *, user *), 38 free_user(user *), 39 env_free(char **), 40 unget_char(int, FILE *), 41 free_entry(entry *), 42 acquire_daemonlock(int), 43 skip_comments(FILE *), 44 log_it(const char *, int, const char *, const char *), 45 log_close(void); 46 47 48 void 49 log_itx(const char *, int, const char *, const char *, ...) 50 __printflike(4, 5); 51 52 int job_runqueue(void), 53 set_debug_flags(const char *), 54 get_char(FILE *), 55 get_string(char *, int, FILE *, const char *), 56 load_env(char *, FILE *), 57 cron_pclose(FILE *), 58 cron_pabort(FILE *), 59 glue_strings(char *, size_t, const char *, const char *, char), 60 strcmp_until(const char *, const char *, char), 61 strdtb(char *); 62 63 size_t strlens(const char *, ...); 64 65 char *env_get(const char *, char **), 66 *arpadate(time_t *), 67 *mkprints(char *, size_t), 68 **env_init(void), 69 **env_copy(char **), 70 **env_set(char **, char *); 71 72 user *load_user(int, struct passwd *, const char *), 73 *find_user(cron_db *, const char *); 74 75 entry *load_entry(FILE *, void (*)(const char *), struct passwd *, char **); 76 77 FILE *cron_popen(char *, const char *, struct passwd *); 78 79 struct passwd *pw_dup(const struct passwd *); 80 81 #ifndef HAVE_TM_GMTOFF 82 long get_gmtoff(time_t *, struct tm *); 83 #endif 84 85 extern int close_all(int); 86 #ifdef USE_PAM 87 extern int cron_pam_start (const char *user); 88 extern int cron_pam_setcred (void); 89 extern void cron_pam_finish (void); 90 extern void cron_pam_child_close (void); 91 extern char **cron_pam_getenvlist (char **envp); 92 #endif 93