[sane-devel] [sane-commit] CVS update of sane-backends (3 files)
louis at lagendijk.xs4all.nl
Sat Dec 6 18:41:01 UTC 2008
ok, changed this according to the excellent suggestion by Julien. I
simply do not know why I never thought of this before. It is so obvious.
On Sat, 2008-12-06 at 17:31 +0100, Julien BLACHE wrote:
> Louis Lagendijk <llagendijk-guest at alioth.debian.org> wrote:
> > backend/pixma_bjnp.c pixma_bjnp_private.h
> > On Ubuntu getlogin() returns NULL. So we noew first try getlogin()
> > and if that fails, we try getenv("USER") and if that fails we use
> > a defaul user string
> You want geteuid() + getpwuid() instead of getlogin() which relies on
> utmp and thus is unreliable.
> Also, never trust an environment variable.
> Julien BLACHE <http://www.jblache.org>
> <jb at jblache.org> GPG KeyID 0xF5D65169
More information about the sane-devel