Incomplete fix of STR #4232 causes crash in RHEL7 #4276

Closed
michaelrsweet opened this Issue Feb 15, 2013 · 2 comments

Comments

Projects
None yet
1 participant
Collaborator

michaelrsweet commented Feb 15, 2013

Version: 1.6-current
CUPS.org User: hughsient

In STR #4232 i attached the file https://www.cups.org/strfiles/4232/0001-Correctly-call-DeleteDevice-when-using-colord-on-lin.patch

This did the following to fix printers being removed on RHEL and Fedora:

  • dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &device_id);
  • dbus_message_iter_append_basic(&args, DBUS_TYPE_OBJECT_PATH, &device_path);

In http://svn.easysw.com/public/cups/trunk@10761 7a7537e8-13f0-0310-91df-b6672ffda945 mike committed a fix that was different:

  • dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &device_id);
  • dbus_message_iter_append_basic(&args, DBUS_TYPE_OBJECT_PATH, &device_id);

This causes a high profile crash in RHEL 7 which triggers the automatic crash reporting service. The outcome is now a segfault of cupsd, rather than the printer being removed. This will affect any Linux distribution that ships colord and cups where the user tries to remove a print queue.

Thanks,

Richard.

Collaborator

michaelrsweet commented Feb 19, 2013

CUPS.org User: mike

Fixed in Subversion repository.

Collaborator

michaelrsweet commented Feb 19, 2013

"str4276.patch":

Index: scheduler/colorman.c

--- scheduler/colorman.c (revision 10865)
+++ scheduler/colorman.c (working copy)
@@ -1128,14 +1128,14 @@
message = COLORD_DBUS_MSG(COLORD_DBUS_PATH, "DeleteDevice");

dbus_message_iter_init_append(message, &args);

  • dbus_message_iter_append_basic(&args, DBUS_TYPE_OBJECT_PATH, &device_id);
  • dbus_message_iter_append_basic(&args, DBUS_TYPE_OBJECT_PATH, &device_path);

/*

  • Send the DeleteDevice request synchronously...
    */

dbus_error_init(&error);

  • cupsdLogMessage(CUPSD_LOG_DEBUG, "Calling DeleteDevice(%s)", device_id);
  • cupsdLogMessage(CUPSD_LOG_DEBUG, "Calling DeleteDevice(%s)", device_path);
    reply = dbus_connection_send_with_reply_and_block(colord_con, message,
    COLORD_DBUS_TIMEOUT,
    &error);

michaelrsweet added this to the Stable milestone Mar 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment