diff options
author | Günther Deschner <gd@samba.org> | 2010-07-01 13:46:55 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-07-01 14:13:16 +0200 |
commit | e4ba8fb3b9a6eebe7a56179f67d1aeff64cf1abc (patch) | |
tree | 7cd97a597bde7803574930b95d808452ad60dd1b /source3/rpc_server | |
parent | 74721bf706371d3fdc5783995a60808763fc7e6d (diff) | |
download | samba-e4ba8fb3b9a6eebe7a56179f67d1aeff64cf1abc.tar.gz samba-e4ba8fb3b9a6eebe7a56179f67d1aeff64cf1abc.tar.bz2 samba-e4ba8fb3b9a6eebe7a56179f67d1aeff64cf1abc.zip |
s3-printing: Fix Bug #7541, %D in "printer admin" causing smbd crash.
Guenther
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 6fd369562a..c844027382 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -1567,7 +1567,8 @@ WERROR _spoolss_OpenPrinterEx(pipes_struct *p, &se_printop ) && !token_contains_name_in_list( uidtoname(p->server_info->utok.uid), - NULL, NULL, + p->server_info->info3->base.domain.string, + NULL, p->server_info->ptok, lp_printer_admin(snum))) { close_printer_handle(p, r->out.handle); @@ -1863,8 +1864,10 @@ WERROR _spoolss_DeletePrinterDriver(pipes_struct *p, if ( (p->server_info->utok.uid != sec_initial_uid()) && !user_has_privileges(p->server_info->ptok, &se_printop ) && !token_contains_name_in_list( - uidtoname(p->server_info->utok.uid), NULL, - NULL, p->server_info->ptok, + uidtoname(p->server_info->utok.uid), + p->server_info->info3->base.domain.string, + NULL, + p->server_info->ptok, lp_printer_admin(-1)) ) { return WERR_ACCESS_DENIED; @@ -1962,7 +1965,9 @@ WERROR _spoolss_DeletePrinterDriverEx(pipes_struct *p, if ( (p->server_info->utok.uid != sec_initial_uid()) && !user_has_privileges(p->server_info->ptok, &se_printop ) && !token_contains_name_in_list( - uidtoname(p->server_info->utok.uid), NULL, NULL, + uidtoname(p->server_info->utok.uid), + p->server_info->info3->base.domain.string, + NULL, p->server_info->ptok, lp_printer_admin(-1)) ) { return WERR_ACCESS_DENIED; @@ -7825,7 +7830,8 @@ WERROR _spoolss_AddForm(pipes_struct *p, if ((p->server_info->utok.uid != sec_initial_uid()) && !user_has_privileges(p->server_info->ptok, &se_printop) && !token_contains_name_in_list(uidtoname(p->server_info->utok.uid), - NULL, NULL, + p->server_info->info3->base.domain.string, + NULL, p->server_info->ptok, lp_printer_admin(snum))) { DEBUG(2,("_spoolss_Addform: denied by insufficient permissions.\n")); @@ -7924,7 +7930,8 @@ WERROR _spoolss_DeleteForm(pipes_struct *p, if ((p->server_info->utok.uid != sec_initial_uid()) && !user_has_privileges(p->server_info->ptok, &se_printop) && !token_contains_name_in_list(uidtoname(p->server_info->utok.uid), - NULL, NULL, + p->server_info->info3->base.domain.string, + NULL, p->server_info->ptok, lp_printer_admin(snum))) { DEBUG(2,("_spoolss_DeleteForm: denied by insufficient permissions.\n")); @@ -8007,7 +8014,8 @@ WERROR _spoolss_SetForm(pipes_struct *p, if ((p->server_info->utok.uid != sec_initial_uid()) && !user_has_privileges(p->server_info->ptok, &se_printop) && !token_contains_name_in_list(uidtoname(p->server_info->utok.uid), - NULL, NULL, + p->server_info->info3->base.domain.string, + NULL, p->server_info->ptok, lp_printer_admin(snum))) { DEBUG(2,("_spoolss_Setform: denied by insufficient permissions.\n")); |