Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 36 of 806  Not logged in ELOG logo
ID Date Icon Author Author Email Category OS ELOG Versiondown Subject
  69473   Tue Feb 15 13:45:02 2022 Reply Stefan Rittstefan.ritt@psi.chBug reportLinuxcb3afcd826d26bfRe: make all messages on ubuntu LTS 20.04.03
Well, I bit the bullet and fixed all of these warnings. Took me like two days of work, but now should be fine. You might want to test it again. I only have gcc 9.2.0, there it compiles now without warning.

Stefan
  69474   Tue Feb 15 20:55:02 2022 Reply Konstantin Olchanskiolchansk@triumf.caBug reportLinuxcb3afcd826d26bfRe: make all messages on ubuntu LTS 20.04.03
> Well, I bit the bullet and fixed all of these warnings. Took me like two days of work, but now should be fine.
> You might want to test it again.

Done. Only 2 sprintf() overruns remain, see below.

> I only have gcc 9.2.0, there it compiles now without warning.

Ubuntu LTS 20.04 is GCC 9.3.0. (And incoming Debian-11 based Ubuntu LTS 22.04 likely to be GCC 10.something).

If you do not have access, I can create an account for you on daq00.triumf.ca.

daq00:elog$ make
c++ -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -c -o mxml.o 
mxml/mxml.cxx
c++ -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -w -c -o crypt.o 
src/crypt.cxx
c++ -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -c -o strlcpy.o 
mxml/strlcpy.cxx
type git &> /dev/null; if [ $? -eq 1 ]; then REV="unknown" ;else REV=`git log -n 1 --pretty=format:"%ad - %h"`; fi; echo \#define 
GIT_REVISION \"$REV\" > src/git-revision.h
git is /usr/bin/git
c++ -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -o elog 
src/elog.cxx mxml.o crypt.o strlcpy.o -lssl
c++ -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -w -c -o auth.o 
src/auth.cxx
c++ -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -o elogd 
src/elogd.cxx auth.o mxml.o crypt.o strlcpy.o -lssl
src/elogd.cxx: In function ‘void show_elog_list(LOGBOOK*, int, int, int, BOOL, char*)’:
src/elogd.cxx:21676:42: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 1588 [-Wformat-overflow=]
21676 |                sprintf(str, "Time format %s", attr_list[i]);
      |                                          ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.cxx:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:34: note: ‘__builtin___sprintf_chk’ output between 13 and 150012 bytes into a destination 
of size 1600
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.cxx:21660:42: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 1588 [-Wformat-overflow=]
21660 |                sprintf(str, "Date format %s", attr_list[i]);
      |                                          ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.cxx:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:34: note: ‘__builtin___sprintf_chk’ output between 13 and 150012 bytes into a destination 
of size 1600
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
c++ -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -o elconv 
src/elconv.cxx -lssl



daq00:elog$ gcc -v
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04) 
  69475   Wed Feb 16 08:45:15 2022 Reply Stefan Rittstefan.ritt@psi.chBug reportLinuxcb3afcd826d26bfRe: make all messages on ubuntu LTS 20.04.03
I fixed these as well, please have a look again. BTW, midas had a few of these as well.

Stefan
  69476   Wed Feb 16 20:01:17 2022 Reply Konstantin Olchanskiolchansk@triumf.caBug reportLinuxcb3afcd826d26bfRe: make all messages on ubuntu LTS 20.04.03
> I fixed these as well, please have a look again. BTW, midas had a few of these as well.

confirmed. elog commit d828aa58305ee8ce2ae882c0ff3c34cfa66650e5

K.O.
  508   Wed Mar 24 20:23:47 2004 Idea Stefan Rittstefan.ritt@psi.chInfo allSuggestions for developing new CSS files
The elog daemon uses cascading style sheets (CSS) to format its output, such
as font family, size and color. Some people started to develop new themes
(skins) and posted them at the contributions logbook (such as
http://midas.psi.ch/elogs/Contributions/7).

From my onw experience, I know that this can be a difficult job, since it
means to change the "default.css" file and reloading a page over and over
again. I recently discovered a way to do this much easier: The Mozilla based
browsers (such as firefox, http://www.mozilla.org/products/firefox/) have an
extension called EditCSS (http://texturizer.net/firefox/extensions/#editcss)
which shows the CSS file on the left side of the browser and the web page on
the right side. Changes in the CSS editor are immediately reflected in the
browser window. This way one can change certain entries in the CSS file and
immediately see its consequences. Development of new skins should therefore
become much more easier.
  509   Wed Mar 24 21:25:34 2004 Idea Stefan Rittstefan.ritt@psi.chInfo allQuick search mode with Mozilla based browsers, extremely useful!!!
It is not usual for me to pester people with tips around elog, but this
one was so helpful for me that I would like to share it.

The Mozilla based browsers, such as Netscape or Firefox
(http://www.mozilla.org/products/firefox/) offer the possibility of
so-called "keymarks" or "bookmark keywords". This are bookmarks to which a
keywork can be added, making them a very powerful search tool for elog. This
can be explained most easily in an example:

Add following bookmark to your Browser:

Name: ELOG search
Location: http://midas.psi.ch/elogs/forum/?mode=full&sall=1&subtext=%s
Keyword: el

I attached a screendump of how this looks under Firefox. Now you can type

el <keyword>

in your URL address bar, and the elog forum is automatically searched for
that keyword (see second attachment), since the "%s" in the URL is
automatically replaced with your keyword. This works of course also with
your personal logbooks. The switch "sall=1" causes elog to search for the
string in the main text body and in all attributes.

The URL bar can be activated with CTRL-L, so the key sequence

CTRL-L el <keyword>

is all you need to search a ELOG logbook, even without touching the mouse.
  655   Thu Aug 5 10:49:21 2004 Idea Stefan Rittstefan.ritt@psi.ch AllallLogin/Logout problem with elog and their solution
Hi everybody,

several people have reported of strange problems concering the login/logout
behaviour of elog. After editing elogd.cfg, they could not logout any more
from a logbook, or they were not able to log in. Here comes some
explanation. If you are not interested in the details, skip to the last section.

The login parameters (user name and password) are sored in cookies, which of
course have to be enabled for the elog site in your browser. Each cookie can
contain an optionsl "path=..." statement, which defines for which subtree in
the URL the cookie is valid. If you use a "global" password file (one where
the "password file = ..." statement is in the [global] section of
elogd.cfg), the elogd server stores a cookie with path "/", so it will apply
to the whole site and therefore to all underlying lobooks. If your password
file is defined in an individual logbook section, the elogd server stores a
cookie with path "/<logbook>", so that it applies only to the specific logbook.

The problem arises now if one moves the password file statement from the
global section to the logbook section or back. The browser might still have
old cookies, whic can override any newly set cookie.

Long story short conclusion: If you observe this behaviour, just delete all
cookies in your browser and you should be fine. I added some additional code
to version 2.5.4 which catches a few cases but unfortunately not all.
  69527   Fri May 6 21:12:11 2022 Warning Konstantin Olchanskiolchansk@triumf.caInfoLinuxallPDF preview special steps to enable
Ubuntu LTS 20.04 and others have elog PDF preview disabled by default. To enable,
please follow these steps, see https://daq00.triumf.ca/DaqWiki/index.php/Ubuntu#Enable_elog_PDF_preview

Enable elog PDF preview
see https://stackoverflow.com/questions/52998331/imagemagick-security-policy-pdf-blocking-conversion

xemacs -nw /etc/ImageMagick-6/policy.xml
remove this section at the end:
<!-- disable ghostscript format types -->
<policy domain="coder" rights="none" pattern="PS" />
<policy domain="coder" rights="none" pattern="PS2" />
<policy domain="coder" rights="none" pattern="PS3" />
<policy domain="coder" rights="none" pattern="EPS" />
<policy domain="coder" rights="none" pattern="PDF" />
<policy domain="coder" rights="none" pattern="XPS" />

K.O.
ELOG V3.1.5-3fb85fa6