diff options
author | Gerald Carter <jerry@samba.org> | 2005-01-14 21:24:15 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:53:53 -0500 |
commit | 2c33c41b0c98ee36f5c9b6a368deb1192360fd5b (patch) | |
tree | 54c32d68910eb1a4a9a2e3fbaf43b531c1b9c88a /source3/rpc_server | |
parent | 16b2db57a72e300117097f6d6f734e2827a0cc82 (diff) | |
download | samba-2c33c41b0c98ee36f5c9b6a368deb1192360fd5b.tar.gz samba-2c33c41b0c98ee36f5c9b6a368deb1192360fd5b.tar.xz samba-2c33c41b0c98ee36f5c9b6a368deb1192360fd5b.zip |
r4740: allow SE_PRINT_OPERATORS to have printer admin access
(This used to be commit 85731706c9d794e8bd3f26ce9b1f881c1ee6a3ba)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index a3424fe73be..ba3ee4706cb 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -1689,10 +1689,12 @@ WERROR _spoolss_open_printer_ex( pipes_struct *p, SPOOL_Q_OPEN_PRINTER_EX *q_u, return WERR_ACCESS_DENIED; } - /* if the user is not root and not a printer admin, then fail */ + /* if the user is not root, doesn't have SE_PRINT_OPERATOR privilege, + and not a printer admin, then fail */ if ( user.uid != 0 - && !user_in_list(uidtoname(user.uid), lp_printer_admin(snum), user.groups, user.ngroups) ) + && !user_has_privilege( user.nt_user_token, SE_PRINT_OPERATOR ) + && !user_in_list(uidtoname(user.uid), lp_printer_admin(snum), user.groups, user.ngroups) ) { close_printer_handle(p, handle); return WERR_ACCESS_DENIED; |