- Timestamp:
- Mar 11, 2011, 8:30:55 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Makefile.in
r310 r315 126 126 sh_log_check.h sh_log_evalrule.h sh_log_correlate.h \ 127 127 sh_log_mark.h sh_log_repeat.h sh_inotify.h sh_registry.h sh_ipvx.h \ 128 sh_restrict.h 128 sh_restrict.h sh_sub.h 129 129 130 130 … … 168 168 $(srcsrc)/sh_inotify.c $(srcsrc)/sh_log_repeat.c \ 169 169 $(srcsrc)/sh_audit.c $(srcsrc)/sh_registry.c \ 170 $(srcsrc)/sh_ipvx.c $(srcsrc)/sh_restrict.c $(srcsrc)/sh_filetype.c \ 170 $(srcsrc)/sh_ipvx.c $(srcsrc)/sh_restrict.c \ 171 $(srcsrc)/sh_filetype.c $(srcsrc)/sh_sub.c \ 171 172 $(srcsrc)/t-test1.c 172 173 … … 188 189 sh_log_correlate.o sh_log_mark.o sh_log_repeat.o \ 189 190 sh_pthread.o sh_string.o sh_inotify.o dnmalloc.o \ 190 sh_audit.o sh_registry.o sh_ipvx.o sh_restrict.o sh_filetype.o 191 sh_audit.o sh_registry.o sh_ipvx.o sh_restrict.o \ 192 sh_filetype.o sh_sub.o 191 193 192 194 KERN = kern_head.h kern_head.c … … 1730 1732 sh_gpg.o: $(srcsrc)/sh_gpg.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_tiger.h $(srcinc)/sh_static.h 1731 1733 sh_cat.o: $(srcsrc)/sh_cat.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_cat.h 1732 sh_calls.o: $(srcsrc)/sh_calls.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_calls.h $(srcinc)/sh_ipvx.h 1734 sh_calls.o: $(srcsrc)/sh_calls.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_calls.h $(srcinc)/sh_ipvx.h $(srcinc)/sh_sub.h $(srcinc)/sh_utils.h 1733 1735 sh_extern.o: $(srcsrc)/sh_extern.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_tiger.h $(srcinc)/sh_extern.h $(srcinc)/sh_calls.h $(srcinc)/sh_filter.h $(srcinc)/sh_static.h 1734 1736 sh_database.o: $(srcsrc)/sh_database.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_cat.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h … … 1788 1790 sh_restrict.o: $(srcsrc)/sh_restrict.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_error_min.h $(srcinc)/sh_string.h $(srcinc)/sh_utils.h $(srcinc)/sh_restrict.h $(srcinc)/CuTest.h 1789 1791 sh_filetype.o: $(srcsrc)/sh_filetype.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_error_min.h $(srcinc)/sh_utils.h 1792 sh_sub.o: $(srcsrc)/sh_sub.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h -
trunk/depend.dep
r310 r315 28 28 sh_gpg.o: $(srcsrc)/sh_gpg.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_error.h $(srcinc)/sh_tiger.h $(srcinc)/sh_static.h 29 29 sh_cat.o: $(srcsrc)/sh_cat.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_cat.h 30 sh_calls.o: $(srcsrc)/sh_calls.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_calls.h $(srcinc)/sh_ipvx.h 30 sh_calls.o: $(srcsrc)/sh_calls.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_error.h $(srcinc)/sh_calls.h $(srcinc)/sh_ipvx.h $(srcinc)/sh_sub.h $(srcinc)/sh_utils.h 31 31 sh_extern.o: $(srcsrc)/sh_extern.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_utils.h $(srcinc)/sh_unix.h $(srcinc)/sh_tiger.h $(srcinc)/sh_extern.h $(srcinc)/sh_calls.h $(srcinc)/sh_filter.h $(srcinc)/sh_static.h 32 32 sh_database.o: $(srcsrc)/sh_database.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_cat.h $(srcinc)/sh_error.h $(srcinc)/sh_utils.h … … 88 88 sh_restrict.o: $(srcsrc)/sh_restrict.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_error_min.h $(srcinc)/sh_string.h $(srcinc)/sh_utils.h $(srcinc)/sh_restrict.h $(srcinc)/CuTest.h 89 89 sh_filetype.o: $(srcsrc)/sh_filetype.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_mem.h $(srcinc)/sh_error_min.h $(srcinc)/sh_utils.h 90 sh_sub.o: $(srcsrc)/sh_sub.c Makefile config_xor.h $(srcinc)/samhain.h $(srcinc)/sh_pthread.h -
trunk/depend.sum
r310 r315 1 2 5893579221 2743510484 -
trunk/docs/Changelog
r312 r315 1 1 2.8.3: 2 * fix zeroing of result from getnameinfo() (problem reported by Richard) 3 * fix spurious warnings about unsupported address family (reported 4 by N Silverman) 5 * option to run lstat/stat in subprocess to avoid hanging on NFS mounts 6 (off by default) 2 7 * fix Windows/Cygwin compile error (reported by A. Schmidt) 3 8 -
trunk/include/sh_calls.h
r295 r315 39 39 int fd, struct sh_sockaddr *serv_addr, int * addrlen); 40 40 #endif 41 42 int sh_calls_set_sub (const char * str); 41 43 42 44 long int retry_stat (const char * file, int line, -
trunk/include/sh_ipvx.h
r295 r315 46 46 int sh_ipvx_set_port(struct sh_sockaddr * ss, int port); 47 47 48 /* Get the port 49 */ 50 int sh_ipvx_get_port(struct sockaddr * ss, int sa_family); 51 48 52 /* Save a sockaddress 49 53 */ 50 54 void sh_ipvx_save(struct sh_sockaddr * ss, int sa_family, struct sockaddr * sa); 55 56 /* Ascii numerical sockaddress 57 */ 58 char * sh_ipvx_print_sockaddr (struct sockaddr * sa, int sa_family); 51 59 52 60 /* Determine whether the given address is numeric -
trunk/include/sh_pthread.h
r214 r315 10 10 #define SH_MUTEX_STATIC(M,I) static pthread_mutex_t M = I 11 11 #define SH_MUTEX_EXTERN(M) extern pthread_mutex_t M 12 13 #define SH_SETSIGMASK(A, B, C) sh_pthread_setsigmask(A,B,C) 14 15 int sh_pthread_setsigmask(int how, const void *set, void *oldset); 12 16 13 17 /* pthread_mutex_unlock() has the wrong type (returns int), so … … 133 137 #else 134 138 139 #define SH_SETSIGMASK(A, B, C) sh_pthread_setsigmask(A,B,C) 140 141 int sh_pthread_setsigmask(int how, const void *set, void *oldset); 142 135 143 #define PTHREAD_MUTEX_INITIALIZER NULL 136 144 #define SH_MUTEX(M) void *SH_MUTEX_DUMMY_ ## M -
trunk/src/sh_calls.c
r307 r315 52 52 #include "sh_calls.h" 53 53 #include "sh_ipvx.h" 54 #include "sh_sub.h" 55 #include "sh_utils.h" 54 56 55 57 #undef FIL__ … … 240 242 } 241 243 244 static int sh_use_sub = 0; 245 246 int sh_calls_set_sub (const char * str) 247 { 248 return sh_util_flagval(str, &sh_use_sub); 249 } 250 242 251 long int retry_lstat(const char * file, int line, 243 252 const char *file_name, struct stat *buf) … … 249 258 SL_ENTER(_("retry_lstat")); 250 259 251 do { 252 val_retry = /*@-unrecog@*/lstat (file_name, buf)/*@+unrecog@*/; 253 } while (val_retry < 0 && errno == EINTR); 260 if (sh_use_sub) 261 { 262 val_retry = sh_sub_lstat (file_name, buf); 263 } 264 else 265 { 266 do { 267 val_retry = /*@-unrecog@*/lstat (file_name, buf)/*@+unrecog@*/; 268 } while (val_retry < 0 && errno == EINTR); 269 } 270 254 271 error = errno; 255 272 if (val_retry < 0) { … … 260 277 } 261 278 errno = error; 279 262 280 SL_RETURN(val_retry, _("retry_lstat")); 263 281 } … … 272 290 SL_ENTER(_("retry_stat")); 273 291 274 do { 275 val_retry = stat (file_name, buf); 276 } while (val_retry < 0 && errno == EINTR); 292 if (sh_use_sub) 293 { 294 val_retry = sh_sub_stat (file_name, buf); 295 } 296 else 297 { 298 do { 299 val_retry = stat (file_name, buf); 300 } while (val_retry < 0 && errno == EINTR); 301 } 302 277 303 error = errno; 278 304 if (val_retry < 0) { … … 283 309 } 284 310 errno = error; 311 285 312 SL_RETURN(val_retry, _("retry_stat")); 286 313 } -
trunk/src/sh_forward.c
r307 r315 4862 4862 int flag = 1; /* non-zero to enable an option */ 4863 4863 4864 /* fprintf(stderr, "FIXME IPVX: bind addr %s (%d) :%d\n", 4865 sh_ipvx_print_sockaddr (sa, domain), salen, 4866 sh_ipvx_get_port(sa, domain)); */ 4867 4864 4868 /* create the socket, bind() it and listen() 4865 4869 */ … … 4940 4944 hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG; 4941 4945 hints.ai_socktype = SOCK_STREAM; 4946 hints.ai_family = AF_UNSPEC; 4942 4947 sl_snprintf(port, sizeof(port), "%d", server_port); 4943 4948 -
trunk/src/sh_port2proc.c
r298 r315 422 422 423 423 sh_ipvx_ntoa(a, sizeof(a), &ss); 424 sh_ipvx_ntoa(b, sizeof(b), &ss);424 sh_ipvx_ntoa(b, sizeof(b), saddr); 425 425 426 426 fprintf(stderr, " -> inode %u, iface/port %s,%u, status %u, searching %s,%u, %u\n", -
trunk/src/sh_pthread.c
r259 r315 15 15 SH_MUTEX_INIT(mutex_readdir, PTHREAD_MUTEX_INITIALIZER); 16 16 SH_MUTEX_INIT(mutex_thread_nolog, PTHREAD_MUTEX_INITIALIZER); 17 18 int sh_pthread_setsigmask(int how, const void *set, void *oldset) 19 { 20 return pthread_sigmask(how, (const sigset_t *)set, (sigset_t *)oldset); 21 } 17 22 18 23 void sh_pthread_mutex_unlock (void *arg) … … 288 293 #endif 289 294 295 #else 296 297 #include <signal.h> 298 299 int sh_pthread_setsigmask(int how, const void *set, void *oldset) 300 { 301 return sigprocmask(how, (const sigset_t *)set, (sigset_t *)oldset); 302 } 303 290 304 291 305 #endif -
trunk/src/sh_readconf.c
r310 r315 1227 1227 sh_util_sigtype }, 1228 1228 1229 { N_("avoidblock"), SH_SECTION_MISC, SH_SECTION_NONE, 1230 sh_calls_set_sub }, 1231 1229 1232 { NULL, 0, 0, NULL} 1230 1233 }; -
trunk/src/sh_socket.c
r295 r315 683 683 { 684 684 ++retry; 685 retry_msleep(0, 1 );685 retry_msleep(0, 10); 686 686 } 687 687 } while ((nbytes < 0) && (retry < 3)); -
trunk/src/sh_unix.c
r310 r315 1529 1529 do { 1530 1530 errno = 0; 1531 test = sigprocmask(SIG_UNBLOCK, &set_proc, NULL);1531 test = SH_SETSIGMASK(SIG_UNBLOCK, &set_proc, NULL); 1532 1532 } while (test < 0 && errno == EINTR); 1533 1533
Note:
See TracChangeset
for help on using the changeset viewer.