diff options
author | Volker Lendecke <vlendec@samba.org> | 2004-06-29 15:42:00 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:52:04 -0500 |
commit | baf7cf42a6319c9c31c9d29ee8102d5478826a38 (patch) | |
tree | 88fe4c2325a6075ea31b3e67ff4a178fb2bbc8fb | |
parent | e8a1292d91e4442fc98f080cae79201575353995 (diff) | |
download | samba-baf7cf42a6319c9c31c9d29ee8102d5478826a38.tar.gz samba-baf7cf42a6319c9c31c9d29ee8102d5478826a38.tar.bz2 samba-baf7cf42a6319c9c31c9d29ee8102d5478826a38.zip |
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)
-rw-r--r-- | source3/printing/printing.c | 10 |
1 files changed, 7 insertions, 3 deletions
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 ); } |