summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-02-12 22:31:18 +0000
committerGerald Carter <jerry@samba.org>2002-02-12 22:31:18 +0000
commit1f6df6c9ce93cca5ee0d0ad13fb8f2ee4b782c63 (patch)
treeeb85f0709dc2eaf5c5400db0499810c23356e6fb /source3/rpc_server
parent51e205c92acce4d9374cc6b9e5ae234219037626 (diff)
downloadsamba-1f6df6c9ce93cca5ee0d0ad13fb8f2ee4b782c63.tar.gz
samba-1f6df6c9ce93cca5ee0d0ad13fb8f2ee4b782c63.tar.bz2
samba-1f6df6c9ce93cca5ee0d0ad13fb8f2ee4b782c63.zip
merge from 2.2
(This used to be commit e18a7c26476e05f95850ac2bbeb42c2588115741)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 1be11f6a18..088945fb79 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -6521,14 +6521,15 @@ WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM
return WERR_BADFID;
}
- /*
- * FIXME!! Feels like there should be an access check here, but haven't
- * had time to verify. --jerry
- */
-
-
if (!get_printer_snum(p,handle, &snum))
return WERR_BADFID;
+
+ if (!print_access_check(NULL, snum, PRINTER_ACCESS_ADMINISTER)) {
+ DEBUG(3, ("security descriptor change denied by existing "
+ "security descriptor\n"));
+ status = WERR_ACCESS_DENIED;
+ goto done;
+ }
/* can't add if builtin */
if (get_a_builtin_ntform(&form->name,&tmpForm)) {
@@ -6544,9 +6545,6 @@ WERROR _spoolss_addform( pipes_struct *p, SPOOL_Q_ADDFORM *q_u, SPOOL_R_ADDFORM
* ChangeID must always be set
*/
- if (!get_printer_snum(p,handle, &snum))
- return WERR_BADFID;
-
status = get_a_printer(&printer, 2, lp_servicename(snum));
if (!W_ERROR_IS_OK(status))
goto done;
@@ -6607,9 +6605,6 @@ WERROR _spoolss_deleteform( pipes_struct *p, SPOOL_Q_DELETEFORM *q_u, SPOOL_R_DE
* ChangeID must always be set
*/
- if (!get_printer_snum(p,handle, &snum))
- return WERR_BADFID;
-
status = get_a_printer(&printer, 2, lp_servicename(snum));
if (!W_ERROR_IS_OK(status))
goto done;
@@ -6672,9 +6667,6 @@ WERROR _spoolss_setform(pipes_struct *p, SPOOL_Q_SETFORM *q_u, SPOOL_R_SETFORM *
* ChangeID must always be set
*/
- if (!get_printer_snum(p,handle, &snum))
- return WERR_BADFID;
-
status = get_a_printer(&printer, 2, lp_servicename(snum));
if (!W_ERROR_IS_OK(status))
goto done;