diff options
author | Jeremy Allison <jra@samba.org> | 2006-07-28 22:42:39 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:38:24 -0500 |
commit | 4ace291278d9a44f5c577bdd3b282c1231e543df (patch) | |
tree | de2d270421bc224cf74758e82740770584733b57 /source/printing/printing.c | |
parent | f462daf02c12cfba634f92e681eb23a09e7d0acf (diff) | |
download | samba-4ace291278d9a44f5c577bdd3b282c1231e543df.tar.gz samba-4ace291278d9a44f5c577bdd3b282c1231e543df.tar.xz samba-4ace291278d9a44f5c577bdd3b282c1231e543df.zip |
r17293: After the results from the cluster tests in Germany,
fix the messaging code to call the efficient calls :
save_re_uid()
set_effective_uid(0);
messaging_op
restore_re_uid();
instead of using heavyweight become_root()/unbecome_root()
pairs around all messaging code. Fixup the messaging
code to ensure sec_init() is called (only once) so that non-root
processes still work when sending messages.
This is a lighter weight solution to become_root()/unbecome_root()
(which swaps all the supplemental groups) and should be more
efficient. I will migrate all server code over to using this
(a similar technique should be used in the passdb backend
where needed).
Jeremy.
Diffstat (limited to 'source/printing/printing.c')
-rw-r--r-- | source/printing/printing.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/source/printing/printing.c b/source/printing/printing.c index bb756c88707..fbb81665650 100644 --- a/source/printing/printing.c +++ b/source/printing/printing.c @@ -1535,10 +1535,8 @@ static void print_queue_update(int snum, BOOL force) /* finally send the message */ - become_root(); message_send_pid(pid_to_procid(background_lpq_updater_pid), MSG_PRINTER_UPDATE, buffer, len, False); - unbecome_root(); SAFE_FREE( buffer ); |