Changeset 170 for trunk/include


Ignore:
Timestamp:
Apr 30, 2008, 11:56:45 PM (17 years ago)
Author:
katerina
Message:

Plenty of compiler warnings fixed, SQL query length fixed, doc update.

Location:
trunk/include
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/samhain.h

    r162 r170  
    4242#define SH_MAXBUF      4096
    4343#define SH_PATHBUF      256
     44#define SH_MSG_BUF    64512
    4445
    4546#define SH_ERRBUF_SIZE   64
     47
     48/* MAX_PATH_STORE must be >= KEY_LEN
     49 */
     50#define MAX_PATH_STORE 12287
    4651
    4752/* Sizes for arrays (user, group, timestamp).
     
    384389/* signal-safe log function
    385390 */
    386 int  safe_logger (int signal, int method, char * details);
    387 void safe_fatal  (char * details, char *f, int l);
     391int  safe_logger (int thesignal, int method, char * details);
     392void safe_fatal  (const char * details, const char *f, int l);
    388393
    389394#define SH_VALIDATE_EQ(a,b) \
  • trunk/include/sh_calls.h

    r22 r170  
    3636
    3737
    38 long int retry_accept(char * file, int line,
     38long int retry_accept(const char * file, int line,
    3939                      int fd, struct sockaddr *serv_addr, int * addrlen);
    40 long int retry_stat (char * file, int line,
     40long int retry_stat (const char * file, int line,
    4141                     const char *file_name, struct stat *buf);
    42 long int retry_fstat(char * file, int line,
     42long int retry_fstat(const char * file, int line,
    4343                     int filed,             struct stat *buf);
    44 long int retry_lstat(char * file, int line,
     44long int retry_lstat(const char * file, int line,
    4545                     const char *file_name, struct stat *buf);
    46 long int retry_fcntl(char * file, int line,
     46long int retry_fcntl(const char * file, int line,
    4747                     int fd, int cmd, long arg);
    4848
    4949long int retry_msleep (int sec, int millisec);
    5050
    51 long int retry_sigaction(char * file, int line,
     51long int retry_sigaction(const char * file, int line,
    5252                         int signum,  const  struct  sigaction  *act,
    5353                         struct sigaction *oldact);
    5454
    5555int      sh_calls_set_bind_addr (const char *);
    56 long int retry_connect(char * file, int line,
     56long int retry_connect(const char * file, int line,
    5757                       int fd, struct sockaddr *serv_addr, int addrlen);
    5858
    59 long int retry_aud_dup2    (char * file, int line, int fd, int fd2);
    60 long int retry_aud_execve  (char * file, int line,
     59long int retry_aud_dup2    (const char * file, int line, int fd, int fd2);
     60long int retry_aud_execve  (const char * file, int line,
    6161                            const  char *dateiname, char * argv[],
    6262                            char *envp[]);
    63 long int retry_aud_dup     (char * file, int line,
     63long int retry_aud_dup     (const char * file, int line,
    6464                            int fd);
    65 long int retry_aud_chdir   (char * file, int line,
     65long int retry_aud_chdir   (const char * file, int line,
    6666                            const char *path);
    67 long int retry_aud_unlink  (char * file, int line,
     67long int retry_aud_unlink  (const char * file, int line,
    6868                            char * path);
    69 long int retry_aud_utime   (char * file, int line,
     69long int retry_aud_utime   (const char * file, int line,
    7070                            char * path, struct utimbuf *buf);
    7171
    72 long int aud_open           (char * file, int line, int privs,
     72long int aud_open           (const char * file, int line, int privs,
    7373                             const char *pathname, int flags, mode_t mode);
    74 long int aud_open_noatime   (char * file, int line, int privs,
     74long int aud_open_noatime   (const char * file, int line, int privs,
    7575                             const char *pathname, int flags, mode_t mode,
    7676                             int * o_noatime);
    7777/*@noreturn@*/
    78 void     aud_exit   (char * file, int line, int fd);
     78void     aud_exit   (const char * file, int line, int fd);
    7979/*@noreturn@*/
    80 void     aud__exit  (char * file, int line, int fd);
    81 pid_t    aud_fork   (char * file, int line);
    82 int      aud_pipe   (char * file, int line, int modus[2]);
    83 int      aud_setuid (char * file, int line, uid_t uid);
    84 int      aud_setgid (char * file, int line, gid_t gid);
    85 long int aud_kill   (char * file, int line, pid_t pid, int sig);
     80void     aud__exit  (const char * file, int line, int fd);
     81pid_t    aud_fork   (const char * file, int line);
     82int      aud_pipe   (const char * file, int line, int modus[2]);
     83int      aud_setuid (const char * file, int line, uid_t uid);
     84int      aud_setgid (const char * file, int line, gid_t gid);
     85long int aud_kill   (const char * file, int line, pid_t pid, int sig);
    8686
    8787#endif
  • trunk/include/sh_cat.h

    r169 r170  
    77  unsigned long priority;
    88  unsigned long class;
    9   char *        format;
     9  const char *        format;
    1010} cat_entry;
    1111
    1212extern cat_entry msg_cat[];
    1313
    14 extern char * class_cat[];
     14extern const char * class_cat[];
    1515
    1616#define  AUD      0
  • trunk/include/sh_database.h

    r22 r170  
    22#define SH_DATABASE_H
    33
    4 void sh_database_reset();
     4void sh_database_reset(void);
    55int sh_database_insert (char * message);
    66
  • trunk/include/sh_error.h

    r132 r170  
    107107/* init or re-init log facilities that need it
    108108 */
    109 void sh_error_fixup();
     109void sh_error_fixup(void);
    110110
    111111/* convert a string to a numeric priority
  • trunk/include/sh_error_min.h

    r1 r170  
    2222/* this function should be called to report an error
    2323 */
    24 void sh_error_handle (int flag, char * file, long line,
     24void sh_error_handle (int flag, const char * file, long line,
    2525                      long errnum, unsigned long  msg_index, ...);
    2626
  • trunk/include/sh_forward.h

    r27 r170  
    5454/* create socket and start listening
    5555 */
    56 void create_server_tcp_socket ();
     56void create_server_tcp_socket (void);
    5757
    5858/* whether to use client address as known to the communication layer
  • trunk/include/sh_gpg.h

    r86 r170  
    2929/* log successful startup
    3030 */
    31 void sh_gpg_log_startup ();
     31void sh_gpg_log_startup (void);
    3232
    3333#endif
  • trunk/include/sh_hash.h

    r169 r170  
    3030/* format a uint64
    3131 */
    32 char * sh_hash_size_format();
     32char * sh_hash_size_format(void);
    3333
    3434/* report on a missing file
     
    8282/* reset sh_hash_pushdata to use 'update' in daemon mode
    8383 */
    84 void sh_hash_pushdata_reset ();
     84void sh_hash_pushdata_reset (void);
    8585
    8686/* Insert a file into the in-memory database.
     
    145145/* Write out database
    146146 */
    147 int sh_hash_writeout();
     147int sh_hash_writeout(void);
    148148#endif
  • trunk/include/sh_ignore.h

    r22 r170  
    88int sh_ignore_chk_new (const char * chkpath);
    99
    10 int sh_ignore_clean ();
     10int sh_ignore_clean (void);
    1111
    1212#endif
  • trunk/include/sh_prelude.h

    r22 r170  
    22#define SH_PRELUDE_H
    33
    4 void sh_prelude_reset();
    5 void sh_prelude_stop();
    6 int  sh_prelude_init();
     4void sh_prelude_reset(void);
     5void sh_prelude_stop(void);
     6int  sh_prelude_init(void);
    77
    88int sh_prelude_set_profile(const char *arg);
  • trunk/include/sh_pthread.h

    r143 r170  
    119119 * ----   Initialize thread-specific conversion area   ----
    120120 */
    121 extern int sh_g_thread();
     121extern int sh_g_thread(void);
    122122
    123123
  • trunk/include/sh_socket.h

    r1 r170  
    1414
    1515
    16 int    sh_socket_open_int ();
    17 int    sh_socket_remove ();
     16int    sh_socket_open_int (void);
     17int    sh_socket_remove (void);
    1818char * sh_socket_check(const char * client_name);
    19 int    sh_socket_poll();
     19int    sh_socket_poll(void);
    2020void   sh_socket_add2reload (const char * clt);
    2121
  • trunk/include/sh_tiger.h

    r151 r170  
    4242 * 0 = tiger192, 1 = sha1, 2 = md5
    4343 */
    44 int sh_tiger_get_hashtype ();
     44int sh_tiger_get_hashtype (void);
    4545
    4646/* GnuPG-like format, returns allocated memory
  • trunk/include/sh_unix.h

    r169 r170  
    9393#define MODI_TXT ((1 << 14)|MODI_CHK)
    9494
     95#define MODI_TXT_ENABLED(a) (((a)&(1 << 14))!=0)
     96
    9597#define SH_TXT_MAX 9200
    9698
     
    156158/* mlock utilities
    157159 */
    158 int sh_unix_mlock(char * file, int line, void * addr, size_t len);
     160int sh_unix_mlock(const char * file, int line, void * addr, size_t len);
    159161int sh_unix_munlock(void * addr, size_t len);
    160 int sh_unix_count_mlock();
     162int sh_unix_count_mlock(void);
    161163/* public for unit tests */
    162 int sh_unix_pagesize();
     164int sh_unix_pagesize(void);
    163165unsigned long sh_unix_lookup_page(void * in_addr, size_t len, int * num_pages);
    164166
     
    183185 */
    184186int  sh_unix_set_io_limit (const char * c);
    185 void sh_unix_io_pause ();
     187void sh_unix_io_pause (void);
    186188
    187189/* get file type
     
    191193/* reset masks for policies
    192194 */
    193 int sh_unix_maskreset();
     195int sh_unix_maskreset(void);
    194196
    195197/* return true if database is remote
    196198 */
    197 int file_is_remote ();
     199int file_is_remote (void);
    198200
    199201/* return the path to the configuration/database file
     
    220222/* write the PID file
    221223 */
    222 int sh_unix_write_pid_file();
     224int sh_unix_write_pid_file(void);
    223225
    224226/* rm the PID file
    225227 */
    226 int sh_unix_rm_pid_file();
     228int sh_unix_rm_pid_file(void);
    227229
    228230
  • trunk/include/sh_userfiles.h

    r140 r170  
    2020int sh_userfiles_set_interval(const char *c);
    2121int sh_userfiles_set_active(const char *c);
    22 int sh_userfiles_check_internal();
     22int sh_userfiles_check_internal(void);
    2323
    2424extern sh_rconf sh_userfiles_table[];
  • trunk/include/sh_utils.h

    r167 r170  
    5858 *  generator.
    5959 */
    60 UINT32 taus_get            (); 
     60UINT32 taus_get            (void); 
    6161double taus_get_double     (void *vstate);  /* fast */
    6262int    taus_seed           (void);
  • trunk/include/slib.h

    r169 r170  
    123123#endif
    124124
    125   int dlog (int flag, char * 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);
    128128
    129129  /* ----------------------------------------------------------------
     
    133133   * ---------------------------------------------------------------- */
    134134
    135   int sl_test_heap();
     135  int sl_test_heap(void);
    136136
    137137  /* ----------------------------------------------------------------
     
    143143  extern int sl_useCaps;
    144144
    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);
    150150
    151151  /* ----------------------------------------------------------------
     
    233233   * UID HANDLING FUNCTIONS.
    234234   */
    235   int sl_policy_get_user(char *username);  /* drop SUID to <username>  */
     235  int sl_policy_get_user(const char *username);  /* drop SUID to <username>  */
    236236  int sl_policy_get_real(char *username);  /* drop privs to <username> */
    237237  int sl_policy_get_root(void);            /* drop SUID to root        */
     
    250250   */
    251251  int sl_get_euid(/*@out@*/uid_t * ret);
    252   uid_t sl_ret_euid();
     252  uid_t sl_ret_euid(void);
    253253
    254254  /*
     
    388388  /* Write file.
    389389   */
    390   int sl_write (SL_TICKET ticket, void * msg, long nbytes);
     390  int sl_write (SL_TICKET ticket, const void * msg, long nbytes);
    391391
    392392  /* Write file, terminate with newline.
    393393   */
    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);
    395395
    396396  /* As above, but only for non-constant strings.
     
    412412  /* purge list of trusted users
    413413   */
    414   int  sl_trust_purge_user ();
     414  int  sl_trust_purge_user (void);
    415415
    416416  /* Add a trusted user.
     
    540540void sl_stack_push(char * c, char * file, int line);
    541541void sl_stack_pop(char * c, char * file, int line);
    542 void sl_stack_print();
    543 #endif
    544 void sl_trace_in   (char * str, char * file, int line);
    545 void sl_trace_out  (char * str, char * file, int line);
     542void sl_stack_print(void);
     543#endif
     544void sl_trace_in   (const char * str, const char * file, int line);
     545void sl_trace_out  (const char * str, const char * file, int line);
    546546int  sl_trace_file (const char * str);
    547547int  sl_trace_use  (const char * str);
Note: See TracChangeset for help on using the changeset viewer.