Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 773 of 796  Not logged in ELOG logo
ID Date Icon Author Author Emailup Category OS ELOG Version Subject
  Draft   Fri Feb 26 08:38:06 2016  Nigel Warrwarr@ikp.uni-koeln.deBug reportLinux Possible bug in elogd execute_shell

I was just playing around with gcc6's new feature for warning about misleading indentation (which can often hide real bugs) and I think it found one in elog-3.1.1-1 at src/elogd.c:22538. Here there is an if statement, which looks as though it should be inside a loop, but it isn't. The code is:

      for (i = 0; i < MAX_ATTACHMENTS; i++)
         generate_subdir_name(att_file[i], subdir, sizeof(subdir));
         if (att_file[i][0] && strlen(shell_cmd) + strlen(lbs->data_dir) + strl$
             < sizeof(shell_cmd) + 1)
{
            strcpy(p, "\"");
            strcat(p, lbs->data_dir);
            strlcat(str, subdir, sizeof(str));
            strlcpy(str, att_file[i], sizeof(str));
            str_escape(str, sizeof(str));
            strcat(p, str);
            strcat(p, "\" ");
            p += strlen(p);
         }

and the if statment is accessing the loop variable i but it is actually outside the loop. Presumably, there should be some more curly brackets here. gcc6 gave the warning:

src/elogd.c: In function ‘execute_shell’:
src/elogd.c:22538:10: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation]
          if (att_file[i][0] && strlen(shell_cmd) + strlen(lbs->data_dir) + strlen(subdir) + strlen(att_file[i])
          ^~
src/elogd.c:22536:7: note: ...this ‘for’ clause, but it is not
       for (i = 0; i < MAX_ATTACHMENTS; i++)
       ^~~

  68267   Fri Feb 26 08:47:22 2016 Warning Nigel Warrwarr@ikp.uni-koeln.deBug reportLinux3.1.1-1Possible bug in elogd execute_shell

I was just playing around with gcc6's new feature for warning about misleading indentation (which can often hide real bugs) and I think it found one in elog-3.1.1-1 at src/elogd.c:22538. Here there is an if statement, which looks as though it should be inside a loop, but it isn't. The code is:

      for (i = 0; i < MAX_ATTACHMENTS; i++)
         generate_subdir_name(att_file[i], subdir, sizeof(subdir));
         if (att_file[i][0] && strlen(shell_cmd) + strlen(lbs->data_dir) + strl$
             < sizeof(shell_cmd) + 1)
{
            strcpy(p, "\"");
            strcat(p, lbs->data_dir);
            strlcat(str, subdir, sizeof(str));
            strlcpy(str, att_file[i], sizeof(str));
            str_escape(str, sizeof(str));
            strcat(p, str);
            strcat(p, "\" ");
            p += strlen(p);
         }

and the if statment is accessing the loop variable i but it is actually outside the loop. Presumably, there should be some more curly brackets here. gcc6 gave the warning:

src/elogd.c: In function ‘execute_shell’:
src/elogd.c:22538:10: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation]
          if (att_file[i][0] && strlen(shell_cmd) + strlen(lbs->data_dir) + strlen(subdir) + strlen(att_file[i])
          ^~
src/elogd.c:22536:7: note: ...this ‘for’ clause, but it is not
       for (i = 0; i < MAX_ATTACHMENTS; i++)
       ^~~

  590   Wed Jul 14 11:45:46 2004 Warning Bartjan Wattelwatt0006@mail.hzeeland.nlBug report 2.5.3'Full' mode gives incorrect results when searching
Hi, 

I was just searching your online discussion forum for entries with the 
word 'password' in the subject. I noticed that the 'Full' option in 
the 'full/summary/threaded' line displays the results of all entries in the 
logbook, and not only the entries with the word 'password' in the subject.

I think there is an error in the URL, because when looking for the word 
password in the subject, the URL for the 'Full' option is:
http://midas.psi.ch/elogs/Forum/page1?mode=full&reve&npp=8&Subject=password

If I change the word 'reve' in this URL to 'reversed=1', the results are 
correct

Bartjan Wattel
  591   Wed Jul 14 11:49:26 2004 Question Bartjan Wattelwatt0006@mail.hzeeland.nlQuestionWindows2.5.3Re: How to construct different logbooks with the same logbook options
> > I know I can simply copy the settings for logbook B and repeat the settings 
> > for all logbooks C-S. But is there a better way to accomplish this?
> 
> Yes. Put all common settings into the [global] section, only differences into
> the individual logbook sections. Like
> 
> [global]
> Attributes = ....
> Options ....
> 
> [A]
> ; Logbook A is different
> Attributes = ....
> Options = ...
> 
> [B]
> Option X = ...
> 
> [C]
> Option X = ...
> 
> [D]
> Option X = ...
> 
> This way all logbooks "inherit" the settings from the [global] section, only the
> differents are superseeded in the individual sections. Still you need two lines
> for each logbook, but all recurring configuration can be omitted.

Thanks for you quick and correct answer. I have one question left ;-)

Suppose I want to have different password files for all the logbooks, but I want to 
have a single (admin) user that can log in to all logbooks... Do I need to specify 
the admin data in all the different password files, or can I use one global 
password file containing the login name and password for the administrator?
  594   Wed Jul 14 13:31:33 2004 Question Bartjan Wattelwatt0006@mail.hzeeland.nlQuestionWindows2.5.3.Always suppress email notifications
Hi - again a configuration question.

How can I suppress all email notifications? The "Suppress default = 2" flag 
allows me to always produce a notification, but the flag does not provide 
an option to never produce a notification. The flag "Suppress Email on 
edit" does help a bit, but still notifications for new messages will be 
sent.

I'm looking forward to your fast response... So far your support is 
fantastic!

Bartjan Wattel
  596   Wed Jul 14 13:58:26 2004 Idea Bartjan Wattelwatt0006@mail.hzeeland.nlRequestLinux | Windows2.5.3.Request: limit size of attachments
hi again,

we have been doing a bit of stress testing for Elog. The most important 
thing we found is that Elog stops responding when a user uploads a large 
attachment (we used a 240 Mb attachment). 

Is it possible to add a flag in the configuration file, to specify the 
maximum size of an attachment?

Bartjan Wattel
  677   Wed Aug 25 13:36:56 2004 Question Bartjan Wattelwatt0006@mail.hzeeland.nlQuestionLinux | Windows2.5.3ELOG with stunnel won't show logbook
Hi,

I have an ELOG installation on a RedHat linux server, called myserver. I 
can connect to this server with the following entries in the elogd.cfg file:
   [global]
   URL=http://myserver:8080
This works fine. I can log in, select logbooks, edit/create entries etc. 
etc.

However, I want this connection to be encrypted. So I activate stunnel (v4) 
in such a way that stunnel listens to port 8081 and forwards to the 
("remote") port 8080, which is the "original" elog port. I change the URL= 
entry in de elogd.cfg file to URL=https://myserver:8081 in order to use the 
SSL encrypted connection.

At this time, when I connect to https://myserver:8081 I get the 
welcome/login screen, but when I enter the (correct) username and password, 
the elog program does not show the contents of the logbook buts shows the 
loginscreen again. If I enter a wrong username/password, I do get a correct 
error-screen. So it seems that the connection is correct, but there is some 
sort of problem in ELOG. Anyone who can give me a hand here?
  2135   Fri Feb 16 12:08:19 2007 Question Ben Waughwaugh@hep.ucl.ac.ukQuestionLinux2.6.3-1762Setting From: for registration/password e-mails
We had a problem, as mentioned in the documentation, with "new password" e-mails being rejected because the default From: address is invalid, so we changed this using "Use Email From".

According to the documentation, "By default, the email address of the currently logged in user is used for the "From:" field. If no user is logged in, or the current user has not specified a email address in the password database, the setting of the option Use Email From is used for the "From:" field."

However, when an address is specified in "Use Email From" we find that all e-mail notifications, even those sent automatically when a logged-in user submits a log entry, are sent from this address.

How can we set a valid address for use for "change of password" or registration e-mails, but still use the appropriate user's e-mail address for log entries?
ELOG V3.1.5-2eba886