Changeset 463
- Timestamp:
- Feb 17, 2015, 5:43:59 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.ac
r460 r463 12 12 dnl start 13 13 dnl 14 AM_INIT_AUTOMAKE(samhain, 3.1. 3)14 AM_INIT_AUTOMAKE(samhain, 3.1.4) 15 15 AC_DEFINE([SAMHAIN], 1, [Application is samhain]) 16 16 AC_CANONICAL_HOST -
trunk/docs/Changelog
r462 r463 1 1 3.1.4: 2 * fix buffer allocation for getgrnam_r for large groups 2 * Add non-existent file to the regression test config 3 * Fix erroneous call to sh_hash_init when a missing file 4 is specified in the configuration 5 * Fix buffer allocation for getgrnam_r for large groups 3 6 (problem reported by Sergio B) 4 * search RPM in $HOME/rpmbuild if test -d _topdir fails (CentOS7 * Search RPM in $HOME/rpmbuild if test -d _topdir fails (CentOS 5 8 recommends '%(echo $HOME)/topdir', reported by E. Taft) 6 9 7 10 3.1.3 (01-11-2014): 8 * remove initgroups() from the popen call in unix entropy gatherer11 * Remove initgroups() from the popen call in unix entropy gatherer 9 12 * Add error message for update mode if local baseline cannot be found 10 13 -
trunk/src/sh_hash.c
r458 r463 1325 1325 1326 1326 SL_ENTER(_("sh_hash_init")); 1327 1328 if ( sh.flag.checkSum == SH_CHECK_INIT ) 1329 { 1330 dlog(1, FIL__, __LINE__, 1331 _("Attempt to load the baseline database during initialisation. This is an internal error, please report it to the developer.\n")); 1332 SH_ABORT; 1333 aud_exit (FIL__, __LINE__, EXIT_FAILURE); 1334 } 1327 1335 1328 1336 SH_MUTEX_LOCK(mutex_hash); … … 2157 2165 { 2158 2166 sh_file_t * p; 2159 int retval; 2160 2161 if (IsInit != 1) 2162 sh_hash_init(); 2163 2164 SH_MUTEX_LOCK(mutex_hash); 2165 p = sh_hash_have_it_int (filename); 2166 if (p) 2167 retval = p->fflags; 2168 else 2169 retval = -1; 2170 SH_MUTEX_UNLOCK(mutex_hash); 2167 int retval = 0; 2168 2169 if ( sh.flag.checkSum != SH_CHECK_INIT ) 2170 { 2171 if (IsInit != 1) 2172 sh_hash_init(); 2173 2174 SH_MUTEX_LOCK(mutex_hash); 2175 p = sh_hash_have_it_int (filename); 2176 if (p) 2177 retval = p->fflags; 2178 else 2179 retval = -1; 2180 SH_MUTEX_UNLOCK(mutex_hash); 2181 } 2171 2182 return retval; 2172 2183 } … … 2175 2186 { 2176 2187 sh_file_t * p; 2177 int retval; 2178 2179 if (IsInit != 1) 2180 sh_hash_init(); 2181 2182 SH_MUTEX_LOCK(mutex_hash); 2183 p = sh_hash_have_it_int (filename); 2184 if (p) 2185 { 2186 p->fflags = flags; 2187 retval = 0; 2188 } 2189 else 2190 retval = -1; 2191 SH_MUTEX_UNLOCK(mutex_hash); 2188 int retval = 0; 2189 2190 if ( sh.flag.checkSum != SH_CHECK_INIT ) 2191 { 2192 if (IsInit != 1) 2193 sh_hash_init(); 2194 2195 SH_MUTEX_LOCK(mutex_hash); 2196 p = sh_hash_have_it_int (filename); 2197 if (p) 2198 { 2199 p->fflags = flags; 2200 retval = 0; 2201 } 2202 else 2203 retval = -1; 2204 SH_MUTEX_UNLOCK(mutex_hash); 2205 } 2192 2206 return retval; 2193 2207 } … … 2199 2213 sh_file_t * p; 2200 2214 2201 if (IsInit != 1) 2202 sh_hash_init(); 2203 2204 SH_MUTEX_LOCK(mutex_hash); 2205 p = sh_hash_have_it_int (filename); 2206 if (p) 2207 { 2208 p->fflags |= flag_to_set; 2209 } 2210 SH_MUTEX_UNLOCK(mutex_hash); 2215 if ( sh.flag.checkSum != SH_CHECK_INIT ) 2216 { 2217 if (IsInit != 1) 2218 sh_hash_init(); 2219 2220 SH_MUTEX_LOCK(mutex_hash); 2221 p = sh_hash_have_it_int (filename); 2222 if (p) 2223 { 2224 p->fflags |= flag_to_set; 2225 } 2226 SH_MUTEX_UNLOCK(mutex_hash); 2227 } 2211 2228 return; 2212 2229 } … … 2218 2235 sh_file_t * p; 2219 2236 2220 if (IsInit != 1) 2221 sh_hash_init(); 2222 2223 SH_MUTEX_LOCK(mutex_hash); 2224 p = sh_hash_have_it_int (filename); 2225 if (p) 2226 { 2227 p->fflags &= ~flag_to_clear; 2228 } 2229 SH_MUTEX_UNLOCK(mutex_hash); 2237 if ( sh.flag.checkSum != SH_CHECK_INIT ) 2238 { 2239 if (IsInit != 1) 2240 sh_hash_init(); 2241 2242 SH_MUTEX_LOCK(mutex_hash); 2243 p = sh_hash_have_it_int (filename); 2244 if (p) 2245 { 2246 p->fflags &= ~flag_to_clear; 2247 } 2248 SH_MUTEX_UNLOCK(mutex_hash); 2249 } 2230 2250 return; 2231 2251 } -
trunk/test/testrc_2.in
r86 r463 43 43 file = /tmp 44 44 file = /etc 45 46 # hopefully does not exist 47 file=/etc/toodleedoo 45 48 46 49 dir=1/usr -
trunk/test/testrun_2a.sh
r460 r463 254 254 ####### EXIT HERE FOR TESTING ###### 255 255 # 256 exit 0257 256 # 258 257 SERVER_BUILDOPTS_ORIG="${SERVER_BUILDOPTS}"
Note:
See TracChangeset
for help on using the changeset viewer.