Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 642 of 808  Not logged in ELOG logo
New entries since:Thu Jan 1 01:00:00 1970
ID Date Icon Author Author Email Categorydown OS ELOG Version Subject
  1917   Tue Aug 29 15:16:31 2006 Reply Giorgio Croci Candianig.crocic@libero.itBug reportLinux | Windows2.6.1Re: Access to global configuration in v2.6.1
Hi,
after a long time, I thought I could try to investigate the code some further,
and maybe I found some hint.
The page where I expected the options to show was (probably) the one generated by this function:

void show_admin_page(LOGBOOK * lbs, char *top_group)

Inside, it, the buttons are generated by following code snippets:

(elogd.c:10443)
if (is_admin_user_global(getparam("unm"))) {
   sprintf(str, loc("Change %s"), "[global]");
   rsprintf("<input type=submit name=cmd value=\"%s\">\n", str);
}
(elogd.c:10461)
  if (is_admin_user("global", getparam("unm"))) {
     rsprintf("<input type=submit name=cmd value=\"%s\">\n", loc("Delete this logbook"));
     rsprintf("<input type=submit name=cmd value=\"%s\">\n", loc("Rename this logbook"));
     rsprintf("<input type=submit name=cmd value=\"%s\">\n", loc("Create new logbook"));
}

The functions called to validate the user are following:

(elogd.c:21298)
BOOL is_admin_user(char *logbook, char *user):
//...
   if (user == NULL)
      return FALSE;

(elogd.c:21324)

BOOL is_admin_user_global(char *user)
{
//...
   if (user == NULL)
      return FALSE;

Since I assume that I'm probably in the "userless" case (no users are defined in the configuration,
and no usernames are set when launching elog either), I would understand that this causes the options for
global config editing etc etc not to be shown on the admin page.

In my opinion (and given that my interpretation of the code flow isn't wrong), the "null"
user should be indeed considered admin, at least as long as no user management is defined whatsoever.
(If I got it right, if user==NULL, but a password file exists, user management is applied,
thus we're in the case of anonymous user which is correctly not admin).

Again, I might be wrong, but I would be curious to hear an opinion from you about this issue.
Thanks again for your attention.
GiorgioCC
  1919   Thu Aug 31 21:46:15 2006 Warning Steve Jonessteve.jones@freescale.comBug reportAll2.6.2-1714Top Text and Bottom Text only show "text" --- no files
Just compiled 2.6.2-1714 and "Top text" and "Bottom text" interpret everything as "text" --- nothing is interpreted as a file to be included, unless there is a new syntax.
  1921   Sun Sep 3 23:16:31 2006 Reply Arno Teunissearno.teunisse@hetnet.nlBug reportWindows2.6.1-6Re: Corrupt page link

Stefan Ritt wrote:

Arno Teunisse wrote:
Just installed the previous version :
====================================
[C:\Program Files\ELOG]elogd -c elogd.cfg
elogd 2.6.1 built May 24 2006, 08:59:09 revision 1688
Indexing logbooks ... done
Server listening on port 8080 ...

And the problem is gone. !!!!

problem is in version :
==========================
[C:\Program Files\ELOG1]elogd -c elogd.cfg
elogd 2.6.1 built Jun 13 2006, 08:43:21 revision 1691
Indexing logbooks ... done
Server listening on port 8080 ...


Thanks for your detailed information. The hint with the two different revisions heally helped. I fixed that in revision 1695, and made an intermediate release 2.6.1-7. This will fix the problem. Can you please check that this is working?


Sorry for my ( very ) late answer , But yes the problem is GONE after installing the new release? Thanks.
  1924   Tue Sep 5 19:46:05 2006 Reply Steve Jonessteve.jones@freescale.comBug reportAll2.6.2-1714Re: Top Text and Bottom Text only show "text" --- no files

Steve Jones wrote:
Just compiled 2.6.2-1714 and "Top text" and "Bottom text" interpret everything as "text" --- nothing is interpreted as a file to be included, unless there is a new syntax.


I dropped back to SVN1699 and same problem, then moved the file to the elog root directory and it works fine. Seems that the current version isn't finding the file, regardless of where I put it (root or in 'resources' directory). Perhaps another directory?
  1925   Tue Sep 5 20:23:40 2006 Reply Steve Jonessteve.jones@freescale.comBug reportAll2.6.2-1714Re: Top Text and Bottom Text only show "text" --- no files

Steve Jones wrote:

Steve Jones wrote:
Just compiled 2.6.2-1714 and "Top text" and "Bottom text" interpret everything as "text" --- nothing is interpreted as a file to be included, unless there is a new syntax.


I dropped back to SVN1699 and same problem, then moved the file to the elog root directory and it works fine. Seems that the current version isn't finding the file, regardless of where I put it (root or in 'resources' directory). Perhaps another directory?


Stefan, I found the source of the problem. When you moved some files to "logbook_dir" you also told the code to look in "logbook_dir" for top and bottom text files:
void show_bottom_text(LOGBOOK * lbs)
{
   char str[NAME_LENGTH], slist[20][NAME_LENGTH], svalue[20][NAME_LENGTH];
   int i, size;

   if (getcfg(lbs->name, "bottom text", str, sizeof(str))) {
      FILE *f;
      char file_name[256], *buf;

      if (str[0]) {
         /* check if file starts with an absolute directory */
         if (str[0] == DIR_SEPARATOR || str[1] == ':')
            strcpy(file_name, str);
         else {
            strlcpy(file_name, logbook_dir, sizeof(file_name));
            strlcat(file_name, str, sizeof(file_name));
         }

The documentation indicates that the location dir should be "resource_dir".
  1926   Wed Sep 6 12:02:52 2006 Reply Gerald Ebberinkg.h.p.ebberink@nclr.nlBug reportLinux2.6.2-1706Re: reply option in elog client not working
Today I found, I have the same problem with editing the log (with the -e option)
  1927   Thu Sep 7 08:01:37 2006 Reply Gerald Ebberinkg.h.p.ebberink@nclr.nlBug reportLinux2.6.2-1706Re: reply option in elog client not working
I have made patch witch solves the problem partialy.

If there are not no attachments this patch works.... (But since I have attachments I'll have to dig in deeper in the code.

Attached you will find the diff.
Attachment 1: elog.c.diff
Index: src/elog.c
===================================================================
--- src/elog.c	(revision 1714)
+++ src/elog.c	(working copy)
@@ -351,8 +351,11 @@
    strcpy(request, "GET /");
    if (subdir[0])
       sprintf(request + strlen(request), "%s/%d?cmd=download", subdir, message_id);
-   if (experiment[0])
-      sprintf(request + strlen(request), "%s/%d?cmd=download", experiment, message_id);
+   if (experiment[0]) {
+      strcpy(str,experiment);
+      url_encode(str, sizeof(str));
+      sprintf(request + strlen(request), "%s/%d?cmd=download", str, message_id);
+	}
    strcat(request, " HTTP/1.0\r\n");
 
    sprintf(request + strlen(request), "User-Agent: ELOG\r\n");
  1928   Thu Sep 7 17:17:17 2006 Reply Gerald Ebberinkg.h.p.ebberink@nclr.nlBug reportLinux2.6.2-1714Re: reply option in elog client not working

Gerald Ebberink wrote:
I have made patch witch solves the problem partialy.

If there are not no attachments this patch works.... (But since I have attachments I'll have to dig in deeper in the code.

Attached you will find the diff.

Now I am digging deeper, and I have a question:

In the function retrive_elog near line 427 a start is made with putting the attributes in an array.
As far as I can see there is no exception for the Attachment attribute. Where this attribute can be very large (e.g. many files attached) and overrun to the boundary variable (in the function submit_elog function). At least that is where I find end of my attachment string.

Could Mr. Ritt please shine some light on this, becouse I
ELOG V3.1.5-3fb85fa6