The Samba-Bugzilla – Attachment 4443 Details for
Bug 6564
SetPrinter fails (panics) as non root
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am format patch for v3-4-test tree.
0001-Fix-bug-6564-SetPrinter-fails-panics-as-non-roo.patch (text/plain), 1.62 KB, created by
Jeremy Allison
on 2009-07-17 19:35:24 UTC
(
hide
)
Description:
git-am format patch for v3-4-test tree.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2009-07-17 19:35:24 UTC
Size:
1.62 KB
patch
obsolete
>From 4dad61c37c974e3af2774ede2ace0dd2737e3729 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Fri, 17 Jul 2009 17:33:28 -0700 >Subject: [PATCH] Fix bug #6564 - SetPrinter fails (panics) as non root. > Missing become_root()/unbecome_root() around reload_services. > Jeremy. > >--- > source3/rpc_server/srv_spoolss_nt.c | 4 ++++ > source3/smbd/server.c | 1 + > 2 files changed, 5 insertions(+), 0 deletions(-) > >diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c >index 79f0f14..855aa30 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 */ >diff --git a/source3/smbd/server.c b/source3/smbd/server.c >index a6689b8..2c5ce40 100644 >--- a/source3/smbd/server.c >+++ b/source3/smbd/server.c >@@ -94,6 +94,7 @@ static void smb_conf_updated(struct messaging_context *msg, > { > DEBUG(10,("smb_conf_updated: Got message saying smb.conf was " > "updated. Reloading.\n")); >+ change_to_root_user(); > reload_services(False); > } > >-- >1.5.4.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 6564
:
4442
| 4443