1 | n/a | /*********************************************************** |
---|
2 | n/a | Written by: |
---|
3 | n/a | Fred Gansevles <Fred.Gansevles@cs.utwente.nl> |
---|
4 | n/a | B&O group, |
---|
5 | n/a | Faculteit der Informatica, |
---|
6 | n/a | Universiteit Twente, |
---|
7 | n/a | Enschede, |
---|
8 | n/a | the Netherlands. |
---|
9 | n/a | ******************************************************************/ |
---|
10 | n/a | |
---|
11 | n/a | /* NIS module implementation */ |
---|
12 | n/a | |
---|
13 | n/a | #include "Python.h" |
---|
14 | n/a | |
---|
15 | n/a | #include <sys/time.h> |
---|
16 | n/a | #include <sys/types.h> |
---|
17 | n/a | #include <rpc/rpc.h> |
---|
18 | n/a | #include <rpcsvc/yp_prot.h> |
---|
19 | n/a | #include <rpcsvc/ypclnt.h> |
---|
20 | n/a | |
---|
21 | n/a | #ifdef __sgi |
---|
22 | n/a | /* This is missing from rpcsvc/ypclnt.h */ |
---|
23 | n/a | extern int yp_get_default_domain(char **); |
---|
24 | n/a | #endif |
---|
25 | n/a | |
---|
26 | n/a | PyDoc_STRVAR(get_default_domain__doc__, |
---|
27 | n/a | "get_default_domain() -> str\n\ |
---|
28 | n/a | Corresponds to the C library yp_get_default_domain() call, returning\n\ |
---|
29 | n/a | the default NIS domain.\n"); |
---|
30 | n/a | |
---|
31 | n/a | PyDoc_STRVAR(match__doc__, |
---|
32 | n/a | "match(key, map, domain = defaultdomain)\n\ |
---|
33 | n/a | Corresponds to the C library yp_match() call, returning the value of\n\ |
---|
34 | n/a | key in the given map. Optionally domain can be specified but it\n\ |
---|
35 | n/a | defaults to the system default domain.\n"); |
---|
36 | n/a | |
---|
37 | n/a | PyDoc_STRVAR(cat__doc__, |
---|
38 | n/a | "cat(map, domain = defaultdomain)\n\ |
---|
39 | n/a | Returns the entire map as a dictionary. Optionally domain can be\n\ |
---|
40 | n/a | specified but it defaults to the system default domain.\n"); |
---|
41 | n/a | |
---|
42 | n/a | PyDoc_STRVAR(maps__doc__, |
---|
43 | n/a | "maps(domain = defaultdomain)\n\ |
---|
44 | n/a | Returns an array of all available NIS maps within a domain. If domain\n\ |
---|
45 | n/a | is not specified it defaults to the system default domain.\n"); |
---|
46 | n/a | |
---|
47 | n/a | static PyObject *NisError; |
---|
48 | n/a | |
---|
49 | n/a | static PyObject * |
---|
50 | n/a | nis_error (int err) |
---|
51 | n/a | { |
---|
52 | n/a | PyErr_SetString(NisError, yperr_string(err)); |
---|
53 | n/a | return NULL; |
---|
54 | n/a | } |
---|
55 | n/a | |
---|
56 | n/a | static struct nis_map { |
---|
57 | n/a | char *alias; |
---|
58 | n/a | char *map; |
---|
59 | n/a | int fix; |
---|
60 | n/a | } aliases [] = { |
---|
61 | n/a | {"passwd", "passwd.byname", 0}, |
---|
62 | n/a | {"group", "group.byname", 0}, |
---|
63 | n/a | {"networks", "networks.byaddr", 0}, |
---|
64 | n/a | {"hosts", "hosts.byname", 0}, |
---|
65 | n/a | {"protocols", "protocols.bynumber", 0}, |
---|
66 | n/a | {"services", "services.byname", 0}, |
---|
67 | n/a | {"aliases", "mail.aliases", 1}, /* created with 'makedbm -a' */ |
---|
68 | n/a | {"ethers", "ethers.byname", 0}, |
---|
69 | n/a | {0L, 0L, 0} |
---|
70 | n/a | }; |
---|
71 | n/a | |
---|
72 | n/a | static char * |
---|
73 | n/a | nis_mapname (char *map, int *pfix) |
---|
74 | n/a | { |
---|
75 | n/a | int i; |
---|
76 | n/a | |
---|
77 | n/a | *pfix = 0; |
---|
78 | n/a | for (i=0; aliases[i].alias != 0L; i++) { |
---|
79 | n/a | if (!strcmp (aliases[i].alias, map) || !strcmp (aliases[i].map, map)) { |
---|
80 | n/a | *pfix = aliases[i].fix; |
---|
81 | n/a | return aliases[i].map; |
---|
82 | n/a | } |
---|
83 | n/a | } |
---|
84 | n/a | |
---|
85 | n/a | return map; |
---|
86 | n/a | } |
---|
87 | n/a | |
---|
88 | n/a | #if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) |
---|
89 | n/a | typedef int (*foreachfunc)(unsigned long, char *, int, char *, int, void *); |
---|
90 | n/a | #else |
---|
91 | n/a | typedef int (*foreachfunc)(int, char *, int, char *, int, char *); |
---|
92 | n/a | #endif |
---|
93 | n/a | |
---|
94 | n/a | struct ypcallback_data { |
---|
95 | n/a | PyObject *dict; |
---|
96 | n/a | int fix; |
---|
97 | n/a | PyThreadState *state; |
---|
98 | n/a | }; |
---|
99 | n/a | |
---|
100 | n/a | static int |
---|
101 | n/a | nis_foreach (int instatus, char *inkey, int inkeylen, char *inval, |
---|
102 | n/a | int invallen, struct ypcallback_data *indata) |
---|
103 | n/a | { |
---|
104 | n/a | if (instatus == YP_TRUE) { |
---|
105 | n/a | PyObject *key; |
---|
106 | n/a | PyObject *val; |
---|
107 | n/a | int err; |
---|
108 | n/a | |
---|
109 | n/a | PyEval_RestoreThread(indata->state); |
---|
110 | n/a | if (indata->fix) { |
---|
111 | n/a | if (inkeylen > 0 && inkey[inkeylen-1] == '\0') |
---|
112 | n/a | inkeylen--; |
---|
113 | n/a | if (invallen > 0 && inval[invallen-1] == '\0') |
---|
114 | n/a | invallen--; |
---|
115 | n/a | } |
---|
116 | n/a | key = PyUnicode_DecodeFSDefaultAndSize(inkey, inkeylen); |
---|
117 | n/a | val = PyUnicode_DecodeFSDefaultAndSize(inval, invallen); |
---|
118 | n/a | if (key == NULL || val == NULL) { |
---|
119 | n/a | /* XXX error -- don't know how to handle */ |
---|
120 | n/a | PyErr_Clear(); |
---|
121 | n/a | Py_XDECREF(key); |
---|
122 | n/a | Py_XDECREF(val); |
---|
123 | n/a | indata->state = PyEval_SaveThread(); |
---|
124 | n/a | return 1; |
---|
125 | n/a | } |
---|
126 | n/a | err = PyDict_SetItem(indata->dict, key, val); |
---|
127 | n/a | Py_DECREF(key); |
---|
128 | n/a | Py_DECREF(val); |
---|
129 | n/a | if (err != 0) |
---|
130 | n/a | PyErr_Clear(); |
---|
131 | n/a | indata->state = PyEval_SaveThread(); |
---|
132 | n/a | if (err != 0) |
---|
133 | n/a | return 1; |
---|
134 | n/a | return 0; |
---|
135 | n/a | } |
---|
136 | n/a | return 1; |
---|
137 | n/a | } |
---|
138 | n/a | |
---|
139 | n/a | static PyObject * |
---|
140 | n/a | nis_get_default_domain (PyObject *self) |
---|
141 | n/a | { |
---|
142 | n/a | char *domain; |
---|
143 | n/a | int err; |
---|
144 | n/a | PyObject *res; |
---|
145 | n/a | |
---|
146 | n/a | if ((err = yp_get_default_domain(&domain)) != 0) |
---|
147 | n/a | return nis_error(err); |
---|
148 | n/a | |
---|
149 | n/a | res = PyUnicode_FromStringAndSize (domain, strlen(domain)); |
---|
150 | n/a | return res; |
---|
151 | n/a | } |
---|
152 | n/a | |
---|
153 | n/a | static PyObject * |
---|
154 | n/a | nis_match (PyObject *self, PyObject *args, PyObject *kwdict) |
---|
155 | n/a | { |
---|
156 | n/a | char *match; |
---|
157 | n/a | char *domain = NULL; |
---|
158 | n/a | Py_ssize_t keylen; |
---|
159 | n/a | int len; |
---|
160 | n/a | char *key, *map; |
---|
161 | n/a | int err; |
---|
162 | n/a | PyObject *ukey, *bkey, *res; |
---|
163 | n/a | int fix; |
---|
164 | n/a | static char *kwlist[] = {"key", "map", "domain", NULL}; |
---|
165 | n/a | |
---|
166 | n/a | if (!PyArg_ParseTupleAndKeywords(args, kwdict, |
---|
167 | n/a | "Us|s:match", kwlist, |
---|
168 | n/a | &ukey, &map, &domain)) |
---|
169 | n/a | return NULL; |
---|
170 | n/a | if ((bkey = PyUnicode_EncodeFSDefault(ukey)) == NULL) |
---|
171 | n/a | return NULL; |
---|
172 | n/a | if (PyBytes_AsStringAndSize(bkey, &key, &keylen) == -1) { |
---|
173 | n/a | Py_DECREF(bkey); |
---|
174 | n/a | return NULL; |
---|
175 | n/a | } |
---|
176 | n/a | if (!domain && ((err = yp_get_default_domain(&domain)) != 0)) { |
---|
177 | n/a | Py_DECREF(bkey); |
---|
178 | n/a | return nis_error(err); |
---|
179 | n/a | } |
---|
180 | n/a | map = nis_mapname (map, &fix); |
---|
181 | n/a | if (fix) |
---|
182 | n/a | keylen++; |
---|
183 | n/a | Py_BEGIN_ALLOW_THREADS |
---|
184 | n/a | err = yp_match (domain, map, key, keylen, &match, &len); |
---|
185 | n/a | Py_END_ALLOW_THREADS |
---|
186 | n/a | Py_DECREF(bkey); |
---|
187 | n/a | if (fix) |
---|
188 | n/a | len--; |
---|
189 | n/a | if (err != 0) |
---|
190 | n/a | return nis_error(err); |
---|
191 | n/a | res = PyUnicode_DecodeFSDefaultAndSize(match, len); |
---|
192 | n/a | free (match); |
---|
193 | n/a | return res; |
---|
194 | n/a | } |
---|
195 | n/a | |
---|
196 | n/a | static PyObject * |
---|
197 | n/a | nis_cat (PyObject *self, PyObject *args, PyObject *kwdict) |
---|
198 | n/a | { |
---|
199 | n/a | char *domain = NULL; |
---|
200 | n/a | char *map; |
---|
201 | n/a | struct ypall_callback cb; |
---|
202 | n/a | struct ypcallback_data data; |
---|
203 | n/a | PyObject *dict; |
---|
204 | n/a | int err; |
---|
205 | n/a | static char *kwlist[] = {"map", "domain", NULL}; |
---|
206 | n/a | |
---|
207 | n/a | if (!PyArg_ParseTupleAndKeywords(args, kwdict, "s|s:cat", |
---|
208 | n/a | kwlist, &map, &domain)) |
---|
209 | n/a | return NULL; |
---|
210 | n/a | if (!domain && ((err = yp_get_default_domain(&domain)) != 0)) |
---|
211 | n/a | return nis_error(err); |
---|
212 | n/a | dict = PyDict_New (); |
---|
213 | n/a | if (dict == NULL) |
---|
214 | n/a | return NULL; |
---|
215 | n/a | cb.foreach = (foreachfunc)nis_foreach; |
---|
216 | n/a | data.dict = dict; |
---|
217 | n/a | map = nis_mapname (map, &data.fix); |
---|
218 | n/a | cb.data = (char *)&data; |
---|
219 | n/a | data.state = PyEval_SaveThread(); |
---|
220 | n/a | err = yp_all (domain, map, &cb); |
---|
221 | n/a | PyEval_RestoreThread(data.state); |
---|
222 | n/a | if (err != 0) { |
---|
223 | n/a | Py_DECREF(dict); |
---|
224 | n/a | return nis_error(err); |
---|
225 | n/a | } |
---|
226 | n/a | return dict; |
---|
227 | n/a | } |
---|
228 | n/a | |
---|
229 | n/a | /* These should be u_long on Sun h/w but not on 64-bit h/w. |
---|
230 | n/a | This is not portable to machines with 16-bit ints and no prototypes */ |
---|
231 | n/a | #ifndef YPPROC_MAPLIST |
---|
232 | n/a | #define YPPROC_MAPLIST 11 |
---|
233 | n/a | #endif |
---|
234 | n/a | #ifndef YPPROG |
---|
235 | n/a | #define YPPROG 100004 |
---|
236 | n/a | #endif |
---|
237 | n/a | #ifndef YPVERS |
---|
238 | n/a | #define YPVERS 2 |
---|
239 | n/a | #endif |
---|
240 | n/a | |
---|
241 | n/a | typedef char *domainname; |
---|
242 | n/a | typedef char *mapname; |
---|
243 | n/a | |
---|
244 | n/a | enum nisstat { |
---|
245 | n/a | NIS_TRUE = 1, |
---|
246 | n/a | NIS_NOMORE = 2, |
---|
247 | n/a | NIS_FALSE = 0, |
---|
248 | n/a | NIS_NOMAP = -1, |
---|
249 | n/a | NIS_NODOM = -2, |
---|
250 | n/a | NIS_NOKEY = -3, |
---|
251 | n/a | NIS_BADOP = -4, |
---|
252 | n/a | NIS_BADDB = -5, |
---|
253 | n/a | NIS_YPERR = -6, |
---|
254 | n/a | NIS_BADARGS = -7, |
---|
255 | n/a | NIS_VERS = -8 |
---|
256 | n/a | }; |
---|
257 | n/a | typedef enum nisstat nisstat; |
---|
258 | n/a | |
---|
259 | n/a | struct nismaplist { |
---|
260 | n/a | mapname map; |
---|
261 | n/a | struct nismaplist *next; |
---|
262 | n/a | }; |
---|
263 | n/a | typedef struct nismaplist nismaplist; |
---|
264 | n/a | |
---|
265 | n/a | struct nisresp_maplist { |
---|
266 | n/a | nisstat stat; |
---|
267 | n/a | nismaplist *maps; |
---|
268 | n/a | }; |
---|
269 | n/a | typedef struct nisresp_maplist nisresp_maplist; |
---|
270 | n/a | |
---|
271 | n/a | static struct timeval TIMEOUT = { 25, 0 }; |
---|
272 | n/a | |
---|
273 | n/a | static |
---|
274 | n/a | bool_t |
---|
275 | n/a | nis_xdr_domainname(XDR *xdrs, domainname *objp) |
---|
276 | n/a | { |
---|
277 | n/a | if (!xdr_string(xdrs, objp, YPMAXDOMAIN)) { |
---|
278 | n/a | return (FALSE); |
---|
279 | n/a | } |
---|
280 | n/a | return (TRUE); |
---|
281 | n/a | } |
---|
282 | n/a | |
---|
283 | n/a | static |
---|
284 | n/a | bool_t |
---|
285 | n/a | nis_xdr_mapname(XDR *xdrs, mapname *objp) |
---|
286 | n/a | { |
---|
287 | n/a | if (!xdr_string(xdrs, objp, YPMAXMAP)) { |
---|
288 | n/a | return (FALSE); |
---|
289 | n/a | } |
---|
290 | n/a | return (TRUE); |
---|
291 | n/a | } |
---|
292 | n/a | |
---|
293 | n/a | static |
---|
294 | n/a | bool_t |
---|
295 | n/a | nis_xdr_ypmaplist(XDR *xdrs, nismaplist *objp) |
---|
296 | n/a | { |
---|
297 | n/a | if (!nis_xdr_mapname(xdrs, &objp->map)) { |
---|
298 | n/a | return (FALSE); |
---|
299 | n/a | } |
---|
300 | n/a | if (!xdr_pointer(xdrs, (char **)&objp->next, |
---|
301 | n/a | sizeof(nismaplist), (xdrproc_t)nis_xdr_ypmaplist)) |
---|
302 | n/a | { |
---|
303 | n/a | return (FALSE); |
---|
304 | n/a | } |
---|
305 | n/a | return (TRUE); |
---|
306 | n/a | } |
---|
307 | n/a | |
---|
308 | n/a | static |
---|
309 | n/a | bool_t |
---|
310 | n/a | nis_xdr_ypstat(XDR *xdrs, nisstat *objp) |
---|
311 | n/a | { |
---|
312 | n/a | if (!xdr_enum(xdrs, (enum_t *)objp)) { |
---|
313 | n/a | return (FALSE); |
---|
314 | n/a | } |
---|
315 | n/a | return (TRUE); |
---|
316 | n/a | } |
---|
317 | n/a | |
---|
318 | n/a | |
---|
319 | n/a | static |
---|
320 | n/a | bool_t |
---|
321 | n/a | nis_xdr_ypresp_maplist(XDR *xdrs, nisresp_maplist *objp) |
---|
322 | n/a | { |
---|
323 | n/a | if (!nis_xdr_ypstat(xdrs, &objp->stat)) { |
---|
324 | n/a | return (FALSE); |
---|
325 | n/a | } |
---|
326 | n/a | if (!xdr_pointer(xdrs, (char **)&objp->maps, |
---|
327 | n/a | sizeof(nismaplist), (xdrproc_t)nis_xdr_ypmaplist)) |
---|
328 | n/a | { |
---|
329 | n/a | return (FALSE); |
---|
330 | n/a | } |
---|
331 | n/a | return (TRUE); |
---|
332 | n/a | } |
---|
333 | n/a | |
---|
334 | n/a | |
---|
335 | n/a | static |
---|
336 | n/a | nisresp_maplist * |
---|
337 | n/a | nisproc_maplist_2(domainname *argp, CLIENT *clnt) |
---|
338 | n/a | { |
---|
339 | n/a | static nisresp_maplist res; |
---|
340 | n/a | |
---|
341 | n/a | memset(&res, 0, sizeof(res)); |
---|
342 | n/a | if (clnt_call(clnt, YPPROC_MAPLIST, |
---|
343 | n/a | (xdrproc_t)nis_xdr_domainname, (caddr_t)argp, |
---|
344 | n/a | (xdrproc_t)nis_xdr_ypresp_maplist, (caddr_t)&res, |
---|
345 | n/a | TIMEOUT) != RPC_SUCCESS) |
---|
346 | n/a | { |
---|
347 | n/a | return (NULL); |
---|
348 | n/a | } |
---|
349 | n/a | return (&res); |
---|
350 | n/a | } |
---|
351 | n/a | |
---|
352 | n/a | static |
---|
353 | n/a | nismaplist * |
---|
354 | n/a | nis_maplist (char *dom) |
---|
355 | n/a | { |
---|
356 | n/a | nisresp_maplist *list; |
---|
357 | n/a | CLIENT *cl; |
---|
358 | n/a | char *server = NULL; |
---|
359 | n/a | int mapi = 0; |
---|
360 | n/a | |
---|
361 | n/a | while (!server && aliases[mapi].map != 0L) { |
---|
362 | n/a | yp_master (dom, aliases[mapi].map, &server); |
---|
363 | n/a | mapi++; |
---|
364 | n/a | } |
---|
365 | n/a | if (!server) { |
---|
366 | n/a | PyErr_SetString(NisError, "No NIS master found for any map"); |
---|
367 | n/a | return NULL; |
---|
368 | n/a | } |
---|
369 | n/a | cl = clnt_create(server, YPPROG, YPVERS, "tcp"); |
---|
370 | n/a | if (cl == NULL) { |
---|
371 | n/a | PyErr_SetString(NisError, clnt_spcreateerror(server)); |
---|
372 | n/a | goto finally; |
---|
373 | n/a | } |
---|
374 | n/a | list = nisproc_maplist_2 (&dom, cl); |
---|
375 | n/a | clnt_destroy(cl); |
---|
376 | n/a | if (list == NULL) |
---|
377 | n/a | goto finally; |
---|
378 | n/a | if (list->stat != NIS_TRUE) |
---|
379 | n/a | goto finally; |
---|
380 | n/a | |
---|
381 | n/a | free(server); |
---|
382 | n/a | return list->maps; |
---|
383 | n/a | |
---|
384 | n/a | finally: |
---|
385 | n/a | free(server); |
---|
386 | n/a | return NULL; |
---|
387 | n/a | } |
---|
388 | n/a | |
---|
389 | n/a | static PyObject * |
---|
390 | n/a | nis_maps (PyObject *self, PyObject *args, PyObject *kwdict) |
---|
391 | n/a | { |
---|
392 | n/a | char *domain = NULL; |
---|
393 | n/a | nismaplist *maps; |
---|
394 | n/a | PyObject *list; |
---|
395 | n/a | int err; |
---|
396 | n/a | static char *kwlist[] = {"domain", NULL}; |
---|
397 | n/a | |
---|
398 | n/a | if (!PyArg_ParseTupleAndKeywords(args, kwdict, |
---|
399 | n/a | "|s:maps", kwlist, &domain)) |
---|
400 | n/a | return NULL; |
---|
401 | n/a | if (!domain && ((err = yp_get_default_domain (&domain)) != 0)) { |
---|
402 | n/a | nis_error(err); |
---|
403 | n/a | return NULL; |
---|
404 | n/a | } |
---|
405 | n/a | |
---|
406 | n/a | if ((maps = nis_maplist (domain)) == NULL) |
---|
407 | n/a | return NULL; |
---|
408 | n/a | if ((list = PyList_New(0)) == NULL) |
---|
409 | n/a | return NULL; |
---|
410 | n/a | for (; maps; maps = maps->next) { |
---|
411 | n/a | PyObject *str = PyUnicode_FromString(maps->map); |
---|
412 | n/a | if (!str || PyList_Append(list, str) < 0) |
---|
413 | n/a | { |
---|
414 | n/a | Py_DECREF(list); |
---|
415 | n/a | list = NULL; |
---|
416 | n/a | break; |
---|
417 | n/a | } |
---|
418 | n/a | Py_DECREF(str); |
---|
419 | n/a | } |
---|
420 | n/a | /* XXX Shouldn't we free the list of maps now? */ |
---|
421 | n/a | return list; |
---|
422 | n/a | } |
---|
423 | n/a | |
---|
424 | n/a | static PyMethodDef nis_methods[] = { |
---|
425 | n/a | {"match", (PyCFunction)nis_match, |
---|
426 | n/a | METH_VARARGS | METH_KEYWORDS, |
---|
427 | n/a | match__doc__}, |
---|
428 | n/a | {"cat", (PyCFunction)nis_cat, |
---|
429 | n/a | METH_VARARGS | METH_KEYWORDS, |
---|
430 | n/a | cat__doc__}, |
---|
431 | n/a | {"maps", (PyCFunction)nis_maps, |
---|
432 | n/a | METH_VARARGS | METH_KEYWORDS, |
---|
433 | n/a | maps__doc__}, |
---|
434 | n/a | {"get_default_domain", (PyCFunction)nis_get_default_domain, |
---|
435 | n/a | METH_NOARGS, |
---|
436 | n/a | get_default_domain__doc__}, |
---|
437 | n/a | {NULL, NULL} /* Sentinel */ |
---|
438 | n/a | }; |
---|
439 | n/a | |
---|
440 | n/a | PyDoc_STRVAR(nis__doc__, |
---|
441 | n/a | "This module contains functions for accessing NIS maps.\n"); |
---|
442 | n/a | |
---|
443 | n/a | static struct PyModuleDef nismodule = { |
---|
444 | n/a | PyModuleDef_HEAD_INIT, |
---|
445 | n/a | "nis", |
---|
446 | n/a | nis__doc__, |
---|
447 | n/a | -1, |
---|
448 | n/a | nis_methods, |
---|
449 | n/a | NULL, |
---|
450 | n/a | NULL, |
---|
451 | n/a | NULL, |
---|
452 | n/a | NULL |
---|
453 | n/a | }; |
---|
454 | n/a | |
---|
455 | n/a | PyMODINIT_FUNC |
---|
456 | n/a | PyInit_nis(void) |
---|
457 | n/a | { |
---|
458 | n/a | PyObject *m, *d; |
---|
459 | n/a | m = PyModule_Create(&nismodule); |
---|
460 | n/a | if (m == NULL) |
---|
461 | n/a | return NULL; |
---|
462 | n/a | d = PyModule_GetDict(m); |
---|
463 | n/a | NisError = PyErr_NewException("nis.error", NULL, NULL); |
---|
464 | n/a | if (NisError != NULL) |
---|
465 | n/a | PyDict_SetItemString(d, "error", NisError); |
---|
466 | n/a | return m; |
---|
467 | n/a | } |
---|