Legend:
- Unmodified
- Added
- Removed
-
trunk/src/samhain.c
r79 r84 1314 1314 /* close all other files 1315 1315 */ 1316 sh_unix_closeall(3, -1); /* after processing CL options */1316 sh_unix_closeall(3, -1); /* after processing CL options; only stderr here */ 1317 1317 1318 1318 … … 1369 1369 sh.flag.loop = S_FALSE; 1370 1370 } 1371 1372 if (sh.flag.isdaemon == S_TRUE)1373 sh_error_only_stderr (BAD);1374 1371 1375 1372 /* --- load database; checksum of database -
trunk/src/sh_database.c
r81 r84 1525 1525 } 1526 1526 1527 static int is_escaped(c har * p_in) {1527 static int is_escaped(const char * p_in) { 1528 1528 1529 1529 int escp = 0; -
trunk/src/sh_unix.c
r78 r84 1198 1198 */ 1199 1199 if (fdlimit < 0) 1200 fdlimit = 8; /* POSIX lower limit */1200 fdlimit = 20; /* POSIX lower limit */ 1201 1201 1202 1202 if (fdlimit > 65536) … … 1847 1847 sh_unix_zeroenv(); 1848 1848 1849 1850 /* close all file descriptors, and1851 * open first three streams to /dev/null1852 */1853 1849 if (goDaemon == 1) 1854 1850 { 1851 /* close all file descriptors 1852 */ 1855 1853 sh_unix_closeall (0, -1); /* if running as daemon */ 1856 aud_open(FIL__, __LINE__, SL_NOPRIV, _("/dev/null"), O_RDWR, 0); 1857 retry_aud_dup(FIL__, __LINE__, 0); 1858 retry_aud_dup(FIL__, __LINE__, 0); 1854 1855 /* Enable full error logging 1856 */ 1857 sh_error_only_stderr (S_FALSE); 1858 1859 /* open first three streams to /dev/null 1860 */ 1861 status = aud_open(FIL__, __LINE__, SL_NOPRIV, _("/dev/null"), O_RDWR, 0); 1862 if (status < 0) 1863 { 1864 status = errno; 1865 sh_error_handle((-1), FIL__, __LINE__, status, MSG_E_SUBGEN, 1866 sh_error_message(status), _("open")); 1867 aud_exit(FIL__, __LINE__, EXIT_FAILURE); 1868 } 1869 1870 status = retry_aud_dup(FIL__, __LINE__, 0); 1871 if (status >= 0) 1872 retry_aud_dup(FIL__, __LINE__, 0); 1873 1874 if (status < 0) 1875 { 1876 status = errno; 1877 sh_error_handle((-1), FIL__, __LINE__, status, MSG_E_SUBGEN, 1878 sh_error_message(status), _("dup")); 1879 aud_exit(FIL__, __LINE__, EXIT_FAILURE); 1880 } 1881 1859 1882 #if defined(HAVE_LIBPRELUDE) 1860 1883 sh_prelude_reset ();
Note:
See TracChangeset
for help on using the changeset viewer.