Changeset 170 for trunk/include
- Timestamp:
- Apr 30, 2008, 11:56:45 PM (17 years ago)
- Location:
- trunk/include
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/samhain.h
r162 r170 42 42 #define SH_MAXBUF 4096 43 43 #define SH_PATHBUF 256 44 #define SH_MSG_BUF 64512 44 45 45 46 #define SH_ERRBUF_SIZE 64 47 48 /* MAX_PATH_STORE must be >= KEY_LEN 49 */ 50 #define MAX_PATH_STORE 12287 46 51 47 52 /* Sizes for arrays (user, group, timestamp). … … 384 389 /* signal-safe log function 385 390 */ 386 int safe_logger (int signal, int method, char * details);387 void safe_fatal (c har * details,char *f, int l);391 int safe_logger (int thesignal, int method, char * details); 392 void safe_fatal (const char * details, const char *f, int l); 388 393 389 394 #define SH_VALIDATE_EQ(a,b) \ -
trunk/include/sh_calls.h
r22 r170 36 36 37 37 38 long int retry_accept(c har * file, int line,38 long int retry_accept(const char * file, int line, 39 39 int fd, struct sockaddr *serv_addr, int * addrlen); 40 long int retry_stat (c har * file, int line,40 long int retry_stat (const char * file, int line, 41 41 const char *file_name, struct stat *buf); 42 long int retry_fstat(c har * file, int line,42 long int retry_fstat(const char * file, int line, 43 43 int filed, struct stat *buf); 44 long int retry_lstat(c har * file, int line,44 long int retry_lstat(const char * file, int line, 45 45 const char *file_name, struct stat *buf); 46 long int retry_fcntl(c har * file, int line,46 long int retry_fcntl(const char * file, int line, 47 47 int fd, int cmd, long arg); 48 48 49 49 long int retry_msleep (int sec, int millisec); 50 50 51 long int retry_sigaction(c har * file, int line,51 long int retry_sigaction(const char * file, int line, 52 52 int signum, const struct sigaction *act, 53 53 struct sigaction *oldact); 54 54 55 55 int sh_calls_set_bind_addr (const char *); 56 long int retry_connect(c har * file, int line,56 long int retry_connect(const char * file, int line, 57 57 int fd, struct sockaddr *serv_addr, int addrlen); 58 58 59 long int retry_aud_dup2 (c har * file, int line, int fd, int fd2);60 long int retry_aud_execve (c har * file, int line,59 long int retry_aud_dup2 (const char * file, int line, int fd, int fd2); 60 long int retry_aud_execve (const char * file, int line, 61 61 const char *dateiname, char * argv[], 62 62 char *envp[]); 63 long int retry_aud_dup (c har * file, int line,63 long int retry_aud_dup (const char * file, int line, 64 64 int fd); 65 long int retry_aud_chdir (c har * file, int line,65 long int retry_aud_chdir (const char * file, int line, 66 66 const char *path); 67 long int retry_aud_unlink (c har * file, int line,67 long int retry_aud_unlink (const char * file, int line, 68 68 char * path); 69 long int retry_aud_utime (c har * file, int line,69 long int retry_aud_utime (const char * file, int line, 70 70 char * path, struct utimbuf *buf); 71 71 72 long int aud_open (c har * file, int line, int privs,72 long int aud_open (const char * file, int line, int privs, 73 73 const char *pathname, int flags, mode_t mode); 74 long int aud_open_noatime (c har * file, int line, int privs,74 long int aud_open_noatime (const char * file, int line, int privs, 75 75 const char *pathname, int flags, mode_t mode, 76 76 int * o_noatime); 77 77 /*@noreturn@*/ 78 void aud_exit (c har * file, int line, int fd);78 void aud_exit (const char * file, int line, int fd); 79 79 /*@noreturn@*/ 80 void aud__exit (c har * file, int line, int fd);81 pid_t aud_fork (c har * file, int line);82 int aud_pipe (c har * file, int line, int modus[2]);83 int aud_setuid (c har * file, int line, uid_t uid);84 int aud_setgid (c har * file, int line, gid_t gid);85 long int aud_kill (c har * file, int line, pid_t pid, int sig);80 void aud__exit (const char * file, int line, int fd); 81 pid_t aud_fork (const char * file, int line); 82 int aud_pipe (const char * file, int line, int modus[2]); 83 int aud_setuid (const char * file, int line, uid_t uid); 84 int aud_setgid (const char * file, int line, gid_t gid); 85 long int aud_kill (const char * file, int line, pid_t pid, int sig); 86 86 87 87 #endif -
trunk/include/sh_cat.h
r169 r170 7 7 unsigned long priority; 8 8 unsigned long class; 9 c har * format;9 const char * format; 10 10 } cat_entry; 11 11 12 12 extern cat_entry msg_cat[]; 13 13 14 extern c har * class_cat[];14 extern const char * class_cat[]; 15 15 16 16 #define AUD 0 -
trunk/include/sh_database.h
r22 r170 2 2 #define SH_DATABASE_H 3 3 4 void sh_database_reset( );4 void sh_database_reset(void); 5 5 int sh_database_insert (char * message); 6 6 -
trunk/include/sh_error.h
r132 r170 107 107 /* init or re-init log facilities that need it 108 108 */ 109 void sh_error_fixup( );109 void sh_error_fixup(void); 110 110 111 111 /* convert a string to a numeric priority -
trunk/include/sh_error_min.h
r1 r170 22 22 /* this function should be called to report an error 23 23 */ 24 void sh_error_handle (int flag, c har * file, long line,24 void sh_error_handle (int flag, const char * file, long line, 25 25 long errnum, unsigned long msg_index, ...); 26 26 -
trunk/include/sh_forward.h
r27 r170 54 54 /* create socket and start listening 55 55 */ 56 void create_server_tcp_socket ( );56 void create_server_tcp_socket (void); 57 57 58 58 /* whether to use client address as known to the communication layer -
trunk/include/sh_gpg.h
r86 r170 29 29 /* log successful startup 30 30 */ 31 void sh_gpg_log_startup ( );31 void sh_gpg_log_startup (void); 32 32 33 33 #endif -
trunk/include/sh_hash.h
r169 r170 30 30 /* format a uint64 31 31 */ 32 char * sh_hash_size_format( );32 char * sh_hash_size_format(void); 33 33 34 34 /* report on a missing file … … 82 82 /* reset sh_hash_pushdata to use 'update' in daemon mode 83 83 */ 84 void sh_hash_pushdata_reset ( );84 void sh_hash_pushdata_reset (void); 85 85 86 86 /* Insert a file into the in-memory database. … … 145 145 /* Write out database 146 146 */ 147 int sh_hash_writeout( );147 int sh_hash_writeout(void); 148 148 #endif -
trunk/include/sh_ignore.h
r22 r170 8 8 int sh_ignore_chk_new (const char * chkpath); 9 9 10 int sh_ignore_clean ( );10 int sh_ignore_clean (void); 11 11 12 12 #endif -
trunk/include/sh_prelude.h
r22 r170 2 2 #define SH_PRELUDE_H 3 3 4 void sh_prelude_reset( );5 void sh_prelude_stop( );6 int sh_prelude_init( );4 void sh_prelude_reset(void); 5 void sh_prelude_stop(void); 6 int sh_prelude_init(void); 7 7 8 8 int sh_prelude_set_profile(const char *arg); -
trunk/include/sh_pthread.h
r143 r170 119 119 * ---- Initialize thread-specific conversion area ---- 120 120 */ 121 extern int sh_g_thread( );121 extern int sh_g_thread(void); 122 122 123 123 -
trunk/include/sh_socket.h
r1 r170 14 14 15 15 16 int sh_socket_open_int ( );17 int sh_socket_remove ( );16 int sh_socket_open_int (void); 17 int sh_socket_remove (void); 18 18 char * sh_socket_check(const char * client_name); 19 int sh_socket_poll( );19 int sh_socket_poll(void); 20 20 void sh_socket_add2reload (const char * clt); 21 21 -
trunk/include/sh_tiger.h
r151 r170 42 42 * 0 = tiger192, 1 = sha1, 2 = md5 43 43 */ 44 int sh_tiger_get_hashtype ( );44 int sh_tiger_get_hashtype (void); 45 45 46 46 /* GnuPG-like format, returns allocated memory -
trunk/include/sh_unix.h
r169 r170 93 93 #define MODI_TXT ((1 << 14)|MODI_CHK) 94 94 95 #define MODI_TXT_ENABLED(a) (((a)&(1 << 14))!=0) 96 95 97 #define SH_TXT_MAX 9200 96 98 … … 156 158 /* mlock utilities 157 159 */ 158 int sh_unix_mlock(c har * file, int line, void * addr, size_t len);160 int sh_unix_mlock(const char * file, int line, void * addr, size_t len); 159 161 int sh_unix_munlock(void * addr, size_t len); 160 int sh_unix_count_mlock( );162 int sh_unix_count_mlock(void); 161 163 /* public for unit tests */ 162 int sh_unix_pagesize( );164 int sh_unix_pagesize(void); 163 165 unsigned long sh_unix_lookup_page(void * in_addr, size_t len, int * num_pages); 164 166 … … 183 185 */ 184 186 int sh_unix_set_io_limit (const char * c); 185 void sh_unix_io_pause ( );187 void sh_unix_io_pause (void); 186 188 187 189 /* get file type … … 191 193 /* reset masks for policies 192 194 */ 193 int sh_unix_maskreset( );195 int sh_unix_maskreset(void); 194 196 195 197 /* return true if database is remote 196 198 */ 197 int file_is_remote ( );199 int file_is_remote (void); 198 200 199 201 /* return the path to the configuration/database file … … 220 222 /* write the PID file 221 223 */ 222 int sh_unix_write_pid_file( );224 int sh_unix_write_pid_file(void); 223 225 224 226 /* rm the PID file 225 227 */ 226 int sh_unix_rm_pid_file( );228 int sh_unix_rm_pid_file(void); 227 229 228 230 -
trunk/include/sh_userfiles.h
r140 r170 20 20 int sh_userfiles_set_interval(const char *c); 21 21 int sh_userfiles_set_active(const char *c); 22 int sh_userfiles_check_internal( );22 int sh_userfiles_check_internal(void); 23 23 24 24 extern sh_rconf sh_userfiles_table[]; -
trunk/include/sh_utils.h
r167 r170 58 58 * generator. 59 59 */ 60 UINT32 taus_get ( );60 UINT32 taus_get (void); 61 61 double taus_get_double (void *vstate); /* fast */ 62 62 int taus_seed (void); -
trunk/include/slib.h
r169 r170 123 123 #endif 124 124 125 int dlog (int flag, c har * file, int line, const char *fmt, ...);126 127 char * sl_get_errmsg( );125 int dlog (int flag, const char * file, int line, const char *fmt, ...); 126 127 char * sl_get_errmsg(void); 128 128 129 129 /* ---------------------------------------------------------------- … … 133 133 * ---------------------------------------------------------------- */ 134 134 135 int sl_test_heap( );135 int sl_test_heap(void); 136 136 137 137 /* ---------------------------------------------------------------- … … 143 143 extern int sl_useCaps; 144 144 145 int sl_drop_cap ( );146 int sl_drop_cap_sub( );147 int sl_get_cap_sub( );148 int sl_drop_cap_qdel( );149 int sl_get_cap_qdel( );145 int sl_drop_cap (void); 146 int sl_drop_cap_sub(void); 147 int sl_get_cap_sub(void); 148 int sl_drop_cap_qdel(void); 149 int sl_get_cap_qdel(void); 150 150 151 151 /* ---------------------------------------------------------------- … … 233 233 * UID HANDLING FUNCTIONS. 234 234 */ 235 int sl_policy_get_user(c har *username); /* drop SUID to <username> */235 int sl_policy_get_user(const char *username); /* drop SUID to <username> */ 236 236 int sl_policy_get_real(char *username); /* drop privs to <username> */ 237 237 int sl_policy_get_root(void); /* drop SUID to root */ … … 250 250 */ 251 251 int sl_get_euid(/*@out@*/uid_t * ret); 252 uid_t sl_ret_euid( );252 uid_t sl_ret_euid(void); 253 253 254 254 /* … … 388 388 /* Write file. 389 389 */ 390 int sl_write (SL_TICKET ticket, void * msg, long nbytes);390 int sl_write (SL_TICKET ticket, const void * msg, long nbytes); 391 391 392 392 /* Write file, terminate with newline. 393 393 */ 394 int sl_write_line (SL_TICKET ticket, void * msg, long nbytes);394 int sl_write_line (SL_TICKET ticket, const void * msg, long nbytes); 395 395 396 396 /* As above, but only for non-constant strings. … … 412 412 /* purge list of trusted users 413 413 */ 414 int sl_trust_purge_user ( );414 int sl_trust_purge_user (void); 415 415 416 416 /* Add a trusted user. … … 540 540 void sl_stack_push(char * c, char * file, int line); 541 541 void sl_stack_pop(char * c, char * file, int line); 542 void sl_stack_print( );543 #endif 544 void sl_trace_in (c har * str,char * file, int line);545 void sl_trace_out (c har * str,char * file, int line);542 void sl_stack_print(void); 543 #endif 544 void sl_trace_in (const char * str, const char * file, int line); 545 void sl_trace_out (const char * str, const char * file, int line); 546 546 int sl_trace_file (const char * str); 547 547 int sl_trace_use (const char * str);
Note:
See TracChangeset
for help on using the changeset viewer.