diff options
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index a4c994a193..57410d0539 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -1639,7 +1639,7 @@ WERROR _spoolss_OpenPrinterEx(pipes_struct *p, /* if the user is not root, doesn't have SE_PRINT_OPERATOR privilege, and not a printer admin, then fail */ - if ((p->server_info->utok.uid != 0) && + if ((p->server_info->utok.uid != sec_initial_uid()) && !user_has_privileges(p->server_info->ptok, &se_printop ) && !token_contains_name_in_list( @@ -2117,7 +2117,7 @@ WERROR _spoolss_DeletePrinterDriver(pipes_struct *p, /* if the user is not root, doesn't have SE_PRINT_OPERATOR privilege, and not a printer admin, then fail */ - if ( (p->server_info->utok.uid != 0) + 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, @@ -2217,7 +2217,7 @@ WERROR _spoolss_DeletePrinterDriverEx(pipes_struct *p, /* if the user is not root, doesn't have SE_PRINT_OPERATOR privilege, and not a printer admin, then fail */ - if ( (p->server_info->utok.uid != 0) + 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, |