cups: joblist displays {job_originating_user_name} instead of real username

Bug #890644 reported by Walter Haslbeck
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
cups (Ubuntu)
Fix Released
Undecided
Lars Karlitski

Bug Description

The Joblisting in the the CUPS Webfrontend (http://host:631/jobs?which_jobs=all) doesn't display the real username of the job-creator, but the value "{job_originating_user_name}".

Further: If you start a "lpstat -W all" on the commandline you get a core dump:
$ lpstat -W all
Segmentation fault (core dumped)
root@amg155:~# gdb /usr/bin/lpstat core
GNU gdb (Ubuntu/Linaro 7.3-0ubuntu2) 7.3-2011.08
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /usr/bin/lpstat...Reading symbols from /usr/lib/debug/usr/bin/lpstat...done.
done.
[New LWP 16897]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Core was generated by `lpstat -W all'.
Program terminated with signal 11, Segmentation fault.
#0 match_list (name=<optimized out>, list=0x7f14a90a5998 "root") at lpstat.c:600
600 lpstat.c: No such file or directory.
        in lpstat.c
(gdb) bt
#0 match_list (name=<optimized out>, list=0x7f14a90a5998 "root") at lpstat.c:600
#1 match_list (list=<optimized out>, name=0x0) at lpstat.c:570
#2 0x00007f14a78c3741 in show_jobs (dests=0x0, users=0x7f14a90a5998 "root", long_status=0, ranking=0,
    which=<optimized out>) at lpstat.c:1425
#3 0x00007f14a78c07e7 in main (argc=3, argv=0x7fff317ea258) at lpstat.c:463

System: ubuntu-server 11.10 x86_64
Description: Ubuntu 11.10
Release: 11.10

apt-cache policy cups
cups:
  Installed: 1.5.0-8ubuntu4
  Candidate: 1.5.0-8ubuntu4
  Version table:
 *** 1.5.0-8ubuntu4 0
        500 http://de.archive.ubuntu.com/ubuntu/ oneiric-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     1.5.0-8 0
        500 http://de.archive.ubuntu.com/ubuntu/ oneiric/main amd64 Packages

Tags: patch
Revision history for this message
Lars Karlitski (larsu) wrote :

Thank you for reporting this bug.

There is a null check missing in lpstat.c:match_list, which has already been added upstream (r10062). Till, I've attached the patch. Do you think it's worth SRU'ing?

I can't reproduce the {job_originating_user_name} problem. It's CUPS's template system not replacing a variable because the value assigned to it is NULL. I have no idea in which cases this can happen, yet. Will investigate further.

Changed in cups (Ubuntu):
status: New → Confirmed
assignee: nobody → Lars Uebernickel (larsu)
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "lpstat.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Walter Haslbeck (wh-l) wrote :

Thanks for fixing the lpstat issue.

The {job_originating_user_name} is caused by the new config option "JobPrivateAccess" introduced in cups 1.5. When I change "JobPrivateAccess" from "default" to "none" all variables are displayed in the joblist.

So I think the right solution for this problem is to change the templates or the template engine. IMHO a empty field or perhaps a "not shown due to privacy settings in cupsd.conf" is better than a "{variable}", which is a bit irritating for the cups user.

Revision history for this message
Hb (hbb) wrote :

Hi Walter,

where did you change this setting?

Additionally, since last Ubuntu upgrade the job names (= document titles) aren't shown in the job list any more. Everys job name is now Unbekannt/Unknwon.

Revision history for this message
Walter Haslbeck (wh-l) wrote :

@Hb

Oops, I meant "JobPrivateValues".

I added the lines

JobPrivateAccess default
JobPrivateValues none

to the sections <Policy default> and <Policy authenticated> in /etc/cups/cupsd.conf

Revision history for this message
Lars Karlitski (larsu) wrote :

This was fixed in CUPS svn r9456 and released in 1.5.2, which already ships in precise.

So {job_originating_user_name} is never shown in the jobs listing. Instead, "Withheld" is shown if access rights aren't given.

Curiously, it wasn't fixed for all variables. For example, if JobPrivateAccess is set to 'none', the 'Completed' column will contain {time_at_completion}. I've reported this upstream at http://cups.org/str.php?L4041+P0+S-2+C0+I0+E0+M20+Q

I'm closing this bug anyway since the original bug is fixed.

Changed in cups (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Daniel_Lechu (danielmadrid19) wrote :

I've the same bug in my CUPS. I'm using Ubuntu 12.04 with CUPS 1.5.3. If it was fixed in 1.5.2 why i get the same problem?. Can i get the username that are printing (i've tried in local and don't show username).

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Daniel_Lechu, do you get exactly the same core dump as shown in the initial posting?

Revision history for this message
Daniel_Lechu (danielmadrid19) wrote :

How i can get a core dump?, i only get the problem of "{job_originating_user_name}" but don't get a core dump.

I've fixed the problem yesterday after a big search in google. i've to change a line in cups config: i've to change "JobPrivateValues" from "default" to "none" and then i get the user name instead the "{job_originating_user_name}" error.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.