git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1d66e53
)
Return exception text if getprinter level not [0..3]
author
Tim Potter
<tpot@samba.org>
Sat, 20 Apr 2002 07:17:36 +0000
(07:17 +0000)
committer
Tim Potter
<tpot@samba.org>
Sat, 20 Apr 2002 07:17:36 +0000
(07:17 +0000)
source/python/py_spoolss_printers.c
patch
|
blob
|
history
diff --git
a/source/python/py_spoolss_printers.c
b/source/python/py_spoolss_printers.c
index 48321500e7db5ad3b9b536c36bd755ffb1bfbf54..623e693124c0e5de6fdbd34573d3042ad8ff3370 100644
(file)
--- a/
source/python/py_spoolss_printers.c
+++ b/
source/python/py_spoolss_printers.c
@@
-119,12
+119,19
@@
PyObject *spoolss_getprinter(PyObject *self, PyObject *args, PyObject *kw)
int level = 1;
uint32 needed;
static char *kwlist[] = {"level", NULL};
-
+
/* Parse parameters */
if (!PyArg_ParseTupleAndKeywords(args, kw, "|i", kwlist, &level))
return NULL;
+ if (level < 0 || level > 3) {
+ PyErr_SetString(spoolss_error, "Invalid info level");
+ return NULL;
+ }
+
+ ZERO_STRUCT(ctr);
+
/* Call rpc function */
werror = cli_spoolss_getprinter(