From 77922d18a85c85a7fd0b38e04bc210ee351d1ee8 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 1 May 2002 04:22:20 +0000 Subject: Implemented py_to_PRINTER_INFO_3() helper function. (This used to be commit d125f9f7dff357bf9eeffc430b5876080f3debeb) --- source3/python/py_spoolss_printers_conv.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'source3/python/py_spoolss_printers_conv.c') diff --git a/source3/python/py_spoolss_printers_conv.c b/source3/python/py_spoolss_printers_conv.c index 4b78f087e6..89980ef25a 100644 --- a/source3/python/py_spoolss_printers_conv.c +++ b/source3/python/py_spoolss_printers_conv.c @@ -253,7 +253,7 @@ BOOL py_to_PRINTER_INFO_2(PRINTER_INFO_2 *info, PyObject *dict, BOOL py_from_PRINTER_INFO_3(PyObject **dict, PRINTER_INFO_3 *info) { - PyObject *obj; + PyObject *obj; *dict = from_struct(info, py_PRINTER_INFO_3); @@ -263,7 +263,18 @@ BOOL py_from_PRINTER_INFO_3(PyObject **dict, PRINTER_INFO_3 *info) return True; } -BOOL py_to_PRINTER_INFO_3(PRINTER_INFO_3 *info, PyObject *dict) +BOOL py_to_PRINTER_INFO_3(PRINTER_INFO_3 *info, PyObject *dict, + TALLOC_CTX *mem_ctx) { - return False; + PyObject *obj; + + to_struct(info, dict, py_PRINTER_INFO_3); + + if (!(obj = PyDict_GetItemString(dict, "security_descriptor"))) + return False; + + if (!py_to_SECDESC(&info->secdesc, obj, mem_ctx)) + return False; + + return True; } -- cgit