Bug 161326 - Bad rewrite of cupsd.conf
Bad rewrite of cupsd.conf
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: system-config-printer (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-06-22 09:59 EDT by Jonathan Kamens
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-06-22 10:15:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Output of printconf-tui --Xexport (13.27 KB, text/xml)
2005-06-22 10:12 EDT, Jonathan Kamens
no flags Details

  None (edit)
Description Jonathan Kamens 2005-06-22 09:59:01 EDT
When I ran system-config-printer, my cupsd.conf got rewritten as follows:

--- /etc/cups/cupsd.conf        2005/06/01 13:44:20     1.2
+++ /etc/cups/cupsd.conf        2005/06/22 02:35:03
@@ -852,31 +852,31 @@
 <Location /printers/draft>
 Order Deny,Allow
 Deny From All
-Allow From @LOCAL
+Allow From 127.0.0.1
 AuthType None
 </Location>
 <Location /printers/color>
 Order Deny,Allow
 Deny From All
-Allow From @LOCAL
+Allow From 127.0.0.1
 AuthType None
 </Location>
 <Location /printers/color2>
 Order Deny,Allow
 Deny From All
-Allow From @LOCAL
+Allow From 127.0.0.1
 AuthType None
 </Location>
 <Location /printers/final>
 Order Deny,Allow
 Deny From All
-Allow From @LOCAL
+Allow From 127.0.0.1
 AuthType None
 </Location>
 <Location /printers/raw>
 Order Deny,Allow
 Deny From All
-Allow From @LOCAL
+Allow From 127.0.0.1
 AuthType None
 </Location>
 Browsing On
@@ -884,4 +884,3 @@
 BrowseOrder Deny,Allow
 BrowseAllow from @LOCAL
 Listen 127.0.0.1:631
-Listen 192.168.0.20:631

The replacement of @LOCAL with 127.0.0.1 is bad, but perhaps forgiveable.  The 
removal of a valid "Listen" line is not.
Comment 1 Tim Waugh 2005-06-22 10:07:23 EDT
Well, what does 'printconf-tui --Xexport' say?

And.. did you edit these things by hand in cupsd.conf?
Comment 2 Jonathan Kamens 2005-06-22 10:12:03 EDT
Created attachment 115810 [details]
Output of printconf-tui --Xexport

Yes, I edited cupsd.conf by hand.  That really needs to be supported, because
as far as I know there's no way to make the changes I made through
system-config-printer.
Comment 3 Tim Waugh 2005-06-22 10:15:48 EDT
The reason those changes were made is precisely because there is a way to set
them using system-config-printer, and those settings have not been made.

Yes, it is certainly bad design for this tool to keeps its own separate
configuration and regenerate CUPS configuration from it; however, that is how it
*was* designed, so that it what it does.

It all needs rewriting so that it *modifies* existing configuration, rather than
generating it afresh.  See any of the recent fedora-devel discussions about this.

If you do need to hand-edit any of the cupsd.conf settings that
system-config-printer rewrites, you *must* remove system-config-printer or they
will get overwritten.
Comment 4 Jonathan Kamens 2005-06-22 10:19:37 EDT
You write, "The reason those changes were made is precisely because there is a 
way to set them using system-config-printer, and those settings have not been 
made."

I've searched and searched and can find no way in system-config-printer to set 
ALLOW FROM for a printer or to add a LISTEN to cupsd.conf.  If, indeed, there 
is a way to set them as you say, can you give me a hint about where I might 
find it in the UI?
Comment 5 Tim Waugh 2005-06-22 11:15:35 EDT
/usr/share/doc/system-config-printer-0.6.*/printconf-share.html
Comment 6 Jonathan Kamens 2005-06-26 12:31:48 EDT
Nope, sorry, Action > Sharing... in system-config-printer won't allow me to set
*either* of the settings I'm trying to set that are shown in the diff above.  I
want to do "Allow From @LOCAL", and the UI does not, as far as I can tell, allow
"@LOCAL" to be entered.  And as far as I can tell there's no where in the
Sharing... dialog that allows me to specify what IP addresses the CUPS Web
server should listen on.
Comment 7 Tim Waugh 2005-06-27 04:24:32 EDT
As for @LOCAL: you can tell it to listen on specific interfaces if you like --
at any one time, this is equivalent to @LOCAL.

As for particular IP addresses to *listen on* -- well, it will listen on the
local IP address for each interface you want it to listen on.  Is that not
sufficient for what you want?
Comment 8 Jonathan Kamens 2005-07-14 12:26:16 EDT
Regarding @LOCAL: I shouldn't have to specify each network interface 
explicitly in system-config-printer when CUPS supports the very useful @LOCAL 
functionality.  I should be able to specify @LOCAL or the equivalent to system-
config-printer and have it put @LOCAL in cupsd.conf as a result.  Yes, I can 
list all my local network ranges explicitly for each printer, but that's a 
workaround, not a fix -- the fix would be for system-config-printer to know 
how to do @LOCAL.

Concerning listening, I think you're confusing the IPP protocol listening with 
the admin Web server listening.  I'm talking about the latter, not the 
former.  There is no way in system-config-printer to specify which IP 
addresses the admin Web server should listen on.  When system-config-printer 
creates cupsd.conf, it always inserts just "Listen 127.0.0.1:631".

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