summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-09-25 06:25:02 +0000
committerTim Potter <tpot@samba.org>2002-09-25 06:25:02 +0000
commit5b71a0055ffe619d7b2aaef453c39fcbc2b3f4e4 (patch)
treee33b7df30efd4ce960f21942b6bbd4050a88cb5b
parentb952ddfbe6e6527892cabf0076e16a4c14f952b8 (diff)
downloadsamba-5b71a0055ffe619d7b2aaef453c39fcbc2b3f4e4.tar.gz
samba-5b71a0055ffe619d7b2aaef453c39fcbc2b3f4e4.tar.bz2
samba-5b71a0055ffe619d7b2aaef453c39fcbc2b3f4e4.zip
The security descriptor in a PRINTER_INFO_2 could be NULL. (Bong?)
(This used to be commit 7ce782c20c6b9e515a2fa831315ae14c66d322ee)
-rw-r--r--source3/python/py_spoolss_printers_conv.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/python/py_spoolss_printers_conv.c b/source3/python/py_spoolss_printers_conv.c
index 760896fcde..9bef118f2b 100644
--- a/source3/python/py_spoolss_printers_conv.c
+++ b/source3/python/py_spoolss_printers_conv.c
@@ -224,8 +224,12 @@ BOOL py_from_PRINTER_INFO_2(PyObject **dict, PRINTER_INFO_2 *info)
*dict = from_struct(info, py_PRINTER_INFO_2);
- if (py_from_SECDESC(&obj, info->secdesc))
- PyDict_SetItemString(*dict, "security_descriptor", obj);
+ /* The security descriptor could be NULL */
+
+ if (info->secdesc) {
+ if (py_from_SECDESC(&obj, info->secdesc))
+ PyDict_SetItemString(*dict, "security_descriptor", obj);
+ }
/* Bong! The devmode could be NULL */