static PyMethodDef py_ccache_container_methods[] = {
{ "get_name", py_ccache_name, METH_NOARGS,
"S.get_name() -> name\nObtain KRB5 credentials cache name." },
- { NULL }
+ {0}
};
PyTypeObject PyCredentialCacheContainer = {
conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Wno-error=cast-align', testflags=True)
conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Wno-error=format-nonliteral', testflags=True)
conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Wno-error=for-loop-analysis', testflags=True)
- conf.ADD_NAMED_CFLAGS('PICKY_CFLAGS', '-Wno-error=missing-field-initializers', testflags=True)
if Options.options.fatal_errors:
conf.ADD_CFLAGS('-Wfatal-errors', testflags=True)
"contextauth", 'C', POPT_ARG_NONE, &context_auth,
0, "Use new authentication function with context", "integer"
},
- {
- NULL
- }
+ {0}
};
setbuf(stdout, NULL);
static PyMethodDef py_crypto_methods[] = {
{ "arcfour_crypt_blob", (PyCFunction)py_crypto_arcfour_crypt_blob, METH_VARARGS, py_crypto_arcfour_crypt_blob_doc },
- { NULL },
+ {0},
};
static struct PyModuleDef moduledef = {
{ "samba_schema_attribute_add",
(PyCFunction)py_ldb_samba_schema_attribute_add,
METH_VARARGS, NULL },
- { NULL },
+ {0},
};
static struct PyModuleDef moduledef = {
static unsigned calculate_popt_array_length(struct poptOption *opts)
{
unsigned i;
- struct poptOption zero_opt = { NULL };
+ struct poptOption zero_opt = { 0 };
for (i=0; memcmp(&zero_opt, &opts[i], sizeof(zero_opt)) != 0; i++) ;
return i;
}
POPT_COMMON_CREDENTIALS
POPT_COMMON_CONNECTION
POPT_COMMON_VERSION
- { NULL }
+ {0}
};
/*
{
unsigned int num = 0;
char *name = NULL, *value = NULL;
- struct ldb_val val = { NULL, };
+ struct ldb_val val = { 0 };
int err;
Py_ssize_t size = 0;
{ "get_rdn_value", (PyCFunction)py_ldb_dn_get_rdn_value, METH_NOARGS,
"S.get_rdn_value() -> string\n"
"get the RDN attribute value as a binary string" },
- { NULL }
+ {0}
};
static Py_ssize_t py_ldb_dn_len(PyLdbDnObject *self)
{ "_register_test_extensions", (PyCFunction)py_ldb_register_test_extensions, METH_NOARGS,
"S._register_test_extensions() -> None\n"
"Register internal extensions used in testing" },
- { NULL },
+ {0},
};
static PyObject *PyLdbModule_FromModule(struct ldb_module *mod)
"S.result() -> ldb.Result (without msgs and referrals)\n" },
{ "abandon", (PyCFunction)py_ldb_search_iterator_abandon, METH_NOARGS,
"S.abandon()\n" },
- { NULL }
+ {0}
};
static PyObject *py_ldb_search_iterator_repr(PyLdbSearchIteratorObject *self)
{ "start_transaction", (PyCFunction)py_ldb_module_start_transaction, METH_NOARGS, NULL },
{ "end_transaction", (PyCFunction)py_ldb_module_end_transaction, METH_NOARGS, NULL },
{ "del_transaction", (PyCFunction)py_ldb_module_del_transaction, METH_NOARGS, NULL },
- { NULL },
+ {0},
};
static void py_ldb_module_dealloc(PyLdbModuleObject *self)
{ "get", (PyCFunction)py_ldb_msg_element_get, METH_VARARGS, NULL },
{ "set_flags", (PyCFunction)py_ldb_msg_element_set_flags, METH_VARARGS, NULL },
{ "flags", (PyCFunction)py_ldb_msg_element_flags, METH_NOARGS, NULL },
- { NULL },
+ {0},
};
static Py_ssize_t py_ldb_msg_element_len(PyLdbMessageElementObject *self)
{ "add", (PyCFunction)py_ldb_msg_add, METH_VARARGS,
"S.add(element)\n\n"
"Add an element to this message." },
- { NULL },
+ {0},
};
static PyObject *py_ldb_msg_iter(PyLdbMessageObject *self)
{ "binary_decode", py_binary_decode, METH_VARARGS,
"S.binary_decode(string) -> string\n\n"
"Perform a RFC2254 binary decode on a string" },
- { NULL }
+ {0}
};
#define MODULE_DOC "An interface to LDB, a LDAP-like API that can either to talk an embedded database (TDB-based) or a standards-compliant LDAP server."
{ "relax", 0, POPT_ARG_NONE, NULL, CMDLINE_RELAX, "pass relax control", NULL },
{ "cross-ncs", 0, POPT_ARG_NONE, NULL, 'N', "search across NC boundaries", NULL },
{ "extended-dn", 0, POPT_ARG_NONE, NULL, 'E', "show extended DNs", NULL },
- { NULL }
+ {0}
};
void ldb_cmdline_help(struct ldb_context *ldb, const char *cmdname, FILE *f)
"enable tracking of the NULL object"},
{ "total_blocks", (PyCFunction)pytalloc_total_blocks, METH_VARARGS,
"return talloc block count"},
- { NULL }
+ {0}
};
/**
"call pytalloc_reference_ex"},
{ "base_reference", (PyCFunction)testpytalloc_base_reference, METH_VARARGS,
"call pytalloc_reference_ex"},
- { NULL }
+ {0}
};
static PyTypeObject DObject_Type;
"S.enable_seqnum() -> None" },
{ "increment_seqnum_nonblock", (PyCFunction)obj_increment_seqnum_nonblock, METH_NOARGS,
"S.increment_seqnum_nonblock() -> None" },
- { NULL }
+ {0}
};
static PyObject *obj_get_hash_size(PyTdbObject *self, void *closure)
"S.start()" },
{ "add", (PyCFunction)py_tevent_queue_add, METH_VARARGS,
"S.add(ctx, req, trigger, baton)" },
- { NULL },
+ {0},
};
static PyObject *py_tevent_context_wakeup_send(PyObject *self, PyObject *args)
.get = (getter)py_tevent_timer_get_active,
.doc = discard_const_p(char, "true if the timer is scheduled to run"),
},
- {NULL},
+ {0},
};
static PyTypeObject TeventTimer_Type = {
METH_VARARGS, "S.add_timer(offset_seconds, handler) -> timer" },
{ "add_fd", (PyCFunction)py_tevent_context_add_fd,
METH_VARARGS, "S.add_fd(fd, flags, handler) -> fd" },
- { NULL },
+ {0},
};
static PyObject *py_tevent_req_wakeup_recv(PyObject *self,
.get = (getter)py_tevent_req_is_in_progress,
.doc = discard_const_p(char, "Whether the request is in progress"),
},
- { NULL }
+ {0}
};
static PyObject *py_tevent_req_post(PyObject *self, PyObject *args)
METH_VARARGS, "set_endtime(ctx, endtime)" },
{ "cancel", (PyCFunction)py_tevent_req_cancel,
METH_NOARGS, "cancel()" },
- { NULL }
+ {0}
};
static void py_tevent_req_dealloc(TeventReq_Object *self)
.get = (getter)py_tevent_queue_get_length,
.doc = discard_const_p(char, "The number of elements in the queue."),
},
- { NULL },
+ {0},
};
static void py_tevent_queue_dealloc(TeventQueue_Object *self)
py_tevent_context_signal_support),
.doc = discard_const_p(char, "if this platform and tevent context support signal handling"),
},
- { NULL }
+ {0}
};
static void py_tevent_context_dealloc(TeventContext_Object *self)
METH_VARARGS, "set_default_backend(backend)" },
{ "backend_list", (PyCFunction)py_backend_list,
METH_NOARGS, "backend_list() -> list" },
- { NULL },
+ {0},
};
#define MODULE_DOC PyDoc_STR("Python wrapping of talloc-maintained objects.")
"S.name_status(name, dest, timeout=0, retries=0) -> (reply_from, name, status)\n"
"Find the status of a name" },
- { NULL }
+ {0}
};
PyTypeObject nbt_node_Type = {
py_se_access_check),
METH_VARARGS|METH_KEYWORDS,
"access_check(security_descriptor, token, access_desired) -> access_granted. Raises NT_STATUS on error, including on access check failure, returns access granted bitmask"},
- { NULL },
+ {0},
};
static struct PyModuleDef moduledef = {
NULL, NULL, NULL},
{discard_const_p(char, "machine_extensions"),
(getter)GPO_get_machine_extensions, NULL, NULL, NULL},
- {NULL}
+ {0}
};
static PyObject *py_gpo_get_unix_path(PyObject *self, PyObject *args,
py_gpo_get_unix_path),
METH_VARARGS | METH_KEYWORDS,
NULL },
- {NULL}
+ {0}
};
static PyTypeObject GPOType = {
METH_VARARGS | METH_KEYWORDS,
NULL },
#endif
- { NULL }
+ {0}
};
static PyTypeObject ads_ADSType = {
{"gpo_get_sysvol_gpt_version",
(PyCFunction)py_gpo_get_sysvol_gpt_version,
METH_VARARGS, NULL},
- {NULL}
+ {0}
};
static struct PyModuleDef moduledef = {
"Try to print structures that fail to parse (used to develop parsers, segfaults are likely).", NULL },
POPT_COMMON_SAMBA
POPT_COMMON_VERSION
- { NULL }
+ {0}
};
uint32_t highest_ofs;
struct dcerpc_sec_verification_trailer *sec_vt = NULL;
my ($infn, $outfn, $callfn, $prettyname, $docstring, $opnum) = @$d;
$self->pidl("{ \"$prettyname\", $docstring, (py_dcerpc_call_fn)$callfn, (py_data_pack_fn)$infn, (py_data_unpack_fn)$outfn, $opnum, &ndr_table_$interface->{NAME} },");
}
- $self->pidl("{ NULL }");
+ $self->pidl("{0}");
$self->deindent;
$self->pidl("};");
$self->pidl("");
METH_VARARGS,
"generate_random_bytes(len) -> bytes\n"
"Generate random bytes with specified length." },
- { NULL }
+ {0}
};
static struct PyModuleDef moduledef = {
};
static PyMethodDef py_libsmb_methods[] = {
- { NULL },
+ {0},
};
void initlibsmb_samba_internal(void);
static PyMethodDef pyparam_methods[] = {
{ "get_context", (PyCFunction)py_get_context, METH_NOARGS,
"Returns LoadParm context." },
- { NULL }
+ {0}
};
static struct PyModuleDef moduledef = {
{ "delete_secret", py_pdb_delete_secret, METH_VARARGS,
"delete_secret(secret_name) -> None\n\n \
Delete secret information for secret_name." },
- { NULL },
+ {0},
};
{ "reload_static_pdb", py_reload_static_pdb, METH_NOARGS,
"reload_static_pdb() -> None\n\n \
Re-initialise the static pdb used internally. Needed if 'passdb backend' is changed." },
- { NULL },
+ {0},
};
static struct PyModuleDef moduledef = {
.ml_flags = METH_VARARGS|METH_KEYWORDS,
.ml_doc = "",
},
- { NULL },
+ {0},
};
static PyObject *search_new(PyTypeObject *type,
.ml_flags = METH_VARARGS|METH_KEYWORDS,
.ml_doc = "mdscli.conn.disconnect(...) -> disconnect",
},
- { NULL },
+ {0},
};
static PyObject *conn_new(PyTypeObject *type,
};
static PyMethodDef mdscli_methods[] = {
- { NULL },
+ {0},
};
static struct PyModuleDef moduledef = {
.description = "Fetch attributes for a CNID",
.usage = "",
},
- { NULL }
+ {0}
};
TALLOC_CTX *frame = talloc_stackframe();
/* Initialise this to zero, in a portable way */
struct smb_acl_wrapper acl_wrapper = {
- NULL
+ 0
};
struct smb_filename *smb_fname = cp_smb_filename_nostream(frame,
smb_fname_in);
PY_DISCARD_FUNC_SIG(PyCFunction, py_smbd_create_file),
METH_VARARGS|METH_KEYWORDS,
NULL },
- { NULL }
+ {0}
};
void initsmbd(void);
{ "test_chain", cmd_test_chain, "test chain code",
"test_chain" },
{ "translate_name", cmd_translate_name, "VFS translate_name()", "translate_name unix_filename" },
- { NULL }
+ {0}
};
NULL, NULL },
{ "help", '?', 0, NULL, '?', "Show this help message", NULL },
{ "usage", '\0', 0, NULL, 'u', "Display brief usage message", NULL },
- { NULL }
+ {0}
} ;
/* Main program */
"S.sign_packet(data, whole_pdu) -> sig\nSign a DCERPC packet." },
{ "check_packet", (PyCFunction)py_gensec_check_packet, METH_VARARGS,
"S.check_packet(data, whole_pdu, sig)\nCheck a DCERPC packet." },
- { NULL }
+ {0}
};
static struct PyModuleDef moduledef = {
PY_DISCARD_FUNC_SIG(PyCFunction,py_copy_session_info),
METH_VARARGS|METH_KEYWORDS,
NULL },
- { NULL },
+ {0},
};
static struct PyModuleDef moduledef = {
POPT_COMMON_CONNECTION
POPT_COMMON_CREDENTIALS
POPT_COMMON_VERSION
- { NULL }
+ {0}
};
/* Block sizes. */
struct poptOption long_options[] = {
{ "url", 'H', POPT_ARG_STRING, &options->url, 0, "database URL", "URL" },
{ "debug", 'd', POPT_ARG_STRING, &options->debug, 0, "debug level", "DEBUG" },
- { NULL }
+ {0}
};
pc = poptGetContext("dlz_bind9", argc, argv, long_options,
METH_VARARGS, "Replace the DNS database entries for a LDB DN"},
{ "extract", (PyCFunction)py_dsdb_dns_extract,
METH_VARARGS, "Return the DNS database entry as a python structure from an Ldb.MessageElement of type dnsRecord"},
- { NULL }
+ {0}
};
static struct PyModuleDef moduledef = {
"_dsdb_allocate_rid(samdb)"
" -> RID" },
{ "_dsdb_load_udv_v2", (PyCFunction)py_dsdb_load_udv_v2, METH_VARARGS, NULL },
- { NULL }
+ {0}
};
static struct PyModuleDef moduledef = {
.dptr = (unsigned char *)k,
.dsize = sizeof(k)
};
- TDB_DATA data = {NULL};
+ TDB_DATA data = {0};
ssize_t n_req = ac->n_attrs;
if (ac->is_null) {
n_req = NULL_REQ_PSEUDO_N;
"get_gplink_options(options) -> list" },
{ "ads_to_dir_access_mask", (PyCFunction)py_ads_to_dir_access_mask, METH_VARARGS,
"ads_to_dir_access_mask(access_mask) -> dir_mask" },
- { NULL }
+ {0}
};
static struct PyModuleDef moduledef = {
"Apply the diff from the specified file" },
{ "mount_hive", py_mount_hive, METH_VARARGS, "S.mount_hive(key, key_id, elements=None) -> None\n"
"Mount the specified key at the specified path." },
- { NULL }
+ {0}
};
PyTypeObject PyRegistry = {
"Delete a value" },
{ "set_value", py_hive_key_set_value, METH_VARARGS, "S.set_value(name, type, data) -> None\n"
"Set a value" },
- { NULL }
+ {0}
};
static PyObject *hive_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) {
METH_VARARGS|METH_KEYWORDS, "open_hive(location, session_info=None, credentials=None, loadparm_context=None) -> key" },
{ "str_regtype", py_str_regtype, METH_VARARGS, "str_regtype(int) -> str" },
{ "get_predef_name", py_get_predef_name, METH_VARARGS, "get_predef_name(hkey) -> str" },
- { NULL }
+ {0}
};
static struct PyModuleDef moduledef = {
POPT_COMMON_SAMBA
POPT_COMMON_CREDENTIALS
POPT_COMMON_VERSION
- { NULL }
+ {0}
};
TALLOC_CTX *ctx;
void *callback_data;
{"file", 'F', POPT_ARG_STRING, &file, 0, "file path", NULL },
POPT_COMMON_SAMBA
POPT_COMMON_CREDENTIALS
- { NULL }
+ {0}
};
pc = poptGetContext(argv[0], argc, argv, long_options,0);
{"help", "?", "Help", cmd_help },
{"exit", "quit", "Exit", cmd_exit },
{"predef", "predefined", "Go to predefined key", cmd_predef },
- {NULL }
+ {0}
};
static WERROR cmd_help(struct regshell_context *ctx,
POPT_COMMON_SAMBA
POPT_COMMON_CREDENTIALS
POPT_COMMON_VERSION
- { NULL }
+ {0}
};
pc = poptGetContext(argv[0], argc, argv, long_options,0);
POPT_COMMON_SAMBA
POPT_COMMON_CREDENTIALS
POPT_COMMON_VERSION
- { NULL }
+ {0}
};
pc = poptGetContext(argv[0], argc, argv, long_options,0);
{ "split", (PyCFunction)py_dom_sid_split, METH_NOARGS,
"S.split() -> (domain_sid, rid)\n"
"Split a domain sid" },
- { NULL }
+ {0}
};
NULL },
{ "as_sddl", (PyCFunction)py_descriptor_as_sddl, METH_VARARGS,
NULL },
- { NULL }
+ {0}
};
static void py_descriptor_patch(PyTypeObject *type)
NULL },
{ "set_privilege", (PyCFunction)py_token_set_privilege, METH_VARARGS,
NULL },
- { NULL }
+ {0}
};
#define PY_TOKEN_PATCH py_token_patch
{ "random_sid", (PyCFunction)py_random_sid, METH_NOARGS, NULL },
{ "privilege_id", (PyCFunction)py_privilege_id, METH_VARARGS, NULL },
{ "privilege_name", (PyCFunction)py_privilege_name, METH_VARARGS, NULL },
- { NULL }
+ {0}
};
static void py_mod_security_patch(PyObject *m)
static PyMethodDef py_ntacl_extra_methods[] = {
{ "dump", (PyCFunction)py_ntacl_print, METH_NOARGS,
NULL },
- { NULL }
+ {0}
};
static void py_xattr_NTACL_patch(PyTypeObject *type)
"Set the given attribute to the given value on the given file." },
{ "is_xattr_supported", (PyCFunction)py_is_xattr_supported, METH_NOARGS,
"Return true if xattr are supported on this system\n"},
- { NULL }
+ {0}
};
static struct PyModuleDef moduledef = {
"Set the given attribute to the given value on the given file." },
{ "is_xattr_supported", (PyCFunction)py_is_xattr_supported, METH_NOARGS,
"Return true if xattr are supported on this system\n"},
- { NULL }
+ {0}
};
static struct PyModuleDef moduledef = {
"Set the given attribute to the given value on the given file." },
{ "is_xattr_supported", (PyCFunction)py_is_xattr_supported, METH_NOARGS,
"Return true if xattr are supported on this system\n"},
- { NULL }
+ {0}
};
static struct PyModuleDef moduledef = {
{ "state_path", py_state_path, METH_VARARGS,
"S.state_path(name) -> string\n"
"Returns a path in the Samba state directory." },
- { NULL }
+ {0}
};
static PyObject *py_lp_ctx_default_service(PyObject *self, void *closure)
static PyMethodDef py_lp_service_methods[] = {
{ "dump", (PyCFunction)py_lp_service_dump, METH_VARARGS,
"S.dump(default_service, show_defaults=False, file_name='', mode='w')" },
- { NULL }
+ {0}
};
PyTypeObject PyLoadparmService = {
"Returns the compiled in BINDIR." },
{ "sbin_dir", (PyCFunction)py_sbin_dir, METH_NOARGS,
"Returns the compiled in SBINDIR." },
- { NULL }
+ {0}
};
static struct PyModuleDef moduledef = {
POPT_COMMON_CONNECTION
POPT_COMMON_CREDENTIALS
POPT_COMMON_VERSION
- { NULL }
+ {0}
};
TALLOC_CTX *mem_ctx = NULL;
int i, j, current, expect_rcode, ret;
const char *comment;
- const char *comment_fmt = "Expected unpack rcode for index %d "
- "(corrupt bytes index %d) "
- "to be %d but got %d";
/*
* List of corruptible byte ranges. First 12 bytes are corruptible,
ret = ldb_unpack_data(ldb, &bin_copy, msg);
- comment = talloc_asprintf(bin_copy.data, comment_fmt,
- current, i,
- expect_rcode, ret);
+ comment = talloc_asprintf(
+ bin_copy.data,
+ "Expected unpack rcode for index %d "
+ "(corrupt bytes index %d) "
+ "to be %d but got %d",
+ current,
+ i,
+ expect_rcode,
+ ret);
torture_assert_int_equal(torture, ret, expect_rcode,
comment);
POPT_COMMON_CONNECTION
POPT_COMMON_CREDENTIALS
POPT_COMMON_VERSION
- { NULL }
+ {0}
};
TALLOC_CTX *mem_ctx = NULL;
int ret = -1;
POPT_COMMON_CONNECTION
POPT_COMMON_CREDENTIALS
POPT_COMMON_VERSION
- { NULL }
+ {0}
};
setlinebuf(stdout);
POPT_COMMON_CONNECTION
POPT_COMMON_CREDENTIALS
POPT_COMMON_VERSION
- { NULL }
+ {0}
};
setlinebuf(stdout);
tcase_afpresource_rw,
tcase_foo_ro,
tcase_foo_rw,
- {NULL}
+ {0}
};
ret = torture_smb2_connection(tctx, &tree2);
{ "output", 'O', POPT_ARG_STRING, &options.output, 0,
"outputfile otherwise STDOUT", "outputfile"},
POPT_COMMON_VERSION
- { NULL }
+ {0}
};