The branch, master has been updated
       via  a1256594b047061d5fce8b7b4234dc725462392d (commit)
       via  43182fdff89bc5c238e7a90cf93500cef850ecd5 (commit)
      from  7a85a87edf3a589235b932a3c802278e78da4ec5 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit a1256594b047061d5fce8b7b4234dc725462392d
Author: Günther Deschner <[email protected]>
Date:   Wed Mar 18 21:54:26 2009 +0100

    s3-spoolss: fix _spoolss_GetPrinterData printerserver handle query error 
code.
    
    When _spoolss_GetPrinterData receives a query on a printserver handle for a
    value that we have not stored or do not provide, we need to return
    WERR_INVALID_PARAM, not WERR_BADFILE. Tested with w2k and w2k3 servers.
    Found by torture test.
    
    Guenther

commit 43182fdff89bc5c238e7a90cf93500cef850ecd5
Author: Günther Deschner <[email protected]>
Date:   Wed Mar 18 21:36:40 2009 +0100

    s3-spoolss: fix _spoolss_EnumPrinterDataEx error path.
    
    When a windows clients queries the "" key, we need to make sure to return 
with
    the appropriate error (WERR_INVALID_PARAM in that case), and not fall 
through
    to the buffer size handling macros. Found by torture test.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 source3/rpc_server/srv_spoolss_nt.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/rpc_server/srv_spoolss_nt.c 
b/source3/rpc_server/srv_spoolss_nt.c
index 0b95988..b825cef 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -2482,7 +2482,7 @@ static WERROR getprinterdata_printer_server(TALLOC_CTX 
*mem_ctx,
                return WERR_OK;
        }
 
-       return WERR_BADFILE;
+       return WERR_INVALID_PARAM;
 }
 
 /****************************************************************
@@ -9141,6 +9141,10 @@ WERROR _spoolss_EnumPrinterDataEx(pipes_struct *p,
                free_a_printer(&printer, 2);
        }
 
+       if (!W_ERROR_IS_OK(result)) {
+               return result;
+       }
+
        *r->out.needed  = SPOOLSS_BUFFER_ARRAY(p->mem_ctx,
                                               spoolss_EnumPrinterDataEx, NULL,
                                               *r->out.info,


-- 
Samba Shared Repository

Reply via email to