diff options
author | Tim Potter <tpot@samba.org> | 2002-05-01 04:22:20 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2002-05-01 04:22:20 +0000 |
commit | 77922d18a85c85a7fd0b38e04bc210ee351d1ee8 (patch) | |
tree | db13321092f6157c2218e895aa8a58825f976663 /source3/python | |
parent | f530f9c25df2d880fd08fe43b51a2a36d53eb88b (diff) | |
download | samba-77922d18a85c85a7fd0b38e04bc210ee351d1ee8.tar.gz samba-77922d18a85c85a7fd0b38e04bc210ee351d1ee8.tar.bz2 samba-77922d18a85c85a7fd0b38e04bc210ee351d1ee8.zip |
Implemented py_to_PRINTER_INFO_3() helper function.
(This used to be commit d125f9f7dff357bf9eeffc430b5876080f3debeb)
Diffstat (limited to 'source3/python')
-rw-r--r-- | source3/python/py_spoolss_printers_conv.c | 17 |
1 files changed, 14 insertions, 3 deletions
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; } |