Changeset 481 for trunk/include/samhain.h
- Timestamp:
- Jul 18, 2015, 5:06:52 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/samhain.h
r459 r481 28 28 #endif 29 29 30 #if defined(__GNUC__) && (__GNUC__ >= 4) 31 #define SH_GNUC_SENTINEL __attribute__((__sentinel__)) 32 #else 33 #define SH_GNUC_SENTINEL 34 #endif 35 36 #if defined(__GNUC__) && (__GNUC__ >= 3) 37 #undef SH_GNUC_PURE 38 #define SH_GNUC_PURE __attribute__((pure)) 39 #undef SH_GNUC_CONST 40 #define SH_GNUC_CONST __attribute__((const)) 41 #undef SH_GNUC_NORETURN 42 #define SH_GNUC_NORETURN __attribute__((noreturn)) 43 #undef SH_GNUC_MALLOC 44 #define SH_GNUC_MALLOC __attribute__((malloc)) 45 #else 46 #undef SH_GNUC_PURE 47 #define SH_GNUC_PURE 48 #undef SH_GNUC_CONST 49 #define SH_GNUC_CONST 50 #undef SH_GNUC_NORETURN 51 #define SH_GNUC_NORETURN 52 #undef SH_GNUC_MALLOC 53 #define SH_GNUC_MALLOC 54 #endif 55 30 56 /************************************************** 31 57 * … … 57 83 58 84 /* end IPv6 */ 59 60 #define REPLACE_OLD61 85 62 86 /* Standard buffer sizes. … … 101 125 #define PW_LEN 8 102 126 103 #undef GOOD104 #define GOOD 1105 #undef BAD106 #define BAD 0107 #undef ON108 #define ON 1109 #undef OFF110 #define OFF 0111 127 #undef S_TRUE 112 128 #define S_TRUE 1 113 129 #undef S_FALSE 114 130 #define S_FALSE 0 131 132 #undef GOOD 133 #define GOOD S_TRUE 134 #undef BAD 135 #define BAD S_FALSE 136 137 138 #ifdef HAVE_INTTYPES_H 139 #include <inttypes.h> 140 #endif 141 #ifdef HAVE_STDINT_H 142 #include <stdint.h> 143 #endif 144 145 #if !defined(HAVE_UINT16_T) 146 #define UINT16 unsigned short 147 #else 148 #define UINT16 uint16_t 149 #endif 150 151 #if !defined(HAVE_UINT32_T) 115 152 116 153 /* An unsigned integer guaranteed to be 32 bit. … … 129 166 #endif 130 167 131 #ifdef HAVE_INTTYPES_H 132 #include <inttypes.h> 133 #endif 134 #ifdef HAVE_STDINT_H 135 #include <stdint.h> 136 #endif 137 138 #if !defined(HAVE_UINT16_T) 139 #define UINT16 unsigned short 140 #else 141 #define UINT16 uint16_t 168 #else 169 #define UINT32 uint32_t 170 #define SINT32 int32_t 171 142 172 #endif 143 173 … … 305 335 int client_severity; /* TRUE if client severity used */ 306 336 int client_class; /* TRUE if client class used */ 337 int hidefile; /* TRUE if file not shown in log */ 338 int inotify; /* Flags for inotify */ 307 339 int audit; 308 340 unsigned long aud_mask; 309 int hidefile; /* TRUE if file not shown in log */310 int inotify; /* Flags for inotify */311 341 } sh_sh_flag; 312 342 … … 347 377 /*@null@*//*@out@*/ char * timezone; 348 378 379 int delayload; 380 349 381 #ifdef SCREW_IT_UP 350 382 int sigtrap_max_duration; 351 383 #endif 352 384 385 char * outpath; 353 386 } sh_struct; 354 387 … … 365 398 extern volatile int sig_termfast; /* SIGTERM */ 366 399 extern volatile int sig_force_check; /* SIGTTOU */ 400 extern volatile int sh_load_delta_flag; 367 401 368 402 extern long int eintr__result; … … 420 454 #endif 421 455 422 #if defined(__GNUC__) && (__GNUC__ >= 4)423 #define SH_GNUC_SENTINEL __attribute__((__sentinel__))424 #else425 #define SH_GNUC_SENTINEL426 #endif427 428 #if defined(__GNUC__) && (__GNUC__ >= 3)429 #undef SH_GNUC_PURE430 #define SH_GNUC_PURE __attribute__((pure))431 #undef SH_GNUC_CONST432 #define SH_GNUC_CONST __attribute__((const))433 #undef SH_GNUC_NORETURN434 #define SH_GNUC_NORETURN __attribute__((noreturn))435 #undef SH_GNUC_MALLOC436 #define SH_GNUC_MALLOC __attribute__((malloc))437 #else438 #undef SH_GNUC_PURE439 #define SH_GNUC_PURE440 #undef SH_GNUC_CONST441 #define SH_GNUC_CONST442 #undef SH_GNUC_NORETURN443 #define SH_GNUC_NORETURN444 #undef SH_GNUC_MALLOC445 #define SH_GNUC_MALLOC446 #endif447 456 448 457 … … 481 490 #ifdef USE_SUID 482 491 #define MLOCK(a, b) \ 483 if ((skey != NULL) && skey->mlock_failed == S L_FALSE){ \492 if ((skey != NULL) && skey->mlock_failed == S_FALSE){ \ 484 493 (void) sl_set_suid(); \ 485 if (sh_unix_mlock(FIL__, __LINE__, a, b) < 0) skey->mlock_failed = S L_TRUE; \494 if (sh_unix_mlock(FIL__, __LINE__, a, b) < 0) skey->mlock_failed = S_TRUE; \ 486 495 (void) sl_unset_suid(); } 487 496 #else 488 497 #define MLOCK(a, b) \ 489 if ((skey != NULL) && skey->mlock_failed == S L_FALSE){ \490 if (sh_unix_mlock(FIL__, __LINE__, a, b) < 0) skey->mlock_failed = S L_TRUE; }498 if ((skey != NULL) && skey->mlock_failed == S_FALSE){ \ 499 if (sh_unix_mlock(FIL__, __LINE__, a, b) < 0) skey->mlock_failed = S_TRUE; } 491 500 #endif 492 501 #else … … 498 507 #ifdef USE_SUID 499 508 #define MUNLOCK(a, b) \ 500 if ((skey != NULL) && skey->mlock_failed == S L_FALSE){ \509 if ((skey != NULL) && skey->mlock_failed == S_FALSE){ \ 501 510 (void) sl_set_suid(); \ 502 511 (void) sh_unix_munlock( a, b );\ … … 504 513 #else 505 514 #define MUNLOCK(a, b) \ 506 if ((skey != NULL) && skey->mlock_failed == S L_FALSE){ \515 if ((skey != NULL) && skey->mlock_failed == S_FALSE){ \ 507 516 (void) sh_unix_munlock( a, b ); } 508 517 #endif
Note:
See TracChangeset
for help on using the changeset viewer.