2 Unix SMB/CIFS implementation.
3 Samba utility functions
5 Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2008-2010
6 Copyright (C) Kamen Mazdrashki <kamen.mazdrashki@postpath.com> 2009
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
26 #include "auth/credentials/pycredentials.h"
27 #include "libcli/security/security.h"
28 #include "lib/events/events.h"
29 #include "param/pyparam.h"
30 #include "auth/gensec/gensec.h"
31 #include "librpc/rpc/pyrpc_util.h"
32 #include "libcli/resolve/resolve.h"
33 #include "libcli/finddc.h"
34 #include "dsdb/samdb/samdb.h"
41 struct libnet_context
*libnet_ctx
;
42 struct tevent_context
*ev
;
45 static PyObject
*py_net_join_member(py_net_Object
*self
, PyObject
*args
, PyObject
*kwargs
)
47 struct libnet_Join_member r
;
52 const char *kwnames
[] = { "domain_name", "netbios_name", "level", NULL
};
54 if (!PyArg_ParseTupleAndKeywords(args
, kwargs
, "ssi:Join", discard_const_p(char *, kwnames
),
55 &r
.in
.domain_name
, &r
.in
.netbios_name
,
61 mem_ctx
= talloc_new(self
->mem_ctx
);
62 if (mem_ctx
== NULL
) {
67 status
= libnet_Join_member(self
->libnet_ctx
, mem_ctx
, &r
);
68 if (NT_STATUS_IS_ERR(status
)) {
69 PyErr_SetString(PyExc_RuntimeError
, r
.out
.error_string
?r
.out
.error_string
:nt_errstr(status
));
74 result
= Py_BuildValue("sss", r
.out
.join_password
,
75 dom_sid_string(mem_ctx
, r
.out
.domain_sid
),
83 static const char py_net_join_member_doc
[] = "join_member(domain_name, netbios_name, level) -> (join_password, domain_sid, domain_name)\n\n" \
84 "Join the domain with the specified name.";
86 static PyObject
*py_net_change_password(py_net_Object
*self
, PyObject
*args
, PyObject
*kwargs
)
88 union libnet_ChangePassword r
;
91 struct tevent_context
*ev
;
92 const char *kwnames
[] = { "newpassword", NULL
};
96 if (!PyArg_ParseTupleAndKeywords(args
, kwargs
, "s:change_password",
97 discard_const_p(char *, kwnames
),
98 &r
.generic
.in
.newpassword
)) {
102 r
.generic
.level
= LIBNET_CHANGE_PASSWORD_GENERIC
;
103 r
.generic
.in
.account_name
= cli_credentials_get_username(self
->libnet_ctx
->cred
);
104 r
.generic
.in
.domain_name
= cli_credentials_get_domain(self
->libnet_ctx
->cred
);
105 r
.generic
.in
.oldpassword
= cli_credentials_get_password(self
->libnet_ctx
->cred
);
107 /* FIXME: we really need to get a context from the caller or we may end
108 * up with 2 event contexts */
109 ev
= s4_event_context_init(NULL
);
111 mem_ctx
= talloc_new(ev
);
112 if (mem_ctx
== NULL
) {
117 status
= libnet_ChangePassword(self
->libnet_ctx
, mem_ctx
, &r
);
118 if (NT_STATUS_IS_ERR(status
)) {
119 PyErr_SetString(PyExc_RuntimeError
,
120 r
.generic
.out
.error_string
?r
.generic
.out
.error_string
:nt_errstr(status
));
121 talloc_free(mem_ctx
);
125 talloc_free(mem_ctx
);
130 static const char py_net_change_password_doc
[] = "change_password(newpassword) -> True\n\n" \
131 "Change password for a user. You must supply credential with enough rights to do this.\n\n" \
132 "Sample usage is:\n" \
133 "net.set_password(newpassword=<new_password>\n";
136 static PyObject
*py_net_set_password(py_net_Object
*self
, PyObject
*args
, PyObject
*kwargs
)
138 union libnet_SetPassword r
;
141 struct tevent_context
*ev
;
142 const char *kwnames
[] = { "account_name", "domain_name", "newpassword", NULL
};
146 r
.generic
.level
= LIBNET_SET_PASSWORD_GENERIC
;
148 if (!PyArg_ParseTupleAndKeywords(args
, kwargs
, "sss:set_password",
149 discard_const_p(char *, kwnames
),
150 &r
.generic
.in
.account_name
,
151 &r
.generic
.in
.domain_name
,
152 &r
.generic
.in
.newpassword
)) {
156 /* FIXME: we really need to get a context from the caller or we may end
157 * up with 2 event contexts */
158 ev
= s4_event_context_init(NULL
);
160 mem_ctx
= talloc_new(ev
);
161 if (mem_ctx
== NULL
) {
166 status
= libnet_SetPassword(self
->libnet_ctx
, mem_ctx
, &r
);
167 if (NT_STATUS_IS_ERR(status
)) {
168 PyErr_SetString(PyExc_RuntimeError
,
169 r
.generic
.out
.error_string
?r
.generic
.out
.error_string
:nt_errstr(status
));
170 talloc_free(mem_ctx
);
174 talloc_free(mem_ctx
);
179 static const char py_net_set_password_doc
[] = "set_password(account_name, domain_name, newpassword) -> True\n\n" \
180 "Set password for a user. You must supply credential with enough rights to do this.\n\n" \
181 "Sample usage is:\n" \
182 "net.set_password(account_name=<account_name>,\n" \
183 " domain_name=domain_name,\n" \
184 " newpassword=new_pass)\n";
187 static PyObject
*py_net_export_keytab(py_net_Object
*self
, PyObject
*args
, PyObject
*kwargs
)
189 struct libnet_export_keytab r
;
191 const char *kwnames
[] = { "keytab", NULL
};
194 if (!PyArg_ParseTupleAndKeywords(args
, kwargs
, "s:export_keytab", discard_const_p(char *, kwnames
),
195 &r
.in
.keytab_name
)) {
199 mem_ctx
= talloc_new(self
->mem_ctx
);
200 if (mem_ctx
== NULL
) {
205 status
= libnet_export_keytab(self
->libnet_ctx
, mem_ctx
, &r
);
206 if (NT_STATUS_IS_ERR(status
)) {
207 PyErr_SetString(PyExc_RuntimeError
,
208 r
.out
.error_string
?r
.out
.error_string
:nt_errstr(status
));
209 talloc_free(mem_ctx
);
213 talloc_free(mem_ctx
);
218 static const char py_net_export_keytab_doc
[] = "export_keytab(keytab, name)\n\n"
219 "Export the DC keytab to a keytab file.";
221 static PyObject
*py_net_time(py_net_Object
*self
, PyObject
*args
, PyObject
*kwargs
)
223 const char *kwnames
[] = { "server_name", NULL
};
224 union libnet_RemoteTOD r
;
231 if (!PyArg_ParseTupleAndKeywords(args
, kwargs
, "s",
232 discard_const_p(char *, kwnames
), &r
.generic
.in
.server_name
))
235 r
.generic
.level
= LIBNET_REMOTE_TOD_GENERIC
;
237 mem_ctx
= talloc_new(NULL
);
238 if (mem_ctx
== NULL
) {
243 status
= libnet_RemoteTOD(self
->libnet_ctx
, mem_ctx
, &r
);
244 if (!NT_STATUS_IS_OK(status
)) {
245 PyErr_SetString(PyExc_RuntimeError
,
246 r
.generic
.out
.error_string
?r
.generic
.out
.error_string
:nt_errstr(status
));
247 talloc_free(mem_ctx
);
251 ZERO_STRUCT(timestr
);
252 tm
= localtime(&r
.generic
.out
.time
);
253 strftime(timestr
, sizeof(timestr
)-1, "%c %Z",tm
);
255 ret
= PyString_FromString(timestr
);
257 talloc_free(mem_ctx
);
262 static const char py_net_time_doc
[] = "time(server_name) -> timestr\n"
263 "Retrieve the remote time on a server";
265 static PyObject
*py_net_user_create(py_net_Object
*self
, PyObject
*args
, PyObject
*kwargs
)
267 const char *kwnames
[] = { "username", NULL
};
270 struct libnet_CreateUser r
;
272 if (!PyArg_ParseTupleAndKeywords(args
, kwargs
, "s", discard_const_p(char *, kwnames
),
276 r
.in
.domain_name
= cli_credentials_get_domain(self
->libnet_ctx
->cred
);
278 mem_ctx
= talloc_new(NULL
);
279 if (mem_ctx
== NULL
) {
284 status
= libnet_CreateUser(self
->libnet_ctx
, mem_ctx
, &r
);
285 if (!NT_STATUS_IS_OK(status
)) {
286 PyErr_SetString(PyExc_RuntimeError
, r
.out
.error_string
?r
.out
.error_string
:nt_errstr(status
));
287 talloc_free(mem_ctx
);
291 talloc_free(mem_ctx
);
296 static const char py_net_create_user_doc
[] = "create_user(username)\n"
297 "Create a new user.";
299 static PyObject
*py_net_user_delete(py_net_Object
*self
, PyObject
*args
, PyObject
*kwargs
)
301 const char *kwnames
[] = { "username", NULL
};
304 struct libnet_DeleteUser r
;
306 if (!PyArg_ParseTupleAndKeywords(args
, kwargs
, "s", discard_const_p(char *, kwnames
),
310 r
.in
.domain_name
= cli_credentials_get_domain(self
->libnet_ctx
->cred
);
312 mem_ctx
= talloc_new(NULL
);
313 if (mem_ctx
== NULL
) {
318 status
= libnet_DeleteUser(self
->libnet_ctx
, mem_ctx
, &r
);
319 if (!NT_STATUS_IS_OK(status
)) {
320 PyErr_SetString(PyExc_RuntimeError
, r
.out
.error_string
?r
.out
.error_string
:nt_errstr(status
));
321 talloc_free(mem_ctx
);
325 talloc_free(mem_ctx
);
330 static const char py_net_delete_user_doc
[] = "delete_user(username)\n"
333 static PyObject
*py_dom_sid_FromSid(struct dom_sid
*sid
)
335 PyObject
*mod_security
, *dom_sid_Type
;
337 mod_security
= PyImport_ImportModule("samba.dcerpc.security");
338 if (mod_security
== NULL
)
341 dom_sid_Type
= PyObject_GetAttrString(mod_security
, "dom_sid");
342 if (dom_sid_Type
== NULL
)
345 return pytalloc_reference((PyTypeObject
*)dom_sid_Type
, sid
);
348 static PyObject
*py_net_vampire(py_net_Object
*self
, PyObject
*args
, PyObject
*kwargs
)
350 const char *kwnames
[] = { "domain", "target_dir", NULL
};
354 struct libnet_Vampire r
;
356 if (!PyArg_ParseTupleAndKeywords(args
, kwargs
, "s|z", discard_const_p(char *, kwnames
),
357 &r
.in
.domain_name
, &r
.in
.targetdir
)) {
361 r
.in
.netbios_name
= lpcfg_netbios_name(self
->libnet_ctx
->lp_ctx
);
362 r
.out
.error_string
= NULL
;
364 mem_ctx
= talloc_new(NULL
);
365 if (mem_ctx
== NULL
) {
370 status
= libnet_Vampire(self
->libnet_ctx
, mem_ctx
, &r
);
372 if (!NT_STATUS_IS_OK(status
)) {
373 PyErr_SetString(PyExc_RuntimeError
,
374 r
.out
.error_string
? r
.out
.error_string
: nt_errstr(status
));
375 talloc_free(mem_ctx
);
379 ret
= Py_BuildValue("(sO)", r
.out
.domain_name
, py_dom_sid_FromSid(r
.out
.domain_sid
));
381 talloc_free(mem_ctx
);
386 struct replicate_state
{
388 dcerpc_InterfaceObject
*drs_pipe
;
389 struct libnet_BecomeDC_StoreChunk chunk
;
390 DATA_BLOB gensec_skey
;
391 struct libnet_BecomeDC_Partition partition
;
392 struct libnet_BecomeDC_Forest forest
;
393 struct libnet_BecomeDC_DestDSA dest_dsa
;
397 setup for replicate_chunk() calls
399 static PyObject
*py_net_replicate_init(py_net_Object
*self
, PyObject
*args
, PyObject
*kwargs
)
401 const char *kwnames
[] = { "samdb", "lp", "drspipe", NULL
};
402 PyObject
*py_ldb
, *py_lp
, *py_drspipe
;
403 struct ldb_context
*samdb
;
404 struct loadparm_context
*lp
;
405 struct replicate_state
*s
;
408 if (!PyArg_ParseTupleAndKeywords(args
, kwargs
, "OOO",
409 discard_const_p(char *, kwnames
),
410 &py_ldb
, &py_lp
, &py_drspipe
)) {
414 s
= talloc_zero(NULL
, struct replicate_state
);
417 lp
= lpcfg_from_py_object(s
, py_lp
);
419 PyErr_SetString(PyExc_TypeError
, "Expected lp object");
424 samdb
= pyldb_Ldb_AsLdbContext(py_ldb
);
426 PyErr_SetString(PyExc_TypeError
, "Expected ldb object");
431 s
->drs_pipe
= (dcerpc_InterfaceObject
*)(py_drspipe
);
433 s
->vampire_state
= libnet_vampire_replicate_init(s
, samdb
, lp
);
434 if (s
->vampire_state
== NULL
) {
435 PyErr_SetString(PyExc_TypeError
, "Failed to initialise vampire_state");
440 status
= gensec_session_key(s
->drs_pipe
->pipe
->conn
->security_state
.generic_state
,
443 if (!NT_STATUS_IS_OK(status
)) {
444 PyErr_Format(PyExc_RuntimeError
, "Unable to get session key from drspipe: %s",
450 s
->forest
.dns_name
= samdb_dn_to_dns_domain(s
, ldb_get_root_basedn(samdb
));
451 s
->forest
.root_dn_str
= ldb_dn_get_linearized(ldb_get_root_basedn(samdb
));
452 s
->forest
.config_dn_str
= ldb_dn_get_linearized(ldb_get_config_basedn(samdb
));
453 s
->forest
.schema_dn_str
= ldb_dn_get_linearized(ldb_get_schema_basedn(samdb
));
455 s
->chunk
.gensec_skey
= &s
->gensec_skey
;
456 s
->chunk
.partition
= &s
->partition
;
457 s
->chunk
.forest
= &s
->forest
;
458 s
->chunk
.dest_dsa
= &s
->dest_dsa
;
460 return pytalloc_CObject_FromTallocPtr(s
);
465 process one replication chunk
467 static PyObject
*py_net_replicate_chunk(py_net_Object
*self
, PyObject
*args
, PyObject
*kwargs
)
469 const char *kwnames
[] = { "state", "level", "ctr",
470 "schema", "req_level", "req",
472 PyObject
*py_state
, *py_ctr
, *py_schema
, *py_req
;
473 struct replicate_state
*s
;
475 unsigned req_level
= 0;
476 NTSTATUS (*chunk_handler
)(void *private_data
, const struct libnet_BecomeDC_StoreChunk
*c
);
479 if (!PyArg_ParseTupleAndKeywords(args
, kwargs
, "OIO|OIO",
480 discard_const_p(char *, kwnames
),
481 &py_state
, &level
, &py_ctr
,
482 &py_schema
, &req_level
, &py_req
)) {
486 s
= talloc_get_type(PyCObject_AsVoidPtr(py_state
), struct replicate_state
);
488 PyErr_SetString(PyExc_TypeError
, "Expected replication_state");
494 if (!py_check_dcerpc_type(py_ctr
, "samba.dcerpc.drsuapi", "DsGetNCChangesCtr1")) {
497 s
->chunk
.ctr1
= pytalloc_get_ptr(py_ctr
);
498 s
->partition
.nc
= *s
->chunk
.ctr1
->naming_context
;
499 s
->partition
.more_data
= s
->chunk
.ctr1
->more_data
;
500 s
->partition
.source_dsa_guid
= s
->chunk
.ctr1
->source_dsa_guid
;
501 s
->partition
.source_dsa_invocation_id
= s
->chunk
.ctr1
->source_dsa_invocation_id
;
502 s
->partition
.highwatermark
= s
->chunk
.ctr1
->new_highwatermark
;
505 if (!py_check_dcerpc_type(py_ctr
, "samba.dcerpc.drsuapi", "DsGetNCChangesCtr6")) {
508 s
->chunk
.ctr6
= pytalloc_get_ptr(py_ctr
);
509 s
->partition
.nc
= *s
->chunk
.ctr6
->naming_context
;
510 s
->partition
.more_data
= s
->chunk
.ctr6
->more_data
;
511 s
->partition
.source_dsa_guid
= s
->chunk
.ctr6
->source_dsa_guid
;
512 s
->partition
.source_dsa_invocation_id
= s
->chunk
.ctr6
->source_dsa_invocation_id
;
513 s
->partition
.highwatermark
= s
->chunk
.ctr6
->new_highwatermark
;
516 PyErr_Format(PyExc_TypeError
, "Bad level %u in replicate_chunk", level
);
520 s
->chunk
.req5
= NULL
;
521 s
->chunk
.req8
= NULL
;
522 s
->chunk
.req10
= NULL
;
528 if (!py_check_dcerpc_type(py_req
, "samba.dcerpc.drsuapi", "DsGetNCChangesRequest5")) {
532 s
->chunk
.req5
= pytalloc_get_ptr(py_req
);
535 if (!py_check_dcerpc_type(py_req
, "samba.dcerpc.drsuapi", "DsGetNCChangesRequest8")) {
539 s
->chunk
.req8
= pytalloc_get_ptr(py_req
);
542 if (!py_check_dcerpc_type(py_req
, "samba.dcerpc.drsuapi", "DsGetNCChangesRequest10")) {
546 s
->chunk
.req10
= pytalloc_get_ptr(py_req
);
549 PyErr_Format(PyExc_TypeError
, "Bad req_level %u in replicate_chunk", req_level
);
553 s
->chunk
.req_level
= req_level
;
555 chunk_handler
= libnet_vampire_cb_store_chunk
;
557 if (!PyBool_Check(py_schema
)) {
558 PyErr_SetString(PyExc_TypeError
, "Expected boolean schema");
561 if (py_schema
== Py_True
) {
562 chunk_handler
= libnet_vampire_cb_schema_chunk
;
566 s
->chunk
.ctr_level
= level
;
568 status
= chunk_handler(s
->vampire_state
, &s
->chunk
);
569 if (!NT_STATUS_IS_OK(status
)) {
570 PyErr_Format(PyExc_TypeError
, "Failed to process chunk: %s", nt_errstr(status
));
579 find a DC given a domain name and server type
581 static PyObject
*py_net_finddc(py_net_Object
*self
, PyObject
*args
)
583 const char *domain_name
;
584 unsigned server_type
;
590 if (!PyArg_ParseTuple(args
, "sI", &domain_name
, &server_type
)) {
594 mem_ctx
= talloc_new(self
->mem_ctx
);
596 io
= talloc_zero(mem_ctx
, struct finddcs
);
597 io
->in
.domain_name
= domain_name
;
598 io
->in
.minimum_dc_flags
= server_type
;
600 status
= finddcs_cldap(io
, io
,
601 lpcfg_resolve_context(self
->libnet_ctx
->lp_ctx
), self
->ev
);
602 if (NT_STATUS_IS_ERR(status
)) {
603 PyErr_SetString(PyExc_RuntimeError
, nt_errstr(status
));
604 talloc_free(mem_ctx
);
608 ret
= py_return_ndr_struct("samba.dcerpc.nbt", "NETLOGON_SAM_LOGON_RESPONSE_EX",
609 io
, &io
->out
.netlogon
.data
.nt5_ex
);
610 talloc_free(mem_ctx
);
616 static const char py_net_vampire_doc
[] = "vampire(domain, target_dir=None)\n"
619 static const char py_net_replicate_init_doc
[] = "replicate_init(samdb, lp, drspipe)\n"
620 "Setup for replicate_chunk calls.";
622 static const char py_net_replicate_chunk_doc
[] = "replicate_chunk(state, level, ctr, schema)\n"
623 "Process replication for one chunk";
625 static const char py_net_finddc_doc
[] = "finddc(domain, server_type)\n"
626 "find a DC with the specified server_type bits. Return the DNS name";
628 static PyMethodDef net_obj_methods
[] = {
629 {"join_member", (PyCFunction
)py_net_join_member
, METH_VARARGS
|METH_KEYWORDS
, py_net_join_member_doc
},
630 {"change_password", (PyCFunction
)py_net_change_password
, METH_VARARGS
|METH_KEYWORDS
, py_net_change_password_doc
},
631 {"set_password", (PyCFunction
)py_net_set_password
, METH_VARARGS
|METH_KEYWORDS
, py_net_set_password_doc
},
632 {"export_keytab", (PyCFunction
)py_net_export_keytab
, METH_VARARGS
|METH_KEYWORDS
, py_net_export_keytab_doc
},
633 {"time", (PyCFunction
)py_net_time
, METH_VARARGS
|METH_KEYWORDS
, py_net_time_doc
},
634 {"create_user", (PyCFunction
)py_net_user_create
, METH_VARARGS
|METH_KEYWORDS
, py_net_create_user_doc
},
635 {"delete_user", (PyCFunction
)py_net_user_delete
, METH_VARARGS
|METH_KEYWORDS
, py_net_delete_user_doc
},
636 {"vampire", (PyCFunction
)py_net_vampire
, METH_VARARGS
|METH_KEYWORDS
, py_net_vampire_doc
},
637 {"replicate_init", (PyCFunction
)py_net_replicate_init
, METH_VARARGS
|METH_KEYWORDS
, py_net_replicate_init_doc
},
638 {"replicate_chunk", (PyCFunction
)py_net_replicate_chunk
, METH_VARARGS
|METH_KEYWORDS
, py_net_replicate_chunk_doc
},
639 {"finddc", (PyCFunction
)py_net_finddc
, METH_VARARGS
, py_net_finddc_doc
},
643 static void py_net_dealloc(py_net_Object
*self
)
645 talloc_free(self
->mem_ctx
);
649 static PyObject
*net_obj_new(PyTypeObject
*type
, PyObject
*args
, PyObject
*kwargs
)
651 PyObject
*py_creds
, *py_lp
= Py_None
;
652 const char *kwnames
[] = { "creds", "lp", "server", NULL
};
654 struct loadparm_context
*lp
;
655 const char *server_address
= NULL
;
657 if (!PyArg_ParseTupleAndKeywords(args
, kwargs
, "O|Oz",
658 discard_const_p(char *, kwnames
), &py_creds
, &py_lp
,
662 ret
= PyObject_New(py_net_Object
, type
);
667 /* FIXME: we really need to get a context from the caller or we may end
668 * up with 2 event contexts */
669 ret
->ev
= s4_event_context_init(NULL
);
670 ret
->mem_ctx
= talloc_new(ret
->ev
);
672 lp
= lpcfg_from_py_object(ret
->mem_ctx
, py_lp
);
678 ret
->libnet_ctx
= libnet_context_init(ret
->ev
, lp
);
679 if (ret
->libnet_ctx
== NULL
) {
680 PyErr_SetString(PyExc_RuntimeError
, "Unable to initialize net");
685 ret
->libnet_ctx
->server_address
= server_address
;
687 ret
->libnet_ctx
->cred
= cli_credentials_from_py_object(py_creds
);
688 if (ret
->libnet_ctx
->cred
== NULL
) {
689 PyErr_SetString(PyExc_TypeError
, "Expected credentials object");
694 return (PyObject
*)ret
;
698 PyTypeObject py_net_Type
= {
699 PyObject_HEAD_INIT(NULL
) 0,
700 .tp_name
= "net.Net",
701 .tp_basicsize
= sizeof(py_net_Object
),
702 .tp_dealloc
= (destructor
)py_net_dealloc
,
703 .tp_methods
= net_obj_methods
,
704 .tp_new
= net_obj_new
,
711 if (PyType_Ready(&py_net_Type
) < 0)
714 m
= Py_InitModule3("net", NULL
, NULL
);
718 Py_INCREF(&py_net_Type
);
719 PyModule_AddObject(m
, "Net", (PyObject
*)&py_net_Type
);
720 PyModule_AddObject(m
, "LIBNET_JOINDOMAIN_AUTOMATIC", PyInt_FromLong(LIBNET_JOINDOMAIN_AUTOMATIC
));
721 PyModule_AddObject(m
, "LIBNET_JOINDOMAIN_SPECIFIED", PyInt_FromLong(LIBNET_JOINDOMAIN_SPECIFIED
));
722 PyModule_AddObject(m
, "LIBNET_JOIN_AUTOMATIC", PyInt_FromLong(LIBNET_JOIN_AUTOMATIC
));
723 PyModule_AddObject(m
, "LIBNET_JOIN_SPECIFIED", PyInt_FromLong(LIBNET_JOIN_SPECIFIED
));