Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 794 of 796  Not logged in ELOG logo
ID Date Iconup Author Author Email Category OS ELOG Version Subject
  69341   Fri Apr 9 16:48:54 2021 Warning Gys Wuytsgys.wuyts@gmail.comQuestionWindows3.1.4 (latest)auto pre-fill fields issue

Hello,

what are the pre-requisites to automatically fill the Author and Author Email fields. The documented method:

Subst Author = $long_name from $remote_host

Subst Email = $user_email

in the elogd.cfg file does not seem to work.

(I see it works here on this platform)

Tnks

 

G

  69369   Mon Jun 14 16:15:10 2021 Warning Sebastian Schenksebastian.schenk@physik.uni-halle.deBug reportLinux | Windows | Mac OSX | All | Other3.1.4Additional forbidden attributes

Hello Stefan,

I stubbled on a issue with our elog.
We introduced an attribute "mode" to one of the elogs and it breaks the "Find" function as this attribute is already used for the viewing settings "full", "summary" and "threaded".
(HTTP parameter pollution)

I suspect other special attributes used by the internals of elog should also not be allowed.
A quick search in the "Find" reveals these attributes in the URL, so I guess, these should also be avoided.
This list could be incomplete

npp, ma, da, ya, mb, db, yb, attach, reverse, mode

A simple workaround would be updating the documentation to add these to the list of forbidden attributes.
https://elog.psi.ch/elog/config.html
Maybe a warning can be added, if the elog behaves unexpected, try other attribute names, as they can conflict with internal attributes.

A fix could be to add a prefix for internal attributes, which can't be used for user attributes.

Best wishes,
Sebastian

 

PS: I also noticed using the "Find" command, the generated URL contains 2 reverse attributes like "reverse=0&reverse=1"

  69388   Sat Aug 28 21:32:09 2021 Warning Andreas Luedekeandreas.luedeke@psi.chBug reportLinuxELOG V3.1.4Adding entries without being logged in stopped working with attachments
Hi Stefan (et al),
we have several logbooks that allow to add new entries without logging in first.
That still works, as long as these entries don't have any attachments.
As soon as there is an attachment you are asked to login in the web interface.

I hope that this is not an intentional feature, but a bug?
Several of our software tools now fail to submit elog entries.

 
The problem occured when we upgraded to ELOG V3.1.4-2e1708b.
Version elog-3.1.4-611489b did not show this behaviour.

Kind Regards
Andreas
  69399   Thu Oct 21 11:00:46 2021 Warning Andreas Luedekeandreas.luedeke@psi.chBug reportLinux3.1.4-2e1708bRedirect in Execute new needs space after ">"

EDIT: forget the tip below. Instead just call script files: inline scripting in the ELOG config shows very strange behavior. Doing the same in external scripts works reliable.

 

I just spend an hour searching for a problem. To avoid others to spend the hour again, here's a little "special behaviour" of shell execution in ELOG you should know about:

If you want to do redirect to a file in a shell execution, put a space before and after the redirecting. The following does not work:

Execute new = if ! [ -z "$CampaignID" ] ; then echo "$CampaignID" >/usr/local/elog/logbooks/elog-campaign.default ; fi

You will not get an error message, but the file is not created. But if you add a space it will work as expected:

Execute new = if ! [ -z "$CampaignID" ] ; then echo "$CampaignID" > /usr/local/elog/logbooks/elog-campaign.default ; fi

It is not really a bug; if you know about it, then it is not a big deal: hence this entry here. I saw this behavior on a Linux RHEL7 system.

In case you are wondering: I use this to create a default for the field CampaignID, to be used for new entries in combination with a Preset:

Preset CampaignID = $shell( if [ -r /usr/local/elog/logbooks/elog-campaign.default ] ; then cat /usr/local/elog/logbooks/elog-campaign.default;fi )
  69424   Sat Nov 27 21:48:41 2021 Warning Chris Körnerchris.koerner@physik.uni-halle.deBug reportLinux3.14$attribute replacement fails occasionally

Hi,

In our setup we have multiple logbooks. I want a convenient way to search all logbooks for an attribute (in our case with the name Sample-ID) by just clicking it in the list display of any logbook.Therefore, in the [global] section I put "List Change Sample-ID = <a href="https://ourelog.com/$logbook/?all=1&Sample-ID=$Sample-ID"</a>. This transforms the attribute in list display into a hyperlink to the search results page. So far this works fine. In the results page, of course the option also applies, meaning the attribute is replaced by the link as well. But here something odd happens and the replacement does not work. The intended behavior is to replace $logbook in the link with the name of the logbook. Sometimes, however, the replacement yields something like "logbook" (missing $ and thus not replacing anything) or even weirder something like "60logbook". I have no idea what causes this.

  69467   Tue Feb 8 00:52:47 2022 Warning Konstantin Olchanskiolchansk@triumf.caBug reportLinuxcb3afcd826d26bfmake all messages on ubuntu LTS 20.04.03
For the record, compiler messages from elog tip of branch elog/master.

Most of the stuff is the usual same-old that we mostly fixed in midas:
- strncpy() checker never heard of fix-length strings (confusion about NUL termination)
- return status of system calls should be checked (really! make sure to print both the numeric errno and the corresponding 
strerror() description!)
- sprintf() buffer overruns (nice to have this checked automatically)
- maybe some more stuff but I cannot see it in the noise.

I could fix some of this, but I do not have permission to commit into elog git repository. (I think)

darkside@daq00:~/packages/elog$ git log -n 1 --pretty=format:"%ad - %h"
Mon Oct 25 13:36:10 2021 +0200 - cb3afcd8

darkside@daq00:~/packages/elog$ gcc -v
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04) 

gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-results -Imxml -DHAVE_SSL -c -o mxml.o 
mxml/mxml.c
mxml/mxml.c: In function ‘mxml_parse_entity’:
mxml/mxml.c:1901:38: warning: ‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Wformat-
overflow=]
 1901 |             sprintf(filename, "%s%c%s", directoryname, DIR_SEPARATOR, entity_reference_name[i]);
      |                                      ^
In file included from /usr/include/stdio.h:867,
                 from mxml/mxml.c:58:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 2 or more bytes (assuming 4097) into a 
destination of size 4096
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mxml/mxml.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-unused-results’
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-results -Imxml -DHAVE_SSL -w -c -o 
crypt.o src/crypt.c
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-results -Imxml -DHAVE_SSL -w -c -o 
regex.o src/regex.c
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-results -Imxml -DHAVE_SSL -c -o 
strlcpy.o mxml/strlcpy.c
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-results -Imxml -DHAVE_SSL -o elog 
src/elog.c mxml.o crypt.o regex.o strlcpy.
o -lssl
In file included from /usr/include/string.h:495,
                 from src/elog.c:34:
In function ‘strncpy’,
    inlined from ‘retrieve_elog’ at src/elog.c:528:13:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ specified bound 256 equals destination 
size [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘submit_elog’ at src/elog.c:986:10:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ specified bound 80 equals destination 
size [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘submit_elog’ at src/elog.c:981:10:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ specified bound 80 equals destination 
size [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
    inlined from ‘submit_elog’ at src/elog.c:960:13:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ specified bound 80 equals destination 
size [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elog.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-unused-results’
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-results -Imxml -DHAVE_SSL -w -c -o 
auth.o src/auth.c
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-results -Imxml -DHAVE_SSL -o elogd 
src/elogd.c auth.o mxml.o crypt.o regex.o
 strlcpy.o -lssl
src/elogd.c: In function ‘my_shell’:
src/elogd.c:979:10: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
  979 |          read(fh, result, size - 1);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:1035:7: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
 1035 |       system(str);
      |       ^~~~~~~~~~~
src/elogd.c: In function ‘setegroup’:
src/elogd.c:1740:7: warning: ignoring return value of ‘chown’, declared with attribute warn_unused_result [-Wunused-result]
 1740 |       chown(logbook_dir, -1, gr->gr_gid);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘seteuser’:
src/elogd.c:1764:7: warning: ignoring return value of ‘chown’, declared with attribute warn_unused_result [-Wunused-result]
 1764 |       chown(logbook_dir, pw->pw_uid, -1);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘ss_daemon_init’:
src/elogd.c:2683:4: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result [-Wunused-result]
 2683 |    chdir("/");                  /* change working direcotry (not on NFS!) */
      |    ^~~~~~~~~~
src/elogd.c: In function ‘parse_config_file’:
src/elogd.c:2900:4: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
 2900 |    read(fh, buffer, length);
      |    ^~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘check_language’:
src/elogd.c:3253:10: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
 3253 |          read(fh, _locbuffer, length);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘parse_file’:
src/elogd.c:3894:7: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
 3894 |       read(fh, buffer, length);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘el_index_logbooks’:
src/elogd.c:4179:7: warning: ignoring return value of ‘getcwd’, declared with attribute warn_unused_result [-Wunused-result]
 4179 |       getcwd(cwd, sizeof(cwd));
      |       ^~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:4185:13: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result [-Wunused-result]
 4185 |             chdir(DIR_SEPARATOR_STR);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:4195:13: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result [-Wunused-result]
 4195 |             chdir(str);
      |             ^~~~~~~~~~
src/elogd.c:4226:16: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result [-Wunused-result]
 4226 |                chdir(str);
      |                ^~~~~~~~~~
src/elogd.c:4232:7: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result [-Wunused-result]
 4232 |       chdir(cwd);
      |       ^~~~~~~~~~
src/elogd.c: In function ‘el_submit_attachment’:
src/elogd.c:4658:10: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
 4658 |          write(fh, buffer, buffer_size);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/elogd.c:38:
src/elogd.c: In function ‘el_submit’:
src/elogd.h:162:22: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
  162 | #define TRUNCATE(fh) ftruncate(fh, TELL(fh))
      |                      ^~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:5085:7: note: in expansion of macro ‘TRUNCATE’
 5085 |       TRUNCATE(fh);
      |       ^~~~~~~~
src/elogd.c: In function ‘el_delete_message’:
src/elogd.c:5297:7: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
 5297 |       write(fh, buffer, tail_size);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/elogd.c:38:
src/elogd.h:162:22: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
  162 | #define TRUNCATE(fh) ftruncate(fh, TELL(fh))
      |                      ^~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:5302:4: note: in expansion of macro ‘TRUNCATE’
 5302 |    TRUNCATE(fh);
      |    ^~~~~~~~
src/elogd.c: In function ‘write_logfile’:
src/elogd.c:5621:4: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
 5621 |    write(fh, buf, strlen(buf));
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘is_full_html’:
src/elogd.c:5745:4: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
 5745 |    read(fh, buf, length);
      |    ^~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘is_ascii’:
src/elogd.c:5783:4: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
 5783 |    read(fh, buf, length);
      |    ^~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_html_header’:
src/elogd.c:7582:10: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
 7582 |          fread(buf, 1, size, f);
      |          ^~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_top_text’:
src/elogd.c:8168:10: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
 8168 |          fread(buf, 1, size, f);
      |          ^~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_bottom_text’:
src/elogd.c:8206:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
 8206 |             fread(buf, 1, size, f);
      |             ^~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_bottom_text_login’:
src/elogd.c:8255:13: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
 8255 |             fread(buf, 1, size, f);
      |             ^~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘send_file_direct’:
src/elogd.c:8411:4: warning: ignoring return value of ‘getcwd’, declared with attribute warn_unused_result [-Wunused-result]
 8411 |    getcwd(dir, sizeof(dir));
      |    ^~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:8479:7: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
 8479 |       read(fh, return_buffer + strlen(return_buffer), length);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_edit_form’:
src/elogd.c:11673:16: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
11673 |                read(fh, buffer, length);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:12003:34: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
12003 |                                  fgets(str, sizeof(str), f);
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘load_config_section’:
src/elogd.c:12600:4: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
12600 |    read(fh, *buffer, length);
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘save_admin_config’:
src/elogd.c:12832:4: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
12832 |    read(fh, buf, length);
      |    ^~~~~~~~~~~~~~~~~~~~~
In file included from src/elogd.c:38:
src/elogd.h:162:22: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
  162 | #define TRUNCATE(fh) ftruncate(fh, TELL(fh))
      |                      ^~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:12868:4: note: in expansion of macro ‘TRUNCATE’
12868 |    TRUNCATE(fh);
      |    ^~~~~~~~
src/elogd.c: In function ‘change_config_line’:
src/elogd.c:12900:4: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
12900 |    read(fh, buf, length);
      |    ^~~~~~~~~~~~~~~~~~~~~
In file included from src/elogd.c:38:
src/elogd.h:162:22: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
  162 | #define TRUNCATE(fh) ftruncate(fh, TELL(fh))
      |                      ^~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:12980:4: note: in expansion of macro ‘TRUNCATE’
12980 |    TRUNCATE(fh);
      |    ^~~~~~~~
src/elogd.c: In function ‘delete_logbook’:
src/elogd.c:13014:4: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
13014 |    read(fh, buf, length);
      |    ^~~~~~~~~~~~~~~~~~~~~
In file included from src/elogd.c:38:
src/elogd.h:162:22: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
  162 | #define TRUNCATE(fh) ftruncate(fh, TELL(fh))
      |                      ^~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:13038:4: note: in expansion of macro ‘TRUNCATE’
13038 |    TRUNCATE(fh);
      |    ^~~~~~~~
src/elogd.c: In function ‘rename_logbook’:
src/elogd.c:13085:4: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
13085 |    read(fh, buf, length);
      |    ^~~~~~~~~~~~~~~~~~~~~
In file included from src/elogd.c:38:
src/elogd.h:162:22: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
  162 | #define TRUNCATE(fh) ftruncate(fh, TELL(fh))
      |                      ^~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:13122:4: note: in expansion of macro ‘TRUNCATE’
13122 |    TRUNCATE(fh);
      |    ^~~~~~~~
src/elogd.c: In function ‘create_logbook’:
src/elogd.c:13157:4: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
13157 |    read(fh, buf, length);
      |    ^~~~~~~~~~~~~~~~~~~~~
In file included from src/elogd.c:38:
src/elogd.h:162:22: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
  162 | #define TRUNCATE(fh) ftruncate(fh, TELL(fh))
      |                      ^~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:13214:4: note: in expansion of macro ‘TRUNCATE’
13214 |    TRUNCATE(fh);
      |    ^~~~~~~~
src/elogd.c: In function ‘save_config’:
src/elogd.h:162:22: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
  162 | #define TRUNCATE(fh) ftruncate(fh, TELL(fh))
      |                      ^~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:13255:4: note: in expansion of macro ‘TRUNCATE’
13255 |    TRUNCATE(fh);
      |    ^~~~~~~~
src/elogd.c: In function ‘submit_message’:
src/elogd.c:15884:13: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
15884 |             read(fh, buffer, size);
      |             ^~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘receive_config’:
src/elogd.c:16349:10: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
16349 |          fgets(pwd, sizeof(pwd), stdin);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘adjust_config’:
src/elogd.c:16411:4: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
16411 |    read(fh, buf, length);
      |    ^~~~~~~~~~~~~~~~~~~~~
In file included from src/elogd.c:38:
src/elogd.h:162:22: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
  162 | #define TRUNCATE(fh) ftruncate(fh, TELL(fh))
      |                      ^~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16473:4: note: in expansion of macro ‘TRUNCATE’
16473 |    TRUNCATE(fh);
      |    ^~~~~~~~
src/elogd.c: In function ‘receive_pwdfile’:
src/elogd.c:16556:10: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
16556 |          fgets(str, sizeof(str), stdin);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/elogd.c:38:
src/elogd.h:162:22: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
  162 | #define TRUNCATE(fh) ftruncate(fh, TELL(fh))
      |                      ^~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16597:4: note: in expansion of macro ‘TRUNCATE’
...
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16733:33: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 992 [-Wformat-overflow=]
16733 |          sprintf(line, "MIRROR: %s", str);
      |                                 ^~
......
17143 |                   mprint(lbs, mode, str);
      |                                     ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 2008 bytes into a 
destination of size 1000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16733:33: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 992 [-Wformat-overflow=]
16733 |          sprintf(line, "MIRROR: %s", str);
      |                                 ^~
......
17244 |                mprint(lbs, mode, str);
      |                                  ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 2008 bytes into a 
destination of size 1000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16733:33: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 992 [-Wformat-overflow=]
16733 |          sprintf(line, "MIRROR: %s", str);
      |                                 ^~
......
17241 |                mprint(lbs, mode, str);
      |                                  ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 2008 bytes into a 
destination of size 1000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16733:33: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 992 [-Wformat-overflow=]
16733 |          sprintf(line, "MIRROR: %s", str);
      |                                 ^~
......
17296 |                mprint(lbs, mode, str);
      |                                  ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 2008 bytes into a 
destination of size 1000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16733:33: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 992 [-Wformat-overflow=]
16733 |          sprintf(line, "MIRROR: %s", str);
      |                                 ^~
......
17289 |                mprint(lbs, mode, str);
      |                                  ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 2008 bytes into a 
destination of size 1000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16733:33: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 992 [-Wformat-overflow=]
16733 |          sprintf(line, "MIRROR: %s", str);
      |                                 ^~
......
16952 |             mprint(lbs, mode, str);
      |                               ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 2008 bytes into a 
destination of size 1000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:17409:60: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 240 [-Wformat-overflow=]
17409 |                         sprintf(rem_ref, "<a href=\"http://%s%d\">%s</a>", str, message_id,
      |                                                            ^~              ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 24 or more bytes (assuming 2023) into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16733:33: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 992 [-Wformat-overflow=]
16733 |          sprintf(line, "MIRROR: %s", str);
      |                                 ^~
......
17397 |                         mprint(lbs, mode, str);
      |                                           ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 2008 bytes into a 
destination of size 1000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16733:33: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 992 [-Wformat-overflow=]
16733 |          sprintf(line, "MIRROR: %s", str);
      |                                 ^~
......
17381 |                            mprint(lbs, mode, str);
      |                                              ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 2008 bytes into a 
destination of size 1000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16733:33: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 992 [-Wformat-overflow=]
16733 |          sprintf(line, "MIRROR: %s", str);
      |                                 ^~
......
17354 |                      mprint(lbs, mode, str);
      |                                        ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 2008 bytes into a 
destination of size 1000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16733:33: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 992 [-Wformat-overflow=]
16733 |          sprintf(line, "MIRROR: %s", str);
      |                                 ^~
......
17350 |                         mprint(lbs, mode, str);
      |                                           ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 2008 bytes into a 
destination of size 1000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:16733:33: warning: ‘%s’ directive writing up to 1999 bytes into a region of size 992 [-Wformat-overflow=]
16733 |          sprintf(line, "MIRROR: %s", str);
      |                                 ^~
......
17343 |                         mprint(lbs, mode, str);
      |                                           ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 2008 bytes into a 
destination of size 1000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘retrieve_email_from’:
src/elogd.c:3486:44: warning: ‘%s’ directive writing up to 255 bytes into a region of size 245 [-Wformat-overflow=]
 3486 |       sprintf(email_from_name, "ELog <ELog@%s>", host_name);
      |                                            ^~    ~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 13 and 268 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:3487:34: warning: ‘%s’ directive writing up to 255 bytes into a region of size 250 [-Wformat-overflow=]
 3487 |       sprintf(email_from, "<ELog@%s>", host_name);
      |                                  ^~    ~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 8 and 263 bytes into a destination 
of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:3508:38: warning: ‘ <’ directive writing 2 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
 3508 |          sprintf(email_from_name, "%s <%s>", login_name, email_from);
      |                                      ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 4 and 514 bytes into a destination 
of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘save_user_config’:
src/elogd.c:13477:40: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
13477 |                   sprintf(url, "http://%s:%d/", http_host, elog_tcp_port);
      |                                        ^~       ~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 11 and 276 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:13475:41: warning: ‘%s’ directive writing up to 255 bytes into a region of size 248 [-Wformat-overflow=]
13475 |                   sprintf(url, "https://%s:%d/", http_host, elog_tcp_port);
      |                                         ^~       ~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 12 and 277 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:13472:40: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
13472 |                   sprintf(url, "http://%s/", http_host);
      |                                        ^~    ~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 264 bytes into a destination 
of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:13470:41: warning: ‘%s’ directive writing up to 255 bytes into a region of size 248 [-Wformat-overflow=]
13470 |                   sprintf(url, "https://%s/", http_host);
      |                                         ^~    ~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 10 and 265 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘activate_user’:
src/elogd.c:14059:40: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
14059 |                   sprintf(url, "http://%s:%d/", http_host, elog_tcp_port);
      |                                        ^~       ~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 11 and 276 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:14057:41: warning: ‘%s’ directive writing up to 255 bytes into a region of size 248 [-Wformat-overflow=]
14057 |                   sprintf(url, "https://%s:%d/", http_host, elog_tcp_port);
      |                                         ^~       ~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 12 and 277 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:14054:40: warning: ‘%s’ directive writing up to 255 bytes into a region of size 249 [-Wformat-overflow=]
14054 |                   sprintf(url, "http://%s/", http_host);
      |                                        ^~    ~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 264 bytes into a destination 
of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:14052:41: warning: ‘%s’ directive writing up to 255 bytes into a region of size 248 [-Wformat-overflow=]
14052 |                   sprintf(url, "https://%s/", http_host);
      |                                         ^~    ~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 10 and 265 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_forgot_pwd_page’:
src/elogd.c:14168:44: warning: ‘%s’ directive writing up to 255 bytes into a region of size 228 [-Wformat-overflow=]
14168 |             sprintf(redir, "?cmd=%s&oldpwd=%s", loc("Change password"), pwd);
      |                                            ^~                           ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 29 and 284 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:14172:34: warning: ‘%s’ directive writing up to 999 bytes into a region of size 993 [-Wformat-overflow=]
14172 |             sprintf(str, "?redir=%s&uname=%s&upassword=%s", str2, login_name, pwd);
      |                                  ^~                         ~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 26 and 1535 bytes into a 
destination of size 1000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:14168:44: warning: ‘%s’ directive writing up to 255 bytes into a region of size 228 [-Wformat-overflow=]
14168 |             sprintf(redir, "?cmd=%s&oldpwd=%s", loc("Change password"), pwd);
      |                                            ^~                           ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 29 and 284 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:14172:34: warning: ‘%s’ directive writing up to 999 bytes into a region of size 993 [-Wformat-overflow=]
14172 |             sprintf(str, "?redir=%s&uname=%s&upassword=%s", str2, login_name, pwd);
      |                                  ^~                         ~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 26 and 1535 bytes into a 
destination of size 1000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:14168:44: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 228 and 243 [-Wformat-overflow=]
14168 |             sprintf(redir, "?cmd=%s&oldpwd=%s", loc("Change password"), pwd);
      |                                            ^~                           ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 14 or more bytes (assuming 284) into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:14172:34: warning: ‘%s’ directive writing up to 999 bytes into a region of size 993 [-Wformat-overflow=]
14172 |             sprintf(str, "?redir=%s&uname=%s&upassword=%s", str2, login_name, pwd);
      |                                  ^~                         ~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 26 and 1535 bytes into a 
destination of size 1000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_change_pwd_page’:
src/elogd.c:8918:53: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 222 and 237 [-Wformat-overflow=]
 8918 |                sprintf(str, "?cmd=%s&config=%s&fail=%s", loc("Change password"), getparam("unm"), error_str);
      |                                                     ^~                                            ~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 20 or more bytes (assuming 290) into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:8908:47: warning: ‘%s’ directive writing up to 255 bytes into a region of size 241 [-Wformat-overflow=]
 8908 |                sprintf(str, "?cmd=%s&cfg_user=%s", loc("Config"), config);
      |                                               ^~                  ~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 16 or more bytes (assuming 271) into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_edit_form’:
src/elogd.c:10602:28: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 2993 [-Wformat-overflow=]
10602 |       sprintf(str, "Format %s", attr_list[i]);
      |                            ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 8 and 150007 bytes into a 
destination of size 3000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:10674:35: warning: ‘%s’ directive writing up to 9999 bytes into a region of size 248 [-Wformat-overflow=]
10674 |          sprintf(title, " title=\"%s\"", comment);
      |                                   ^~     ~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 10 and 10009 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11142:52: warning: ‘%s’ directive writing up to 9999 bytes into a region of size 9992 [-Wformat-overflow=]
11142 |                         sprintf(tooltip, " title=\"%s\"", comment);
      |                                                    ^~     ~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 10 and 10009 bytes into a 
destination of size 10000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11091:52: warning: ‘%s’ directive writing up to 9999 bytes into a region of size 9992 [-Wformat-overflow=]
11091 |                         sprintf(tooltip, " title=\"%s\"", comment);
      |                                                    ^~     ~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 10 and 10009 bytes into a 
destination of size 10000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11096:52: warning: ‘%s’ directive writing up to 9999 bytes into a region of size 9992 [-Wformat-overflow=]
11096 |                         sprintf(tooltip, " title=\"%s\"", comment);
      |                                                    ^~     ~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 10 and 10009 bytes into a 
destination of size 10000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11892:56: warning: ‘%s’ directive writing up to 12799 bytes into a region of size between 2727 and 2983 [-Wformat-
overflow=]
11892 |                      sprintf(str, "im('att'+'%d','%s','%s','smaller');", index, thumb_name, att[index]);
      |                                                        ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 31 and 13086 bytes into a 
destination of size 3000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11894:56: warning: ‘%s’ directive writing up to 12799 bytes into a region of size between 2727 and 2983 [-Wformat-
overflow=]
11894 |                      sprintf(str, "im('att'+'%d','%s','%s','original');", index, thumb_name, att[index]);
      |                                                        ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 32 and 13087 bytes into a 
destination of size 3000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11896:56: warning: ‘%s’ directive writing up to 12799 bytes into a region of size between 2727 and 2983 [-Wformat-
overflow=]
11896 |                      sprintf(str, "im('att'+'%d','%s','%s','larger');", index, thumb_name, att[index]);
      |                                                        ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 30 and 13085 bytes into a 
destination of size 3000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11899:56: warning: ‘%s’ directive writing up to 12799 bytes into a region of size between 2727 and 2983 [-Wformat-
overflow=]
11899 |                      sprintf(str, "im('att'+'%d','%s','%s','rotleft');", index, thumb_name, att[index]);
      |                                                        ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 31 and 13086 bytes into a 
destination of size 3000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11901:56: warning: ‘%s’ directive writing up to 12799 bytes into a region of size between 2727 and 2983 [-Wformat-
overflow=]
11901 |                      sprintf(str, "im('att'+'%d','%s','%s','rotright');", index, thumb_name, att[index]);
      |                                                        ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 32 and 13087 bytes into a 
destination of size 3000
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11915:41: warning: ‘ -format '’ directive writing 10 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
11915 |                         sprintf(cmd, "%s -format '%%wx%%h' '%s'", _identify_cmd, file_name);
      |                                         ^~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 20 and 530 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11913:41: warning: ‘ -format '’ directive writing 10 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
11913 |                         sprintf(cmd, "%s -format '%%wx%%h' '%s[0]'", _identify_cmd, file_name);
      |                                         ^~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 23 and 533 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11982:42: warning: ‘%s’ directive writing up to 2999 bytes into a region of size 256 [-Wformat-overflow=]
11982 |                            sprintf(ref, "%s/%s", str, file_enc);
      |                                          ^~      ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 2 and 3256 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11967:48: warning: ‘%s’ directive writing up to 2999 bytes into a region of size 256 [-Wformat-overflow=]
11967 |                                  sprintf(ref, "%s/%s?thumb=1", str, file_enc);
      |                                                ^~              ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 10 and 3264 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:11949:42: warning: ‘%s’ directive writing up to 2999 bytes into a region of size 256 [-Wformat-overflow=]
11949 |                            sprintf(ref, "%s/%s?thumb=1", str, file_enc);
      |                                          ^~              ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 10 and 3264 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_elog_list’:
src/elogd.c:20037:27: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 253 [-Wformat-overflow=]
20037 |          sprintf(ref, "-- %s --", attr_list[i]);
      |                           ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 7 and 150006 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:20121:39: warning: ‘%s’ directive writing up to 79 bytes into a region of size 73 [-Wformat-overflow=]
20121 |          sprintf(mode_cookie, "elmode=%s", mode);
      |                                       ^~   ~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 8 and 87 bytes into a destination 
of size 80
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:20354:27: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 1500 [-Wformat-overflow=]
20354 |             sprintf(str, "%s_%d", attr_list[i], j);
      |                           ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 3 and 150012 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:20364:27: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 1500 [-Wformat-overflow=]
20364 |             sprintf(str, "%s_%d", attr_list[i], j);
      |                           ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 3 and 150012 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:21243:35: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 256 [-Wformat-overflow=]
21243 |                   sprintf(iattr, "%s_%d", attr_list[i], j);
      |                                   ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 3 and 150012 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:21182:35: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 256 [-Wformat-overflow=]
21182 |                   sprintf(iattr, "%s_%d", attr_list[i], j);
      |                                   ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 3 and 150012 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:21454:43: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 249 [-Wformat-overflow=]
21454 |                      sprintf(ref, "?rsort=%s", str);
      |                                           ^~   ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 8 and 1507 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:21456:42: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 250 [-Wformat-overflow=]
21456 |                      sprintf(ref, "?sort=%s", str);
      |                                          ^~   ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 7 and 1506 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:21470:35: warning: ‘%s’ directive writing up to 155999 bytes into a region of size 1492 [-Wformat-overflow=]
21470 |             sprintf(str, "Tooltip %s", disp_attr[i]);
      |                                   ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 156008 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:21472:38: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 1493 [-Wformat-overflow=]
21472 |                sprintf(str, "title=\"%s\"", comment);
      |                                      ^~     ~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 9 and 1508 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:21646:42: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 1488 [-Wformat-overflow=]
21646 |                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.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 13 and 150012 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:21630:42: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 1488 [-Wformat-overflow=]
21630 |                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.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 13 and 150012 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:19968:31: warning: ‘3D’ directive writing 2 bytes into a region of size between 0 and 1499 [-Wformat-overflow=]
19968 |             sprintf(str, "%s%%3D", param);
      |                               ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 4 and 1503 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:19945:31: warning: ‘3D’ directive writing 2 bytes into a region of size between 0 and 1499 [-Wformat-overflow=]
19945 |             sprintf(str, "%s%%3D", param);
      |                               ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 4 and 1503 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_elog_entry’:
src/elogd.c:25162:33: warning: ‘%s’ directive writing up to 2999 bytes into a region of size 256 [-Wformat-overflow=]
25162 |                   sprintf(ref, "%s/%s", str, file_enc);
      |                                 ^~      ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 2 and 3256 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:25156:43: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 246 and 247 [-Wformat-overflow=]
25156 |                   sprintf(ref, "cid:att%d@%s", index, domain);
      |                                           ^~          ~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 10 and 266 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘compose_email’:
src/elogd.c:22504:18: warning: ‘%s’ directive writing up to 1599 bytes into a region of size 256 [-Wformat-overflow=]
22504 |    sprintf(url, "%s%d", str, message_id);
      |                  ^~     ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 2 and 1611 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘submit_elog’:
src/elogd.c:22983:33: warning: ‘%d’ directive writing between 1 and 2 bytes into a region of size between 0 and 1499 [-Wformat-
overflow=]
22983 |                sprintf(str, "%s_%d", ua, j);
      |                                 ^~
src/elogd.c:22983:29: note: directive argument in the range [0, 99]
22983 |                sprintf(str, "%s_%d", ua, j);
      |                             ^~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 3 and 1503 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:23144:33: warning: ‘%d’ directive writing between 1 and 2 bytes into a region of size between 0 and 1499 [-Wformat-
overflow=]
23144 |                sprintf(str, "%s_%d", ua, j);
      |                                 ^~
src/elogd.c:23144:29: note: directive argument in the range [0, 99]
23144 |                sprintf(str, "%s_%d", ua, j);
      |                             ^~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 3 and 1503 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:23275:30: warning: ‘%s’ directive writing up to 149999 bytes into a region of size 1494 [-Wformat-overflow=]
23275 |          sprintf(str, "Subst %s", attr_list[index]);
      |                              ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 7 and 150006 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:23523:34: warning: ‘%d’ directive writing between 1 and 10 bytes into a region of size between 0 and 1499 [-Wformat-
overflow=]
23523 |                sprintf(str2, "%s_%d", ua, mindex);
      |                                  ^~
src/elogd.c:23523:30: note: directive argument in the range [0, 2147483647]
23523 |                sprintf(str2, "%s_%d", ua, mindex);
      |                              ^~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 3 and 1511 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘do_self_register’:
src/elogd.c:26778:27: warning: ‘%s’ directive writing up to 255 bytes into a region of size 253 [-Wformat-overflow=]
26778 |          sprintf(str, "../%s/", lbs->name_enc);
      |                           ^~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 5 and 260 bytes into a destination 
of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘show_uploader_finished’:
src/elogd.c:27015:24: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 0 and 255 [-Wformat-overflow=]
27015 |       sprintf(ref, "%s/%s?lb=%s", str, file_enc, lbs->name_enc);
      |                        ^~              ~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 6 and 771 bytes into a destination 
of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:27016:30: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 0 and 255 [-Wformat-overflow=]
27016 |       sprintf(ref_thumb, "%s/%s?lb=%s&thumb=1", str, file_enc, lbs->name_enc);
      |                              ^~                      ~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 14 and 779 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘interprete’:
src/elogd.c:28286:27: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 1495 [-Wformat-overflow=]
28286 |       sprintf(str1, "?cmd=%s", str);
      |                           ^~   ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 6 and 1505 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:28290:27: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 1495 [-Wformat-overflow=]
28290 |       sprintf(str2, "?cmd=%s", str);
      |                           ^~   ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 6 and 1505 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:28075:31: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 1495 [-Wformat-overflow=]
28075 |          sprintf(str, "%s: <b>%s</b>", loc("Invalid URL"), str2);
      |                               ^~                           ~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 10 or more bytes (assuming 1509) into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c:27535:28: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 1495 [-Wformat-overflow=]
27535 |       sprintf(str, "%s: <b>%s</b>", loc("Invalid URL"), str2);
      |                            ^~                           ~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 10 or more bytes (assuming 1509) into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: In function ‘decode_post’:
src/elogd.c:28521:54: warning: ‘%s’ directive writing up to 1499 bytes into a region of size 1483 [-Wformat-overflow=]
28521 |                      sprintf(str, "Error: Filename \"%s\" contains invalid character", str2);
      |                                                      ^~                                ~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elogd.h:42,
                 from src/elogd.c:38:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 46 and 1545 bytes into a 
destination of size 1500
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elogd.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-unused-results’
gcc -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-results -Imxml -DHAVE_SSL -o elconv 
src/elconv.c -lssl
src/elconv.c: In function ‘el_submit’:
src/elconv.c:635:19: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
  635 |                   write(fh, buffer[index], buffer_size[index]);
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:662:7: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
  662 |       read(fh, str, 16);
      |       ^~~~~~~~~~~~~~~~~
src/elconv.c:664:7: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
  664 |       read(fh, message, size);
      |       ^~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:772:4: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
  772 |    write(fh, start_str, strlen(start_str));
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:773:4: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
  773 |    write(fh, message, strlen(message));
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:774:4: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
  774 |    write(fh, end_str, strlen(end_str));
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:786:7: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
  786 |       ftruncate(fh, TELL(fh));
      |       ^~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:801:13: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
  801 |             read(fh, str, 16);
      |             ^~~~~~~~~~~~~~~~~
src/elconv.c:807:16: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
  807 |                write(fh, str, 16);
      |                ^~~~~~~~~~~~~~~~~~
src/elconv.c: In function ‘el_get_v1’:
src/elconv.c:881:4: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
  881 |    read(fh, message, size);
      |    ^~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c: In function ‘scan_messages’:
src/elconv.c:914:4: warning: ignoring return value of ‘getcwd’, declared with attribute warn_unused_result [-Wunused-result]
  914 |    getcwd(str, sizeof(str));
      |    ^~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:1003:7: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
 1003 |       write(fh, str, strlen(str));
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:1014:13: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
 1014 |             write(fh, str, strlen(str));
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:1026:13: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
 1026 |             write(fh, str, strlen(str));
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:1036:7: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
 1036 |       write(fh, message, strlen(message));
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c: In function ‘main’:
src/elconv.c:1071:4: warning: ignoring return value of ‘getcwd’, declared with attribute warn_unused_result [-Wunused-result]
 1071 |    getcwd(data_dir, sizeof(data_dir));
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/string.h:495,
                 from src/elconv.c:32:
In function ‘strncpy’,
    inlined from ‘ss_file_find’ at src/elconv.c:233:10:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ output truncated before terminating nul 
copying as many bytes from a string as 
its length [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c: In function ‘ss_file_find’:
src/elconv.c:233:10: note: length computed here
  233 |          strncpy(*plist + (i * MAX_PATH_LENGTH), dp->d_name, strlen(dp->d_name));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c: In function ‘el_search_message’:
src/elconv.c:325:32: warning: ‘%02d’ directive writing between 2 and 3 bytes into a region of size between 1 and 256 [-Wformat-
overflow=]
  325 |          sprintf(file_name, "%s%02d%02d%02d.log", dir, tms->tm_year % 100, tms->tm_mon + 1, tms->tm_mday);
      |                                ^~~~
src/elconv.c:325:29: note: directive argument in the range [-99, 99]
  325 |          sprintf(file_name, "%s%02d%02d%02d.log", dir, tms->tm_year % 100, tms->tm_mon + 1, tms->tm_mday);
      |                             ^~~~~~~~~~~~~~~~~~~~
src/elconv.c:325:29: note: directive argument in the range [-2147483647, 2147483647]
In file included from /usr/include/stdio.h:867,
                 from src/elconv.c:28:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 11 and 285 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:419:32: warning: ‘%06d’ directive writing 6 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
  419 |          sprintf(file_name, "%s%06d.log", dir, max % 1000000);
      |                                ^~~~
src/elconv.c:419:29: note: directive argument in the range [0, 999999]
  419 |          sprintf(file_name, "%s%06d.log", dir, max % 1000000);
      |                             ^~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elconv.c:28:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 11 and 266 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:388:32: warning: ‘%06d’ directive writing between 6 and 7 bytes into a region of size between 1 and 256 [-Wformat-
overflow=]
  388 |          sprintf(file_name, "%s%06d.log", dir, min % 1000000);
      |                                ^~~~
src/elconv.c:388:29: note: directive argument in the range [-999999, 999999]
  388 |          sprintf(file_name, "%s%06d.log", dir, min % 1000000);
      |                             ^~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from src/elconv.c:28:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 11 and 267 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c: In function ‘el_submit’:
src/elconv.c:626:38: warning: ‘%02d’ directive writing between 2 and 3 bytes into a region of size between 1 and 256 [-Wformat-
overflow=]
  626 |                sprintf(file_name, "%s%02d%02d%02d_%02d%02d%02d_%s", dir,
      |                                      ^~~~
src/elconv.c:626:35: note: directive argument in the range [-99, 99]
  626 |                sprintf(file_name, "%s%02d%02d%02d_%02d%02d%02d_%s", dir,
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:626:35: note: directive argument in the range [-2147483647, 2147483647]
In file included from /usr/include/stdio.h:867,
                 from src/elconv.c:28:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 15 and 571 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:690:29: warning: ‘%02d’ directive writing between 2 and 3 bytes into a region of size between 1 and 256 [-Wformat-
overflow=]
  690 |       sprintf(file_name, "%s%02d%02d%02d.log", dir, tms->tm_year % 100, tms->tm_mon + 1, tms->tm_mday);
      |                             ^~~~
src/elconv.c:690:26: note: directive argument in the range [-99, 99]
  690 |       sprintf(file_name, "%s%02d%02d%02d.log", dir, tms->tm_year % 100, tms->tm_mon + 1, tms->tm_mday);
      |                          ^~~~~~~~~~~~~~~~~~~~
src/elconv.c:690:26: note: directive argument in the range [-2147483647, 2147483647]
In file included from /usr/include/stdio.h:867,
                 from src/elconv.c:28:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 11 and 285 bytes into a 
destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c:656:29: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
  656 |       sprintf(file_name, "%s%s.log", dir, str);
      |                             ^~            ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elconv.c:28:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 5 and 515 bytes into a destination 
of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c: In function ‘scan_messages’:
src/elconv.c:981:29: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
  981 |       sprintf(file_name, "%s%sa.log", data_dir, str);
      |                             ^~                  ~~~
In file included from /usr/include/stdio.h:867,
                 from src/elconv.c:28:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 6 and 516 bytes into a destination 
of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/elconv.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-unused-results’
darkside@daq00:~/packages/elog$      
  69478   Wed Feb 16 22:24:18 2022 Warning Laurent Jean-Rigaudlollspam@free.frBug reportLinuxTrunkelog c++ and LDAP

Hi Stefan,

I've seen that ELOG is build now with gcc-c++ now, so i tried to check rpmbuild script with all options. It seems that ldap api is different with c++ (quick search : https://www.openldap.org/lists/openldap-software/200706/msg00177.html) and elogd can not been build anymore with ldap support. :-(

# make
c++ -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -DHAVE_KRB5 -DHAVE_LDAP -DHAVE_PAM -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 -DHAVE_KRB5 -DHAVE_LDAP -DHAVE_PAM -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 -DHAVE_KRB5 -DHAVE_LDAP -DHAVE_PAM -c -o strlcpy.o mxml/strlcpy.cxx
c++ -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -DHAVE_KRB5 -DHAVE_LDAP -DHAVE_PAM -o elog src/elog.cxx mxml.o crypt.o strlcpy.o -lssl -lkrb5 -lldap -llber -lpam -llber
c++ -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -DHAVE_KRB5 -DHAVE_LDAP -DHAVE_PAM -w -c -o auth.o src/auth.cxx
src/auth.cxx: In function ‘int auth_verify_password_ldap(LOGBOOK*, const char*, const char*, char*, int)’:
src/auth.cxx:283:60: erreur: ‘ldap_simple_bind_s’ was not declared in this scope
    bind = ldap_simple_bind_s(ldap_ld, ldap_bindDN, password);
                                                            ^
src/auth.cxx:290:26: erreur: ‘ldap_unbind’ was not declared in this scope
       ldap_unbind(ldap_ld);
                          ^
src/auth.cxx:295:23: erreur: ‘ldap_unbind’ was not declared in this scope
    ldap_unbind(ldap_ld);
                       ^
src/auth.cxx: In function ‘int ldap_adduser_file(LOGBOOK*, const char*, const char*, char*, int)’:
src/auth.cxx:323:60: erreur: ‘ldap_simple_bind_s’ was not declared in this scope
    bind = ldap_simple_bind_s(ldap_ld, ldap_bindDN, password);
                                                            ^
src/auth.cxx:330:26: erreur: ‘ldap_unbind’ was not declared in this scope
       ldap_unbind(ldap_ld);
                          ^
src/auth.cxx:358:26: erreur: ‘ldap_unbind’ was not declared in this scope
       ldap_unbind(ldap_ld);
                          ^
src/auth.cxx:369:62: erreur: ‘ldap_get_values’ was not declared in this scope
          if((values = ldap_get_values(ldap_ld,entry,attribute)) != NULL ) {
                                                              ^
src/auth.cxx:378:35: erreur: ‘ldap_value_free’ was not declared in this scope
             ldap_value_free(values);
                                   ^
src/auth.cxx:386:23: erreur: ‘ldap_unbind’ was not declared in this scope
    ldap_unbind(ldap_ld);
                       ^
src/auth.cxx: In function ‘int elog_conv(int, const pam_message**, pam_response**, void*)’:
src/auth.cxx:451:59: erreur: invalid conversion from ‘void*’ to ‘pam_response*’ [-fpermissive]
    if((*resp = calloc(num_msg, sizeof(struct pam_response))) == NULL)
                                                           ^
src/auth.cxx:456:33: erreur: invalid conversion from ‘void*’ to ‘const char*’ [-fpermissive]
    if(!(resptok = strdup(my_data))) {
                                 ^
In file included from src/elogd.h:46:0,
                 from src/auth.cxx:30:
/usr/include/string.h:172:14: erreur:   initializing argument 1 of ‘char* strdup(const char*)’ [-fpermissive]
 extern char *strdup (const char *__s)
              ^
src/auth.cxx: In function ‘int auth_verify_password(LOGBOOK*, const char*, const char*, char*, int)’:
src/auth.cxx:593:73: erreur: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
          if (get_user_line(lbs, user, NULL, NULL, NULL, NULL, NULL, NULL) == 2) {
                                                                         ^
In file included from src/auth.cxx:30:0:
src/elogd.h:282:5: erreur:   initializing argument 2 of ‘int get_user_line(LOGBOOK*, char*, char*, char*, char*, BOOL*, time_t*, int*)’ [-fpermissive]
 int get_user_line(LOGBOOK * lbs, char *user, char *password, char *full_name, char *email,
     ^
make: *** [auth.o] Erreur 1
 

Regards,

Laurent

  69498   Fri Mar 18 00:36:37 2022 Warning Konstantin Olchanskiolchansk@triumf.caBug reportLinuxELOG V3.1.4-2e1http status 200 returned for "file not found"
"file not found" should return http code 404. elogd returns code 200 together
with a page containing text "404 not found". This pollutes the browser cache
with wrong content (in this case, we are trying to load a css file, and the browser
is trying to use text "404 not found" as if it were a css. bad. file not found
should return http code 404. K.O.

in example below, response "HTTP/1.1 200 Document follows" should be "HTTP/1.1 404 ..."

to reproduce, through the https proxy:

daq00:~$ curl -v https://daq00.triumf.ca/elog-midas/Midas/zzz.css
*   Trying 142.90.111.168:443...
...
> GET /elog-midas/Midas/zzz.css HTTP/1.1
...
< HTTP/1.1 200 Document follows
< Date: Thu, 17 Mar 2022 23:40:04 GMT
< Server: ELOG HTTP 3.1.4-2e1708b5
< Strict-Transport-Security: max-age=31536000; includeSubDomains
< Content-Type: text/html;charset=ISO-8859-1
< Vary: Accept-Encoding
< Transfer-Encoding: chunked
< 
<!DOCTYPE html>
<html><head>
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
<title>404 Not Found</title>
<link rel="stylesheet" type="text/css" href="elog.css">
<link rel="shortcut icon" href="favicon.ico" />
<link rel="icon" href="favicon.png" type="image/png" />
</head>
<body><h1>404 Not Found</h1>
The requested file <b>zzz.css</b> was not found on this server<p>
* Connection #0 to host daq00.triumf.ca left intact
daq00:~$ 

directly:

daq00:~$ curl -v http://localhost:9080/Midas/zzz.css
*   Trying 127.0.0.1:9080...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 9080 (#0)
> GET /Midas/zzz.css HTTP/1.1
> Host: localhost:9080
> User-Agent: curl/7.68.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 Document follows
< Server: ELOG HTTP 3.1.4-2e1708b5
< Content-Type: text/html;charset=ISO-8859-1
< Connection: Close
< 
<!DOCTYPE html>
<html><head>
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
<title>404 Not Found</title>
<link rel="stylesheet" type="text/css" href="elog.css">
<link rel="shortcut icon" href="favicon.ico" />
<link rel="icon" href="favicon.png" type="image/png" />
</head>
<body><h1>404 Not Found</h1>
The requested file <b>zzz.css</b> was not found on this server<p>
* Closing connection 0
daq00:~$ 
ELOG V3.1.5-fe60aaf