diff options
author | Andreas Schneider <asn@samba.org> | 2012-02-14 11:56:37 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2012-03-14 19:38:45 +0100 |
commit | db0ea166043416c4a5635c0f20b60f3e030c9441 (patch) | |
tree | 3d77849540fe5a7cb51c236b5b47af0abb27cc31 /source3 | |
parent | c3c3d3ac3fc0eddf8ce4d4d71ac5bf8f6bcefd4f (diff) | |
download | samba-db0ea166043416c4a5635c0f20b60f3e030c9441.tar.gz samba-db0ea166043416c4a5635c0f20b60f3e030c9441.tar.bz2 samba-db0ea166043416c4a5635c0f20b60f3e030c9441.zip |
s3-spoolss: Check return type of update_dsspooler().
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Wed Mar 14 19:38:45 CET 2012 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpc_server/spoolss/srv_spoolss_nt.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c index 400884860e..ef987e5fc9 100644 --- a/source3/rpc_server/spoolss/srv_spoolss_nt.c +++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c @@ -6744,12 +6744,15 @@ static WERROR update_printer(struct pipes_struct *p, } } - update_dsspooler(tmp_ctx, - get_session_info_system(), - p->msg_ctx, - snum, - printer, - old_printer); + result = update_dsspooler(tmp_ctx, + get_session_info_system(), + p->msg_ctx, + snum, + printer, + old_printer); + if (!W_ERROR_IS_OK(result)) { + goto done; + } printer_mask &= ~SPOOLSS_PRINTER_INFO_SECDESC; @@ -8105,12 +8108,15 @@ static WERROR spoolss_addprinterex_level_2(struct pipes_struct *p, info2_mask = ~SPOOLSS_PRINTER_INFO_DEVMODE; } - update_dsspooler(p->mem_ctx, - get_session_info_system(), - p->msg_ctx, - 0, - info2, - NULL); + err = update_dsspooler(p->mem_ctx, + get_session_info_system(), + p->msg_ctx, + 0, + info2, + NULL); + if (!W_ERROR_IS_OK(err)) { + return err; + } err = winreg_update_printer_internal(p->mem_ctx, get_session_info_system(), |