temp file creation problem in inn
Russ Allbery
rra at stanford.edu
Sun Dec 31 00:31:23 UTC 2000
Steve Beattie <steve at wirex.net> writes:
> However, I believe it is dangerous for INN to depend that its temp
> directory be non-world writable AND have configure set the default to
> %prefix/tmp if --with-tmp-path is not given. It is common for vendors to
> set --prefix to /usr and easy to miss that this is an unsafe
> configuration. If nothing else, a warning in the INSTALL file about the
> interdependence of --prefix and the temp directory is desired.
Part of the problem is that INN is designed to be installed in its own
tree, rather than being scattered throughout the system. The
configuration that Red Hat is using is not currently supported by us.
There has been discussion of adding support for a FHS-compliant
installation, but INN currently doesn't support this without additional
patches. (I'd like to see support for this added at some point,
particularly so that vendors like Red Hat who want this file layout can
just use a single configuration option that won't do anything unsafe like
this.) From INSTALL:
Installing INN so that all of its files are under a single directory
tree, rather than scattering binaries, libraries, and man pages
throughout the file system, is strongly recommended. It helps keep
everything involved in the operation of INN together as a unit and will
make the installation instructions easier to follow.
I agree that a warning would be in order; we should also be able to check
at configure time and warn if the chosen temporary directory is
world-writeable.
> I suppose license issues prevent incorporating the gnu glibc version
> (or the glibc derived version that egcs used). Given that, I suggest
> adapting the OpenBSD implementation:
> http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/mktemp.c
Thanks, I'll take a look. Note that one problem is that INN uses a large
number of shell scripts, and safe temporary file creation in shell scripts
is a non-trivial problem.
I've been disappointed by many aspects of Red Hat's packaging of INN; this
is just the latest problem that we've run into. For some time, they
apparently didn't even include the INSTALL file in their RPM.
--
Russ Allbery (rra at stanford.edu) <http://www.eyrie.org/~eagle/>
More information about the inn-bugs
mailing list