Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 15 of 238  Not logged in ELOG logo
icon5.gif   Removal of ID and Date attributes, posted by James Darrow on Sun Mar 13 21:20:56 2022 Screenshot_from_2022-03-13_15-31-40.png

Hello all,

I just found elog which is a great piece  of software! I'm implementing it for use to log my shortwave listening contacts. The problem that I have is I'm moving over a current log to elog which already has a date of when the record was created, which is important.I renamed the old date to day to upload the log into elog. My problem is I don't need to see elog's ID# or date/time stamp of when the log was created seeing it's already in my data. My question is, is there any way to not show elog's ID# and date/time stamp or would I need to create a tab and if so could someone provide a config file where I could see how the tab was implemented. I've attached a screenshot of what it looks like so far. I've implemented the dark theme (which I like) that Anthoney had posted in the contibutions section.

Thanks in advance!

Jim

    icon2.gif   Re: Removal of ID and Date attributes, posted by Stefan Ritt on Mon Mar 14 08:49:44 2022 

Use the configuration option

List display = Day, Station Type, Start time UTC, ...

as written in the documentation.

Best,
Stefan

James Darrow wrote:

Hello all,

I just found elog which is a great piece  of software! I'm implementing it for use to log my shortwave listening contacts. The problem that I have is I'm moving over a current log to elog which already has a date of when the record was created, which is important.I renamed the old date to day to upload the log into elog. My problem is I don't need to see elog's ID# or date/time stamp of when the log was created seeing it's already in my data. My question is, is there any way to not show elog's ID# and date/time stamp or would I need to create a tab and if so could someone provide a config file where I could see how the tab was implemented. I've attached a screenshot of what it looks like so far. I've implemented the dark theme (which I like) that Anthoney had posted in the contibutions section.

Thanks in advance!

Jim

 

       icon2.gif   Re: Removal of ID and Date attributes, posted by James Darrow on Mon Mar 14 18:45:14 2022 

That worked! Thanks Stefan

Stefan Ritt wrote:

Use the configuration option

List display = Day, Station Type, Start time UTC, ...

as written in the documentation.

Best,
Stefan

James Darrow wrote:

Hello all,

I just found elog which is a great piece  of software! I'm implementing it for use to log my shortwave listening contacts. The problem that I have is I'm moving over a current log to elog which already has a date of when the record was created, which is important.I renamed the old date to day to upload the log into elog. My problem is I don't need to see elog's ID# or date/time stamp of when the log was created seeing it's already in my data. My question is, is there any way to not show elog's ID# and date/time stamp or would I need to create a tab and if so could someone provide a config file where I could see how the tab was implemented. I've attached a screenshot of what it looks like so far. I've implemented the dark theme (which I like) that Anthoney had posted in the contibutions section.

Thanks in advance!

Jim

 

 

icon5.gif   Use different HTML class for drafts compared to not existing entries, posted by Edmund Hertle on Wed Mar 9 16:25:31 2022 

Right now a Draft shows a red error indication, that the entry is currently a draft. For the CSS styling it uses the HTML class="errormsg". The same class is also used if an entry does not exist.

Would it be possible for the draft version to use a different HTML class (for example class="draftmsg")? It can also use the same visual style (or making it yellow would probably also work)

The reason is that the py_elog Interface uses the class="errormsg" to determine if an entry does not exist ( https://github.com/paulscherrerinstitute/py_elog/blob/master/elog/logbook.py#L394 ) and refuses to return the content for this entry. One could possibly fix that also on the py_elog part, but it would probably at least require parsing of actual text (which might make problems for translated pages). Alternativley one could also look for the edit button, but maybe a small change on the elog server side is the simplest solution to this problem?

 

icon1.gif   Invalid activation code, posted by Konstantin Olchanski on Wed Mar 2 18:29:08 2022 
Something is not right with the elog account activation, I get the email
for "Registration request for ELOG logbook "haicu"", but when I follow the given URL,
I get "Invalid activation code". Account activation requests go to two people,
so maybe the other one already activate this user, in which case I expect a message "user already active".
When I check the elog config, I see that the user indeed is already active. And if I rerun
this URL I still get "Invalid activation code", and this time I definitely expect "user already active".

https://daq00.triumf.ca/elog-haicu/haicu/?cmd=Activate&new_user_name=fujiwara&code=-1904103410&unm=Olchansk

K.O.
    icon2.gif   Re: Invalid activation code, posted by Konstantin Olchanski on Wed Mar 2 23:15:11 2022 
> Something is not right with the elog account activation...

I did a test:
- register as new user "test", web page says "request for approval sent..." (good)
- check elog config, user "test" is present, "active" set to "no" (good)
- open the "approve/activate" URL, get "Invalid activation code" (should say: "activated successfully!")
- check elog config, user "test" now has "active" set to "yes" (good, "approve/activate" URL worked)
- open the "approve/activate" URL again, again "Invalid activation code" (should say: "already activated!")

additional test:
- from the elog config, user "test", set active to "no", save.
- open the "approve/activate" URL, get "Invalid activation code" (good, this time)
- check elog config, user "test" is still inactive (good)

So it looks like the "approve/activate" URL works correctly - only the first time it is accessed - but
returns wrong message "invalid activation code" instead of "success".

K.O.
 
icon1.gif   login cookie confusion, posted by Konstantin Olchanski on Wed Mar 2 18:35:48 2022 
we had an elog with only one logbook and one password file,
we added a second logbook with a second password file and everything broke.

specifically, login to the original logbook stopped working,
username and password is accepted, elog.log says "user accepted", but I am presented
with the login dialog again, ad infinitum, and cannot access the elog.

solution seems to be to "delete all cookies" (which is excessive,
google chrome wants to delete all cookies for *.triumf.ca,
which will log me out from everywhere I am logged in and probably
erase/reset web site preferences everywhere).

manually deleting just the elog session cookie also seems to work, though.

this suggests that there is a bug in elog, where on successful login,
it fails to create a new authentication cookie, but reuses an old
cookie, which is no longer valid, for whatever reason (that would
be a different bug, why adding one more logbook invalidates
existing logins?).

K.O.
icon4.gif   elog c++ and LDAP, posted by Laurent Jean-Rigaud on Wed Feb 16 22:24:18 2022 

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

icon4.gif   make all messages on ubuntu LTS 20.04.03, posted by Konstantin Olchanski on Tue Feb 8 00:52:47 2022 
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$      
    icon2.gif   Re: make all messages on ubuntu LTS 20.04.03, posted by Stefan Ritt on Tue Feb 8 09:14:25 2022 
> /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

Yeah, I like those warnings "up to 4097 bytes written to a buffer of 4096 bytes". And it's even not a security issue, since the source of the data comes from elogd.cfg which only the owner can modify.

Basically this calls to rewrite elog completely with std::string. Maybe one day I retire and have some time for that...

Stefan
       icon2.gif   Re: make all messages on ubuntu LTS 20.04.03, posted by Stefan Ritt on Tue Feb 15 13:45:02 2022 
Well, I bit the bullet and fixed all of these warnings. Took me like two days of work, but now should be fine. You might want to test it again. I only have gcc 9.2.0, there it compiles now without warning.

Stefan
          icon2.gif   Re: make all messages on ubuntu LTS 20.04.03, posted by Konstantin Olchanski on Tue Feb 15 20:55:02 2022 
> Well, I bit the bullet and fixed all of these warnings. Took me like two days of work, but now should be fine.
> You might want to test it again.

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

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

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

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

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



daq00:elog$ gcc -v
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04) 
             icon2.gif   Re: make all messages on ubuntu LTS 20.04.03, posted by Stefan Ritt on Wed Feb 16 08:45:15 2022 
I fixed these as well, please have a look again. BTW, midas had a few of these as well.

Stefan
                icon2.gif   Re: make all messages on ubuntu LTS 20.04.03, posted by Konstantin Olchanski on Wed Feb 16 20:01:17 2022 
> I fixed these as well, please have a look again. BTW, midas had a few of these as well.

confirmed. elog commit d828aa58305ee8ce2ae882c0ff3c34cfa66650e5

K.O.
icon1.gif   ELOG problems with certificates, posted by Ezio Zanghellini on Thu Feb 10 19:03:56 2022 

Recently I have had problems with ELOG not accepting the certificates (in this case from https://letsencrypt.org/) probably due to the old version of the SSL library of the binary distribution for Windows.
I have tried to follow the instructions to set up ELOG to work with Apache but they are probably old.
I have a simple solution for the Apache installation of XAMPP, the example is for two separate logbooks using each its own ELOG service on the same server:

1. I have set up the two ELOG to run as http://my.server.example.com:8080/ and as http://my.server.example.com:8081/

2. in c:\xampp\apache\conf\httpd.conf I have enabled the following (I am not sure if all the modules are really needed but this works for me):

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule headers_module modules/mod_headers.so
LoadModule proxy_html_module modules/mod_proxy_html.so
LoadModule xml2enc_module modules/mod_xml2enc.so

3. still in c:\xampp\apache\conf\httpd.conf, at the very end of the file I added the following:

ProxyRequests off

Redirect permanent /app1 https://my.server.example.com/app1/
ProxyPass /app1/ http://my.server.example.com:8080/
ProxyHTMLURLMap http://my.server.example.com:8080 /app1

Redirect permanent /app2 https://my.server.example.com/app2/
ProxyPass /app2/ http://my.server.example.com:8081/
ProxyHTMLURLMap http://my.server.example.com:8081 /app2

This way I can now connect to the two ELOG using https://my.server.example.com/app1/ and https://my.server.example.com/app2/ without troubles and no additional setting to either the configuration files of ELOG nor any need for virtual hosts, ...

I hope this might be of use.

icon1.gif   "New User" option does not work when Authentication=Webserver, posted by Jan Just Keijser on Fri May 29 09:27:32 2020 

Our setup uses "Authentication=Webserver" + no automatic user registration. Thus, logbook admins should add a user by clicking "Config"  and then "New user". However, no matter what they fill in in the "new user " dialog, as soon as they hit "Save" an error pops up saying that their username (the admin one, not the new one) already exists. I found the following code:

int save_user_config(LOGBOOK * lbs, char *user, BOOL new_user)
{
   char file_name[256], str[256], *pl, user_enc[256], new_pwd[80], new_pwd2[80], smtp_host[256],
       email_addr[256], mail_from[256], mail_from_name[256], subject[256], mail_text[2000], str2[256],
       admin_user[80], url[256], error[2000], sid[32];
   int i, self_register, code, first_user;
   PMXML_NODE node, subnode, npwd; 

   /* if we outsourced the authentication, use external username */
   getcfg(lbs->name, "Authentication", str, sizeof(str));
   if (stristr(str, "Webserver")) {
      /* do not allow HTML in user name */
      strencode2(user_enc, http_user, sizeof(user_enc));
   } else {
      strencode2(user_enc, user, sizeof(user_enc));
   }

 

which seems to be the culprit:  the admin user is logged using his/her Webserver (http_user) credentials and this overrides anything that he/she might fill in.  If I remove the "Authentication" check then I can create a new user without problems.  So, how to fix this? should the "Authentication=Webserver" check be extended with a self/auto registration check?

 

    icon2.gif   Re: "New User" option does not work when Authentication=Webserver, posted by Stefan Ritt on Tue Aug 4 13:29:23 2020 

Unfortunately I locallly don't have Webserver authentication, so I cannot check or debug. If you send me a diff that works for you, I'm happy to incorporate it.

Stefan

Jan Just Keijser wrote:

Our setup uses "Authentication=Webserver" + no automatic user registration. Thus, logbook admins should add a user by clicking "Config"  and then "New user". However, no matter what they fill in in the "new user " dialog, as soon as they hit "Save" an error pops up saying that their username (the admin one, not the new one) already exists. I found the following code:

int save_user_config(LOGBOOK * lbs, char *user, BOOL new_user)
{
   char file_name[256], str[256], *pl, user_enc[256], new_pwd[80], new_pwd2[80], smtp_host[256],
       email_addr[256], mail_from[256], mail_from_name[256], subject[256], mail_text[2000], str2[256],
       admin_user[80], url[256], error[2000], sid[32];
   int i, self_register, code, first_user;
   PMXML_NODE node, subnode, npwd; 

   /* if we outsourced the authentication, use external username */
   getcfg(lbs->name, "Authentication", str, sizeof(str));
   if (stristr(str, "Webserver")) {
      /* do not allow HTML in user name */
      strencode2(user_enc, http_user, sizeof(user_enc));
   } else {
      strencode2(user_enc, user, sizeof(user_enc));
   }

 

which seems to be the culprit:  the admin user is logged using his/her Webserver (http_user) credentials and this overrides anything that he/she might fill in.  If I remove the "Authentication" check then I can create a new user without problems.  So, how to fix this? should the "Authentication=Webserver" check be extended with a self/auto registration check?

 

 

       icon2.gif   Re: "New User" option does not work when Authentication=Webserver, posted by Jan Just Keijser on Wed Aug 18 09:05:51 2021 elog-webauth.patch

here's the patch that I use to enable  use creation and deletion in combination with Webserver authentication.

The idea behind the patch is that if the user logged in via  "http_user" is an elog admin, then {s}he is allowed to save a random user configuration, including creating or deleting a user.

Stefan Ritt wrote:

Unfortunately I locallly don't have Webserver authentication, so I cannot check or debug. If you send me a diff that works for you, I'm happy to incorporate it.

Stefan

Jan Just Keijser wrote:

Our setup uses "Authentication=Webserver" + no automatic user registration. Thus, logbook admins should add a user by clicking "Config"  and then "New user". However, no matter what they fill in in the "new user " dialog, as soon as they hit "Save" an error pops up saying that their username (the admin one, not the new one) already exists. I found the following code:

int save_user_config(LOGBOOK * lbs, char *user, BOOL new_user)
{
   char file_name[256], str[256], *pl, user_enc[256], new_pwd[80], new_pwd2[80], smtp_host[256],
       email_addr[256], mail_from[256], mail_from_name[256], subject[256], mail_text[2000], str2[256],
       admin_user[80], url[256], error[2000], sid[32];
   int i, self_register, code, first_user;
   PMXML_NODE node, subnode, npwd; 

   /* if we outsourced the authentication, use external username */
   getcfg(lbs->name, "Authentication", str, sizeof(str));
   if (stristr(str, "Webserver")) {
      /* do not allow HTML in user name */
      strencode2(user_enc, http_user, sizeof(user_enc));
   } else {
      strencode2(user_enc, user, sizeof(user_enc));
   }

 

which seems to be the culprit:  the admin user is logged using his/her Webserver (http_user) credentials and this overrides anything that he/she might fill in.  If I remove the "Authentication" check then I can create a new user without problems.  So, how to fix this? should the "Authentication=Webserver" check be extended with a self/auto registration check?

 

 

 

          icon2.gif   Re: "New User" option does not work when Authentication=Webserver, posted by Stefan Ritt on Thu Feb 10 17:32:42 2022 

Thanks for your patch, I committed it.

Stefan

ELOG V3.1.5-3fb85fa6