PATCH: Saving Document Defaults... [was Re: [Samba] Differences in
printer functionality between 2.2.2 and 2.2.3a? PANIC Internal error]
Gerald Carter
jerry at samba.org
Tue Feb 12 11:23:06 GMT 2002
On Tue, 12 Feb 2002 christoph.beyer at desy.de wrote:
> hi,
>
> I experience exactly the same problem, and eaven changing the document
> defaults does not work. I played around with all possible acl options but
> it didn't solve the problem...
Christoph,
This patch should fix things up for you. At least the bug with saving
document defaults.
chau, jerry
---------------------------------------------------------------------
Hewlett-Packard http://www.hp.com
SAMBA Team http://www.samba.org
-- http://www.plainjoe.org
"Sam's Teach Yourself Samba in 24 Hours" 2ed. ISBN 0-672-32269-2
--"I never saved anything for the swim back." Ethan Hawk in Gattaca--
-------------- next part --------------
Index: rpc_server/srv_spoolss_nt.c
===================================================================
RCS file: /data/cvs/samba/source/rpc_server/srv_spoolss_nt.c,v
retrieving revision 1.115.2.150
diff -u -r1.115.2.150 srv_spoolss_nt.c
--- rpc_server/srv_spoolss_nt.c 12 Feb 2002 15:21:04 -0000 1.115.2.150
+++ rpc_server/srv_spoolss_nt.c 12 Feb 2002 19:10:47 -0000
@@ -4438,6 +4438,8 @@
return True;
}
+#if 0 /* JERRY */
+
/* Return true if two devicemodes are equal */
#define DEVMODE_CHECK_INT(field) \
@@ -4447,6 +4449,10 @@
return False; \
}
+/************************************************************************
+ Handy, but currently unused functions
+ ***********************************************************************/
+
static BOOL nt_devicemode_equal(NT_DEVICEMODE *d1, NT_DEVICEMODE *d2)
{
if (!d1 && !d2) goto equal; /* if both are NULL they are equal */
@@ -4678,6 +4684,8 @@
return True;
}
+#endif
+
/********************************************************************
* Called by spoolss_api_setprinter
* when updating a printer description.
@@ -4751,9 +4759,13 @@
goto done;
}
- /* NT likes to call this function even though nothing has actually
- changed. Check this so the user doesn't end up with an
- annoying permission denied dialog box. */
+#if 0 /* JERRY */
+
+ /*
+ * Another one of those historical misunderstandings...
+ * This is reminisent of a similar call we had in _spoolss_setprinterdata()
+ * I'm leaving it here as a reminder. --jerry
+ */
if (nt_printer_info_level_equal(printer, old_printer)) {
DEBUG(3, ("update_printer: printer info has not changed\n"));
@@ -4761,6 +4773,8 @@
goto done;
}
+#endif
+
/* Check calling user has permission to update printer description */
if (!print_access_check(NULL, snum, PRINTER_ACCESS_ADMINISTER)) {
@@ -4800,7 +4814,7 @@
* lookup previously saved driver initialization info, which is then
* bound to the printer, simulating what happens in the Windows arch.
*/
- if (strequal(printer->info_2->drivername, old_printer->info_2->drivername))
+ if (!strequal(printer->info_2->drivername, old_printer->info_2->drivername))
set_driver_init(printer, 2);
}
More information about the samba
mailing list