From fe33db6c06e107fef575da670d026c7303472e9b Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 3 May 2010 11:58:06 +0200 Subject: s3-lanman: exit early for unsupported levels in api_PrintJobInfo(). Guenther --- source3/smbd/lanman.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c index 1a5d9e89f3..954c9c84ba 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; -- cgit