summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-05-03 11:58:06 +0200
committerGünther Deschner <gd@samba.org>2010-05-03 14:43:34 +0200
commitfe33db6c06e107fef575da670d026c7303472e9b (patch)
tree3cbdc2b18994d344fa09b18e4dd0ffda4c3cb1c0
parentd1fe325a7681b7d9ca4ac354f0d43879c4615987 (diff)
downloadsamba-fe33db6c06e107fef575da670d026c7303472e9b.tar.gz
samba-fe33db6c06e107fef575da670d026c7303472e9b.tar.bz2
samba-fe33db6c06e107fef575da670d026c7303472e9b.zip
s3-lanman: exit early for unsupported levels in api_PrintJobInfo().
Guenther
-rw-r--r--source3/smbd/lanman.c34
1 files changed, 17 insertions, 17 deletions
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;