Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 515 of 808  Not logged in ELOG logo
ID Date Icon Authordown Author Email Category OS ELOG Version Subject
  68316   Fri May 6 16:19:10 2016 Question John Mundjohn.mund@noaa.govQuestionLinuxV2.7.8-2278Merge duplicate types

Hello,

We have accumulated some duplicate 'types' in one of our logbooks.  Is it possible to merge them?

Thanks,

John

 

  67069   Fri May 20 22:45:00 2011 Idea John M O'Donnellodonnell@lanl.govBug fixLinuxsvn 2414my_shell (OS_UNIX) uses /tmp/elog_shell - conflict when more than one elogd runs at the same time

all instances of elogd use the same file name in /tmp when calling my_shell.  This can cause some inconsistent behavior when two or more copies of elogd are runnnig at the same time.  (eg. one might detect ImageMagik is installed, and the other not,)

 

The propsed solution is to have the parent read from a pipe to the child rather from a file.  A patch is attached.

Attachment 1: elogd.c.patch_shellPipe
--- elogd.c.orig	2011-05-20 13:28:48.000000000 -0600
+++ elogd.c	2011-05-20 14:16:12.000000000 -0600
@@ -866,25 +866,27 @@
 
 #ifdef OS_UNIX
    pid_t child_pid;
-   int fh, status, i;
+   int fd[2], status, i;
    char str[256];
 
+   /* create pipe for parent<->child communication */
+   if (pipe(fd) < 0)
+      return 0;
+
    if ((child_pid = fork()) < 0)
       return 0;
    else if (child_pid > 0) {
-      /* parent process waits for child */
-      waitpid(child_pid, &status, 0);
+
+      /* parent does not write to child */
+      close(fd[1]);
 
       /* read back result */
       memset(result, 0, size);
-      fh = open("/tmp/elog-shell", O_RDONLY);
-      if (fh > 0) {
-         i = read(fh, result, size);
-         close(fh);
-      }
+      i = read(fd[0], result, size);
+      close(fd[0]);
 
-      /* remove temporary file */
-      remove("/tmp/elog-shell");
+      /* parent process waits for child */
+      waitpid(child_pid, &status, 0);
 
       /* strip trailing CR/LF */
       while (strlen(result) > 0 && (result[strlen(result) - 1] == '\r' || result[strlen(result) - 1] == '\n'))
@@ -926,8 +928,7 @@
             eprintf("Falling back to user \"%s\"\n", str);
       }
 
-      /* execute shell with redirection to /tmp/elog-shell */
-      sprintf(str, "/bin/sh -c \"%s\" > /tmp/elog-shell 2>&1", cmd);
+      /* execute command with redirection to pipe to parent */
 
       if (is_verbose()) {
          efputs("Going to execute: ");
@@ -935,7 +936,17 @@
          efputs("\n");
       }
 
-      system(str);
+      /* redirect stdout/stderr to pipe for parent to read */
+      close(STDOUT_FILENO); dup2(fd[1], STDOUT_FILENO);
+      close(STDERR_FILENO); dup2(fd[1], STDERR_FILENO);
+      /* child does not read the pipe */
+      close(fd[0]);
+      /* child nolonger uses fd[1] - use stderr or stdout instead */
+      close(fd[1]);
+      
+      if (system(cmd) == -1) {
+          fprintf(stderr, "unable to execute command: %s\n", cmd);
+      }
       _exit(0);
    }
 
  66643   Tue Dec 8 18:57:31 2009 Smile John Lemkojlemko@hotmail.comQuestionWindowslatestCertificate Error

Is there any documentation I can go through that explains how to remove the Certificate Error I am getting as shown in the attachment.  I have tried creating my own certificate and putting it in the elog ssl folder but that just prevented the elog service from starting.  Any help would be greatly appreciated.  Thanks.

Attachment 1: Elog_Error.jpg
Elog_Error.jpg
  66645   Tue Dec 8 19:34:11 2009 Reply John Lemkojlemko@hotmail.comQuestionWindowslatestRe: Certificate Error
> 
> How did you create the certificate?
> Are you running eLog on a server with more than one host name (CNAME entries) and are you pointing to your eLog
> via one of that aliases?
> 
> Certificates that work with an Apache 1 Web server do work with eLog, too.
> 
> GS

The certificate that is on there right now is the one that gets created when you install elogs.  I have tried 
creating one with a windows server 2008 box with the CA role installed.  The certificate is created without issue 
and I can install it on the server but when I try to restart the elog service it wont start until I put the 
original server.crt and server.key file back into the ssl directory.  

I have DNS on the machine but only have one CNAME pointing to the elog server.

I don't know a lot about certificates so sorry if this doesn't help out much. 
  66648   Tue Dec 8 21:57:37 2009 Reply John Lemkojlemko@hotmail.comQuestionWindowslatestRe: Certificate Error
> > The certificate that is on there right now is the one that gets created when you install elogs.  I have tried 
> > creating one with a windows server 2008 box with the CA role installed.  The certificate is created without issue 
> > and I can install it on the server but when I try to restart the elog service it wont start until I put the 
> > original server.crt and server.key file back into the ssl directory.  
> 
> How did you install the certificate? Maybe it ended up in the IIS directory and not in the elog directory?

That is a good point.  I just installed the cert by double clicking on it.  Then selecting either trusted root CA or 
personal to install the certificate.  Is there a different way to install the certificate for elog?

Thanks alot for your help.
  66649   Tue Dec 8 22:06:47 2009 Reply John Lemkojlemko@hotmail.comQuestionWindowslatestRe: Certificate Error
> > 
> > The certificate that is on there right now is the one that gets created when you install elogs.  I have tried 
> > creating one with a windows server 2008 box with the CA role installed.  The certificate is created without issue 
> > and I can install it on the server but when I try to restart the elog service it wont start until I put the 
> > original server.crt and server.key file back into the ssl directory.  
> > 
> 
> I don't know anything about Windows server CA, but eLog is very strict in the syntax of the CERTs.
> I had to learn it the hard way when installing a chain CERT.
> 
> For server.crt and server.key it MUST NOT be a chain cert. Therefor you have to use chain.crt
> 
> Are the generated CERTs ASCII (with only one -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- in
> server.crt 
> and -----BEGIN RSA PRIVATE KEY----- and -----END RSA PRIVATE KEY----- in server.key)?
> 
> So the eLog generated keys should look like..
> 
> GS

Thanks for your reply.  I appreciate it alot.

When I created my certificate it came out as a .cer [there was no .key file] and looking at the code that was posted 
below it looks like unless there is a server.crt and server.key file in the ssl folder the program will exit:  So I 
guess I need to figure out how to generate a certificate that elog will understand using a .key file and a .crt file.  
So I might have to research certificates more.

To be honest I'm not an expert on SSL. I just use following code inside ELOG to initialize the SSL connection:

SSL_CTX *init_ssl(void)
{
   char str[256];
   SSL_METHOD *meth;
   SSL_CTX *ctx;

   SSL_library_init();
   SSL_load_error_strings();

   meth = SSLv23_method();
   ctx = SSL_CTX_new(meth);

   strlcpy(str, resource_dir, sizeof(str));
   strlcat(str, "ssl/server.crt", sizeof(str));
   if (!file_exist(str)) {
      eprintf("Cerificate file \"%s\" not found, aborting\n", str);
      return NULL;
   }
   if (SSL_CTX_use_certificate_file(ctx, str, SSL_FILETYPE_PEM) < 0)
      return NULL;

   strlcpy(str, resource_dir, sizeof(str));
   strlcat(str, "ssl/server.key", sizeof(str));
   if (!file_exist(str)) {
      eprintf("Key file \"%s\" not found, aborting\n", str);
      return NULL;
   }
   if (SSL_CTX_use_PrivateKey_file(ctx, str, SSL_FILETYPE_PEM) < 0)
      return NULL;
   if (SSL_CTX_check_private_key(ctx) < 0)
      return NULL;

   strlcpy(str, resource_dir, sizeof(str));
   strlcat(str, "ssl/chain.crt", sizeof(str));
   if (file_exist(str))
      SSL_CTX_use_certificate_chain_file(ctx, str);

   return ctx;
}
  68084   Sat Aug 15 00:00:36 2015 Question John Krautkramerjohn.krautkramer@micrel.comQuestionLinux3.1.1IE 11 - Text Edit Toolbar Not Working

Hi,

I've been exploring elog. I find when using IE 11, the text editor formatting buttons don't work with HTML encoding selected. The entire toolbar is grayed out. It appears to work fine with Chrome. Any ideas or direction to look? elog v3.1.1 is running on RedHat EL5. I've tried the rpm installation, and source code compilation and installation with no change.

Any input would be greatly apriciated!

John

  68095   Mon Aug 17 16:30:17 2015 Reply John Krautkramerjohn.krautkramer@micrel.comQuestionLinux3.1.1Re: IE 11 - Text Edit Toolbar Not Working

The issue was IE Compatibility Mode. There were no websites in the list, but the "Display intranet sites in Compatibility View" was checked. Removing this fixed it.

Thanks for the help!

John

Stefan Ritt wrote:

Also make sure you don't have "Compatibility Mode" turned on in IE11.

See here for example: http://winaero.com/blog/how-to-enable-compatibility-view-in-internet-explorer-11-ie11/

Andreas Luedeke wrote:

This reply has been written with IE 11 using the embedded HTML editor of ELOG. Therefore it is obviously not a problem of ELOG 3.1.1 with IE 11.

It could be a problem with your ELOG installation or it could be a problem with you IE 11 configuration. Can you use the HTML editor of this forum with IE11? Did you install ELOG 3.1.1 on top of an existing ELOG installation?

There was a recent post in the forum about IE11 and the HTML editor in the Forum. Did you read it?

Cheers, Andreas

John Krautkramer wrote:

Hi,

I've been exploring elog. I find when using IE 11, the text editor formatting buttons don't work with HTML encoding selected. The entire toolbar is grayed out. It appears to work fine with Chrome. Any ideas or direction to look? elog v3.1.1 is running on RedHat EL5. I've tried the rpm installation, and source code compilation and installation with no change.

Any input would be greatly apriciated!

John

 

 

 

ELOG V3.1.5-3fb85fa6