-
Notifications
You must be signed in to change notification settings - Fork 467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webinterface: Changing Settings results in cupsd.conf being truncated #1976
Comments
CUPS.org User: mike Please attach the cupsd.conf file before and after the change. Also, please describe what check boxes are set if you are changing the basic server settings or if you are using the "edit" button... |
CUPS.org User: rojon I've attached a cupsd.conf used before the changings, In either case change settings via the checkboxes i.e uncheck |
CUPS.org User: mike Try applying the patches from STR #1968 and let me know if that does not resolve the problem:
Also, what operating system are you using? What compiler are you using? |
CUPS.org User: mike Oh, and also are you just clicking on the "Change Settings" button on the main admin page, or "Edit Configuration File"? |
CUPS.org User: jewillia I'm able to reproduce the issue on a RHEL4 U4 test machine. The only changes I made to the default config file were to listen on all interfaces, allow access from my workstation, and turn browsing off. To reproduce the issue, I go to the web interface, click on the Administration tab, click "Edit Configuration File", make a small change (for example, turn browsing back on), and click "Save Changes". Here is what the error log shows: I [15/Sep/2006:10:02:38 -0500] Installing config file "/etc/cups/cupsd.conf"... Cupsd stops but does not startup due to the config file being empty. Let me know if you need more info. |
CUPS.org User: rojon I've applied the two patches mention in your post mike, but that doesn't resolve the problem. My system is linux with kernel 2.4.33.3 and gcc 2.95 and glibc-2.2.5. |
CUPS.org User: mike What browser are you using? |
CUPS.org User: rojon Mozilla Firefox/1.5.0.6 |
CUPS.org User: twaugh.redhat I see this too, with 1.2.3 and also with current SVN. It also happens with a program I am using which uses the CUPS API (in particular, _cupsAdminSetServerSettings()), so I don't think this is to do with which browser is used. |
CUPS.org User: mike Please try the attached patch and let me know if you still experience problems... |
CUPS.org User: rojon After applying the above patch at least a new cupsd.conf gets written in the appropiate location, but anyhow, cupsd doesn't keep running and have to started manually again. But the cupsd.conf looks (and is at least) usable. Other Caveats: my Directives Listen 0.0.0.0:631 Listen /var/run/cups/cups.sock gets overwritten with a simple Port 631 command, which is basically the same, accept that 0.0.0.0:631 only listen on ipv4 connections and port 631 also enable listening on ipv6. |
CUPS.org User: rojon error_log says_ but cupsd is already dead |
CUPS.org User: mike Run cupsd from the debugger with:
Then let me know where cupsd is crashing after the restart. Also, please open a separate STR for the "Listen 0.0.0.0:631" getting mapped to "Port 631". |
CUPS.org User: rojon Find output from gdb below .... |
CUPS.org User: twaugh.redhat With that patch I found I couldn't authenticate using Firefox. When running the program I have which uses the CUPS API, as root, the cupsd.conf is altered as noted above (with 'Port' instead of 'Listen') and cupsd no longer restarts: I [17/Sep/2006:11:49:10 +0100] Full reload complete. |
CUPS.org User: twaugh.redhat Mike, can you reproduce this problem? I see exactly the same symptoms here, right down to the cupsd crash site: 311 if ((*po)->op == op) |
CUPS.org User: mike The attached patch should fix the crash bug, but I'm still seeing a hang after the restart. Still looking into it... |
CUPS.org User: mike OK, after a "make clean" the problem seems to have gone away. Can you test the current SVN code and let me know if things are back to normal? Thanks! |
CUPS.org User: rojon I've tested your patch and it works perfectly for me. |
CUPS.org User: mike Fixed in Subversion repository. |
"str1976.patch": Index: cups/http.c--- cups/http.c (revision 5959)
- httpFlushWrite(HTTP(con));- con->http.data_encoding = HTTP_ENCODE_FIELDS;
- return (0);if (code == HTTP_CONTINUE)
|
"str1976p2.patch": Index: Dependencies--- Dependencies (revision 5963) Index: printers.c--- printers.c (revision 5963)
if (!Browsing && (p->type & (CUPS_PRINTER_IMPLICIT | CUPS_PRINTER_REMOTE)))
|
Version: 1.2.3
CUPS.org User: rojon
Since 1.2.3 changing settings in the Webinterface Serversettings Page truncates cupsd.conf and as an result the Server didn't start again.
This works well with Version 1.2.2
The text was updated successfully, but these errors were encountered: