Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 722 of 796  Not logged in ELOG logo
New entries since:Thu Jan 1 01:00:00 1970
ID Date Icondown Author Author Email Category OS ELOG Version Subject
  69590   Fri Dec 2 14:44:46 2022 Idea Laurent Jean-Rigaudlollspam@free.frBug reportLinux3.14 EL7 EPELRe: custom css not loaded

Update : i tryed with last git, w/o ldap support and it seems the problem is solved with CCS URL on same machine (just replace the elogd binary from EPEL by new one just build w/o LDAP support and fallback on File to login for testing).

So my problem is the error during build with LDAP auth (since using C++) :-(

...

+ cd elog-3-14
+ make USE_SSL=1 USE_LDAP=1 USE_KRB5=1 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml'
c++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -DHAVE_KRB5 -DHAVE_LDAP -c -o mxml.o mxml/mxml.cxx
c++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -DHAVE_KRB5 -DHAVE_LDAP -w -c -o crypt.o src/crypt.cxx
c++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -DHAVE_KRB5 -DHAVE_LDAP -c -o strlcpy.o mxml/strlcpy.cxx
c++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -DHAVE_KRB5 -DHAVE_LDAP -o elog src/elog.cxx mxml.o crypt.o strlcpy.o -lssl -lkrb5 -lldap -llber
c++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -DHAVE_KRB5 -DHAVE_LDAP -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: error: '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: error: 'ldap_unbind' was not declared in this scope
       ldap_unbind(ldap_ld);
                          ^
src/auth.cxx:295:23: error: '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: error: '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: error: 'ldap_unbind' was not declared in this scope
       ldap_unbind(ldap_ld);
                          ^
src/auth.cxx:358:26: error: 'ldap_unbind' was not declared in this scope
       ldap_unbind(ldap_ld);
                          ^
src/auth.cxx:369:62: error: 'ldap_get_values' was not declared in this scope
          if((values = ldap_get_values(ldap_ld,entry,attribute)) != NULL ) {
                                                              ^
src/auth.cxx:378:35: error: 'ldap_value_free' was not declared in this scope
             ldap_value_free(values);
                                   ^
src/auth.cxx:386:23: error: 'ldap_unbind' was not declared in this scope
    ldap_unbind(ldap_ld);
                       ^
src/auth.cxx: In function 'int auth_verify_password(LOGBOOK*, const char*, const char*, char*, int)':
src/auth.cxx:593:73: error: 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: error:   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] Error 1
error: Bad exit status from /home/il/jeanrigaudl/rpmbuild/tmp/rpm-tmp.cKJL45 (%build)

 

Updated :

  1. from google (https://www.openldap.org/lists/openldap-technical/201104/msg00030.html), it seems it's necessary to add before "#include ldap.h" in src/auth.cxx
#define LDAP_DEPRECATED 1
  1. A cast must be added to src/auth.cxx:593 as already done somewhere with C++ commit :

         if (get_user_line(lbs, (char *) user, NULL, NULL, NULL, NULL, NULL, NULL) == 2) {
 

-> elogd builds now with ldap :-) .

I installed elogd binary and i could login and the css url problem is gone.

 

Thanks to update auth.cxx (2 mods) and buildrpm (2 mods) in git (sorry, no pull request).

 

NB : PAM can not be activated under EL7 with same type of error. I disabled the feature as i do not use it.

 

+ cd elog-3-14
+ make USE_SSL=1 USE_PAM=1 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml'
c++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -DHAVE_PAM -c -o mxml.o mxml/mxml.cxx
c++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -DHAVE_PAM -w -c -o crypt.o src/crypt.cxx
c++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -DHAVE_PAM -c -o strlcpy.o mxml/strlcpy.cxx
c++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -DHAVE_PAM -o elog src/elog.cxx mxml.o crypt.o strlcpy.o -lssl -lpam -llber
c++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic -O3 -funroll-loops -fomit-frame-pointer -W -Wall -Wno-deprecated-declarations -Wno-unused-result -Imxml -DHAVE_SSL -DHAVE_PAM -w -c -o auth.o src/auth.cxx
src/auth.cxx: In function 'int elog_conv(int, const pam_message**, pam_response**, void*)':
src/auth.cxx:452:59: error: invalid conversion from 'void*' to 'pam_response*' [-fpermissive]
    if((*resp = calloc(num_msg, sizeof(struct pam_response))) == NULL)
                                                           ^
src/auth.cxx:457:33: error: 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: error:   initializing argument 1 of 'char* strdup(const char*)' [-fpermissive]
 extern char *strdup (const char *__s)
              ^
make: *** [auth.o] Error 1
error: Bad exit status from /home/il/jeanrigaudl/rpmbuild/tmp/rpm-tmp.V2LE4L (%build)

 

 

 

 

Laurent Jean-Rigaud wrote:

Hi,

I use some CSS for each elog to resize column correcly and it seems that current ELOG version 3.14 available from EPEL for EL7 has a problem (maybe others also).

The browser console displays an error when loading ELOG logbook page (french locale ):

La feuille de style https:/xxxxx.xxx.xx/elog/MCO/1130_171749_REUNION_20221130_Q01.jpgelog-mco.css n’a pas été chargée car son type MIME, « text/html », n’est pas « text/css ».

It seems ELOG server send the css link with enclosure path (https:/xxxxx.xxx.xx/elog/MCO/1130_171749_REUNION_20221130_Q01.jpg) + css file (elog-mco.css) ?!?

I tryed to rebuild the last source from git under EL7 but it fails with LDAP libs (C++ regression already reported in elog:forum/69478). :-(

 

Thanks for help.

Laurent

 

  69674   Sat Jun 17 22:13:01 2023 Idea Andreas Luedekeandreas.luedeke@psi.chQuestionAll3.1.3Re: Nested commands in logbook

Atrributes can only be defined once in a logbook.
But you can select which attributes are shown with the commands:

  • Show Attributes = <list>
    Attributes present in this list are shown in the single entry page. Omitting attributes can make sense for attributes which are automatically derived from other attributes via the Change <attribute> command.
  • Show Attributes Edit = <list>
    The same as Show Attributes, but for the entry form.

Those can be redifined in conditional attribute clauses.

(See https://elog.psi.ch/elog/config.html)

Leonardo Tacconi wrote:

Hi everybody,

I am trying to setup my personal ELog, defining attributes and stuff like that. I just tried to make some nested commands but I really could not achieve that. 

The idea is something like this:

Attributes = Author

Options Author = Tizio{1}, Caio{2}, Sempronio{3}

{1} Attributes = Author, Project

{1} Options Project = Proj1{a}, Proj2{b}, Proj3{c}

{a} Attributes = Author, Project, Year

{a} Options Year = 2017, 2019

Anyway, when I select Proj1 nothing really happens. So, is there any way to set up nested commands like in the reported example?

Many thanks in advance!

P.S. Is there any documentation in which are reported all the possible commands that can be used?   

 

  69757   Sat Mar 9 17:17:02 2024 Idea Andreas Warburtonandreas.warburton@mcgill.caRequestMac OSX3.1.5Suggestion to update Mac OS X instructions in ELOG Administrator's Guide

The section of the ELOG Administrator's Guide https://elog.psi.ch/elog/adminguide.html describing how to build and install ELOG on a Mac OS X system has worked well for me for several years, even though there have been warnings that the "load" and "unload" subcommands of the "launchctl" command have been deprecated for some time.  After trying my luck again on a new Mac with the latest operating system, I encountered errors of the type "Load failed: 5: Input/output error" when attempting to follow these instructions.

After a bit of searching around, I used information at the page https://www.alansiu.net/2023/11/15/launchctl-new-subcommand-basics-for-macos/ to deploy the more current subcommands as follows:

sudo launchctl enable system/ch.psi.elogd
sudo launchctl bootstrap system /Library/LaunchDaemons/ch.psi.elogd.plist 

sudo launchctl disable system/ch.psi.elogd

Once the above can be verified, perhaps the instructions in the Administrator's Guide can be updated accordingly.

 

  148   Fri Nov 1 13:33:01 2002 Entry Willem KosterW.Koster@rc.rug.nlRequest  wrapping of text in edit field
I noticed a long url got hard-wrapped when I entered a long one, I patched 
the source code. I don't know if this was done intentionally, otherwise you 
might want to change this also.

diff elogd.c elogd.c.org 
4468c4468
<     rsprintf("<textarea rows=20 cols=%d wrap=soft name=Text>", width);
---
>     rsprintf("<textarea rows=20 cols=%d wrap=hard name=Text>", width);

BTW, why is the editor window 20 rows by 76 columns ?
(20 is fixed in the source code, but 76 is the width-variable that is set 
hard to:

  /* set textarea width */
  width = 76;

Now I don't like both parameters. 20 is too long for my display (1024x768) 
and 76 is too short. Something dynamically would be cool, but a parameter 
somewhere in a config file would also be acceptable. (just a thought, makes 
it easier to upgrade)
  149   Fri Nov 1 13:39:41 2002 Entry Willem KosterW.Koster@rc.rug.nlRequest  New ELOG entry
When I make a new entry I get an email with 

   subject: New ELOG entry

But when I or someone else changes an entry I also get an email with a 

   subject: New ELOG entry

I would prefer to see "Changed" , "Edited", or "Updated". This is beyond my 
programming capabilities so I enter this request.
  209   Mon Feb 10 23:05:36 2003 Entry eric wootenwootene@verizon.netQuestion  elog notification process causes the email to be truncated when going to Blackberry
Hi Stefan,

Many users have there email forward to Blackberry devices.  Although I 
wasn't aware, it appears the Blackberry has a limit (or maybe one was set) 
of how big the message can be (still checking for that though).

Previously, a modification was made that addressed the issue of slow ELOG 
response when saving the elog entry.   I think the change was for ELOG to 
generate one email and send to all the users designated to receive the 
notification.  This caused everyone to show up as "TO" addresses.

This change makes the Email header increase in size (length).  I guess the 
Blackberry counts the Header portion as part of the email size limit.

Any ideas?

Thanks, 
Eric
  210   Mon Feb 10 23:11:25 2003 Entry eric wootenwootene@verizon.netQuestion  Re: elog notification process causes the email to be truncated when going to Blackberry
Another Question:  Could ELOG be configured to send notifications as a Blind 
Copy?  Just wondering if that would take care of the problem?

> Hi Stefan,
> 
> Many users have there email forward to Blackberry devices.  Although I 
> wasn't aware, it appears the Blackberry has a limit (or maybe one was set) 
> of how big the message can be (still checking for that though).
> 
> Previously, a modification was made that addressed the issue of slow ELOG 
> response when saving the elog entry.   I think the change was for ELOG to 
> generate one email and send to all the users designated to receive the 
> notification.  This caused everyone to show up as "TO" addresses.
> 
> This change makes the Email header increase in size (length).  I guess the 
> Blackberry counts the Header portion as part of the email size limit.
> 
> Any ideas?
> 
> Thanks, 
> Eric
  211   Mon Feb 10 23:19:50 2003 Entry eric wootenwootene@verizon.netQuestion  Re: elog notification process causes the email to be truncated when going to Blackberry
I just noticed that the notifications I receive from your ELOG system, 
doesn't show anyone in the "TO:" section but myself.  Or is ELOG configured 
to only send myself a message?


> Another Question:  Could ELOG be configured to send notifications as a 
Blind 
> Copy?  Just wondering if that would take care of the problem?
> 
> > Hi Stefan,
> > 
> > Many users have there email forward to Blackberry devices.  Although I 
> > wasn't aware, it appears the Blackberry has a limit (or maybe one was 
set) 
> > of how big the message can be (still checking for that though).
> > 
> > Previously, a modification was made that addressed the issue of slow ELOG 
> > response when saving the elog entry.   I think the change was for ELOG to 
> > generate one email and send to all the users designated to receive the 
> > notification.  This caused everyone to show up as "TO" addresses.
> > 
> > This change makes the Email header increase in size (length).  I guess 
the 
> > Blackberry counts the Header portion as part of the email size limit.
> > 
> > Any ideas?
> > 
> > Thanks, 
> > Eric
ELOG V3.1.5-2eba886