Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 322 of 808  Not logged in ELOG logo
New entries since:Thu Jan 1 01:00:00 1970
ID Date Icon Author Author Email Category OS ELOG Version Subjectdown
  1954   Fri Sep 22 19:32:45 2006 Reply Steve Jonessteve.jones@freescale.comBug reportOther2.6.2-1714Re: SVN1714 will not run in 'daemon" mode on Solaris8

Stefan Ritt wrote:

Steve Jones wrote:
On Solaris, SVN1714 will not go into daemon mode. Running the compiled version under TRUSS (which provides a dump of every system call) and shows precisely where elog is failing. I have attached two TRUSS outputs: one where it errors out and the other where it runs but "interactively". Both runs are as root, simply one with and one without the "-D"


The "one where it errors out" does not look like an error. It does the "fork()" at the end and the main thread ends, that's how it's supposed to be.



Quote:


Ok, what this tells me is I need to get TRUSS to follow the fork - which I think I can do. The behavior, however, is that elog never goes into daemon mode after that fork.

More info to follow.
  1956   Fri Sep 22 22:12:18 2006 Reply Steve Jonessteve.jones@freescale.comBug reportOther2.6.2-1714Re: SVN1714 will not run in 'daemon" mode on Solaris8

Stefan Ritt wrote:

Steve Jones wrote:
On Solaris, SVN1714 will not go into daemon mode. Running the compiled version under TRUSS (which provides a dump of every system call) and shows precisely where elog is failing. I have attached two TRUSS outputs: one where it errors out and the other where it runs but "interactively". Both runs are as root, simply one with and one without the "-D"


The "one where it errors out" does not look like an error. It does the "fork()" at the end and the main thread ends, that's how it's supposed to be.




Quote:
Ok, I got it. I've attached the TRUSS output where we follow the fork. It appears that elogd cannot open any of the specified files then gives up. What was throwing me is no error output, even to STDERR. When I run the same but without the -D flag the files are opened fine.

There are also strange system calls that differ, and I thought it might be due to the setuid(60001) -nobody- but the the non-daemn mode also sets to nobody and works fine.
Attachment 1: truss-daemon-1714.txt
sudo truss -f /sysadm/www/elog/elogd -f /var/run/cr-elogd.pid -c /sysadm/www/elog/cr-elogd.cfg -D 
16352:  execve("/sysadm/www/elog/elogd", 0xFFBEFACC, 0xFFBEFAE8)  argc = 6
16352:  resolvepath("/usr/lib/ld.so.1", "/usr/lib/ld.so.1", 1023) = 16
16352:  open("/var/ld/ld.config", O_RDONLY)             Err#2 ENOENT
16352:  stat("/usr/lib/libsocket.so.1", 0xFFBEF3F0)     = 0
16352:  open("/usr/lib/libsocket.so.1", O_RDONLY)       = 3
16352:  mmap(0x00000000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0xFF390000
16352:  mmap(0x00000000, 114688, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON, -1, 0) = 0xFF370000
16352:  mmap(0xFF370000, 40558, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF370000
16352:  mmap(0xFF38A000, 4365, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 40960) = 0xFF38A000
16352:  munmap(0xFF37A000, 65536)                       = 0
16352:  memcntl(0xFF370000, 14496, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
16352:  close(3)                                        = 0
16352:  stat("/usr/lib/libnsl.so.1", 0xFFBEF3F0)        = 0
16352:  open("/usr/lib/libnsl.so.1", O_RDONLY)          = 3
16352:  mmap(0xFF390000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF390000
16352:  mmap(0x00000000, 712704, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON, -1, 0) = 0xFF280000
16352:  mmap(0xFF280000, 580118, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF280000
16352:  mmap(0xFF31E000, 33184, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 581632) = 0xFF31E000
16352:  mmap(0xFF328000, 23240, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) = 0xFF328000
16352:  munmap(0xFF30E000, 65536)                       = 0
16352:  memcntl(0xFF280000, 83788, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
16352:  close(3)                                        = 0
16352:  stat("/usr/lib/libc.so.1", 0xFFBEF3F0)          = 0
16352:  open("/usr/lib/libc.so.1", O_RDONLY)            = 3
16352:  mmap(0xFF390000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF390000
16352:  mmap(0x00000000, 802816, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON, -1, 0) = 0xFF180000
16352:  mmap(0xFF180000, 702456, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF180000
16352:  mmap(0xFF23C000, 24772, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 704512) = 0xFF23C000
16352:  munmap(0xFF22C000, 65536)                       = 0
16352:  memcntl(0xFF180000, 113528, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
16352:  close(3)                                        = 0
16352:  stat("/usr/lib/libdl.so.1", 0xFFBEF3F0)         = 0
16352:  open("/usr/lib/libdl.so.1", O_RDONLY)           = 3
16352:  mmap(0xFF390000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF390000
16352:  mmap(0x00000000, 8192, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON, -1, 0) = 0xFF360000
16352:  mmap(0xFF360000, 2302, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF360000
16352:  close(3)                                        = 0
16352:  stat("/usr/lib/libmp.so.2", 0xFFBEF3F0)         = 0
16352:  open("/usr/lib/libmp.so.2", O_RDONLY)           = 3
16352:  mmap(0xFF390000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF390000
16352:  mmap(0x00000000, 90112, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON, -1, 0) = 0xFF340000
16352:  mmap(0xFF340000, 11316, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF340000
16352:  mmap(0xFF354000, 865, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 16384) = 0xFF354000
16352:  munmap(0xFF344000, 65536)                       = 0
16352:  mmap(0x00000000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFF270000
16352:  memcntl(0xFF340000, 3124, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
16352:  close(3)                                        = 0
16352:  stat("/usr/platform/SUNW,UltraAX-i2/lib/libc_psr.so.1", 0xFFBEF1D8) = 0
16352:  open("/usr/platform/SUNW,UltraAX-i2/lib/libc_psr.so.1", O_RDONLY) = 3
16352:  mmap(0xFF390000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF390000
16352:  mmap(0xFF3A501C, 16384, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON, -1, 0) = 0xFF260000
16352:  mmap(0xFF260000, 13800, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF260000
16352:  close(3)                                        = 0
16352:  munmap(0xFF390000, 8192)                        = 0
16352:  getgid()                                        = 1 [1]
16352:  getuid()                                        = 0 [0]
16352:  time()                                          = 1158947397
16352:  brk(0x010E0A80)                                 = 0
16352:  brk(0x010E2A80)                                 = 0
16352:  open("/usr/share/lib/zoneinfo/US/Central", O_RDONLY) = 3
16352:  read(3, " T Z i f\0\0\0\0\0\0\0\0".., 8192)     = 1262
16352:  close(3)                                        = 0
16352:  open("/sysadm/www/elog/cr-elogd.cfg", O_RDONLY) = 3
16352:  close(3)                                        = 0
16352:  stat("/sysadm/www/elog/cr-elogd.cfg", 0xFFBEF1F8) = 0
16352:  brk(0x010E2A80)                                 = 0
16352:  brk(0x010E8A80)                                 = 0
16352:  open("/sysadm/www/elog/cr-elogd.cfg", O_RDONLY) = 3
16352:  lseek(3, 0, SEEK_END)                           = 21208
16352:  lseek(3, 0, SEEK_SET)                           = 0
16352:  brk(0x010E8A80)                                 = 0
16352:  brk(0x010ECA80)                                 = 0
16352:  read(3, " [ g l o b a l ]\n # # #".., 21208)    = 21208
16352:  close(3)                                        = 0
16352:  brk(0x010ECA80)                                 = 0
16352:  brk(0x010EEA80)                                 = 0
16352:  brk(0x010EEA80)                                 = 0
16352:  brk(0x010F0A80)                                 = 0
16352:  brk(0x010F0A80)                                 = 0
16352:  brk(0x010F2A80)                                 = 0
16352:  brk(0x010F2A80)                                 = 0
16352:  brk(0x010F4A80)                                 = 0
16352:  stat("/usr/lib/locale/english/english.so.2", 0xFFBEE2D8) Err#2 ENOENT
16352:  stat("resources/eloglang.", 0xFFBEEFE8)         Err#2 ENOENT
16352:  stat("crlogbooks", 0xFFBEF368)                  = 0
16352:  stat("/sysadm/www/elog", 0xFFBEF368)            = 0
16352:  brk(0x010F4A80)                                 = 0
16352:  brk(0x0110CA80)                                 = 0
16352:  brk(0x0110CA80)                                 = 0
16352:  brk(0x01124A80)                                 = 0
16352:  so_socket(2, 2, 0, "", 1)                       = 3
16352:  setsockopt(3, 65535, 4, 0xFFBC97D4, 4, 1)       = 0
16352:  bind(3, 0xFFBEF2B8, 16, 3)                      = 0
16352:  fstat(-1, 0xFFBC9528)                           Err#9 EBADF
16352:  open("/dev/conslog", O_WRONLY)                  = 4
16352:  fcntl(4, F_SETFD, 0x00000001)                   = 0
16352:  fstat(4, 0xFFBC9528)                            = 0
16352:  fork()                                          = 16353
16353:  fork()          (returning as child ...)        = 16352
16353:  close(0)                                        = 0
16353:  open("/dev/null", O_RDWR)                       = 0
16353:  close(1)                                        = 0
16353:  open("/dev/null", O_RDWR)                       = 1
16353:  close(2)                                        = 0
16353:  open("/dev/null", O_RDWR)                       = 2
16353:  setsid()                                        = 16353
16353:  chdir("/")                                      = 0
16353:  umask(0)                                        = 022
16353:  fstat(4, 0xFFBC92D8)                            = 0
16353:  time()                                          = 1158947397
16353:  getpid()                                        = 16353 [16352]
16353:  putmsg(4, 0xFFBC8990, 0xFFBC8984, 0)            = 0
16353:  open("/var/run/syslog_door", O_RDONLY)          = 5
16353:  door_info(5, 0xFFBC88C8)                        = 0
16353:  getpid()                                        = 16353 [16352]
16353:  door_call(5, 0xFFBC88B0)                        = 0
16353:  close(5)                                        = 0
16353:  fstat(4, 0xFFBC92D8)                            = 0
16353:  time()                                          = 1158947397
16353:  getpid()                                        = 16353 [16352]
16353:  putmsg(4, 0xFFBC8990, 0xFFBC8984, 0)            = 0
16353:  open("/var/run/syslog_door", O_RDONLY)          = 5
16353:  door_info(5, 0xFFBC88C8)                        = 0
16353:  getpid()                                        = 16353 [16352]
16353:  door_call(5, 0xFFBC88B0)                        = 0
16353:  close(5)                                        = 0
16353:  getuid()                                        = 0 [0]
16353:  stat("/var/run/cr-elogd.pid", 0xFFBC9690)       Err#2 ENOENT
16353:  open("/var/run/cr-elogd.pid", O_RDWR|O_CREAT, 0644) = 5
16353:  getpid()                                        = 16353 [16352]
16353:  write(5, " 1 6 3 5 3\n", 6)                     = 6
16353:  close(5)                                        = 0
16353:  sigaction(SIGTERM, 0xFFBC9560, 0xFFBC95E0)      = 0
16353:  sigaction(SIGINT, 0xFFBC9560, 0xFFBC95E0)       = 0
16353:  sigaction(SIGPIPE, 0xFFBC9560, 0xFFBC95E0)      = 0
16353:  sigaction(SIGHUP, 0xFFBC9560, 0xFFBC95E0)       = 0
16353:  getuid()                                        = 0 [0]
16353:  open64("/etc/.name_service_door", O_RDONLY)     = 5
16353:  fcntl(5, F_SETFD, 0x00000001)                   = 0
16353:  door_info(5, 0xFF242748)                        = 0
16353:  door_call(5, 0xFFBC74D8)                        = 0
16353:  setegid(14109)                                  = 0
16353:  sysconfig(_CONFIG_NGROUPS)                      = 16
16353:  open("/etc/default/nss", O_RDONLY)              = 6
16353:  fcntl(6, F_DUPFD, 0x00000100)                   Err#22 EINVAL
16353:  read(6, " #   i d e n t\t " @ ( #".., 1024)     = 754
16353:  read(6, 0x010E3B08, 1024)                       = 0
16353:  close(6)                                        = 0
16353:  open("/etc/nsswitch.conf", O_RDONLY)            = 6
16353:  fcntl(6, F_DUPFD, 0x00000100)                   Err#22 EINVAL
16353:  read(6, " #\n #   " h o s t s : "".., 1024)     = 1024
16353:  read(6, " s   n i s\n s e n d m a".., 1024)     = 126
16353:  read(6, 0x010E3B68, 1024)                       = 0
16353:  close(6)                                        = 0
16353:  stat("/usr/lib/nss_files.so.1", 0xFFBC8AF8)     = 0
16353:  open("/usr/lib/nss_files.so.1", O_RDONLY)       = 6
16353:  mmap(0x00000000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE, 6, 0) = 0xFF250000
16353:  mmap(0x00000000, 98304, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON, -1, 0) = 0xFF160000
16353:  mmap(0xFF160000, 19978, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0xFF160000
16353:  mmap(0xFF176000, 1760, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 6, 24576) = 0xFF176000
16353:  munmap(0xFF166000, 65536)                       = 0
16353:  memcntl(0xFF160000, 6884, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
16353:  close(6)                                        = 0
16353:  munmap(0xFF250000, 8192)                        = 0
16353:  open("/etc/group", O_RDONLY|O_LARGEFILE)        = 6
16353:  fcntl(6, F_DUPFD, 0x00000100)                   Err#22 EINVAL
16353:  read(6, " r o o t : : 0 : r o o t".., 1024)     = 278
16353:  read(6, 0x010E3BE0, 1024)                       = 0
16353:  close(6)                                        = 0
16353:  stat("/usr/lib/nss_nis.so.1", 0xFFBC8AF8)       = 0
16353:  open("/usr/lib/nss_nis.so.1", O_RDONLY)         = 6
16353:  mmap(0x00000000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE, 6, 0) = 0xFF250000
16353:  mmap(0x00000000, 98304, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON, -1, 0) = 0xFF140000
16353:  mmap(0xFF140000, 22032, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 6, 0) = 0xFF140000
16353:  mmap(0xFF156000, 1836, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 6, 24576) = 0xFF156000
16353:  munmap(0xFF146000, 65536)                       = 0
16353:  memcntl(0xFF140000, 7460, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
16353:  close(6)                                        = 0
16353:  munmap(0xFF250000, 8192)                        = 0
16353:  sigfillset(0xFF2428D0)                          = 0
16353:  sysinfo(SI_SRPC_DOMAIN, "cde-tx32.sps.mot.com", 256) = 21
16353:  getpid()                                        = 16353 [16352]
16353:  open("/var/yp/binding/cde-tx32.sps.mot.com/cache_binding", O_RDONLY|O_LARGEFILE) = 6
16353:  fcntl(6, F_DUPFD, 0x00000100)                   Err#22 EINVAL
16353:  fcntl(6, F_GETLK, 0xFFBC87BC)                   = 0
16353:  read(6, "\0\0\001\0\0\001\0\0\001".., 1024)     = 144
16353:  close(6)                                        = 0
16353:  open("/dev/udp", O_RDWR)                        = 6
16353:  ioctl(6, I_FIND, "timod")                       = 0
16353:  ioctl(6, I_PUSH, "timod")                       = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC888C, 0xFFBC887C) = 0
16353:  ioctl(6, I_STR, 0xFFBC8700)                     = 0
16353:  fstat(6, 0xFFBC8688)                            = 0
16353:  ioctl(6, I_STR, 0xFFBC8700)                     = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC887C, 0x00000000) = 0
16353:  ioctl(6, I_FLUSH, FLUSHRW)                      = 0
16353:  fstat(6, 0xFFBC86F0)                            = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC8890, 0xFFBC8880) = 0
16353:  ioctl(6, I_STR, 0xFFBC87F8)                     = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC8880, 0x00000000) = 0
16353:  brk(0x01124A80)                                 = 0
16353:  brk(0x01132A80)                                 = 0
16353:  fstat(6, 0xFFBC8618)                            = 0
16353:  ioctl(6, I_STR, 0xFFBC8720)                     = 0
16353:  fstat(6, 0xFFBC8518)                            = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC86B8, 0xFFBC86A8) = 0
16353:  ioctl(6, I_STR, 0xFFBC8620)                     = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC86A8, 0x00000000) = 0
16353:  brk(0x01132A80)                                 = 0
16353:  brk(0x01136A80)                                 = 0
16353:  getpid()                                        = 16353 [16352]
16353:  fstat(6, 0xFFBC85F0)                            = 0
16353:  ioctl(6, I_STR, 0xFFBC876C)                     = 0
16353:  brk(0x01136A80)                                 = 0
16353:  brk(0x01138A80)                                 = 0
16353:  fstat(6, 0xFFBC8894)                            = 0
16353:  fcntl(6, F_SETFD, 0x00000001)                   = 0
16353:  fstat(6, 0xFFBC8968)                            = 0
16353:  open("/etc/netconfig", O_RDONLY|O_LARGEFILE)    = 7
16353:  fcntl(7, F_DUPFD, 0x00000100)                   Err#22 EINVAL
16353:  read(7, " # p r a g m a   i d e n".., 1024)     = 1024
16353:  read(7, " t s           t p i _ c".., 1024)     = 215
16353:  read(7, 0x010EA2B0, 1024)                       = 0
16353:  lseek(7, 0, SEEK_SET)                           = 0
16353:  read(7, " # p r a g m a   i d e n".., 1024)     = 1024
16353:  read(7, " t s           t p i _ c".., 1024)     = 215
16353:  read(7, 0x010EA2B0, 1024)                       = 0
16353:  close(7)                                        = 0
16353:  open("/dev/udp", O_RDONLY)                      = 7
16353:  ioctl(7, 0xC00C6982, 0xFFBC8104)                = 0
16353:  close(7)                                        = 0
16353:  door_info(5, 0xFFBC6640)                        = 0
16353:  door_call(5, 0xFFBC6628)                        = 0
16353:  open("/dev/udp", O_RDWR)                        = 7
16353:  ioctl(7, I_FIND, "timod")                       = 0
16353:  ioctl(7, I_PUSH, "timod")                       = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC8794, 0xFFBC8784) = 0
16353:  ioctl(7, I_STR, 0xFFBC8608)                     = 0
16353:  fstat(7, 0xFFBC8590)                            = 0
16353:  brk(0x01138A80)                                 = 0
16353:  brk(0x0113AA80)                                 = 0
16353:  brk(0x0113AA80)                                 = 0
16353:  brk(0x0113EA80)                                 = 0
16353:  ioctl(7, I_STR, 0xFFBC8608)                     = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC8784, 0x00000000) = 0
16353:  ioctl(7, I_FLUSH, FLUSHRW)                      = 0
16353:  fstat(7, 0xFFBC85F8)                            = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC8798, 0xFFBC8788) = 0
16353:  ioctl(7, I_STR, 0xFFBC8700)                     = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC8788, 0x00000000) = 0
16353:  fstat(7, 0xFFBC8520)                            = 0
16353:  ioctl(7, I_STR, 0xFFBC8628)                     = 0
16353:  fstat(7, 0xFFBC8420)                            = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC85C0, 0xFFBC85B0) = 0
16353:  ioctl(7, I_STR, 0xFFBC8528)                     = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC85B0, 0x00000000) = 0
16353:  brk(0x0113EA80)                                 = 0
16353:  brk(0x0115EA80)                                 = 0
16353:  getpid()                                        = 16353 [16352]
16353:  fstat(7, 0xFFBC84F8)                            = 0
16353:  ioctl(7, I_STR, 0xFFBC8674)                     = 0
16353:  brk(0x0115EA80)                                 = 0
16353:  brk(0x01160A80)                                 = 0
16353:  time()                                          = 1158947397
16353:  fstat(7, 0xFFBC85B0)                            = 0
16353:  putmsg(7, 0xFFBC874C, 0xFFBC8864, 0)            = 0
16353:  poll(0x0113CF9C, 1, 15000)                      = 1
16353:  fstat(7, 0xFFBC85A8)                            = 0
16353:  getmsg(7, 0xFFBC8748, 0x010E4360, 0xFFBC8774)   = 0
16353:  fstat(7, 0xFFBC8688)                            = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC8810, 0xFFBC8800) = 0
16353:  close(7)                                        = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC8800, 0x00000000) = 0
16353:  open("/dev/tcp", O_RDWR)                        = 7
16353:  ioctl(7, I_FIND, "timod")                       = 0
16353:  ioctl(7, I_PUSH, "timod")                       = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC88D4, 0xFFBC88C4) = 0
16353:  ioctl(7, I_STR, 0xFFBC8748)                     = 0
16353:  fstat(7, 0xFFBC86D0)                            = 0
16353:  ioctl(7, I_STR, 0xFFBC8748)                     = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC88C4, 0x00000000) = 0
16353:  ioctl(7, I_FLUSH, FLUSHRW)                      = 0
16353:  fstat(7, 0xFFBC8738)                            = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC88D8, 0xFFBC88C8) = 0
16353:  ioctl(7, I_STR, 0xFFBC8840)                     = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC88C8, 0x00000000) = 0
16353:  fstat(7, 0xFFBC8708)                            = 0
16353:  fstat(7, 0xFFBC86D0)                            = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC8870, 0xFFBC8860) = 0
16353:  ioctl(7, I_STR, 0xFFBC87D8)                     = 0
16353:  sigprocmask(SIG_SETMASK, 0xFFBC8860, 0x00000000) = 0
16353:  fcntl(7, F_GETFL, 0x00000000)                   = 2
16353:  fstat64(7, 0xFFBC8708)                          = 0
16353:  fstat(7, 0xFFBC8610)                            = 0
16353:  fstat(7, 0xFFBC85B0)                            = 0
16353:  ioctl(7, I_STR, 0xFFBC872C)                     = 0
16353:  fstat(7, 0xFFBC85D0)                            = 0
16353:  sigprocmask(SIG_BLOCK, 0xFFBC86D8, 0xFFBC8748)  = 0
16353:  ioctl(7, I_NREAD, 0xFFBC8684)                   = 0
... 1591 more lines ...
  69155   Fri Jun 5 13:24:01 2020 Reply Stefan Rittstefan.ritt@psi.chBug reportLinux3.1.4-2Re: SSL does not work

When you compile elog from the soruces, you need the OpenSSL library to be installed. The CMake build process will then find it and include it in the compile process. When you use the "make" build process, you have to make sure that SSL is enabled there:

USE_SSL = 1

To install the OpenSSL library, you can do on most systems something like "sudo yum install openssl-dev" or "sudo apt-get install openssl-dev"

/Stefan

 

Hisataka YOSHIDA wrote:

Hello.

I installed the latest elog (3.1.4-2) in CentOS 7, and it is working well without SSL.
When I enalbled SSL option (SSL = 1) in the "elogd.cfg", and tried to start the elogd, the message below was shown and failed to run.

SSL support not compiled into elogd

If I switched the elog to older one (3.1.4-1), I could successeed to run the elogd with SSL option.
Is there any other option required in the latest elog to run with SSL? Or is this bug in the latest version?

Thank you,
Hisataka YOSHIDA

 

  69160   Thu Jun 11 08:23:01 2020 Reply Hisataka YOSHIDAhisataka@rcnp.osaka-u.ac.jpBug reportLinux3.1.4-2Re: SSL does not work

Dear Stefan,

Thank you for your comment. I successfuly compiled the latest elog from source code, and now elogd could work with SSL.

In fact, I reported the case of installation with rpm file. Maybe, the latest elog rpm doesn't support SSL, I guess.
The installtion with rpm file is easier to build the common environment, so I hope the next rpm will support the SSL.

best regards,
Hisataka YOSHIDA

Stefan Ritt wrote:

When you compile elog from the soruces, you need the OpenSSL library to be installed. The CMake build process will then find it and include it in the compile process. When you use the "make" build process, you have to make sure that SSL is enabled there:

USE_SSL = 1

To install the OpenSSL library, you can do on most systems something like "sudo yum install openssl-dev" or "sudo apt-get install openssl-dev"

/Stefan

 

Hisataka YOSHIDA wrote:

Hello.

I installed the latest elog (3.1.4-2) in CentOS 7, and it is working well without SSL.
When I enalbled SSL option (SSL = 1) in the "elogd.cfg", and tried to start the elogd, the message below was shown and failed to run.

SSL support not compiled into elogd

If I switched the elog to older one (3.1.4-1), I could successeed to run the elogd with SSL option.
Is there any other option required in the latest elog to run with SSL? Or is this bug in the latest version?

Thank you,
Hisataka YOSHIDA

 

 

  69205   Wed Aug 26 20:41:50 2020 Reply Stefan Rittstefan.ritt@psi.chBug reportLinux3.1.4-2Re: SSL does not work

Today I succeeded with the help of L.JR to produce a new RPM which contains SSL, KRB5, PAM and LDAP support. It's uploaded to https://elog.psi.ch/elog/download/RPMS/elog-3.1.4-2.el7.x86_64.rpm

Hisataka YOSHIDA wrote:

Dear Stefan,

Thank you for your comment. I successfuly compiled the latest elog from source code, and now elogd could work with SSL.

In fact, I reported the case of installation with rpm file. Maybe, the latest elog rpm doesn't support SSL, I guess.
The installtion with rpm file is easier to build the common environment, so I hope the next rpm will support the SSL.

best regards,
Hisataka YOSHIDA

Stefan Ritt wrote:

When you compile elog from the soruces, you need the OpenSSL library to be installed. The CMake build process will then find it and include it in the compile process. When you use the "make" build process, you have to make sure that SSL is enabled there:

USE_SSL = 1

To install the OpenSSL library, you can do on most systems something like "sudo yum install openssl-dev" or "sudo apt-get install openssl-dev"

/Stefan

 

Hisataka YOSHIDA wrote:

Hello.

I installed the latest elog (3.1.4-2) in CentOS 7, and it is working well without SSL.
When I enalbled SSL option (SSL = 1) in the "elogd.cfg", and tried to start the elogd, the message below was shown and failed to run.

SSL support not compiled into elogd

If I switched the elog to older one (3.1.4-1), I could successeed to run the elogd with SSL option.
Is there any other option required in the latest elog to run with SSL? Or is this bug in the latest version?

Thank you,
Hisataka YOSHIDA

 

 

 

  69199   Mon Aug 10 08:33:42 2020 Reply Stefan Rittstefan.ritt@psi.chBug reportLinux3.1.4Re: SSL connection drop with large content

Your solution sounds quite good, I will incorporate them in the distribution.

Stefan

HyonSan Seo wrote:

Dear all,

 

I had some difficulty to upload large files (>20MB) with SSL connection. I think it is also related to https://elog.psi.ch/elogs/Forum/68636

During debuging, I found that, when uploading large files, ssl connection is dropped since 'SSL_read' function returns -1.

But it doesn't alway mean broken connection. It may be "SSL_ERROR_WANT_READ".

I changed the "server_loop" function in the source code to "continue" when it is SSL_ERROR_WANT_READ. And it fixed the problem.

Here is my code.


## elogd.c "server_loop" function L30031

                        if (FD_ISSET(_sock, &readfds)) {
#ifdef HAVE_SSL
                          if (_ssl_flag){
                            i = SSL_read(_ssl_con, net_buffer + len, net_buffer_size - len);
                            if(i<=0){
                              int ssl_error=SSL_get_error(_ssl_con,i);    ## check ssl error code
                              if(ssl_error==SSL_ERROR_WANT_READ||ssl_error==SSL_ERROR_WANT_WRITE) continue;    ## if ssl wants more, continue
                            }
                          }
                          else
#endif
                            i = recv(_sock, net_buffer + len, net_buffer_size - len, 0);
 


 

I am ignorant about networking. Some experts on ssl connection would know a better way to deal with this problem.

 

Best,

HyonSan Seo

 

 

  67244   Wed Apr 11 16:43:37 2012 Reply Stefan Rittstefan.ritt@psi.chQuestionLinux2.9.1-2435Re: SSL

Thomas Kleeb wrote:

I'm slowly able to see the finish line

Now all I need to do is get SSL to work. My server name is hf-info-elog and I'm not sure what the correct values for Port= and URL= should be.

thank
Tom (the green-horn)

All you need is a SSL=1 in the config file, then the default port of 443 will be used. The URL is the one seen from outside, like

 

https://hf-info-elog.psi.ch

 

or so. The certificate from the distribution is self-signed and therefore the browser will complain. Go to AIT to obtain an official certificate.

- Stefan

  66901   Wed Sep 15 00:21:10 2010 Reply Stefan Rittstefan.ritt@psi.chQuestionWindows2.7.6-2230Re: SQL Database

lance wrote:

We have been running elog for a few years now and its solid. The only thing is we are getting to 140k entries over a few books and its starting to slow down whist searching. My questions is can we go to an SQL type database rather than a flat file? Is it worth it? Is anyone running this type of configuration?

Running through a SQL database requires a major rework of the software. I'm planning this in the long run, but not for this year. I'm also not sure how much this would buy you. If you do a full-text search on 140k entries in a SQL database (not index search), this might also take some time.

But what you can do is to "archive" part of your logbooks. Since the files are named YYMMDDa.log, you can move all 09XXXXXa.log files into a separate "archive" which you then do not include in your search.  

ELOG V3.1.5-3fb85fa6