From baf7cf42a6319c9c31c9d29ee8102d5478826a38 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 29 Jun 2004 15:42:00 +0000 Subject: r1295: To be able to send a message to the background queue updated, we need to be root. Otherwise the USR1 signal will not be delivered. Volker (This used to be commit c66be874d8ce1f381518e07025305222bac1ab3a) --- source3/printing/printing.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'source3/printing/printing.c') diff --git a/source3/printing/printing.c b/source3/printing/printing.c index 5814182b25..8beea9d0ce 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -1231,9 +1231,13 @@ static void print_queue_update(int snum) * Otherwise just do the update ourselves */ - if ( background_lpq_updater_pid != -1 ) - message_send_pid(background_lpq_updater_pid, MSG_PRINTER_UPDATE, &snum, sizeof(snum), False); - else + if ( background_lpq_updater_pid != -1 ) { + become_root(); + message_send_pid(background_lpq_updater_pid, + MSG_PRINTER_UPDATE, &snum, sizeof(snum), + False); + unbecome_root(); + } else print_queue_update_internal( snum ); } -- cgit