Bug 76488 - "lpadmin" quietly ignores invalid option settings
"lpadmin" quietly ignores invalid option settings
Status: CLOSED CANTFIX
Product: Red Hat Linux
Classification: Retired
Component: cups (Show other bugs)
8.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-10-22 08:31 EDT by Robert P. J. Day
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-10-18 13:05:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Robert P. J. Day 2002-10-22 08:31:39 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830

Description of problem:
  the "lpadmin" command can, with the -o options, set
any of the PPD settings in the file /etc/cups/ppd/<printer>.ppd.
these options include things like resolution, inputslot and
so on -- the stuff listed by "lpoptions -l"  (a *really*
bad choice for this, since -l has such a history of meaning
"long".  but i digress.  onward.)

  anyway, if you try to use lpadmin to set a bogus option:

  # lpadmin -p <printer> -o fred=barney

the command quietly fails to set anything, with no error or usage
message that this is not a valid PPD or server option.

  more annoyingly, despite the fact that nothing was changed,
both the file /etc/cups/printers.conf and the printer-specific
file /etc/cups/ppd/<printer>.ppd have their last-modified
timestamps updated.  (ok, printers.conf is updated just 
because a new header line as to its last update time is
written at the top of the file.  but that's a pretty lame
reason.)

  it can be inconvenient to have last-modified timestamps
updated when, effectively, nothing was done.  occasionally,
it can be useful to see what has changed recently with

  # find . -mmin -5         # or something like that

and it's misleading for these two files to show up as if
their contents have been changed when lpadmin should have
done input validation and rejected the command in the first
place.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. # lpadmin -p <printer> -o wilma=betty
2.
3.
	

Actual Results:   no error or usage message about invalid PPD or server options.
in addition, /etc/cups/printers.conf and 
/etc/cups/ppd/<printer>.ppd have their last-modified
timestamps updated when, effectively, nothing changed.

Expected Results:    an error or usage message would be appropriate

Additional info:
Comment 1 Bill Nottingham 2006-08-07 15:45:28 EDT
Red Hat Linux is no longer supported by Red Hat, Inc. If you are still
running Red Hat Linux, you are strongly advised to upgrade to a
current Fedora Core release or Red Hat Enterprise Linux or comparable.
Some information on which option may be right for you is available at
http://www.redhat.com/rhel/migrate/redhatlinux/.

Red Hat apologizes that these issues have not been resolved yet. We do
want to make sure that no important bugs slip through the cracks.
Please check if this issue is still present in a current Fedora Core
release. If so, please change the product and version to match, and
check the box indicating that the requested information has been
provided. Note that any bug still open against Red Hat Linux on will be
closed as 'CANTFIX' on September 30, 2006. Thanks again for your help.
Comment 2 Bill Nottingham 2006-10-18 13:05:39 EDT
Red Hat Linux is no longer supported by Red Hat, Inc. If you are still
running Red Hat Linux, you are strongly advised to upgrade to a
current Fedora Core release or Red Hat Enterprise Linux or comparable.
Some information on which option may be right for you is available at
http://www.redhat.com/rhel/migrate/redhatlinux/.

Closing as CANTFIX.

Note You need to log in before you can comment on or make changes to this bug.