The branch, master has been updated
       via  fe33db6... s3-lanman: exit early for unsupported levels in 
api_PrintJobInfo().
      from  d1fe325... s3: re-run make samba3-idl.

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


- Log -----------------------------------------------------------------
commit fe33db6c06e107fef575da670d026c7303472e9b
Author: Günther Deschner <[email protected]>
Date:   Mon May 3 11:58:06 2010 +0200

    s3-lanman: exit early for unsupported levels in api_PrintJobInfo().
    
    Guenther

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

Summary of changes:
 source3/smbd/lanman.c |   34 +++++++++++++++++-----------------
 1 files changed, 17 insertions(+), 17 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index 1a5d9e8..954c9c8 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -3337,6 +3337,23 @@ static bool api_PrintJobInfo(connection_struct *conn, 
uint16 vuid,
                return False;
        }
 
+       *rdata_len = 0;
+
+       /* check it's a supported varient */
+       if ((strcmp(str1,"WWsTP")) ||
+           (!check_printjob_info(&desc,uLevel,str2)))
+               return(False);
+
+       errcode = NERR_notsupported;
+
+       switch (function) {
+       case 0xb:
+               /* change print job name, data gives the name */
+               break;
+       default:
+               goto out;
+       }
+
        ZERO_STRUCT(handle);
 
        status = rpc_pipe_open_internal(mem_ctx, &ndr_table_spoolss.syntax_id,
@@ -3367,13 +3384,6 @@ static bool api_PrintJobInfo(connection_struct *conn, 
uint16 vuid,
                goto out;
        }
 
-       *rdata_len = 0;
-
-       /* check it's a supported varient */
-       if ((strcmp(str1,"WWsTP")) || 
-           (!check_printjob_info(&desc,uLevel,str2)))
-               return(False);
-
        werr = rpccli_spoolss_getjob(cli, mem_ctx,
                                     &handle,
                                     jobid,
@@ -3385,16 +3395,6 @@ static bool api_PrintJobInfo(connection_struct *conn, 
uint16 vuid,
                goto out;
        }
 
-       errcode = NERR_notsupported;
-
-       switch (function) {
-       case 0xb:
-               /* change print job name, data gives the name */
-               break;
-       default:
-               goto out;
-       }
-
        ZERO_STRUCT(ctr);
 
        info1.job_id            = info.info1.job_id;


-- 
Samba Shared Repository

Reply via email to