Changeset 149 for trunk/include
- Timestamp:
- Jan 7, 2008, 8:52:13 PM (17 years ago)
- Location:
- trunk/include
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/samhain.h
r143 r149 48 48 */ 49 49 #define SOCKPASS_MAX 14 50 #define USER_MAX 20 51 #define GROUP_MAX 20 52 #define TIM_MAX 32 53 50 #define USER_MAX 20 51 #define GROUP_MAX 20 52 #define TIM_MAX 32 53 54 #define CMODE_SIZE 11 55 56 #define ATTRBUF_SIZE 16 57 #define ATTRBUF_USED 12 54 58 55 59 /* The number of bytes in a key, … … 159 163 #define SET_SH_FFLAG_SUIDCHK(a) ((a) |= SH_FFLAG_SUIDCHK) 160 164 #define CLEAR_SH_FFLAG_SUIDCHK(a) ((a) &= ~SH_FFLAG_SUIDCHK) 161 162 165 163 166 … … 340 343 341 344 #if defined(__GNUC__) && (__GNUC__ >= 4) 342 #define SH_GNUC_NULL_TERMINATED __attribute__((__sentinel__)) 343 #else 344 #define SH_GNUC_NULL_TERMINATED 345 #endif 345 #define SH_GNUC_SENTINEL __attribute__((__sentinel__)) 346 #else 347 #define SH_GNUC_SENTINEL 348 #endif 349 350 #if defined(__GNUC__) && (__GNUC__ >= 3) 351 #undef SH_GNUC_PURE 352 #define SH_GNUC_PURE __attribute__((pure)) 353 #undef SH_GNUC_CONST 354 #define SH_GNUC_CONST __attribute__((const)) 355 #undef SH_GNUC_NORETURN 356 #define SH_GNUC_NORETURN __attribute__((noreturn)) 357 #undef SH_GNUC_MALLOC 358 #define SH_GNUC_MALLOC __attribute__((malloc)) 359 #else 360 #undef SH_GNUC_PURE 361 #define SH_GNUC_PURE 362 #undef SH_GNUC_CONST 363 #define SH_GNUC_CONST 364 #undef SH_GNUC_NORETURN 365 #define SH_GNUC_NORETURN 366 #undef SH_GNUC_MALLOC 367 #define SH_GNUC_MALLOC 368 #endif 369 346 370 347 371 /* The semantics of the built-in are that it is expected that expr == const -
trunk/include/sh_mem.h
r1 r149 38 38 #else 39 39 40 #if defined(__GNUC__) && (__GNUC__ >= 3) 41 #undef SH_GNUC_MALLOC 42 #define SH_GNUC_MALLOC __attribute__((malloc)) 43 #else 44 #undef SH_GNUC_MALLOC 45 #define SH_GNUC_MALLOC 46 #endif 40 47 41 48 void sh_mem_free (/*@only@*//*@out@*//*@null@*/ void * a); 42 /*@only@*//*@notnull@*/void * sh_mem_malloc (size_t size) ;49 /*@only@*//*@notnull@*/void * sh_mem_malloc (size_t size) SH_GNUC_MALLOC; 43 50 44 51 #define SH_FREE(a) sh_mem_free(a) -
trunk/include/sh_suidchk.h
r140 r149 6 6 7 7 #ifdef SH_USE_SUIDCHK 8 int sh_suidchk_init (struct mod_type * arg);9 int sh_suidchk_timer (time_t tcurrent);10 int sh_suidchk_check (void);11 int sh_suidchk_end (void);12 int sh_suidchk_ free_schedule(void);8 int sh_suidchk_init (struct mod_type * arg); 9 int sh_suidchk_timer (time_t tcurrent); 10 int sh_suidchk_check (void); 11 int sh_suidchk_end (void); 12 int sh_suidchk_reconf (void); 13 13 14 14 int sh_suidchk_set_activate (const char * c); -
trunk/include/sh_unix.h
r132 r149 120 120 #if defined(__linux__) || defined(HAVE_STAT_FLAGS) 121 121 unsigned long attributes; 122 char c_attributes[ 16];123 #endif 124 char c_mode[ 11];122 char c_attributes[ATTRBUF_SIZE]; 123 #endif 124 char c_mode[CMODE_SIZE]; 125 125 uid_t owner; 126 126 char c_owner[USER_MAX+2]; -
trunk/include/sh_utils.h
r138 r149 64 64 /* returns allocated memory 65 65 */ 66 char * sh_util_strdup (const char * str) ;66 char * sh_util_strdup (const char * str) SH_GNUC_MALLOC; 67 67 68 68 /* returns allocated memory 69 69 */ 70 char * sh_util_strdup_l (const char * str, size_t len) ;70 char * sh_util_strdup_l (const char * str, size_t len) SH_GNUC_MALLOC; 71 71 72 72 /* returns pointer within str … … 119 119 /* read a hexchar, return int value (0-15) 120 120 */ 121 int sh_util_hexchar( char c ) ;121 int sh_util_hexchar( char c ) SH_GNUC_CONST; 122 122 123 123 /* change verifier … … 159 159 * Argument list must be NULL terminated. 160 160 */ 161 char * sh_util_strconcat (const char * arg1, ...) SH_GNUC_ NULL_TERMINATED;161 char * sh_util_strconcat (const char * arg1, ...) SH_GNUC_MALLOC SH_GNUC_SENTINEL; 162 162 163 163 /* check if string is numeric only 164 164 */ 165 int sh_util_isnum (c har *str);165 int sh_util_isnum (const char *str) SH_GNUC_PURE; 166 166 167 167 /* init a key w/random string … … 176 176 /* returns freshly allocated memory, return value should be free'd 177 177 */ 178 char * sh_util_safe_name (const char * name) ;178 char * sh_util_safe_name (const char * name) SH_GNUC_MALLOC SH_GNUC_PURE; 179 179 180 180 /* check max size of printf result string -
trunk/include/sh_utmp.h
r140 r149 6 6 7 7 #ifdef SH_USE_UTMP 8 int sh_utmp_init (struct mod_type * arg);9 int sh_utmp_timer (time_t tcurrent);10 int sh_utmp_check (void);11 int sh_utmp_end (void);12 int sh_utmp_ null(void);8 int sh_utmp_init (struct mod_type * arg); 9 int sh_utmp_timer (time_t tcurrent); 10 int sh_utmp_check (void); 11 int sh_utmp_end (void); 12 int sh_utmp_reconf (void); 13 13 14 14 int sh_utmp_set_login_activate (const char * c); -
trunk/include/slib.h
r138 r149 63 63 #define SH_PWBUF_SIZE 4096 64 64 65 66 #if defined(__GNUC__) && (__GNUC__ >= 3) 67 #undef SL_GNUC_CONST 68 #define SL_GNUC_CONST __attribute__((const)) 69 #else 70 #undef SH_GNUC_CONST 71 #define SH_GNUC_CONST 72 #endif 65 73 66 74 /* … … 405 413 /* Overflow tests 406 414 */ 407 int sl_ok_muli (int a, int b) ;408 int sl_ok_divi (int a, int b) ;409 int sl_ok_addi (int a, int b) ;410 int sl_ok_subi (int a, int b) ;411 412 int sl_ok_muls (size_t a, size_t b) ;413 int sl_ok_adds (size_t a, size_t b) ;415 int sl_ok_muli (int a, int b) SL_GNUC_CONST; 416 int sl_ok_divi (int a, int b) SL_GNUC_CONST; 417 int sl_ok_addi (int a, int b) SL_GNUC_CONST; 418 int sl_ok_subi (int a, int b) SL_GNUC_CONST; 419 420 int sl_ok_muls (size_t a, size_t b) SL_GNUC_CONST; 421 int sl_ok_adds (size_t a, size_t b) SL_GNUC_CONST; 414 422 415 423
Note:
See TracChangeset
for help on using the changeset viewer.