- Timestamp:
- Nov 8, 2007, 10:35:23 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.ac
r143 r145 13 13 dnl start 14 14 dnl 15 AM_INIT_AUTOMAKE(samhain, 2.4.0 )15 AM_INIT_AUTOMAKE(samhain, 2.4.0a) 16 16 AC_CANONICAL_HOST 17 17 -
trunk/docs/Changelog
r144 r145 1 2.4.0a: 2 * fix compile failure with --enable-static (reported by S. Clormann) 3 * fix potential deadlock if SIGHUP is received while suspended 4 1 5 2.4.0: 2 6 * eliminate alarm() for I/O timeout (replaced by select) -
trunk/include/sh_static.h
r131 r145 17 17 18 18 struct passwd * sh_getpwnam(const char *name); 19 int getpwnam_r(const char *name, struct passwd *pwbuf,19 int sh_getpwnam_r(const char *name, struct passwd *pwbuf, 20 20 char *buf, size_t buflen, struct passwd **pwbufp); 21 21 22 22 struct group * sh_getgrgid(gid_t gid); 23 int getgrgid_r(gid_t gid, struct group *gbuf,23 int sh_getgrgid_r(gid_t gid, struct group *gbuf, 24 24 char *buf, size_t buflen, struct group **gbufp); 25 25 26 26 struct passwd * sh_getpwuid(uid_t uid); 27 int getpwuid_r(uid_t uid, struct passwd *pwbuf,27 int sh_getpwuid_r(uid_t uid, struct passwd *pwbuf, 28 28 char *buf, size_t buflen, struct passwd **pwbufp); 29 29 -
trunk/src/samhain.c
r144 r145 1723 1723 } 1724 1724 1725 if (sig_config_read_again == 1) /* SIGHUP */ 1725 if (sig_config_read_again == 1 && /* SIGHUP */ 1726 sh_global_suspend_flag == 0) 1726 1727 { 1727 1728 TPT((0, FIL__, __LINE__, _("msg=<Re-read configuration.>\n"))) -
trunk/src/sh_static.c
r134 r145 94 94 #define DO_GETXXKEY_R_PATHNAME _PATH_PASSWD 95 95 96 staticint GETXXKEY_R_FUNC(DO_GETXXKEY_R_KEYTYPE key,97 98 99 96 int GETXXKEY_R_FUNC(DO_GETXXKEY_R_KEYTYPE key, 97 GETXXKEY_R_ENTTYPE *__restrict resultbuf, 98 char *__restrict buffer, size_t buflen, 99 GETXXKEY_R_ENTTYPE **__restrict result) 100 100 { 101 101 FILE *stream; … … 142 142 #define DO_GETXXKEY_R_PATHNAME _PATH_GROUP 143 143 144 staticint GETXXKEY_R_FUNC(DO_GETXXKEY_R_KEYTYPE key,145 146 147 144 int GETXXKEY_R_FUNC(DO_GETXXKEY_R_KEYTYPE key, 145 GETXXKEY_R_ENTTYPE *__restrict resultbuf, 146 char *__restrict buffer, size_t buflen, 147 GETXXKEY_R_ENTTYPE **__restrict result) 148 148 { 149 149 FILE *stream; … … 190 190 #define DO_GETXXKEY_R_PATHNAME _PATH_PASSWD 191 191 192 staticint GETXXKEY_R_FUNC(DO_GETXXKEY_R_KEYTYPE key,193 194 195 192 int GETXXKEY_R_FUNC(DO_GETXXKEY_R_KEYTYPE key, 193 GETXXKEY_R_ENTTYPE *__restrict resultbuf, 194 char *__restrict buffer, size_t buflen, 195 GETXXKEY_R_ENTTYPE **__restrict result) 196 196 { 197 197 FILE *stream; … … 238 238 #define DO_GETXXKEY_R_PATHNAME _PATH_GROUP 239 239 240 staticint GETXXKEY_R_FUNC(DO_GETXXKEY_R_KEYTYPE key,241 242 243 240 int GETXXKEY_R_FUNC(DO_GETXXKEY_R_KEYTYPE key, 241 GETXXKEY_R_ENTTYPE *__restrict resultbuf, 242 char *__restrict buffer, size_t buflen, 243 GETXXKEY_R_ENTTYPE **__restrict result) 244 244 { 245 245 FILE *stream; … … 1168 1168 DPRINTF("Looking up type %d answer for '%s'\n", type, name); 1169 1169 1170 LOCK;1170 SH_MUTEX_LOCK_UNSAFE(resolv_lock); 1171 1171 ns %= nscount; 1172 UNLOCK;1172 SH_MUTEX_UNLOCK_UNSAFE(resolv_lock); 1173 1173 1174 1174 while (retries++ < MAX_RETRIES) { … … 1181 1181 1182 1182 /* Mess with globals while under lock */ 1183 LOCK;1183 SH_MUTEX_LOCK_UNSAFE(resolv_lock); 1184 1184 ++id; 1185 1185 id &= 0xffff; 1186 1186 h.id = id; 1187 1187 dns = nsip[ns]; 1188 UNLOCK;1188 SH_MUTEX_UNLOCK_UNSAFE(resolv_lock); 1189 1189 1190 1190 h.qdcount = 1; … … 1281 1281 DPRINTF("id = %d, qr = %d\n", h.id, h.qr); 1282 1282 1283 LOCK;1283 SH_MUTEX_LOCK_UNSAFE(resolv_lock); 1284 1284 if ((h.id != id) || (!h.qr)) { 1285 UNLOCK;1285 SH_MUTEX_UNLOCK_UNSAFE(resolv_lock); 1286 1286 /* unsolicited */ 1287 1287 goto again; 1288 1288 } 1289 UNLOCK;1289 SH_MUTEX_UNLOCK_UNSAFE(resolv_lock); 1290 1290 1291 1291 … … 1369 1369 } else { 1370 1370 /* next server, first search */ 1371 LOCK;1371 SH_MUTEX_LOCK_UNSAFE(resolv_lock); 1372 1372 ns = (ns + 1) % nscount; 1373 UNLOCK;1373 SH_MUTEX_UNLOCK_UNSAFE(resolv_lock); 1374 1374 variant = 0; 1375 1375 } -
trunk/test/testcompile.sh
r140 r145 20 20 # 21 21 22 MAXTEST= 65; export MAXTEST22 MAXTEST=71; export MAXTEST 23 23 24 24 run_flawfinder () … … 181 181 # test standalone compilation 182 182 # 183 TEST="${S}standalone static w/suidcheck w/procchk${E}" 184 # 185 if test -r "Makefile"; then 186 $MAKE distclean 187 fi 188 # 189 ${TOP_SRCDIR}/configure --quiet --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test --enable-static --enable-suidcheck --enable-process-check > /dev/null 2>> test_log 190 # 191 let "num = num + 1" >/dev/null 192 testmake $? $num || let "numfail = numfail + 1" >/dev/null 193 let "num = num + 1" >/dev/null 194 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 195 196 # 197 # test standalone compilation 198 # 183 199 TEST="${S}standalone w/procchk w/portchk${E}" 184 200 # … … 450 466 # 451 467 ${TOP_SRCDIR}/configure --quiet --enable-network=server --enable-srp --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test --with-timeserver=127.0.0.1 > /dev/null 2>> test_log 468 # 469 let "num = num + 1" >/dev/null 470 testmake $? $num || let "numfail = numfail + 1" >/dev/null 471 let "num = num + 1" >/dev/null 472 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 473 474 # 475 # test client/server compilation 476 # 477 TEST="${S}client/server application static w/timeserver${E}" 478 # 479 if test -r "Makefile"; then 480 $MAKE clean 481 fi 482 # 483 ${TOP_SRCDIR}/configure --quiet --enable-network=client --enable-static --enable-srp --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test --with-timeserver=127.0.0.1 > /dev/null 2>> test_log 484 # 485 let "num = num + 1" >/dev/null 486 testmake $? $num || let "numfail = numfail + 1" >/dev/null 487 let "num = num + 1" >/dev/null 488 run_smatch $? $num || let "numfail = numfail + 1" >/dev/null 489 490 if test -r "Makefile"; then 491 $MAKE clean 492 fi 493 # 494 ${TOP_SRCDIR}/configure --quiet --enable-network=server --enable-static --enable-srp --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$PW_DIR/samhainrc.test --with-timeserver=127.0.0.1 > /dev/null 2>> test_log 452 495 # 453 496 let "num = num + 1" >/dev/null -
trunk/test/testrun_1a.sh
r100 r145 20 20 # 21 21 22 PREBUILDOPTS="--quiet $TRUST --enable-debug --enable- xml-log --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE --with-log-file=$LOGFILE --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file"22 PREBUILDOPTS="--quiet $TRUST --enable-debug --enable-static --enable-xml-log --enable-login-watch --prefix=$PW_DIR --localstatedir=$PW_DIR --with-config-file=$RCFILE --with-log-file=$LOGFILE --with-pid-file=$PW_DIR/.samhain_lock --with-data-file=$PW_DIR/.samhain_file" 23 23 export PREBUILDOPTS 24 24
Note:
See TracChangeset
for help on using the changeset viewer.