With inn-devel-2.4.2-4, if you link against libinn and call its server_init function, you end up with TMPDIR set to /var/lib/news/tmp, which doesn't do much good if you aren't running as root or news (which you probably aren't, if you're a news client that links against libinn). Demonstrate this by compiling and running the following problem with "gcc -I/usr/include/inn -L/usr/lib/news/lib test.c -linn", with inn-devel installed: #include <stdlib.h> #include <libinn.h> #include <stdio.h> main() { if (getenv("TMPDIR")) { printf("%s\n", getenv("TMPDIR")); } else { printf("before\n"); } server_init("localhost", 119); if (getenv("TMPDIR")) { printf("%s\n", getenv("TMPDIR")); } else { printf("after\n"); } } Library functions should not be setting TMPDIR.
I'm going to consult it with upstream....
The concept of a news client that talks directly to the server with libinn rather than talking NNTP over a socket is so repellant that I hope this is closed as "NOTABUG". I would think libinn is meant more for people writing server extensions, like spam filtering or the like.
You are confused. The routines I'm talking about in libinn are intended for clients to link against to talk to the server via NNTP. They are a replacement for the old "clientlib.c" that was shipped with rrn and is the quasi-standard interface for Unix news clients to talk NNTP with a server. Routines that are intended to be used by News clients shouldn't mess with TMPDIR.
Reported to upstream, here is the reply from Russ Allbery: "I plan on dropping all of the clientlib compatibility functions in the next major release of INN. INN really doesn't do a good enough job of providing an NNTP library to warrant continuing to include them, and very few programs use them. (INN will eventually provide a different NNTP library with a much different API, but that's another story.)"