diff options
author | Jeremy Allison <jra@samba.org> | 2009-07-17 17:33:28 -0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2009-08-13 14:27:23 +0200 |
commit | 2ea34c0b06d485e47db7fe7b197521fed3ddb0a1 (patch) | |
tree | 2d90cee75e88cf5729efafdd6b7802492633d3f2 /source3/rpc_server | |
parent | c75219130f855c2709729922d5e069ba4e23012c (diff) | |
download | samba-2ea34c0b06d485e47db7fe7b197521fed3ddb0a1.tar.gz |
Fix bug #6564 - SetPrinter fails (panics) as non root. Missing become_root()/unbecome_root() around reload_services. Jeremy.
(cherry picked from commit d53cb77ab21cc6edc2f1767bb56a75901c4c1709)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 79f0f14ad1a..855aa30a990 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -309,7 +309,9 @@ WERROR delete_printer_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, const char *sh return WERR_BADFID; /* What to return here? */ /* go ahead and re-read the services immediately */ + become_root(); reload_services(false); + unbecome_root(); if ( lp_servicenumber( sharename ) < 0 ) return WERR_ACCESS_DENIED; @@ -6031,7 +6033,9 @@ bool add_printer_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, NT_PRINTER_INFO_LEV } /* reload our services immediately */ + become_root(); reload_services(false); + unbecome_root(); numlines = 0; /* Get lines and convert them back to dos-codepage */ |