
/* Python wrapper functions auto-generated by pidl */
#include <Python.h>
#include "includes.h"
#include <pytalloc.h>
#include "librpc/rpc/pyrpc.h"
#include "librpc/rpc/pyrpc_util.h"
#include "librpc/gen_ndr/ndr_xattr.h"
#include "librpc/gen_ndr/ndr_xattr_c.h"

#include "librpc/gen_ndr/security.h"
staticforward PyTypeObject xattr_DosInfoFFFFCompat_Type;
staticforward PyTypeObject xattr_DosInfo1_Type;
staticforward PyTypeObject xattr_DosInfo2Old_Type;
staticforward PyTypeObject xattr_DosInfo3_Type;
staticforward PyTypeObject xattr_DosAttrib_Type;
staticforward PyTypeObject xattr_DOSATTRIB_Type;
staticforward PyTypeObject xattr_EA_Type;
staticforward PyTypeObject xattr_DosEAs_Type;
staticforward PyTypeObject tdb_xattrs_Type;
staticforward PyTypeObject xattr_DosStream_Type;
staticforward PyTypeObject xattr_DosStreams_Type;
staticforward PyTypeObject security_descriptor_hash_v2_Type;
staticforward PyTypeObject security_descriptor_hash_v3_Type;
staticforward PyTypeObject xattr_NTACL_Type;
staticforward PyTypeObject xattr_InterfaceType;

void initxattr(void);static PyTypeObject *security_descriptor_Type;
static PyTypeObject *ClientConnection_Type;
static PyTypeObject *Object_Type;
#include "librpc/ndr/py_xattr.c"


static PyObject *py_xattr_DosInfoFFFFCompat_get_attrib(PyObject *obj, void *closure)
{
	struct xattr_DosInfoFFFFCompat *object = (struct xattr_DosInfoFFFFCompat *)py_talloc_get_ptr(obj);
	PyObject *py_attrib;
	py_attrib = PyInt_FromLong(object->attrib);
	return py_attrib;
}

static int py_xattr_DosInfoFFFFCompat_set_attrib(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosInfoFFFFCompat *object = (struct xattr_DosInfoFFFFCompat *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->attrib = PyInt_AsLong(value);
	return 0;
}

static PyGetSetDef py_xattr_DosInfoFFFFCompat_getsetters[] = {
	{ discard_const_p(char, "attrib"), py_xattr_DosInfoFFFFCompat_get_attrib, py_xattr_DosInfoFFFFCompat_set_attrib },
	{ NULL }
};

static PyObject *py_xattr_DosInfoFFFFCompat_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct xattr_DosInfoFFFFCompat, type);
}


static PyTypeObject xattr_DosInfoFFFFCompat_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "xattr.DosInfoFFFFCompat",
	.tp_getset = py_xattr_DosInfoFFFFCompat_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_xattr_DosInfoFFFFCompat_new,
};


static PyObject *py_xattr_DosInfo1_get_attrib(PyObject *obj, void *closure)
{
	struct xattr_DosInfo1 *object = (struct xattr_DosInfo1 *)py_talloc_get_ptr(obj);
	PyObject *py_attrib;
	py_attrib = PyInt_FromLong(object->attrib);
	return py_attrib;
}

static int py_xattr_DosInfo1_set_attrib(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosInfo1 *object = (struct xattr_DosInfo1 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->attrib = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_xattr_DosInfo1_get_ea_size(PyObject *obj, void *closure)
{
	struct xattr_DosInfo1 *object = (struct xattr_DosInfo1 *)py_talloc_get_ptr(obj);
	PyObject *py_ea_size;
	py_ea_size = PyInt_FromLong(object->ea_size);
	return py_ea_size;
}

static int py_xattr_DosInfo1_set_ea_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosInfo1 *object = (struct xattr_DosInfo1 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->ea_size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_xattr_DosInfo1_get_size(PyObject *obj, void *closure)
{
	struct xattr_DosInfo1 *object = (struct xattr_DosInfo1 *)py_talloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyLong_FromLongLong(object->size);
	return py_size;
}

static int py_xattr_DosInfo1_set_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosInfo1 *object = (struct xattr_DosInfo1 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->size = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->size = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_xattr_DosInfo1_get_alloc_size(PyObject *obj, void *closure)
{
	struct xattr_DosInfo1 *object = (struct xattr_DosInfo1 *)py_talloc_get_ptr(obj);
	PyObject *py_alloc_size;
	py_alloc_size = PyLong_FromLongLong(object->alloc_size);
	return py_alloc_size;
}

static int py_xattr_DosInfo1_set_alloc_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosInfo1 *object = (struct xattr_DosInfo1 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->alloc_size = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->alloc_size = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_xattr_DosInfo1_get_create_time(PyObject *obj, void *closure)
{
	struct xattr_DosInfo1 *object = (struct xattr_DosInfo1 *)py_talloc_get_ptr(obj);
	PyObject *py_create_time;
	py_create_time = PyLong_FromLongLong(object->create_time);
	return py_create_time;
}

static int py_xattr_DosInfo1_set_create_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosInfo1 *object = (struct xattr_DosInfo1 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->create_time = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->create_time = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_xattr_DosInfo1_get_change_time(PyObject *obj, void *closure)
{
	struct xattr_DosInfo1 *object = (struct xattr_DosInfo1 *)py_talloc_get_ptr(obj);
	PyObject *py_change_time;
	py_change_time = PyLong_FromLongLong(object->change_time);
	return py_change_time;
}

static int py_xattr_DosInfo1_set_change_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosInfo1 *object = (struct xattr_DosInfo1 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->change_time = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->change_time = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyGetSetDef py_xattr_DosInfo1_getsetters[] = {
	{ discard_const_p(char, "attrib"), py_xattr_DosInfo1_get_attrib, py_xattr_DosInfo1_set_attrib },
	{ discard_const_p(char, "ea_size"), py_xattr_DosInfo1_get_ea_size, py_xattr_DosInfo1_set_ea_size },
	{ discard_const_p(char, "size"), py_xattr_DosInfo1_get_size, py_xattr_DosInfo1_set_size },
	{ discard_const_p(char, "alloc_size"), py_xattr_DosInfo1_get_alloc_size, py_xattr_DosInfo1_set_alloc_size },
	{ discard_const_p(char, "create_time"), py_xattr_DosInfo1_get_create_time, py_xattr_DosInfo1_set_create_time },
	{ discard_const_p(char, "change_time"), py_xattr_DosInfo1_get_change_time, py_xattr_DosInfo1_set_change_time },
	{ NULL }
};

static PyObject *py_xattr_DosInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct xattr_DosInfo1, type);
}


static PyTypeObject xattr_DosInfo1_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "xattr.DosInfo1",
	.tp_getset = py_xattr_DosInfo1_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_xattr_DosInfo1_new,
};


static PyObject *py_xattr_DosInfo2Old_get_flags(PyObject *obj, void *closure)
{
	struct xattr_DosInfo2Old *object = (struct xattr_DosInfo2Old *)py_talloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyInt_FromLong(object->flags);
	return py_flags;
}

static int py_xattr_DosInfo2Old_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosInfo2Old *object = (struct xattr_DosInfo2Old *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->flags = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_xattr_DosInfo2Old_get_attrib(PyObject *obj, void *closure)
{
	struct xattr_DosInfo2Old *object = (struct xattr_DosInfo2Old *)py_talloc_get_ptr(obj);
	PyObject *py_attrib;
	py_attrib = PyInt_FromLong(object->attrib);
	return py_attrib;
}

static int py_xattr_DosInfo2Old_set_attrib(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosInfo2Old *object = (struct xattr_DosInfo2Old *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->attrib = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_xattr_DosInfo2Old_get_ea_size(PyObject *obj, void *closure)
{
	struct xattr_DosInfo2Old *object = (struct xattr_DosInfo2Old *)py_talloc_get_ptr(obj);
	PyObject *py_ea_size;
	py_ea_size = PyInt_FromLong(object->ea_size);
	return py_ea_size;
}

static int py_xattr_DosInfo2Old_set_ea_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosInfo2Old *object = (struct xattr_DosInfo2Old *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->ea_size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_xattr_DosInfo2Old_get_size(PyObject *obj, void *closure)
{
	struct xattr_DosInfo2Old *object = (struct xattr_DosInfo2Old *)py_talloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyLong_FromLongLong(object->size);
	return py_size;
}

static int py_xattr_DosInfo2Old_set_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosInfo2Old *object = (struct xattr_DosInfo2Old *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->size = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->size = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_xattr_DosInfo2Old_get_alloc_size(PyObject *obj, void *closure)
{
	struct xattr_DosInfo2Old *object = (struct xattr_DosInfo2Old *)py_talloc_get_ptr(obj);
	PyObject *py_alloc_size;
	py_alloc_size = PyLong_FromLongLong(object->alloc_size);
	return py_alloc_size;
}

static int py_xattr_DosInfo2Old_set_alloc_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosInfo2Old *object = (struct xattr_DosInfo2Old *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->alloc_size = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->alloc_size = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_xattr_DosInfo2Old_get_create_time(PyObject *obj, void *closure)
{
	struct xattr_DosInfo2Old *object = (struct xattr_DosInfo2Old *)py_talloc_get_ptr(obj);
	PyObject *py_create_time;
	py_create_time = PyLong_FromLongLong(object->create_time);
	return py_create_time;
}

static int py_xattr_DosInfo2Old_set_create_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosInfo2Old *object = (struct xattr_DosInfo2Old *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->create_time = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->create_time = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_xattr_DosInfo2Old_get_change_time(PyObject *obj, void *closure)
{
	struct xattr_DosInfo2Old *object = (struct xattr_DosInfo2Old *)py_talloc_get_ptr(obj);
	PyObject *py_change_time;
	py_change_time = PyLong_FromLongLong(object->change_time);
	return py_change_time;
}

static int py_xattr_DosInfo2Old_set_change_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosInfo2Old *object = (struct xattr_DosInfo2Old *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->change_time = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->change_time = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_xattr_DosInfo2Old_get_write_time(PyObject *obj, void *closure)
{
	struct xattr_DosInfo2Old *object = (struct xattr_DosInfo2Old *)py_talloc_get_ptr(obj);
	PyObject *py_write_time;
	py_write_time = PyLong_FromLongLong(object->write_time);
	return py_write_time;
}

static int py_xattr_DosInfo2Old_set_write_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosInfo2Old *object = (struct xattr_DosInfo2Old *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->write_time = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->write_time = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_xattr_DosInfo2Old_get_name(PyObject *obj, void *closure)
{
	struct xattr_DosInfo2Old *object = (struct xattr_DosInfo2Old *)py_talloc_get_ptr(obj);
	PyObject *py_name;
	py_name = PyString_FromStringOrNULL(object->name);
	return py_name;
}

static int py_xattr_DosInfo2Old_set_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosInfo2Old *object = (struct xattr_DosInfo2Old *)py_talloc_get_ptr(py_obj);
	object->name = talloc_strdup(py_talloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	return 0;
}

static PyGetSetDef py_xattr_DosInfo2Old_getsetters[] = {
	{ discard_const_p(char, "flags"), py_xattr_DosInfo2Old_get_flags, py_xattr_DosInfo2Old_set_flags },
	{ discard_const_p(char, "attrib"), py_xattr_DosInfo2Old_get_attrib, py_xattr_DosInfo2Old_set_attrib },
	{ discard_const_p(char, "ea_size"), py_xattr_DosInfo2Old_get_ea_size, py_xattr_DosInfo2Old_set_ea_size },
	{ discard_const_p(char, "size"), py_xattr_DosInfo2Old_get_size, py_xattr_DosInfo2Old_set_size },
	{ discard_const_p(char, "alloc_size"), py_xattr_DosInfo2Old_get_alloc_size, py_xattr_DosInfo2Old_set_alloc_size },
	{ discard_const_p(char, "create_time"), py_xattr_DosInfo2Old_get_create_time, py_xattr_DosInfo2Old_set_create_time },
	{ discard_const_p(char, "change_time"), py_xattr_DosInfo2Old_get_change_time, py_xattr_DosInfo2Old_set_change_time },
	{ discard_const_p(char, "write_time"), py_xattr_DosInfo2Old_get_write_time, py_xattr_DosInfo2Old_set_write_time },
	{ discard_const_p(char, "name"), py_xattr_DosInfo2Old_get_name, py_xattr_DosInfo2Old_set_name },
	{ NULL }
};

static PyObject *py_xattr_DosInfo2Old_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct xattr_DosInfo2Old, type);
}


static PyTypeObject xattr_DosInfo2Old_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "xattr.DosInfo2Old",
	.tp_getset = py_xattr_DosInfo2Old_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_xattr_DosInfo2Old_new,
};


static PyObject *py_xattr_DosInfo3_get_valid_flags(PyObject *obj, void *closure)
{
	struct xattr_DosInfo3 *object = (struct xattr_DosInfo3 *)py_talloc_get_ptr(obj);
	PyObject *py_valid_flags;
	py_valid_flags = PyInt_FromLong(object->valid_flags);
	return py_valid_flags;
}

static int py_xattr_DosInfo3_set_valid_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosInfo3 *object = (struct xattr_DosInfo3 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->valid_flags = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->valid_flags = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_xattr_DosInfo3_get_attrib(PyObject *obj, void *closure)
{
	struct xattr_DosInfo3 *object = (struct xattr_DosInfo3 *)py_talloc_get_ptr(obj);
	PyObject *py_attrib;
	py_attrib = PyInt_FromLong(object->attrib);
	return py_attrib;
}

static int py_xattr_DosInfo3_set_attrib(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosInfo3 *object = (struct xattr_DosInfo3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->attrib = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_xattr_DosInfo3_get_ea_size(PyObject *obj, void *closure)
{
	struct xattr_DosInfo3 *object = (struct xattr_DosInfo3 *)py_talloc_get_ptr(obj);
	PyObject *py_ea_size;
	py_ea_size = PyInt_FromLong(object->ea_size);
	return py_ea_size;
}

static int py_xattr_DosInfo3_set_ea_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosInfo3 *object = (struct xattr_DosInfo3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->ea_size = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_xattr_DosInfo3_get_size(PyObject *obj, void *closure)
{
	struct xattr_DosInfo3 *object = (struct xattr_DosInfo3 *)py_talloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyLong_FromLongLong(object->size);
	return py_size;
}

static int py_xattr_DosInfo3_set_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosInfo3 *object = (struct xattr_DosInfo3 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->size = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->size = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_xattr_DosInfo3_get_alloc_size(PyObject *obj, void *closure)
{
	struct xattr_DosInfo3 *object = (struct xattr_DosInfo3 *)py_talloc_get_ptr(obj);
	PyObject *py_alloc_size;
	py_alloc_size = PyLong_FromLongLong(object->alloc_size);
	return py_alloc_size;
}

static int py_xattr_DosInfo3_set_alloc_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosInfo3 *object = (struct xattr_DosInfo3 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->alloc_size = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->alloc_size = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_xattr_DosInfo3_get_create_time(PyObject *obj, void *closure)
{
	struct xattr_DosInfo3 *object = (struct xattr_DosInfo3 *)py_talloc_get_ptr(obj);
	PyObject *py_create_time;
	py_create_time = PyLong_FromLongLong(object->create_time);
	return py_create_time;
}

static int py_xattr_DosInfo3_set_create_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosInfo3 *object = (struct xattr_DosInfo3 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->create_time = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->create_time = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_xattr_DosInfo3_get_change_time(PyObject *obj, void *closure)
{
	struct xattr_DosInfo3 *object = (struct xattr_DosInfo3 *)py_talloc_get_ptr(obj);
	PyObject *py_change_time;
	py_change_time = PyLong_FromLongLong(object->change_time);
	return py_change_time;
}

static int py_xattr_DosInfo3_set_change_time(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosInfo3 *object = (struct xattr_DosInfo3 *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->change_time = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->change_time = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyGetSetDef py_xattr_DosInfo3_getsetters[] = {
	{ discard_const_p(char, "valid_flags"), py_xattr_DosInfo3_get_valid_flags, py_xattr_DosInfo3_set_valid_flags },
	{ discard_const_p(char, "attrib"), py_xattr_DosInfo3_get_attrib, py_xattr_DosInfo3_set_attrib },
	{ discard_const_p(char, "ea_size"), py_xattr_DosInfo3_get_ea_size, py_xattr_DosInfo3_set_ea_size },
	{ discard_const_p(char, "size"), py_xattr_DosInfo3_get_size, py_xattr_DosInfo3_set_size },
	{ discard_const_p(char, "alloc_size"), py_xattr_DosInfo3_get_alloc_size, py_xattr_DosInfo3_set_alloc_size },
	{ discard_const_p(char, "create_time"), py_xattr_DosInfo3_get_create_time, py_xattr_DosInfo3_set_create_time },
	{ discard_const_p(char, "change_time"), py_xattr_DosInfo3_get_change_time, py_xattr_DosInfo3_set_change_time },
	{ NULL }
};

static PyObject *py_xattr_DosInfo3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct xattr_DosInfo3, type);
}


static PyTypeObject xattr_DosInfo3_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "xattr.DosInfo3",
	.tp_getset = py_xattr_DosInfo3_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_xattr_DosInfo3_new,
};

PyObject *py_import_xattr_DosInfo(TALLOC_CTX *mem_ctx, int level, union xattr_DosInfo *in)
{
	PyObject *ret;

	switch (level) {
		case 0xFFFF:
			ret = py_talloc_reference_ex(&xattr_DosInfoFFFFCompat_Type, mem_ctx, &in->compatinfoFFFF);
			return ret;

		case 1:
			ret = py_talloc_reference_ex(&xattr_DosInfo1_Type, mem_ctx, &in->info1);
			return ret;

		case 2:
			ret = py_talloc_reference_ex(&xattr_DosInfo2Old_Type, mem_ctx, &in->oldinfo2);
			return ret;

		case 3:
			ret = py_talloc_reference_ex(&xattr_DosInfo3_Type, mem_ctx, &in->info3);
			return ret;

	}
	PyErr_SetString(PyExc_TypeError, "unknown union level");
	return NULL;
}

union xattr_DosInfo *py_export_xattr_DosInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union xattr_DosInfo *ret = talloc_zero(mem_ctx, union xattr_DosInfo);
	switch (level) {
		case 0xFFFF:
			PY_CHECK_TYPE(&xattr_DosInfoFFFFCompat_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->compatinfoFFFF = *(struct xattr_DosInfoFFFFCompat *)py_talloc_get_ptr(in);
			break;

		case 1:
			PY_CHECK_TYPE(&xattr_DosInfo1_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info1 = *(struct xattr_DosInfo1 *)py_talloc_get_ptr(in);
			break;

		case 2:
			PY_CHECK_TYPE(&xattr_DosInfo2Old_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->oldinfo2 = *(struct xattr_DosInfo2Old *)py_talloc_get_ptr(in);
			break;

		case 3:
			PY_CHECK_TYPE(&xattr_DosInfo3_Type, in, talloc_free(ret); return NULL;);
			if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
				PyErr_NoMemory();
				talloc_free(ret); return NULL;
			}
			ret->info3 = *(struct xattr_DosInfo3 *)py_talloc_get_ptr(in);
			break;

		default:
			PyErr_SetString(PyExc_TypeError, "invalid union level value");
			talloc_free(ret);
			ret = NULL;
	}

	return ret;
}


static PyObject *py_xattr_DosAttrib_get_version(PyObject *obj, void *closure)
{
	struct xattr_DosAttrib *object = (struct xattr_DosAttrib *)py_talloc_get_ptr(obj);
	PyObject *py_version;
	py_version = PyInt_FromLong(object->version);
	return py_version;
}

static int py_xattr_DosAttrib_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosAttrib *object = (struct xattr_DosAttrib *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->version = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_xattr_DosAttrib_get_info(PyObject *obj, void *closure)
{
	struct xattr_DosAttrib *object = (struct xattr_DosAttrib *)py_talloc_get_ptr(obj);
	PyObject *py_info;
	py_info = py_import_xattr_DosInfo(py_talloc_get_mem_ctx(obj), object->version, &object->info);
	if (py_info == NULL) {
		return NULL;
	}
	return py_info;
}

static int py_xattr_DosAttrib_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosAttrib *object = (struct xattr_DosAttrib *)py_talloc_get_ptr(py_obj);
	{
		union xattr_DosInfo *info_switch_0;
		info_switch_0 = py_export_xattr_DosInfo(py_talloc_get_mem_ctx(py_obj), object->version, value);
		if (info_switch_0 == NULL) {
			return -1;
		}
		object->info = *info_switch_0;
	}
	return 0;
}

static PyGetSetDef py_xattr_DosAttrib_getsetters[] = {
	{ discard_const_p(char, "version"), py_xattr_DosAttrib_get_version, py_xattr_DosAttrib_set_version },
	{ discard_const_p(char, "info"), py_xattr_DosAttrib_get_info, py_xattr_DosAttrib_set_info },
	{ NULL }
};

static PyObject *py_xattr_DosAttrib_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct xattr_DosAttrib, type);
}

static PyObject *py_xattr_DosAttrib_ndr_pack(PyObject *py_obj)
{
	struct xattr_DosAttrib *object = (struct xattr_DosAttrib *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_xattr_DosAttrib);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_xattr_DosAttrib_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct xattr_DosAttrib *object = (struct xattr_DosAttrib *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_xattr_DosAttrib);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_xattr_DosAttrib_ndr_print(PyObject *py_obj)
{
	struct xattr_DosAttrib *object = (struct xattr_DosAttrib *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_xattr_DosAttrib, "xattr_DosAttrib", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_xattr_DosAttrib_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_xattr_DosAttrib_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_xattr_DosAttrib_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_xattr_DosAttrib_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject xattr_DosAttrib_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "xattr.DosAttrib",
	.tp_getset = py_xattr_DosAttrib_getsetters,
	.tp_methods = py_xattr_DosAttrib_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_xattr_DosAttrib_new,
};


static PyObject *py_xattr_DOSATTRIB_get_attrib_hex(PyObject *obj, void *closure)
{
	struct xattr_DOSATTRIB *object = (struct xattr_DOSATTRIB *)py_talloc_get_ptr(obj);
	PyObject *py_attrib_hex;
	py_attrib_hex = PyString_FromStringOrNULL(object->attrib_hex);
	return py_attrib_hex;
}

static int py_xattr_DOSATTRIB_set_attrib_hex(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DOSATTRIB *object = (struct xattr_DOSATTRIB *)py_talloc_get_ptr(py_obj);
	object->attrib_hex = talloc_strdup(py_talloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	return 0;
}

static PyObject *py_xattr_DOSATTRIB_get_version(PyObject *obj, void *closure)
{
	struct xattr_DOSATTRIB *object = (struct xattr_DOSATTRIB *)py_talloc_get_ptr(obj);
	PyObject *py_version;
	py_version = PyInt_FromLong(object->version);
	return py_version;
}

static int py_xattr_DOSATTRIB_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DOSATTRIB *object = (struct xattr_DOSATTRIB *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->version = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_xattr_DOSATTRIB_get_info(PyObject *obj, void *closure)
{
	struct xattr_DOSATTRIB *object = (struct xattr_DOSATTRIB *)py_talloc_get_ptr(obj);
	PyObject *py_info;
	py_info = py_import_xattr_DosInfo(py_talloc_get_mem_ctx(obj), object->version, &object->info);
	if (py_info == NULL) {
		return NULL;
	}
	return py_info;
}

static int py_xattr_DOSATTRIB_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DOSATTRIB *object = (struct xattr_DOSATTRIB *)py_talloc_get_ptr(py_obj);
	{
		union xattr_DosInfo *info_switch_0;
		info_switch_0 = py_export_xattr_DosInfo(py_talloc_get_mem_ctx(py_obj), object->version, value);
		if (info_switch_0 == NULL) {
			return -1;
		}
		object->info = *info_switch_0;
	}
	return 0;
}

static PyGetSetDef py_xattr_DOSATTRIB_getsetters[] = {
	{ discard_const_p(char, "attrib_hex"), py_xattr_DOSATTRIB_get_attrib_hex, py_xattr_DOSATTRIB_set_attrib_hex },
	{ discard_const_p(char, "version"), py_xattr_DOSATTRIB_get_version, py_xattr_DOSATTRIB_set_version },
	{ discard_const_p(char, "info"), py_xattr_DOSATTRIB_get_info, py_xattr_DOSATTRIB_set_info },
	{ NULL }
};

static PyObject *py_xattr_DOSATTRIB_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct xattr_DOSATTRIB, type);
}

static PyObject *py_xattr_DOSATTRIB_ndr_pack(PyObject *py_obj)
{
	struct xattr_DOSATTRIB *object = (struct xattr_DOSATTRIB *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_xattr_DOSATTRIB);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_xattr_DOSATTRIB_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct xattr_DOSATTRIB *object = (struct xattr_DOSATTRIB *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_xattr_DOSATTRIB);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_xattr_DOSATTRIB_ndr_print(PyObject *py_obj)
{
	struct xattr_DOSATTRIB *object = (struct xattr_DOSATTRIB *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_xattr_DOSATTRIB, "xattr_DOSATTRIB", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_xattr_DOSATTRIB_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_xattr_DOSATTRIB_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_xattr_DOSATTRIB_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_xattr_DOSATTRIB_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject xattr_DOSATTRIB_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "xattr.DOSATTRIB",
	.tp_getset = py_xattr_DOSATTRIB_getsetters,
	.tp_methods = py_xattr_DOSATTRIB_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_xattr_DOSATTRIB_new,
};


static PyObject *py_xattr_EA_get_name(PyObject *obj, void *closure)
{
	struct xattr_EA *object = (struct xattr_EA *)py_talloc_get_ptr(obj);
	PyObject *py_name;
	py_name = PyString_FromStringOrNULL(object->name);
	return py_name;
}

static int py_xattr_EA_set_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_EA *object = (struct xattr_EA *)py_talloc_get_ptr(py_obj);
	object->name = talloc_strdup(py_talloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	return 0;
}

static PyObject *py_xattr_EA_get_value(PyObject *obj, void *closure)
{
	struct xattr_EA *object = (struct xattr_EA *)py_talloc_get_ptr(obj);
	PyObject *py_value;
	py_value = PyString_FromStringAndSize((char *)(object->value).data, (object->value).length);
	return py_value;
}

static int py_xattr_EA_set_value(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_EA *object = (struct xattr_EA *)py_talloc_get_ptr(py_obj);
	object->value = data_blob_talloc(py_talloc_get_mem_ctx(py_obj), PyString_AS_STRING(value), PyString_GET_SIZE(value));
	return 0;
}

static PyGetSetDef py_xattr_EA_getsetters[] = {
	{ discard_const_p(char, "name"), py_xattr_EA_get_name, py_xattr_EA_set_name },
	{ discard_const_p(char, "value"), py_xattr_EA_get_value, py_xattr_EA_set_value },
	{ NULL }
};

static PyObject *py_xattr_EA_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct xattr_EA, type);
}


static PyTypeObject xattr_EA_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "xattr.EA",
	.tp_getset = py_xattr_EA_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_xattr_EA_new,
};


static PyObject *py_xattr_DosEAs_get_num_eas(PyObject *obj, void *closure)
{
	struct xattr_DosEAs *object = (struct xattr_DosEAs *)py_talloc_get_ptr(obj);
	PyObject *py_num_eas;
	py_num_eas = PyInt_FromLong(object->num_eas);
	return py_num_eas;
}

static int py_xattr_DosEAs_set_num_eas(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosEAs *object = (struct xattr_DosEAs *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_eas = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_xattr_DosEAs_get_eas(PyObject *obj, void *closure)
{
	struct xattr_DosEAs *object = (struct xattr_DosEAs *)py_talloc_get_ptr(obj);
	PyObject *py_eas;
	if (object->eas == NULL) {
		py_eas = Py_None;
		Py_INCREF(py_eas);
	} else {
		py_eas = PyList_New(object->num_eas);
		if (py_eas == NULL) {
			return NULL;
		}
		{
			int eas_cntr_1;
			for (eas_cntr_1 = 0; eas_cntr_1 < object->num_eas; eas_cntr_1++) {
				PyObject *py_eas_1;
				py_eas_1 = py_talloc_reference_ex(&xattr_EA_Type, object->eas, &object->eas[eas_cntr_1]);
				PyList_SetItem(py_eas, eas_cntr_1, py_eas_1);
			}
		}
	}
	return py_eas;
}

static int py_xattr_DosEAs_set_eas(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosEAs *object = (struct xattr_DosEAs *)py_talloc_get_ptr(py_obj);
	talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->eas);
	if (value == Py_None) {
		object->eas = NULL;
	} else {
		object->eas = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int eas_cntr_1;
			object->eas = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->eas, PyList_GET_SIZE(value));
			if (!object->eas) { return -1;; }
			talloc_set_name_const(object->eas, "ARRAY: object->eas");
			for (eas_cntr_1 = 0; eas_cntr_1 < PyList_GET_SIZE(value); eas_cntr_1++) {
				PY_CHECK_TYPE(&xattr_EA_Type, PyList_GET_ITEM(value, eas_cntr_1), return -1;);
				if (talloc_reference(object->eas, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, eas_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				object->eas[eas_cntr_1] = *(struct xattr_EA *)py_talloc_get_ptr(PyList_GET_ITEM(value, eas_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_xattr_DosEAs_getsetters[] = {
	{ discard_const_p(char, "num_eas"), py_xattr_DosEAs_get_num_eas, py_xattr_DosEAs_set_num_eas },
	{ discard_const_p(char, "eas"), py_xattr_DosEAs_get_eas, py_xattr_DosEAs_set_eas },
	{ NULL }
};

static PyObject *py_xattr_DosEAs_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct xattr_DosEAs, type);
}

static PyObject *py_xattr_DosEAs_ndr_pack(PyObject *py_obj)
{
	struct xattr_DosEAs *object = (struct xattr_DosEAs *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_xattr_DosEAs);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_xattr_DosEAs_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct xattr_DosEAs *object = (struct xattr_DosEAs *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_xattr_DosEAs);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_xattr_DosEAs_ndr_print(PyObject *py_obj)
{
	struct xattr_DosEAs *object = (struct xattr_DosEAs *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_xattr_DosEAs, "xattr_DosEAs", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_xattr_DosEAs_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_xattr_DosEAs_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_xattr_DosEAs_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_xattr_DosEAs_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject xattr_DosEAs_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "xattr.DosEAs",
	.tp_getset = py_xattr_DosEAs_getsetters,
	.tp_methods = py_xattr_DosEAs_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_xattr_DosEAs_new,
};


static PyObject *py_tdb_xattrs_get_num_eas(PyObject *obj, void *closure)
{
	struct tdb_xattrs *object = (struct tdb_xattrs *)py_talloc_get_ptr(obj);
	PyObject *py_num_eas;
	py_num_eas = PyInt_FromLong(object->num_eas);
	return py_num_eas;
}

static int py_tdb_xattrs_set_num_eas(PyObject *py_obj, PyObject *value, void *closure)
{
	struct tdb_xattrs *object = (struct tdb_xattrs *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_eas = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_tdb_xattrs_get_eas(PyObject *obj, void *closure)
{
	struct tdb_xattrs *object = (struct tdb_xattrs *)py_talloc_get_ptr(obj);
	PyObject *py_eas;
	py_eas = PyList_New(object->num_eas);
	if (py_eas == NULL) {
		return NULL;
	}
	{
		int eas_cntr_0;
		for (eas_cntr_0 = 0; eas_cntr_0 < object->num_eas; eas_cntr_0++) {
			PyObject *py_eas_0;
			py_eas_0 = py_talloc_reference_ex(&xattr_EA_Type, object->eas, &object->eas[eas_cntr_0]);
			PyList_SetItem(py_eas, eas_cntr_0, py_eas_0);
		}
	}
	return py_eas;
}

static int py_tdb_xattrs_set_eas(PyObject *py_obj, PyObject *value, void *closure)
{
	struct tdb_xattrs *object = (struct tdb_xattrs *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int eas_cntr_0;
		object->eas = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->eas, PyList_GET_SIZE(value));
		if (!object->eas) { return -1;; }
		talloc_set_name_const(object->eas, "ARRAY: object->eas");
		for (eas_cntr_0 = 0; eas_cntr_0 < PyList_GET_SIZE(value); eas_cntr_0++) {
			PY_CHECK_TYPE(&xattr_EA_Type, PyList_GET_ITEM(value, eas_cntr_0), return -1;);
			if (talloc_reference(object->eas, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, eas_cntr_0))) == NULL) {
				PyErr_NoMemory();
				return -1;
			}
			object->eas[eas_cntr_0] = *(struct xattr_EA *)py_talloc_get_ptr(PyList_GET_ITEM(value, eas_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_tdb_xattrs_getsetters[] = {
	{ discard_const_p(char, "num_eas"), py_tdb_xattrs_get_num_eas, py_tdb_xattrs_set_num_eas },
	{ discard_const_p(char, "eas"), py_tdb_xattrs_get_eas, py_tdb_xattrs_set_eas },
	{ NULL }
};

static PyObject *py_tdb_xattrs_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct tdb_xattrs, type);
}

static PyObject *py_tdb_xattrs_ndr_pack(PyObject *py_obj)
{
	struct tdb_xattrs *object = (struct tdb_xattrs *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_tdb_xattrs);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_tdb_xattrs_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct tdb_xattrs *object = (struct tdb_xattrs *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_tdb_xattrs);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_tdb_xattrs_ndr_print(PyObject *py_obj)
{
	struct tdb_xattrs *object = (struct tdb_xattrs *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_tdb_xattrs, "tdb_xattrs", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_tdb_xattrs_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_tdb_xattrs_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_tdb_xattrs_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_tdb_xattrs_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject tdb_xattrs_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "xattr.tdb_xattrs",
	.tp_getset = py_tdb_xattrs_getsetters,
	.tp_methods = py_tdb_xattrs_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_tdb_xattrs_new,
};


static PyObject *py_xattr_DosStream_get_flags(PyObject *obj, void *closure)
{
	struct xattr_DosStream *object = (struct xattr_DosStream *)py_talloc_get_ptr(obj);
	PyObject *py_flags;
	py_flags = PyInt_FromLong(object->flags);
	return py_flags;
}

static int py_xattr_DosStream_set_flags(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosStream *object = (struct xattr_DosStream *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->flags = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_xattr_DosStream_get_size(PyObject *obj, void *closure)
{
	struct xattr_DosStream *object = (struct xattr_DosStream *)py_talloc_get_ptr(obj);
	PyObject *py_size;
	py_size = PyLong_FromLongLong(object->size);
	return py_size;
}

static int py_xattr_DosStream_set_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosStream *object = (struct xattr_DosStream *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->size = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->size = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_xattr_DosStream_get_alloc_size(PyObject *obj, void *closure)
{
	struct xattr_DosStream *object = (struct xattr_DosStream *)py_talloc_get_ptr(obj);
	PyObject *py_alloc_size;
	py_alloc_size = PyLong_FromLongLong(object->alloc_size);
	return py_alloc_size;
}

static int py_xattr_DosStream_set_alloc_size(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosStream *object = (struct xattr_DosStream *)py_talloc_get_ptr(py_obj);
	if (PyLong_Check(value)) {
		object->alloc_size = PyLong_AsLongLong(value);
	} else if (PyInt_Check(value)) {
		object->alloc_size = PyInt_AsLong(value);
	} else {
		PyErr_Format(PyExc_TypeError, "Expected type %s or %s",\
		  PyInt_Type.tp_name, PyLong_Type.tp_name);
		return -1;
	}
	return 0;
}

static PyObject *py_xattr_DosStream_get_name(PyObject *obj, void *closure)
{
	struct xattr_DosStream *object = (struct xattr_DosStream *)py_talloc_get_ptr(obj);
	PyObject *py_name;
	py_name = PyString_FromStringOrNULL(object->name);
	return py_name;
}

static int py_xattr_DosStream_set_name(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosStream *object = (struct xattr_DosStream *)py_talloc_get_ptr(py_obj);
	object->name = talloc_strdup(py_talloc_get_mem_ctx(py_obj), PyString_AS_STRING(value));
	return 0;
}

static PyGetSetDef py_xattr_DosStream_getsetters[] = {
	{ discard_const_p(char, "flags"), py_xattr_DosStream_get_flags, py_xattr_DosStream_set_flags },
	{ discard_const_p(char, "size"), py_xattr_DosStream_get_size, py_xattr_DosStream_set_size },
	{ discard_const_p(char, "alloc_size"), py_xattr_DosStream_get_alloc_size, py_xattr_DosStream_set_alloc_size },
	{ discard_const_p(char, "name"), py_xattr_DosStream_get_name, py_xattr_DosStream_set_name },
	{ NULL }
};

static PyObject *py_xattr_DosStream_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct xattr_DosStream, type);
}


static PyTypeObject xattr_DosStream_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "xattr.DosStream",
	.tp_getset = py_xattr_DosStream_getsetters,
	.tp_methods = NULL,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_xattr_DosStream_new,
};


static PyObject *py_xattr_DosStreams_get_num_streams(PyObject *obj, void *closure)
{
	struct xattr_DosStreams *object = (struct xattr_DosStreams *)py_talloc_get_ptr(obj);
	PyObject *py_num_streams;
	py_num_streams = PyInt_FromLong(object->num_streams);
	return py_num_streams;
}

static int py_xattr_DosStreams_set_num_streams(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosStreams *object = (struct xattr_DosStreams *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->num_streams = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_xattr_DosStreams_get_streams(PyObject *obj, void *closure)
{
	struct xattr_DosStreams *object = (struct xattr_DosStreams *)py_talloc_get_ptr(obj);
	PyObject *py_streams;
	if (object->streams == NULL) {
		py_streams = Py_None;
		Py_INCREF(py_streams);
	} else {
		py_streams = PyList_New(object->num_streams);
		if (py_streams == NULL) {
			return NULL;
		}
		{
			int streams_cntr_1;
			for (streams_cntr_1 = 0; streams_cntr_1 < object->num_streams; streams_cntr_1++) {
				PyObject *py_streams_1;
				py_streams_1 = py_talloc_reference_ex(&xattr_DosStream_Type, object->streams, &object->streams[streams_cntr_1]);
				PyList_SetItem(py_streams, streams_cntr_1, py_streams_1);
			}
		}
	}
	return py_streams;
}

static int py_xattr_DosStreams_set_streams(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_DosStreams *object = (struct xattr_DosStreams *)py_talloc_get_ptr(py_obj);
	talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->streams);
	if (value == Py_None) {
		object->streams = NULL;
	} else {
		object->streams = NULL;
		PY_CHECK_TYPE(&PyList_Type, value, return -1;);
		{
			int streams_cntr_1;
			object->streams = talloc_array_ptrtype(py_talloc_get_mem_ctx(py_obj), object->streams, PyList_GET_SIZE(value));
			if (!object->streams) { return -1;; }
			talloc_set_name_const(object->streams, "ARRAY: object->streams");
			for (streams_cntr_1 = 0; streams_cntr_1 < PyList_GET_SIZE(value); streams_cntr_1++) {
				PY_CHECK_TYPE(&xattr_DosStream_Type, PyList_GET_ITEM(value, streams_cntr_1), return -1;);
				if (talloc_reference(object->streams, py_talloc_get_mem_ctx(PyList_GET_ITEM(value, streams_cntr_1))) == NULL) {
					PyErr_NoMemory();
					return -1;
				}
				object->streams[streams_cntr_1] = *(struct xattr_DosStream *)py_talloc_get_ptr(PyList_GET_ITEM(value, streams_cntr_1));
			}
		}
	}
	return 0;
}

static PyGetSetDef py_xattr_DosStreams_getsetters[] = {
	{ discard_const_p(char, "num_streams"), py_xattr_DosStreams_get_num_streams, py_xattr_DosStreams_set_num_streams },
	{ discard_const_p(char, "streams"), py_xattr_DosStreams_get_streams, py_xattr_DosStreams_set_streams },
	{ NULL }
};

static PyObject *py_xattr_DosStreams_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct xattr_DosStreams, type);
}

static PyObject *py_xattr_DosStreams_ndr_pack(PyObject *py_obj)
{
	struct xattr_DosStreams *object = (struct xattr_DosStreams *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_xattr_DosStreams);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_xattr_DosStreams_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct xattr_DosStreams *object = (struct xattr_DosStreams *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_xattr_DosStreams);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_xattr_DosStreams_ndr_print(PyObject *py_obj)
{
	struct xattr_DosStreams *object = (struct xattr_DosStreams *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_xattr_DosStreams, "xattr_DosStreams", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_xattr_DosStreams_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_xattr_DosStreams_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_xattr_DosStreams_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_xattr_DosStreams_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject xattr_DosStreams_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "xattr.DosStreams",
	.tp_getset = py_xattr_DosStreams_getsetters,
	.tp_methods = py_xattr_DosStreams_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_xattr_DosStreams_new,
};


static PyObject *py_security_descriptor_hash_v2_get_sd(PyObject *obj, void *closure)
{
	struct security_descriptor_hash_v2 *object = (struct security_descriptor_hash_v2 *)py_talloc_get_ptr(obj);
	PyObject *py_sd;
	if (object->sd == NULL) {
		py_sd = Py_None;
		Py_INCREF(py_sd);
	} else {
		py_sd = py_talloc_reference_ex(security_descriptor_Type, object->sd, object->sd);
	}
	return py_sd;
}

static int py_security_descriptor_hash_v2_set_sd(PyObject *py_obj, PyObject *value, void *closure)
{
	struct security_descriptor_hash_v2 *object = (struct security_descriptor_hash_v2 *)py_talloc_get_ptr(py_obj);
	talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->sd);
	if (value == Py_None) {
		object->sd = NULL;
	} else {
		object->sd = NULL;
		PY_CHECK_TYPE(security_descriptor_Type, value, return -1;);
		if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->sd = (struct security_descriptor *)py_talloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_security_descriptor_hash_v2_get_hash(PyObject *obj, void *closure)
{
	struct security_descriptor_hash_v2 *object = (struct security_descriptor_hash_v2 *)py_talloc_get_ptr(obj);
	PyObject *py_hash;
	py_hash = PyList_New(16);
	if (py_hash == NULL) {
		return NULL;
	}
	{
		int hash_cntr_0;
		for (hash_cntr_0 = 0; hash_cntr_0 < 16; hash_cntr_0++) {
			PyObject *py_hash_0;
			py_hash_0 = PyInt_FromLong(object->hash[hash_cntr_0]);
			PyList_SetItem(py_hash, hash_cntr_0, py_hash_0);
		}
	}
	return py_hash;
}

static int py_security_descriptor_hash_v2_set_hash(PyObject *py_obj, PyObject *value, void *closure)
{
	struct security_descriptor_hash_v2 *object = (struct security_descriptor_hash_v2 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int hash_cntr_0;
		for (hash_cntr_0 = 0; hash_cntr_0 < PyList_GET_SIZE(value); hash_cntr_0++) {
			PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, hash_cntr_0), return -1;);
			object->hash[hash_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, hash_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_security_descriptor_hash_v2_getsetters[] = {
	{ discard_const_p(char, "sd"), py_security_descriptor_hash_v2_get_sd, py_security_descriptor_hash_v2_set_sd },
	{ discard_const_p(char, "hash"), py_security_descriptor_hash_v2_get_hash, py_security_descriptor_hash_v2_set_hash },
	{ NULL }
};

static PyObject *py_security_descriptor_hash_v2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct security_descriptor_hash_v2, type);
}

static PyObject *py_security_descriptor_hash_v2_ndr_pack(PyObject *py_obj)
{
	struct security_descriptor_hash_v2 *object = (struct security_descriptor_hash_v2 *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_security_descriptor_hash_v2);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_security_descriptor_hash_v2_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct security_descriptor_hash_v2 *object = (struct security_descriptor_hash_v2 *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_security_descriptor_hash_v2);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_security_descriptor_hash_v2_ndr_print(PyObject *py_obj)
{
	struct security_descriptor_hash_v2 *object = (struct security_descriptor_hash_v2 *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_security_descriptor_hash_v2, "security_descriptor_hash_v2", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_security_descriptor_hash_v2_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_security_descriptor_hash_v2_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_security_descriptor_hash_v2_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_security_descriptor_hash_v2_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject security_descriptor_hash_v2_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "xattr.security_descriptor_hash_v2",
	.tp_getset = py_security_descriptor_hash_v2_getsetters,
	.tp_methods = py_security_descriptor_hash_v2_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_security_descriptor_hash_v2_new,
};


static PyObject *py_security_descriptor_hash_v3_get_sd(PyObject *obj, void *closure)
{
	struct security_descriptor_hash_v3 *object = (struct security_descriptor_hash_v3 *)py_talloc_get_ptr(obj);
	PyObject *py_sd;
	if (object->sd == NULL) {
		py_sd = Py_None;
		Py_INCREF(py_sd);
	} else {
		py_sd = py_talloc_reference_ex(security_descriptor_Type, object->sd, object->sd);
	}
	return py_sd;
}

static int py_security_descriptor_hash_v3_set_sd(PyObject *py_obj, PyObject *value, void *closure)
{
	struct security_descriptor_hash_v3 *object = (struct security_descriptor_hash_v3 *)py_talloc_get_ptr(py_obj);
	talloc_unlink(py_talloc_get_mem_ctx(py_obj), object->sd);
	if (value == Py_None) {
		object->sd = NULL;
	} else {
		object->sd = NULL;
		PY_CHECK_TYPE(security_descriptor_Type, value, return -1;);
		if (talloc_reference(py_talloc_get_mem_ctx(py_obj), py_talloc_get_mem_ctx(value)) == NULL) {
			PyErr_NoMemory();
			return -1;
		}
		object->sd = (struct security_descriptor *)py_talloc_get_ptr(value);
	}
	return 0;
}

static PyObject *py_security_descriptor_hash_v3_get_hash_type(PyObject *obj, void *closure)
{
	struct security_descriptor_hash_v3 *object = (struct security_descriptor_hash_v3 *)py_talloc_get_ptr(obj);
	PyObject *py_hash_type;
	py_hash_type = PyInt_FromLong(object->hash_type);
	return py_hash_type;
}

static int py_security_descriptor_hash_v3_set_hash_type(PyObject *py_obj, PyObject *value, void *closure)
{
	struct security_descriptor_hash_v3 *object = (struct security_descriptor_hash_v3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->hash_type = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_security_descriptor_hash_v3_get_hash(PyObject *obj, void *closure)
{
	struct security_descriptor_hash_v3 *object = (struct security_descriptor_hash_v3 *)py_talloc_get_ptr(obj);
	PyObject *py_hash;
	py_hash = PyList_New(64);
	if (py_hash == NULL) {
		return NULL;
	}
	{
		int hash_cntr_0;
		for (hash_cntr_0 = 0; hash_cntr_0 < 64; hash_cntr_0++) {
			PyObject *py_hash_0;
			py_hash_0 = PyInt_FromLong(object->hash[hash_cntr_0]);
			PyList_SetItem(py_hash, hash_cntr_0, py_hash_0);
		}
	}
	return py_hash;
}

static int py_security_descriptor_hash_v3_set_hash(PyObject *py_obj, PyObject *value, void *closure)
{
	struct security_descriptor_hash_v3 *object = (struct security_descriptor_hash_v3 *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyList_Type, value, return -1;);
	{
		int hash_cntr_0;
		for (hash_cntr_0 = 0; hash_cntr_0 < PyList_GET_SIZE(value); hash_cntr_0++) {
			PY_CHECK_TYPE(&PyInt_Type, PyList_GET_ITEM(value, hash_cntr_0), return -1;);
			object->hash[hash_cntr_0] = PyInt_AsLong(PyList_GET_ITEM(value, hash_cntr_0));
		}
	}
	return 0;
}

static PyGetSetDef py_security_descriptor_hash_v3_getsetters[] = {
	{ discard_const_p(char, "sd"), py_security_descriptor_hash_v3_get_sd, py_security_descriptor_hash_v3_set_sd },
	{ discard_const_p(char, "hash_type"), py_security_descriptor_hash_v3_get_hash_type, py_security_descriptor_hash_v3_set_hash_type },
	{ discard_const_p(char, "hash"), py_security_descriptor_hash_v3_get_hash, py_security_descriptor_hash_v3_set_hash },
	{ NULL }
};

static PyObject *py_security_descriptor_hash_v3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct security_descriptor_hash_v3, type);
}

static PyObject *py_security_descriptor_hash_v3_ndr_pack(PyObject *py_obj)
{
	struct security_descriptor_hash_v3 *object = (struct security_descriptor_hash_v3 *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_security_descriptor_hash_v3);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_security_descriptor_hash_v3_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct security_descriptor_hash_v3 *object = (struct security_descriptor_hash_v3 *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_security_descriptor_hash_v3);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_security_descriptor_hash_v3_ndr_print(PyObject *py_obj)
{
	struct security_descriptor_hash_v3 *object = (struct security_descriptor_hash_v3 *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_security_descriptor_hash_v3, "security_descriptor_hash_v3", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_security_descriptor_hash_v3_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_security_descriptor_hash_v3_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_security_descriptor_hash_v3_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_security_descriptor_hash_v3_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject security_descriptor_hash_v3_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "xattr.security_descriptor_hash_v3",
	.tp_getset = py_security_descriptor_hash_v3_getsetters,
	.tp_methods = py_security_descriptor_hash_v3_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_security_descriptor_hash_v3_new,
};

PyObject *py_import_xattr_NTACL_Info(TALLOC_CTX *mem_ctx, int level, union xattr_NTACL_Info *in)
{
	PyObject *ret;

	switch (level) {
		case 1:
			if (in->sd == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = py_talloc_reference_ex(security_descriptor_Type, in->sd, in->sd);
			}
			return ret;

		case 2:
			if (in->sd_hs2 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = py_talloc_reference_ex(&security_descriptor_hash_v2_Type, in->sd_hs2, in->sd_hs2);
			}
			return ret;

		case 3:
			if (in->sd_hs3 == NULL) {
				ret = Py_None;
				Py_INCREF(ret);
			} else {
				ret = py_talloc_reference_ex(&security_descriptor_hash_v3_Type, in->sd_hs3, in->sd_hs3);
			}
			return ret;

	}
	PyErr_SetString(PyExc_TypeError, "unknown union level");
	return NULL;
}

union xattr_NTACL_Info *py_export_xattr_NTACL_Info(TALLOC_CTX *mem_ctx, int level, PyObject *in)
{
	union xattr_NTACL_Info *ret = talloc_zero(mem_ctx, union xattr_NTACL_Info);
	switch (level) {
		case 1:
			if (in == Py_None) {
				ret->sd = NULL;
			} else {
				ret->sd = NULL;
				PY_CHECK_TYPE(security_descriptor_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->sd = (struct security_descriptor *)py_talloc_get_ptr(in);
			}
			break;

		case 2:
			if (in == Py_None) {
				ret->sd_hs2 = NULL;
			} else {
				ret->sd_hs2 = NULL;
				PY_CHECK_TYPE(&security_descriptor_hash_v2_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->sd_hs2 = (struct security_descriptor_hash_v2 *)py_talloc_get_ptr(in);
			}
			break;

		case 3:
			if (in == Py_None) {
				ret->sd_hs3 = NULL;
			} else {
				ret->sd_hs3 = NULL;
				PY_CHECK_TYPE(&security_descriptor_hash_v3_Type, in, talloc_free(ret); return NULL;);
				if (talloc_reference(mem_ctx, py_talloc_get_mem_ctx(in)) == NULL) {
					PyErr_NoMemory();
					talloc_free(ret); return NULL;
				}
				ret->sd_hs3 = (struct security_descriptor_hash_v3 *)py_talloc_get_ptr(in);
			}
			break;

		default:
			PyErr_SetString(PyExc_TypeError, "invalid union level value");
			talloc_free(ret);
			ret = NULL;
	}

	return ret;
}


static PyObject *py_xattr_NTACL_get_version(PyObject *obj, void *closure)
{
	struct xattr_NTACL *object = (struct xattr_NTACL *)py_talloc_get_ptr(obj);
	PyObject *py_version;
	py_version = PyInt_FromLong(object->version);
	return py_version;
}

static int py_xattr_NTACL_set_version(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_NTACL *object = (struct xattr_NTACL *)py_talloc_get_ptr(py_obj);
	PY_CHECK_TYPE(&PyInt_Type, value, return -1;);
	object->version = PyInt_AsLong(value);
	return 0;
}

static PyObject *py_xattr_NTACL_get_info(PyObject *obj, void *closure)
{
	struct xattr_NTACL *object = (struct xattr_NTACL *)py_talloc_get_ptr(obj);
	PyObject *py_info;
	py_info = py_import_xattr_NTACL_Info(py_talloc_get_mem_ctx(obj), object->version, &object->info);
	if (py_info == NULL) {
		return NULL;
	}
	return py_info;
}

static int py_xattr_NTACL_set_info(PyObject *py_obj, PyObject *value, void *closure)
{
	struct xattr_NTACL *object = (struct xattr_NTACL *)py_talloc_get_ptr(py_obj);
	{
		union xattr_NTACL_Info *info_switch_0;
		info_switch_0 = py_export_xattr_NTACL_Info(py_talloc_get_mem_ctx(py_obj), object->version, value);
		if (info_switch_0 == NULL) {
			return -1;
		}
		object->info = *info_switch_0;
	}
	return 0;
}

static PyGetSetDef py_xattr_NTACL_getsetters[] = {
	{ discard_const_p(char, "version"), py_xattr_NTACL_get_version, py_xattr_NTACL_set_version },
	{ discard_const_p(char, "info"), py_xattr_NTACL_get_info, py_xattr_NTACL_set_info },
	{ NULL }
};

static PyObject *py_xattr_NTACL_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_talloc_new(struct xattr_NTACL, type);
}

static PyObject *py_xattr_NTACL_ndr_pack(PyObject *py_obj)
{
	struct xattr_NTACL *object = (struct xattr_NTACL *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	err = ndr_push_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_push_flags_fn_t)ndr_push_xattr_NTACL);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	return PyString_FromStringAndSize((char *)blob.data, blob.length);
}

static PyObject *py_xattr_NTACL_ndr_unpack(PyObject *py_obj, PyObject *args)
{
	struct xattr_NTACL *object = (struct xattr_NTACL *)py_talloc_get_ptr(py_obj);
	DATA_BLOB blob;
	enum ndr_err_code err;
	if (!PyArg_ParseTuple(args, "s#:__ndr_unpack__", &blob.data, &blob.length))
		return NULL;

	err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_xattr_NTACL);
	if (err != NDR_ERR_SUCCESS) {
		PyErr_SetNdrError(err);
		return NULL;
	}

	Py_RETURN_NONE;
}

static PyObject *py_xattr_NTACL_ndr_print(PyObject *py_obj)
{
	struct xattr_NTACL *object = (struct xattr_NTACL *)py_talloc_get_ptr(py_obj);
	PyObject *ret;
	char *retstr;

	retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_xattr_NTACL, "xattr_NTACL", object);
	ret = PyString_FromString(retstr);
	talloc_free(retstr);

	return ret;
}

static PyMethodDef py_xattr_NTACL_methods[] = {
	{ "__ndr_pack__", (PyCFunction)py_xattr_NTACL_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
	{ "__ndr_unpack__", (PyCFunction)py_xattr_NTACL_ndr_unpack, METH_VARARGS, "S.ndr_unpack(class, blob) -> None\nNDR unpack" },
	{ "__ndr_print__", (PyCFunction)py_xattr_NTACL_ndr_print, METH_VARARGS, "S.ndr_print(object) -> None\nNDR print" },
	{ NULL, NULL, 0, NULL }
};


static PyTypeObject xattr_NTACL_Type = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "xattr.NTACL",
	.tp_getset = py_xattr_NTACL_getsetters,
	.tp_methods = py_xattr_NTACL_methods,
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_basicsize = sizeof(py_talloc_Object),
	.tp_new = py_xattr_NTACL_new,
};


static bool pack_py_xattr_parse_DOSATTRIB_args_in(PyObject *args, PyObject *kwargs, struct xattr_parse_DOSATTRIB *r)
{
	PyObject *py_x;
	const char *kwnames[] = {
		"x", NULL
	};

	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:xattr_parse_DOSATTRIB", discard_const_p(char *, kwnames), &py_x)) {
		return false;
	}

	PY_CHECK_TYPE(&xattr_DOSATTRIB_Type, py_x, return false;);
	if (talloc_reference(r, py_talloc_get_mem_ctx(py_x)) == NULL) {
		PyErr_NoMemory();
		return false;
	}
	r->in.x = *(struct xattr_DOSATTRIB *)py_talloc_get_ptr(py_x);
	return true;
}

static PyObject *unpack_py_xattr_parse_DOSATTRIB_args_out(struct xattr_parse_DOSATTRIB *r)
{
	PyObject *result;
	result = Py_None;
	Py_INCREF(result);
	return result;
}

const struct PyNdrRpcMethodDef py_ndr_xattr_methods[] = {
	{ "parse_DOSATTRIB", "S.parse_DOSATTRIB(x) -> None", (py_dcerpc_call_fn)dcerpc_xattr_parse_DOSATTRIB_r, (py_data_pack_fn)pack_py_xattr_parse_DOSATTRIB_args_in, (py_data_unpack_fn)unpack_py_xattr_parse_DOSATTRIB_args_out, 0, &ndr_table_xattr },
	{ NULL }
};

static PyObject *interface_xattr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
	return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_xattr);
}

static PyTypeObject xattr_InterfaceType = {
	PyObject_HEAD_INIT(NULL) 0,
	.tp_name = "xattr.xattr",
	.tp_basicsize = sizeof(dcerpc_InterfaceObject),
	.tp_doc = "xattr(binding, lp_ctx=None, credentials=None) -> connection\n"
"\n"
"binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
"lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
"credentials should be a credentials.Credentials object.\n\n",
	.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
	.tp_new = interface_xattr_new,
};

static PyMethodDef xattr_methods[] = {
	{ NULL, NULL, 0, NULL }
};

void initxattr(void)
{
	PyObject *m;
	PyObject *dep_samba_dcerpc_base;
	PyObject *dep_talloc;
	PyObject *dep_samba_dcerpc_security;

	dep_samba_dcerpc_base = PyImport_ImportModule("samba.dcerpc.base");
	if (dep_samba_dcerpc_base == NULL)
		return;

	dep_talloc = PyImport_ImportModule("talloc");
	if (dep_talloc == NULL)
		return;

	dep_samba_dcerpc_security = PyImport_ImportModule("samba.dcerpc.security");
	if (dep_samba_dcerpc_security == NULL)
		return;

	security_descriptor_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_security, "descriptor");
	if (security_descriptor_Type == NULL)
		return;

	ClientConnection_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ClientConnection");
	if (ClientConnection_Type == NULL)
		return;

	Object_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "Object");
	if (Object_Type == NULL)
		return;

	xattr_DosInfoFFFFCompat_Type.tp_base = Object_Type;

	xattr_DosInfo1_Type.tp_base = Object_Type;

	xattr_DosInfo2Old_Type.tp_base = Object_Type;

	xattr_DosInfo3_Type.tp_base = Object_Type;

	xattr_DosAttrib_Type.tp_base = Object_Type;

	xattr_DOSATTRIB_Type.tp_base = Object_Type;

	xattr_EA_Type.tp_base = Object_Type;

	xattr_DosEAs_Type.tp_base = Object_Type;

	tdb_xattrs_Type.tp_base = Object_Type;

	xattr_DosStream_Type.tp_base = Object_Type;

	xattr_DosStreams_Type.tp_base = Object_Type;

	security_descriptor_hash_v2_Type.tp_base = Object_Type;

	security_descriptor_hash_v3_Type.tp_base = Object_Type;

	xattr_NTACL_Type.tp_base = Object_Type;

	xattr_InterfaceType.tp_base = ClientConnection_Type;

	if (PyType_Ready(&xattr_DosInfoFFFFCompat_Type) < 0)
		return;
	if (PyType_Ready(&xattr_DosInfo1_Type) < 0)
		return;
	if (PyType_Ready(&xattr_DosInfo2Old_Type) < 0)
		return;
	if (PyType_Ready(&xattr_DosInfo3_Type) < 0)
		return;
	if (PyType_Ready(&xattr_DosAttrib_Type) < 0)
		return;
	if (PyType_Ready(&xattr_DOSATTRIB_Type) < 0)
		return;
	if (PyType_Ready(&xattr_EA_Type) < 0)
		return;
	if (PyType_Ready(&xattr_DosEAs_Type) < 0)
		return;
	if (PyType_Ready(&tdb_xattrs_Type) < 0)
		return;
	if (PyType_Ready(&xattr_DosStream_Type) < 0)
		return;
	if (PyType_Ready(&xattr_DosStreams_Type) < 0)
		return;
	if (PyType_Ready(&security_descriptor_hash_v2_Type) < 0)
		return;
	if (PyType_Ready(&security_descriptor_hash_v3_Type) < 0)
		return;
	if (PyType_Ready(&xattr_NTACL_Type) < 0)
		return;
	if (PyType_Ready(&xattr_InterfaceType) < 0)
		return;
	if (!PyInterface_AddNdrRpcMethods(&xattr_InterfaceType, py_ndr_xattr_methods))
		return;

#ifdef PY_DOSINFOFFFFCOMPAT_PATCH
	PY_DOSINFOFFFFCOMPAT_PATCH(&xattr_DosInfoFFFFCompat_Type);
#endif
#ifdef PY_DOSINFO1_PATCH
	PY_DOSINFO1_PATCH(&xattr_DosInfo1_Type);
#endif
#ifdef PY_DOSINFO2OLD_PATCH
	PY_DOSINFO2OLD_PATCH(&xattr_DosInfo2Old_Type);
#endif
#ifdef PY_DOSINFO3_PATCH
	PY_DOSINFO3_PATCH(&xattr_DosInfo3_Type);
#endif
#ifdef PY_DOSATTRIB_PATCH
	PY_DOSATTRIB_PATCH(&xattr_DosAttrib_Type);
#endif
#ifdef PY_DOSATTRIB_PATCH
	PY_DOSATTRIB_PATCH(&xattr_DOSATTRIB_Type);
#endif
#ifdef PY_EA_PATCH
	PY_EA_PATCH(&xattr_EA_Type);
#endif
#ifdef PY_DOSEAS_PATCH
	PY_DOSEAS_PATCH(&xattr_DosEAs_Type);
#endif
#ifdef PY_TDB_XATTRS_PATCH
	PY_TDB_XATTRS_PATCH(&tdb_xattrs_Type);
#endif
#ifdef PY_DOSSTREAM_PATCH
	PY_DOSSTREAM_PATCH(&xattr_DosStream_Type);
#endif
#ifdef PY_DOSSTREAMS_PATCH
	PY_DOSSTREAMS_PATCH(&xattr_DosStreams_Type);
#endif
#ifdef PY_SECURITY_DESCRIPTOR_HASH_V2_PATCH
	PY_SECURITY_DESCRIPTOR_HASH_V2_PATCH(&security_descriptor_hash_v2_Type);
#endif
#ifdef PY_SECURITY_DESCRIPTOR_HASH_V3_PATCH
	PY_SECURITY_DESCRIPTOR_HASH_V3_PATCH(&security_descriptor_hash_v3_Type);
#endif
#ifdef PY_NTACL_PATCH
	PY_NTACL_PATCH(&xattr_NTACL_Type);
#endif
#ifdef PY_XATTR_PATCH
	PY_XATTR_PATCH(&xattr_InterfaceType);
#endif

	m = Py_InitModule3("xattr", xattr_methods, "xattr DCE/RPC");
	if (m == NULL)
		return;

	PyModule_AddObject(m, "XATTR_DOSINFO_EA_SIZE", PyInt_FromLong(XATTR_DOSINFO_EA_SIZE));
	PyModule_AddObject(m, "XATTR_MAX_STREAM_SIZE", PyInt_FromLong(0x4000));
	PyModule_AddObject(m, "XATTR_DOSSTREAMS_NAME", PyString_FromString("user.DosStreams"));
	PyModule_AddObject(m, "XATTR_SD_HASH_TYPE_SHA256", PyInt_FromLong(0x1));
	PyModule_AddObject(m, "XATTR_SD_HASH_SIZE", PyInt_FromLong(64));
	PyModule_AddObject(m, "XATTR_DOSINFO_CREATE_TIME", PyInt_FromLong(XATTR_DOSINFO_CREATE_TIME));
	PyModule_AddObject(m, "XATTR_DOSINFO_SIZE", PyInt_FromLong(XATTR_DOSINFO_SIZE));
	PyModule_AddObject(m, "XATTR_DOSINFO_ATTRIB", PyInt_FromLong(XATTR_DOSINFO_ATTRIB));
	PyModule_AddObject(m, "XATTR_DOSINFO_ALLOC_SIZE", PyInt_FromLong(XATTR_DOSINFO_ALLOC_SIZE));
	PyModule_AddObject(m, "XATTR_MAX_STREAM_SIZE_TDB", PyInt_FromLong(0x100000));
	PyModule_AddObject(m, "XATTR_DOSATTRIB_ESTIMATED_SIZE", PyInt_FromLong(64));
	PyModule_AddObject(m, "XATTR_NTACL_NAME", PyString_FromString("security.NTACL"));
	PyModule_AddObject(m, "XATTR_DOSINFO_CHANGE_TIME", PyInt_FromLong(XATTR_DOSINFO_CHANGE_TIME));
	PyModule_AddObject(m, "XATTR_STREAM_FLAG_INTERNAL", PyInt_FromLong(0x00000001));
	PyModule_AddObject(m, "XATTR_DOSSTREAM_PREFIX", PyString_FromString("user.DosStream."));
	PyModule_AddObject(m, "XATTR_DOSEAS_NAME", PyString_FromString("user.DosEAs"));
	PyModule_AddObject(m, "XATTR_DOSATTRIB_NAME", PyString_FromString("user.DosAttrib"));
	PyModule_AddObject(m, "XATTR_SD_HASH_TYPE_NONE", PyInt_FromLong(0x0));
	Py_INCREF((PyObject *)(void *)&xattr_DosInfoFFFFCompat_Type);
	PyModule_AddObject(m, "DosInfoFFFFCompat", (PyObject *)(void *)&xattr_DosInfoFFFFCompat_Type);
	Py_INCREF((PyObject *)(void *)&xattr_DosInfo1_Type);
	PyModule_AddObject(m, "DosInfo1", (PyObject *)(void *)&xattr_DosInfo1_Type);
	Py_INCREF((PyObject *)(void *)&xattr_DosInfo2Old_Type);
	PyModule_AddObject(m, "DosInfo2Old", (PyObject *)(void *)&xattr_DosInfo2Old_Type);
	Py_INCREF((PyObject *)(void *)&xattr_DosInfo3_Type);
	PyModule_AddObject(m, "DosInfo3", (PyObject *)(void *)&xattr_DosInfo3_Type);
	Py_INCREF((PyObject *)(void *)&xattr_DosAttrib_Type);
	PyModule_AddObject(m, "DosAttrib", (PyObject *)(void *)&xattr_DosAttrib_Type);
	Py_INCREF((PyObject *)(void *)&xattr_DOSATTRIB_Type);
	PyModule_AddObject(m, "DOSATTRIB", (PyObject *)(void *)&xattr_DOSATTRIB_Type);
	Py_INCREF((PyObject *)(void *)&xattr_EA_Type);
	PyModule_AddObject(m, "EA", (PyObject *)(void *)&xattr_EA_Type);
	Py_INCREF((PyObject *)(void *)&xattr_DosEAs_Type);
	PyModule_AddObject(m, "DosEAs", (PyObject *)(void *)&xattr_DosEAs_Type);
	Py_INCREF((PyObject *)(void *)&tdb_xattrs_Type);
	PyModule_AddObject(m, "tdb_xattrs", (PyObject *)(void *)&tdb_xattrs_Type);
	Py_INCREF((PyObject *)(void *)&xattr_DosStream_Type);
	PyModule_AddObject(m, "DosStream", (PyObject *)(void *)&xattr_DosStream_Type);
	Py_INCREF((PyObject *)(void *)&xattr_DosStreams_Type);
	PyModule_AddObject(m, "DosStreams", (PyObject *)(void *)&xattr_DosStreams_Type);
	Py_INCREF((PyObject *)(void *)&security_descriptor_hash_v2_Type);
	PyModule_AddObject(m, "security_descriptor_hash_v2", (PyObject *)(void *)&security_descriptor_hash_v2_Type);
	Py_INCREF((PyObject *)(void *)&security_descriptor_hash_v3_Type);
	PyModule_AddObject(m, "security_descriptor_hash_v3", (PyObject *)(void *)&security_descriptor_hash_v3_Type);
	Py_INCREF((PyObject *)(void *)&xattr_NTACL_Type);
	PyModule_AddObject(m, "NTACL", (PyObject *)(void *)&xattr_NTACL_Type);
	Py_INCREF((PyObject *)(void *)&xattr_InterfaceType);
	PyModule_AddObject(m, "xattr", (PyObject *)(void *)&xattr_InterfaceType);
#ifdef PY_MOD_XATTR_PATCH
	PY_MOD_XATTR_PATCH(m);
#endif

}
