summaryrefslogtreecommitdiff
path: root/source3/python/py_conv.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/python/py_conv.c')
-rw-r--r--source3/python/py_conv.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/source3/python/py_conv.c b/source3/python/py_conv.c
index 39b20ace86..20302c83e8 100644
--- a/source3/python/py_conv.c
+++ b/source3/python/py_conv.c
@@ -68,7 +68,32 @@ PyObject *from_struct(void *s, struct pyconv *conv)
break;
}
+ case PY_STRING: {
+ char *str = (char *)s + conv[i].offset;
+
+ item = PyString_FromString(str);
+ PyDict_SetItemString(obj, conv[i].name, item);
+
+ break;
+ }
+ case PY_UID: {
+ uid_t *uid = (uid_t *)((char *)s + conv[i].offset);
+
+ item = PyInt_FromLong(*uid);
+ PyDict_SetItemString(obj, conv[i].name, item);
+
+ break;
+ }
+ case PY_GID: {
+ gid_t *gid = (gid_t *)((char *)s + conv[i].offset);
+
+ item = PyInt_FromLong(*gid);
+ PyDict_SetItemString(obj, conv[i].name, item);
+
+ break;
+ }
default:
+
break;
}
}