[Pkg-freeipmi-devel] Bug#690040: freeipmi: Build with PIE, bindnow, openfiles with O_EXCL and check return status

Albert Chu chu11 at llnl.gov
Wed Oct 10 18:29:13 UTC 2012


Ok, after thinking about this I did realize that this is a debug feature
and not a logging feature.  So logging to the /var/log was wrong.

So, what I ended up doing was:

1) made the debug dumps to files go to the current working directory.

2) appended the PID to files to make them unique enough for debugging
purposes (i.e. multiple clients using libipmiconsole in debug scenarios)

3) did check for O_EXCL because it now makes sense

I also fixed the not checking for read()/write() errors upstream.  So
both fixes will be in FreeIPMI 1.2.3.

Al

On Tue, 2012-10-09 at 18:31 -0400, Yaroslav Halchenko wrote:
> ok -- let's then just wait for Dave's feedback -- it might be that this
> all came up purely from code introspection and indeed not pertinent per
> se.
> 
> On Tue, 09 Oct 2012, Albert Chu wrote:
> 
> > >   * debian/patches/0002_excel_when_opening_tmp.patch: Open files with
> > O_EXCL.
> 
> > Sorry, I think I got confused when I first read this and the code.
> 
> > Now that I'm looking through the code, the debug data is dumped
> > to /var/log/ipmiconsole.  It's only when FreeIPMI is being compiled in
> > debug/developer mode that files are temporarily stored in /tmp.  So we
> > shouldn't consider the storage of files into /tmp the normal
> > production/release case.
> 
> > So I'm even more confused now on the need for O_EXCL.  The production
> > case is exactly what you'd want.  Files stored into /var/log/ipmiconsole
> > and already existing is ok.
> 
> besides two ipmiconsoles trying to write into the same file, right
> -- or do you expect that work just fine?
> 
-- 
Albert Chu
chu11 at llnl.gov
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory



More information about the Pkg-freeipmi-devel mailing list