Logging and "-inetd"
Wed Apr 2 00:19:00 2003
Beerse, Corni wrote:
> > When XVNC is started with the "-inetd" parameter it closes the standard
> > error
> > stream and tries to write log messages to a file in /usr/adm.
> > This is not so good, because XVNC should preferably be run as an
> > unprivileged user and normally only Root can write in the /usr tree.
> > Besides, my
> > Redhat system doesn't even have a /usr/adm directory.
> To avoid all possible rights and location problems, I think using the
> system logging fascilities should be the best, specially with -inetd usage,
> where stdio is used for other purposes and hence cannot be used for
> > I suppose there is a reason why the system logger isn't used, so I'd like
> > to
> > suggest an option to provide the path to a log file on the command line.
> I don't know what is to be logged, specially in the -inetd case: There is
> only one connect and one disconnect in the entire session. This one is
> perfectly logged by inetd, since that handles the connection. Xvnc does not
> know from where the connection comes, inetd does know that and can log
> THe accout that is used for logging in is also not seen by Xvnc, since the
> xdm process is just an other process that displays. Hence, the logging of
> the used display manager can also be used, specially if the account info is
> needed. xdm does know that and should be able to log that.
I was primarily thinking of error messages. If something doesn't work, logs
can often be very helpful.
> > Alternatively, if it's possible to compare file descriptors, XVNC could
> > leave
> > standard error open if it's different from standard in and standard out,
> > so
> > that it could be run from a wrapper that redirects standard error to a
> > file.
> Once you start creating a wrapper that wraps stdio, you can also write a
> wrapper that maps the stdio of the wrapper to the port for the rfb
> communication an start Xvnc without the -inetd option.
Yes you could, but not quite as easily. Writing wrappers isn't the method I'd