Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 262 of 807  Not logged in ELOG logo
ID Date Icon Author Author Email Category OSdown ELOG Version Subject
  528   Fri Apr 23 11:50:07 2004 Question Paul Harringtonpaul.harrington@oup.comQuestionOther2.5.2CSV importing
I have been importing data from a CSV file into elog which has worked.

However I'd like to import data from the CSV file, directly to the 'text' 
field, rather than just to one an attribute fields. Is it possible to do 
this?

Paul
  529   Fri Apr 23 13:47:40 2004 Reply Stefan Rittstefan.ritt@psi.chQuestionOther2.5.2Re: CSV importing
> However I'd like to import data from the CSV file, directly to the 'text' 
> field, rather than just to one an attribute fields. Is it possible to do 
> this?

Not yet, but I can implement it. Do you always have a column "text" in your
CSV data or would you like to be able to select which column goes into the
"text" field? Can you apend some sample CSV data so that I can have a look at it?
  531   Fri Apr 30 12:58:54 2004 Reply Paul Harringtonpaul.harrington@oup.comQuestionOther2.5.2Re: CSV importing
> > However I'd like to import data from the CSV file, directly to the 'text' 
> > field, rather than just to one an attribute fields. Is it possible to do 
> > this?
> 
> Not yet, but I can implement it. Do you always have a column "text" in your
> CSV data or would you like to be able to select which column goes into the
> "text" field? Can you apend some sample CSV data so that I can have a look at it?

I've been trying an alternative approach which is basically to :

1. Import the data (not including the text field) into elog from a CSV file
2. Stop the elog server
3. Use a perl script to add each text entry to the appropriate record within the 
logbook file. 
(I.e. between the =============================== of the appropriate entry
and the next  '
  533   Sat May 1 00:21:20 2004 Idea Stefan Rittstefan.ritt@psi.chQuestionOther2.5.2Re: CSV importing
I implemented the feature to import the main entry text body from a CSV column labeled
"text". Please see the newest release
(http://midas.psi.ch/cgi-bin/cvsweb/elog/src/elogd.c?rev=1.319) and let me know if this
works for you.

I had to add code to break apart long text bodies after 78 characters in order not to
get too long lines. Please note that the maximum body size in the CSV import is limited
to 500 characters.
  662   Wed Aug 11 18:12:35 2004 Question Steve Jonessteve.jones@freescale.comQuestionOther2.5.4Q: On Solaris 8, eLog not honoring USR= and GRP= cfg file directives?
I'm not sure if this is a configuration problem or a bug, but running
v2.5.4subver1.413, elogd runs as user ROOT (UID0) even though the following
is in the elogd.cfd file:

Usr = nobody
Grp = essadm

All other directives added to the cfg file work, so I know eLog is reading
the cfg file.  

The elogd binary *is not* setuid 0.

Thanks
  664   Thu Aug 12 21:37:29 2004 Question Stefan Rittstefan.ritt@psi.chQuestionOther2.5.4Re: Q: On Solaris 8, eLog not honoring USR= and GRP= cfg file directives?
> I'm not sure if this is a configuration problem or a bug, but running
> v2.5.4subver1.413, elogd runs as user ROOT (UID0) even though the following
> is in the elogd.cfd file:
> 
> Usr = nobody
> Grp = essadm
> 
> All other directives added to the cfg file work, so I know eLog is reading
> the cfg file.  
> 
> The elogd binary *is not* setuid 0.

I could not reproduce your problem with the current version (Revision 1.460)
under Linux. I guess you made sure that user "nobody" and group "essadm" exist.
Try to run elogd interactively, if you see any error message (without "-D"
flag). In the most recent version (1.460), I added some more debugging code
which tells you if elogd successfully fell back to another user, if you use the
"-v" (verbose) flag.

If all that does not help, I guess it's some peculiarity of Solaris. Maybe
someone else using Solaris has some idea. All elogd does is a call to 

setuser("<user>");

I see no reason why this should not work on Solaris.
  666   Thu Aug 12 22:18:56 2004 Agree Steve Jonessteve.jones@freescale.comQuestionOther2.5.4Re: Q: On Solaris 8, eLog not honoring USR= and GRP= cfg file directives?
> > I'm not sure if this is a configuration problem or a bug, but running
> > v2.5.4subver1.413, elogd runs as user ROOT (UID0) even though the following
> > is in the elogd.cfd file:
> > 
> > Usr = nobody
> > Grp = essadm
> > 
> > All other directives added to the cfg file work, so I know eLog is reading
> > the cfg file.  
> > 
> > The elogd binary *is not* setuid 0.
> 
> I could not reproduce your problem with the current version (Revision 1.460)
> under Linux. I guess you made sure that user "nobody" and group "essadm" exist.
> Try to run elogd interactively, if you see any error message (without "-D"
> flag). In the most recent version (1.460), I added some more debugging code
> which tells you if elogd successfully fell back to another user, if you use the
> "-v" (verbose) flag.
> 
> If all that does not help, I guess it's some peculiarity of Solaris. Maybe
> someone else using Solaris has some idea. All elogd does is a call to 
> 
> setuser("<user>");
> 
> I see no reason why this should not work on Solaris.

Ok, just checking.  I will fiddle around with running it interactively and see what
I get, plus I'll have a look at the setuser function under Solaris.

Just for grins, what version of compiler are you using under Linux?

Thanks again!
  668   Thu Aug 12 22:25:45 2004 Reply Stefan Rittstefan.ritt@psi.chQuestionOther2.5.4Re: Q: On Solaris 8, eLog not honoring USR= and GRP= cfg file directives?
> Just for grins, what version of compiler are you using under Linux?

gcc 3.2.2 (from RedHat Linux 9.0)
ELOG V3.1.5-3fb85fa6