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