- Fixed _cupsAdminSetServerSettings() sharing/shared handling (bug

#238057).
This commit is contained in:
Tim Waugh 2007-06-27 08:32:18 +00:00
parent 9274fc7aff
commit 4302d5fbc5
2 changed files with 50 additions and 1 deletions

44
cups-adminutil.patch Normal file
View File

@ -0,0 +1,44 @@
--- cups-1.2.10/cups/adminutil.c.adminutil 2007-05-21 16:39:00.000000000 +0100
+++ cups-1.2.10/cups/adminutil.c 2007-05-21 16:45:31.000000000 +0100
@@ -1260,14 +1260,21 @@
{
if (!wrote_browsing)
{
+ int new_remote_printers = (remote_printers > 0 ||
+ (remote_printers == -1 &&
+ old_remote_printers > 0));
+ int new_share_printers = (share_printers > 0 ||
+ (share_printers == -1 &&
+ old_share_printers > 0));
+
wrote_browsing = 1;
- if (remote_printers > 0 || share_printers > 0)
+ if (new_remote_printers | new_share_printers)
{
- if (remote_printers > 0 && share_printers > 0)
+ if (new_remote_printers && new_share_printers)
cupsFilePuts(temp,
"# Enable printer sharing and shared printers.\n");
- else if (remote_printers > 0)
+ else if (new_remote_printers)
cupsFilePuts(temp,
"# Show shared printers on the local network.\n");
else
@@ -1277,14 +1284,14 @@
cupsFilePuts(temp, "Browsing On\n");
cupsFilePuts(temp, "BrowseOrder allow,deny\n");
- if (remote_printers > 0)
+ if (new_remote_printers)
{
cupsFilePuts(temp, "# (Change '@LOCAL' to 'ALL' if using "
"directed broadcasts from another subnet.)\n");
cupsFilePuts(temp, "BrowseAllow @LOCAL\n");
}
- if (share_printers > 0)
+ if (new_share_printers)
cupsFilePuts(temp, "BrowseAddress @LOCAL\n");
}
else

View File

@ -6,7 +6,7 @@
Summary: Common Unix Printing System
Name: cups
Version: 1.2.11
Release: 1%{?dist}
Release: 2%{?dist}
License: GPL
Group: System Environment/Daemons
Source: ftp://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2
@ -46,6 +46,7 @@ Patch21: cups-driverd-timeout.patch
Patch22: cups-af_unix-auth.patch
Patch24: cups-str2109.patch
Patch25: cups-usb-paperout.patch
Patch26: cups-adminutil.patch
Patch100: cups-lspp.patch
Epoch: 1
Url: http://www.cups.org/
@ -154,6 +155,7 @@ lpd emulation.
%patch22 -p1 -b .af_unix-auth
%patch24 -p1 -b .str2109
%patch25 -p1 -b .usb-paperout
%patch26 -p1 -b .adminutil
%if %lspp
%patch100 -p1 -b .lspp
@ -441,6 +443,9 @@ rm -rf $RPM_BUILD_ROOT
%{cups_serverbin}/daemon/cups-lpd
%changelog
* Wed Jun 27 2007 Tim Waugh <twaugh@redhat.com> 1:1.2.11-2
- Fixed _cupsAdminSetServerSettings() sharing/shared handling (bug #238057).
* Mon Jun 25 2007 Tim Waugh <twaugh@redhat.com>
- Fixed permissions on classes.conf in the file manifest (bug #245748).