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 | c66be874d8ce1f381518e07025305222bac1ab3a (patch) | |
tree | 38773d37268da8fb8f96b8e0f2f3e62a82ed6884 /source/printing | |
parent | e6ff6d95d21ff071d0fb7266987c75fd15f6652f (diff) | |
download | samba-c66be874d8ce1f381518e07025305222bac1ab3a.tar.gz samba-c66be874d8ce1f381518e07025305222bac1ab3a.tar.xz samba-c66be874d8ce1f381518e07025305222bac1ab3a.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
Diffstat (limited to 'source/printing')
-rw-r--r-- | source/printing/printing.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/printing/printing.c b/source/printing/printing.c index 5814182b258..8beea9d0cec 100644 --- a/source/printing/printing.c +++ b/source/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 ); } |