[cups.bugs] [LOW] STR #1199: Empty username when printing Test page

Jerome Alet alet at librelogiciel.com
Wed Jun 15 14:09:32 PDT 2005


[STR New]

When printing a test page from http://localhost:631, the username received
by the backend is empty. 

I've checked with the latest code in cgi-bin/printers.c, both in 1.2 (svn)
and oldtrunk, and there's a test which checks the existance of the
REMOTE_USER CGI variable, so in theory this shouldn't happen.

But I think the variable is set somewhere to "" (I didn't check where the
exact problem is, which would explain the problem.

I think the test should be modified, something like :

  char *remuser = getenv("REMOTE_USER");
  if (remuser and *remuser)
  { ... }
  else
  { ... }

I've seen the problem in much older versions as well, on different
machines.

Then, maybe instead of setting "root" when remote user is unknown, it
would be best to use the user CUPS runs as : the User directive's content
in cupsd.conf.

Any comment ?

Link: http://www.cups.org/str.php?L1199
Version: 1.1.23





More information about the cups-devel mailing list