Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 218 of 796  Not logged in ELOG logo
ID Date Icon Author Author Email Category OS ELOG Version Subjectdown
  67223   Thu Mar 29 23:43:30 2012 Reply Stefan Rittstefan.ritt@psi.chQuestionLinuxV2.9.0-243Re: create "front page" for a logbook

Rex Tayloe wrote:

Is there a way to create a "front page" or "table of contents" for a logbook?

While chronological entries are good and what elog was designed for, I find myself wanting a page to summarize important things
and/or link to important files that are somewhere in that logbook.  And, I would like to use the features of the elog editor to do (not just point
to another www page that points to the various elog entries).  For example, in an analysis logbook, you would like to have one page that
may summarize latest on analysis and point to best/latest plot/drawing of something and not have to re-search for it every time.

I think that start page with cmd to go to entry 1 (how do I do that?) may work.  Then I just keep editing entry 1 to point to latest info or
entries.  Will this work?  Will I run into a size limitiation if I attach too many files to that?   Is there a better way?

One could imaging using a wiki to do this, however, I never seem to get to updating our wikis... maybe I should just figure how to
get elog to do it.

Thanks.

Well, if you never get to update your wiki, you will you get to update your summary page? As you know there is no free lunch.

For my analysis logbooks, I do it such that I create an arbitrary entry in the logbook, where I put references to other entries. Using the syntax "elog:<id>" this is very simple like here: elog:67222. Then I put a link to that special page in my browser bookmarks. This puts me one mouse click away from accessing this page. You can link to other elog pages but also to page attachments this way, so no need to put too many attachments into a single page, although there is no limit on that.

Best regards,
Stefan 

  67251   Tue Apr 17 21:59:43 2012 Reply Rex Tayloertayloe@indiana.eduQuestionLinuxV2.9.0-243Re: create "front page" for a logbook

Stefan Ritt wrote:

Rex Tayloe wrote:

Is there a way to create a "front page" or "table of contents" for a logbook?

While chronological entries are good and what elog was designed for, I find myself wanting a page to summarize important things
and/or link to important files that are somewhere in that logbook.  And, I would like to use the features of the elog editor to do (not just point
to another www page that points to the various elog entries).  For example, in an analysis logbook, you would like to have one page that
may summarize latest on analysis and point to best/latest plot/drawing of something and not have to re-search for it every time.

I think that start page with cmd to go to entry 1 (how do I do that?) may work.  Then I just keep editing entry 1 to point to latest info or
entries.  Will this work?  Will I run into a size limitiation if I attach too many files to that?   Is there a better way?

One could imaging using a wiki to do this, however, I never seem to get to updating our wikis... maybe I should just figure how to
get elog to do it.

Thanks.

Well, if you never get to update your wiki, you will you get to update your summary page? As you know there is no free lunch.

For my analysis logbooks, I do it such that I create an arbitrary entry in the logbook, where I put references to other entries. Using the syntax "elog:<id>" this is very simple like here: elog:67222. Then I put a link to that special page in my browser bookmarks. This puts me one mouse click away from accessing this page. You can link to other elog pages but also to page attachments this way, so no need to put too many attachments into a single page, although there is no limit on that.

Best regards,
Stefan 

Thanks for suggestion... it gave me idea for slightly different way to do it.  The method you suggest doesnt work that well to share in group (everyone would have to add that link in their bookmarks).. So I added this in config file:
Title image = <img border=0 height=25 src="bulb.png" alt="Summary/TOC entry">
Title image URL = <http:link to my specific elog page/entry num>

That replaces elog help icon with a link to TOC entry which can be any entry number.  One could make a custom icon and perhaps play around with adding more than one link (?).

Another thing that could do same thing and maybe more consistent with elog philiosophy would be to add a command that goes to a specific link or entry.... but this current solution works...

  69501   Mon Mar 28 14:04:18 2022 Reply Stefan Rittstefan.ritt@psi.chBug reportLinuxelogd 3.1.4 Re: crash with attachment with very long filename
Hi Stefano,

well, why in heaven's name do you run 200+ chars file names? I see that they are generated probably automatically, but I guess you will run in all kinds of other problems in doing that.

I had a check with elogd. I found one buffer overflow once you delete an attachment with a long file name. I fixed that and committed the change.

Concerning your crash, I was not able to reproduce it. Used a 255 char long filename, and could NOT crash elogd. Maybe you have an oder version or some special config options which
trigger that crash. Try with the newest git version and a minimal elogd.cfg configuration. Please also add line numbers during compilation (-g -o0 flags) so that I can better analyze
your backtrace. Best would be if I could reproduce your error.

Best,
Stefan



> Hi,
>   I'm running 
> elogd 3.1.4 built Jan 27 2021, 09:56:34 revision 395e101a
> on an ubuntu server.
> 
> I have a crash when very long filename (200 chars) are attached to an logbook entry.
> 
> The uploading of the attachment works almost fine: the filename is truncated and the convert to thumbnail is not working (as a consequence, maybe) but the file is actually uploaded and can be 
> downloaded correctly from the entry itself.
> 
> However, if I try to access the logbook list which contains that entry, I have a crash:
> 
> *** buffer overflow detected ***: terminated
> Aborted (core dumped)
> 
> [backtrace is attached below]
> 
> The only way I found to solve this is to edit manually the log entry and delete the attachment from it.
> 
> Any suggestion how to solve this?
> 
> Thanks
>   Stefano
> 
> 
> *** buffer overflow detected ***: terminated
> 
> Program received signal SIGABRT, Aborted.
> __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
> 50	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
> (gdb) bp
> Undefined command: "bp".  Try "help".
> (gdb) backtrace 
> #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
> #1  0x00007ffff7cf4859 in __GI_abort () at abort.c:79
> #2  0x00007ffff7d5f29e in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff7e8908f "*** %s ***: terminated\n") at ../sysdeps/posix/libc_fatal.c:155
> #3  0x00007ffff7e01aea in __GI___fortify_fail (msg=msg@entry=0x7ffff7e89025 "buffer overflow detected") at fortify_fail.c:26
> #4  0x00007ffff7e00386 in __GI___chk_fail () at chk_fail.c:28
> #5  0x00007ffff7d5707f in _IO_str_chk_overflow (fp=<optimized out>, c=<optimized out>) at iovsprintf.c:35
> #6  0x00007ffff7d64054 in __GI__IO_default_xsputn (n=<optimized out>, data=<optimized out>, f=<optimized out>) at libioP.h:948
> #7  __GI__IO_default_xsputn (f=0x7ffffff36ca0, data=<optimized out>, n=241) at genops.c:370
> #8  0x00007ffff7d4912c in __vfprintf_internal (s=s@entry=0x7ffffff36ca0, format=format@entry=0x555555622e74 "../%s/%s/%s", ap=ap@entry=0x7ffffff36de0, mode_flags=mode_flags@entry=6)
>     at ../libio/libioP.h:948
> #9  0x00007ffff7d57129 in __vsprintf_internal (
>     string=0x7ffffff37120 
> "../DAQ/220325_090630/j5K1OSy8XN9FRPriaBGOmMg3bih07CQKo68Sw6dskclxdOqKaTOsf2bX8UugSWn0s8zaAHe6VWiPcQVnmD8PM1tbQoVMr08dBrXKU2X2tBR4pJ3hlfxbKjspmcbiDTMy32eHIp6lFAVA9lppShmpiut4g4CtgDK3F2bOPzgzXEjPw
> W0SJWG"..., maxlen=<optimized out>, format=0x555555622e74 "../%s/%s/%s", args=args@entry=0x7ffffff36de0, mode_flags=6) at iovsprintf.c:95
> #10 0x00007ffff7dffe7b in ___sprintf_chk (s=<optimized out>, flag=<optimized out>, slen=<optimized out>, format=<optimized out>) at sprintf_chk.c:40
> #11 0x00005555555a939d in display_line ()
> #12 0x00005555555ddc8a in show_elog_list ()
> #13 0x00005555556010cf in interprete ()
> #14 0x0000555555601a33 in decode_get ()
> #15 0x000055555560461f in process_http_request ()
> #16 0x0000555555607745 in server_loop ()
> #17 0x000055555555a92c in main ()
  69502   Tue Mar 29 11:31:55 2022 Reply Stefano Lacaprarastefano.lacaprara@pd.infn.itBug reportLinuxelogd 3.1.4 Re: crash with attachment with very long filename
Hi Stefan,
  

> Hi Stefano,
> 
> well, why in heaven's name do you run 200+ chars file names?

This is a very good question, and I asked the same to my user: the use case is typically that the attachment names are generated programmatcally, and many steps of the script add a string to it, plus sometime the original filename has hiragana or even kanji character.

So, long story short, it has happened in our production environment

The file I'm using was indeed generated from /dev/random, but that was the earies way fo rme to create such long filename.

Backtrace with lines is as follow.

Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) where
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff7cf4859 in __GI_abort () at abort.c:79
#2  0x00007ffff7d5f29e in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff7e8908f "*** %s ***: terminated\n") at ../sysdeps/posix/libc_fatal.c:155
#3  0x00007ffff7e01aea in __GI___fortify_fail (msg=msg@entry=0x7ffff7e89025 "buffer overflow detected") at fortify_fail.c:26
#4  0x00007ffff7e00386 in __GI___chk_fail () at chk_fail.c:28
#5  0x00007ffff7d5707f in _IO_str_chk_overflow (fp=<optimized out>, c=<optimized out>) at iovsprintf.c:35
#6  0x00007ffff7d64054 in __GI__IO_default_xsputn (n=<optimized out>, data=<optimized out>, f=<optimized out>) at libioP.h:948
#7  __GI__IO_default_xsputn (f=0x7ffffff36c70, data=<optimized out>, n=241) at genops.c:370
#8  0x00007ffff7d4912c in __vfprintf_internal (s=s@entry=0x7ffffff36c70, format=format@entry=0x555555622e74 "../%s/%s/%s", ap=ap@entry=0x7ffffff36db0, mode_flags=mode_flags@entry=6) at ../libio/libioP.h:948
#9  0x00007ffff7d57129 in __vsprintf_internal (
    string=0x7ffffff370f0 "../DAQ/220329_090332/IjU4CK54jRBuQhOdUANqC6X8i8x1yoGGKozhtuM2M0Cc8MnauDwSzAs0BiVwAIzyC4TJqmDArrIA9Exja36xXqc6PSUjOE5hkiW1YeG1R9FM64tmdq52vvo1NsqLOk6I02RBlgnQB7hoUQa1fwb8ZdoRo3BJ9WJGq2sErewo8BL9dAZhZF9"..., maxlen=<optimized out>, format=0x555555622e74 "../%s/%s/%s", 
args=args@entry=0x7ffffff36db0, mode_flags=6) at iovsprintf.c:95
#10 0x00007ffff7dffe7b in ___sprintf_chk (s=<optimized out>, flag=<optimized out>, slen=<optimized out>, format=<optimized out>) at sprintf_chk.c:40
#11 0x00005555555a939d in sprintf (__fmt=0x555555622e74 "../%s/%s/%s", __s=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/stdio2.h:36
#12 display_line (lbs=0x55555664b818, message_id=9, number=<optimized out>, mode=0x7ffffffd2b80 "Summary", expand=1, level=0, printable=0, n_line=3, show_attachments=0, show_att_column=1, 
    date=0x7ffffffd2a40 "Tue, 29 Mar 2022 09:03:35 +0000", in_reply_to=0x7ffffffd2a90 "", reply_to=0x7ffffffd3160 "", n_attr_disp=7, disp_attr=0x7ffffff86760, disp_attr_link=0x7ffffff386a0, attrib=0x7ffffff3d380, 
    n_attr=5, text=0x5555567f26f8 "", show_text=1, attachment=0x7ffffff3a180, encoding=0x7ffffffd2ae0 "plain", select=0, n_display=0x7ffffff38438, locked_by=0x7ffffffd2d60 "", highlight=0, re_buf=0x7ffffff38840, 
    highlight_mid=0, absolute_link=0, draft=0x7ffffffd2f60 "") at src/elogd.c:18214
#13 0x00005555555ddc8a in show_elog_list (lbs=<optimized out>, past_n=<optimized out>, last_n=<optimized out>, page_n=<optimized out>, default_page=<optimized out>, info=<optimized out>) at src/elogd.c:21741
#14 0x00005555556010cf in interprete (lbook=<optimized out>, path=<optimized out>) at src/elogd.c:28362
#15 0x0000555555601a33 in decode_get (logbook=0x7fffffffbda0 "DAQ", string=<optimized out>) at src/elogd.c:28401
#16 0x000055555560461f in process_http_request (request=<optimized out>, i_conn=<optimized out>) at src/elogd.c:29209
#17 0x0000555555607745 in server_loop () at src/elogd.c:30233
#18 0x000055555555a92c in main (argc=<optimized out>, argv=<optimized out>) at src/elogd.c:31258


I'm not using the latest git version, but elog-3.1.4-3 from tar-ball, as I'm not able to compile elog from git
Is there any special thing I have to do?

In file included from src/auth.cxx:30:
src/elogd.h:282:40: note:   initializing argument 2 of ‘int get_user_line(LOGBOOK*, char*, char*, char*, char*, BOOL*, time_t*, int*)’
  282 | int get_user_line(LOGBOOK * lbs, char *user, char *password, char *full_name, char *email,
      |                                  ~~~~~~^~~~
make: *** [Makefile:140: auth.o] Error 1

thanks for your help.

Stefano


I see that they are generated probably automatically, but I guess you will run in all kinds of other problems in doing that.
> 
> I had a check with elogd. I found one buffer overflow once you delete an attachment with a long file name. I fixed that and committed the change.
> 
> Concerning your crash, I was not able to reproduce it. Used a 255 char long filename, and could NOT crash elogd. Maybe you have an oder version or some special config options which
> trigger that crash. Try with the newest git version and a minimal elogd.cfg configuration. Please also add line numbers during compilation (-g -o0 flags) so that I can better analyze
> your backtrace. Best would be if I could reproduce your error.
> 
> Best,
> Stefan
> 
> 
> 
> > Hi,
> >   I'm running 
> > elogd 3.1.4 built Jan 27 2021, 09:56:34 revision 395e101a
> > on an ubuntu server.
> > 
> > I have a crash when very long filename (200 chars) are attached to an logbook entry.
> > 
> > The uploading of the attachment works almost fine: the filename is truncated and the convert to thumbnail is not working (as a consequence, maybe) but the file is actually uploaded and can be 
> > downloaded correctly from the entry itself.
> > 
> > However, if I try to access the logbook list which contains that entry, I have a crash:
> > 
> > *** buffer overflow detected ***: terminated
> > Aborted (core dumped)
> > 
> > [backtrace is attached below]
> > 
> > The only way I found to solve this is to edit manually the log entry and delete the attachment from it.
> > 
> > Any suggestion how to solve this?
> > 
> > Thanks
> >   Stefano
> > 
> > 
> > *** buffer overflow detected ***: terminated
> > 
> > Program received signal SIGABRT, Aborted.
> > __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
> > 50	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
> > (gdb) bp
> > Undefined command: "bp".  Try "help".
> > (gdb) backtrace 
> > #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
> > #1  0x00007ffff7cf4859 in __GI_abort () at abort.c:79
> > #2  0x00007ffff7d5f29e in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff7e8908f "*** %s ***: terminated\n") at ../sysdeps/posix/libc_fatal.c:155
> > #3  0x00007ffff7e01aea in __GI___fortify_fail (msg=msg@entry=0x7ffff7e89025 "buffer overflow detected") at fortify_fail.c:26
> > #4  0x00007ffff7e00386 in __GI___chk_fail () at chk_fail.c:28
> > #5  0x00007ffff7d5707f in _IO_str_chk_overflow (fp=<optimized out>, c=<optimized out>) at iovsprintf.c:35
> > #6  0x00007ffff7d64054 in __GI__IO_default_xsputn (n=<optimized out>, data=<optimized out>, f=<optimized out>) at libioP.h:948
> > #7  __GI__IO_default_xsputn (f=0x7ffffff36ca0, data=<optimized out>, n=241) at genops.c:370
> > #8  0x00007ffff7d4912c in __vfprintf_internal (s=s@entry=0x7ffffff36ca0, format=format@entry=0x555555622e74 "../%s/%s/%s", ap=ap@entry=0x7ffffff36de0, mode_flags=mode_flags@entry=6)
> >     at ../libio/libioP.h:948
> > #9  0x00007ffff7d57129 in __vsprintf_internal (
> >     string=0x7ffffff37120 
> > "../DAQ/220325_090630/j5K1OSy8XN9FRPriaBGOmMg3bih07CQKo68Sw6dskclxdOqKaTOsf2bX8UugSWn0s8zaAHe6VWiPcQVnmD8PM1tbQoVMr08dBrXKU2X2tBR4pJ3hlfxbKjspmcbiDTMy32eHIp6lFAVA9lppShmpiut4g4CtgDK3F2bOPzgzXEjPw
> > W0SJWG"..., maxlen=<optimized out>, format=0x555555622e74 "../%s/%s/%s", args=args@entry=0x7ffffff36de0, mode_flags=6) at iovsprintf.c:95
> > #10 0x00007ffff7dffe7b in ___sprintf_chk (s=<optimized out>, flag=<optimized out>, slen=<optimized out>, format=<optimized out>) at sprintf_chk.c:40
> > #11 0x00005555555a939d in display_line ()
> > #12 0x00005555555ddc8a in show_elog_list ()
> > #13 0x00005555556010cf in interprete ()
> > #14 0x0000555555601a33 in decode_get ()
> > #15 0x000055555560461f in process_http_request ()
> > #16 0x0000555555607745 in server_loop ()
> > #17 0x000055555555a92c in main ()
  66752   Fri Mar 12 12:28:36 2010 Reply Stefan Rittstefan.ritt@psi.chQuestionWindows2.7.8-2280Re: could not get the threaded display working

FX FRERE wrote:

I have been trying to get the display mode into threaded by default, it does not work on any of my logbooks. I saw related threads in this forum but none gave me a solution (unless the 2.7.8-2282 is available for download).

The display mode is taken from the configuration option "Display mode = ..." only the very first time a users accesses a logbook. When the user switches to any other mode (summary, full) by clicking on the according menu option, the new mode is stored in a cookie in the browser and overrides the "Display mode = ..." setting. Maybe that is what you see.

  66176   Tue Jan 27 09:19:22 2009 Reply Stefan Rittstefan.ritt@psi.chBug fixLinux2.7.5Re: convert: unrecognized option '-set'
> Hello,
> 
> We are now running elog-2.7.5 in a Scientific Linux 4 (RHEL4) system, which uses ImageMagick 6.0.7.1.  After uploading an image, the image 
> manipulation buttons don't work and complain:
> convert: unrecognized option '-set'
> 
> We are using an RPM built from source, and it looks like I should be able to just change "-set comment ..." to "-comment" as in:
> ------
> [dab66@lnx100 tmp]% diff elogd.c elogd.c.new 
> 22601c22601
> <       sprintf(cmd, "convert '%s' -rotate %d -thumbnail %d -set comment ' %d' '%s'", file_name, new_rot,
> ---
> >       sprintf(cmd, "convert '%s' -rotate %d -thumbnail %d -comment ' %d' '%s'", file_name, new_rot,
> 22607c22607
> <       sprintf(cmd, "convert '%s' -rotate %d -thumbnail %d -set comment ' %d' '%s'", file_name, new_rot,
> ---
> >       sprintf(cmd, "convert '%s' -rotate %d -thumbnail %d -comment ' %d' '%s'", file_name, new_rot,
> 22618c22618
> <       sprintf(cmd, "convert '%s' -rotate %d -thumbnail %d -set comment ' %d' '%s'", file_name, cur_rot,
> ---
> >       sprintf(cmd, "convert '%s' -rotate %d -thumbnail %d -comment ' %d' '%s'", file_name, cur_rot,
> 22624c22624
> <       sprintf(cmd, "convert '%s' -rotate %d -thumbnail %d -set comment ' %d' '%s'", file_name, cur_rot,
> ---
> >       sprintf(cmd, "convert '%s' -rotate %d -thumbnail %d -comment ' %d' '%s'", file_name, cur_rot,
> ------
> 
> Is there any better way for us to fix this, or is anything else needed?

Well, I believe your modification won't work. I just tried it with ImageMagick 6.3.8 and it failed. Try to rotate your picture four times, and 
it should be back to the old position. When I use "-comment" instead "-set comment" on a PNG file, this did not work. From the man page it 
tells me:

Version: ImageMagick 6.3.8 01/25/08 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC

Usage: convert [options ...] file [ [options ...] file ...] [options ...] file

Image Settings:
  ...
  -comment string      annotate image with comment
  ...

Image Operators:
  ...
  -set property value  set an image property
  ...


So indeed "-comment" and "-set comment" are two different things. I'm afraid you have to upgrade your ImageMagick package in order to make 
this work.
  199   Fri Jan 24 12:24:18 2003 Reply Stefan Rittstefan.ritt@psi.chBug report  Re: confused name in the attributes section
> do not use confused name in attributes
> **************************************
> like
> Attributes Type, Type2
> the info on Type2 will be placed in the Type also
> see attachment 1
> 
> Never use confused name like '
> Attributes PC_Memory, Memory

I acknowledge the problem. It had to do with the fact that for checkbox 
options, the first checkbox is submitted in the above case as "Type0", the 
second as "Type1", and the third as "Type2" which conficts with the other 
attribute. I fixed that and use now "Type#0" and so on which should be fine.

The fix will be included in V2.2.6.

Stefan
  65857   Fri Apr 25 17:19:27 2008 Reply Stefan Rittstefan.ritt@psi.chQuestion  Re: configuration of rss feeds

W.Koster wrote:
Is it possible to change what is being shown in the rss-feed ? (like only name, date and subject in the list and text and other attributes in the text-pane below the rss-feed list (I hope you can figure out what I mean). Regards, W.

Have you tried the "RSS Title" option?

ELOG V3.1.5-2eba886