passwd.c revision 1.1 1 1.1 lukem /* passwd.c - password lookup routines */
2 1.1 lukem /* $OpenLDAP: pkg/ldap/contrib/slapd-modules/nssov/passwd.c,v 1.1.2.1 2008/07/08 18:53:57 quanah Exp $ */
3 1.1 lukem /*
4 1.1 lukem * Copyright 2008 by Howard Chu, Symas Corp.
5 1.1 lukem * All rights reserved.
6 1.1 lukem *
7 1.1 lukem * Redistribution and use in source and binary forms, with or without
8 1.1 lukem * modification, are permitted only as authorized by the OpenLDAP
9 1.1 lukem * Public License.
10 1.1 lukem *
11 1.1 lukem * A copy of this license is available in the file LICENSE in the
12 1.1 lukem * top-level directory of the distribution or, alternatively, at
13 1.1 lukem * <http://www.OpenLDAP.org/license.html>.
14 1.1 lukem */
15 1.1 lukem /*
16 1.1 lukem * This code references portions of the nss-ldapd package
17 1.1 lukem * written by Arthur de Jong. The nss-ldapd code was forked
18 1.1 lukem * from the nss-ldap library written by Luke Howard.
19 1.1 lukem */
20 1.1 lukem
21 1.1 lukem #include "nssov.h"
22 1.1 lukem
23 1.1 lukem /* ( nisSchema.2.0 NAME 'posixAccount' SUP top AUXILIARY
24 1.1 lukem * DESC 'Abstraction of an account with POSIX attributes'
25 1.1 lukem * MUST ( cn $ uid $ uidNumber $ gidNumber $ homeDirectory )
26 1.1 lukem * MAY ( userPassword $ loginShell $ gecos $ description ) )
27 1.1 lukem */
28 1.1 lukem
29 1.1 lukem /* the basic search filter for searches */
30 1.1 lukem static struct berval passwd_filter = BER_BVC("(objectClass=posixAccount)");
31 1.1 lukem
32 1.1 lukem /* the attributes used in searches */
33 1.1 lukem static struct berval passwd_keys[] = {
34 1.1 lukem BER_BVC("uid"),
35 1.1 lukem BER_BVC("userPassword"),
36 1.1 lukem BER_BVC("uidNumber"),
37 1.1 lukem BER_BVC("gidNumber"),
38 1.1 lukem BER_BVC("gecos"),
39 1.1 lukem BER_BVC("cn"),
40 1.1 lukem BER_BVC("homeDirectory"),
41 1.1 lukem BER_BVC("loginShell"),
42 1.1 lukem BER_BVC("objectClass"),
43 1.1 lukem BER_BVNULL
44 1.1 lukem };
45 1.1 lukem
46 1.1 lukem #define UID_KEY 0
47 1.1 lukem #define PWD_KEY 1
48 1.1 lukem #define UIDN_KEY 2
49 1.1 lukem #define GIDN_KEY 3
50 1.1 lukem #define GEC_KEY 4
51 1.1 lukem #define CN_KEY 5
52 1.1 lukem #define DIR_KEY 6
53 1.1 lukem #define SHL_KEY 7
54 1.1 lukem
55 1.1 lukem /* default values for attributes */
56 1.1 lukem static struct berval default_passwd_userPassword = BER_BVC("*"); /* unmatchable */
57 1.1 lukem static struct berval default_passwd_homeDirectory = BER_BVC("");
58 1.1 lukem static struct berval default_passwd_loginShell = BER_BVC("");
59 1.1 lukem
60 1.1 lukem static struct berval shadow_passwd = BER_BVC("x");
61 1.1 lukem
62 1.1 lukem NSSOV_INIT(passwd)
63 1.1 lukem
64 1.1 lukem /*
65 1.1 lukem Checks to see if the specified name is a valid user name.
66 1.1 lukem
67 1.1 lukem This test is based on the definition from POSIX (IEEE Std 1003.1, 2004, 3.426 User Name
68 1.1 lukem and 3.276 Portable Filename Character Set):
69 1.1 lukem http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap03.html#tag_03_426
70 1.1 lukem http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap03.html#tag_03_276
71 1.1 lukem
72 1.1 lukem The standard defines user names valid if they contain characters from
73 1.1 lukem the set [A-Za-z0-9._-] where the hyphen should not be used as first
74 1.1 lukem character. As an extension this test allows the dolar '$' sign as the last
75 1.1 lukem character to support Samba special accounts.
76 1.1 lukem */
77 1.1 lukem int isvalidusername(struct berval *bv)
78 1.1 lukem {
79 1.1 lukem int i;
80 1.1 lukem char *name = bv->bv_val;
81 1.1 lukem if ((name==NULL)||(name[0]=='\0'))
82 1.1 lukem return 0;
83 1.1 lukem /* check first character */
84 1.1 lukem if ( ! ( (name[0]>='A' && name[0] <= 'Z') ||
85 1.1 lukem (name[0]>='a' && name[0] <= 'z') ||
86 1.1 lukem (name[0]>='0' && name[0] <= '9') ||
87 1.1 lukem name[0]=='.' || name[0]=='_' ) )
88 1.1 lukem return 0;
89 1.1 lukem /* check other characters */
90 1.1 lukem for (i=1;i<bv->bv_len;i++)
91 1.1 lukem {
92 1.1 lukem if ( name[i]=='$' )
93 1.1 lukem {
94 1.1 lukem /* if the char is $ we require it to be the last char */
95 1.1 lukem if (name[i+1]!='\0')
96 1.1 lukem return 0;
97 1.1 lukem }
98 1.1 lukem else if ( ! ( (name[i]>='A' && name[i] <= 'Z') ||
99 1.1 lukem (name[i]>='a' && name[i] <= 'z') ||
100 1.1 lukem (name[i]>='0' && name[i] <= '9') ||
101 1.1 lukem name[i]=='.' || name[i]=='_' || name[i]=='-') )
102 1.1 lukem return 0;
103 1.1 lukem }
104 1.1 lukem /* no test failed so it must be good */
105 1.1 lukem return -1;
106 1.1 lukem }
107 1.1 lukem
108 1.1 lukem /* return 1 on success */
109 1.1 lukem int nssov_dn2uid(Operation *op,nssov_info *ni,struct berval *dn,struct berval *uid)
110 1.1 lukem {
111 1.1 lukem nssov_mapinfo *mi = &ni->ni_maps[NM_passwd];
112 1.1 lukem AttributeDescription *ad = mi->mi_attrs[UID_KEY].an_desc;
113 1.1 lukem Entry *e;
114 1.1 lukem
115 1.1 lukem /* check for empty string */
116 1.1 lukem if (!dn->bv_len)
117 1.1 lukem return 0;
118 1.1 lukem /* try to look up uid within DN string */
119 1.1 lukem if (!strncmp(dn->bv_val,ad->ad_cname.bv_val,ad->ad_cname.bv_len) &&
120 1.1 lukem dn->bv_val[ad->ad_cname.bv_len] == '=')
121 1.1 lukem {
122 1.1 lukem struct berval bv, rdn;
123 1.1 lukem dnRdn(dn, &rdn);
124 1.1 lukem /* check if it is valid */
125 1.1 lukem bv.bv_val = dn->bv_val + ad->ad_cname.bv_len + 1;
126 1.1 lukem bv.bv_len = rdn.bv_len - ad->ad_cname.bv_len - 1;
127 1.1 lukem if (!isvalidusername(&bv))
128 1.1 lukem return 0;
129 1.1 lukem ber_dupbv_x( uid, &bv, op->o_tmpmemctx );
130 1.1 lukem return 1;
131 1.1 lukem }
132 1.1 lukem /* look up the uid from the entry itself */
133 1.1 lukem if (be_entry_get_rw( op, dn, NULL, ad, 0, &e) == LDAP_SUCCESS)
134 1.1 lukem {
135 1.1 lukem Attribute *a = attr_find(e->e_attrs, ad);
136 1.1 lukem if (a) {
137 1.1 lukem ber_dupbv_x(uid, &a->a_vals[0], op->o_tmpmemctx);
138 1.1 lukem }
139 1.1 lukem be_entry_release_r(op, e);
140 1.1 lukem if (a)
141 1.1 lukem return 1;
142 1.1 lukem }
143 1.1 lukem return 0;
144 1.1 lukem }
145 1.1 lukem
146 1.1 lukem static int uid2dn_cb(Operation *op,SlapReply *rs)
147 1.1 lukem {
148 1.1 lukem if ( rs->sr_type == REP_SEARCH )
149 1.1 lukem {
150 1.1 lukem struct berval *bv = op->o_callback->sc_private;
151 1.1 lukem if ( !BER_BVISNULL(bv)) {
152 1.1 lukem op->o_tmpfree( bv->bv_val, op->o_tmpmemctx );
153 1.1 lukem BER_BVZERO(bv);
154 1.1 lukem return LDAP_ALREADY_EXISTS;
155 1.1 lukem }
156 1.1 lukem ber_dupbv_x(bv, &rs->sr_entry->e_name, op->o_tmpmemctx);
157 1.1 lukem }
158 1.1 lukem return LDAP_SUCCESS;
159 1.1 lukem }
160 1.1 lukem
161 1.1 lukem int nssov_uid2dn(Operation *op,nssov_info *ni,struct berval *uid,struct berval *dn)
162 1.1 lukem {
163 1.1 lukem nssov_mapinfo *mi = &ni->ni_maps[NM_passwd];
164 1.1 lukem char fbuf[1024];
165 1.1 lukem struct berval filter = {sizeof(fbuf),fbuf};
166 1.1 lukem slap_callback cb = {0};
167 1.1 lukem SlapReply rs = {REP_RESULT};
168 1.1 lukem Operation op2;
169 1.1 lukem int rc;
170 1.1 lukem
171 1.1 lukem /* if it isn't a valid username, just bail out now */
172 1.1 lukem if (!isvalidusername(uid))
173 1.1 lukem return 0;
174 1.1 lukem /* we have to look up the entry */
175 1.1 lukem nssov_filter_byid(mi,UIDN_KEY,uid,&filter);
176 1.1 lukem BER_BVZERO(dn);
177 1.1 lukem cb.sc_private = dn;
178 1.1 lukem cb.sc_response = uid2dn_cb;
179 1.1 lukem op2 = *op;
180 1.1 lukem op2.o_callback = &cb;
181 1.1 lukem op2.o_req_dn = mi->mi_base;
182 1.1 lukem op2.o_req_ndn = mi->mi_base;
183 1.1 lukem op2.ors_scope = mi->mi_scope;
184 1.1 lukem op2.ors_filterstr = filter;
185 1.1 lukem op2.ors_filter = str2filter_x( op, filter.bv_val );
186 1.1 lukem op2.ors_attrs = slap_anlist_no_attrs;
187 1.1 lukem rc = op2.o_bd->be_search( &op2, &rs );
188 1.1 lukem filter_free_x( op, op2.ors_filter );
189 1.1 lukem return rc == LDAP_SUCCESS;
190 1.1 lukem }
191 1.1 lukem
192 1.1 lukem /* the maximum number of uidNumber attributes per entry */
193 1.1 lukem #define MAXUIDS_PER_ENTRY 5
194 1.1 lukem
195 1.1 lukem NSSOV_CBPRIV(passwd,
196 1.1 lukem char buf[256];
197 1.1 lukem struct berval name;
198 1.1 lukem struct berval id;);
199 1.1 lukem
200 1.1 lukem static struct berval shadowclass = BER_BVC("shadowAccount");
201 1.1 lukem
202 1.1 lukem static int write_passwd(nssov_passwd_cbp *cbp,Entry *entry)
203 1.1 lukem {
204 1.1 lukem int32_t tmpint32;
205 1.1 lukem struct berval tmparr[2], tmpuid[2];
206 1.1 lukem const char **tmpvalues;
207 1.1 lukem char *tmp;
208 1.1 lukem struct berval *names;
209 1.1 lukem struct berval *uids;
210 1.1 lukem struct berval passwd = {0};
211 1.1 lukem gid_t gid;
212 1.1 lukem struct berval gecos;
213 1.1 lukem struct berval homedir;
214 1.1 lukem struct berval shell;
215 1.1 lukem Attribute *a;
216 1.1 lukem int i,j;
217 1.1 lukem int use_shadow = 0;
218 1.1 lukem /* get the usernames for this entry */
219 1.1 lukem if (BER_BVISNULL(&cbp->name))
220 1.1 lukem {
221 1.1 lukem a = attr_find(entry->e_attrs, cbp->mi->mi_attrs[UID_KEY].an_desc);
222 1.1 lukem if (!a)
223 1.1 lukem {
224 1.1 lukem Debug(LDAP_DEBUG_ANY,"passwd entry %s does not contain %s value",
225 1.1 lukem entry->e_name.bv_val, cbp->mi->mi_attrs[UID_KEY].an_desc->ad_cname.bv_val,0);
226 1.1 lukem return 0;
227 1.1 lukem }
228 1.1 lukem names = a->a_vals;
229 1.1 lukem }
230 1.1 lukem else
231 1.1 lukem {
232 1.1 lukem names=tmparr;
233 1.1 lukem names[0]=cbp->name;
234 1.1 lukem BER_BVZERO(&names[1]);
235 1.1 lukem }
236 1.1 lukem /* get the password for this entry */
237 1.1 lukem a = attr_find(entry->e_attrs, slap_schema.si_ad_objectClass);
238 1.1 lukem if ( a ) {
239 1.1 lukem for ( i=0; i<a->a_numvals; i++) {
240 1.1 lukem if ( bvmatch( &shadowclass, &a->a_nvals[i] )) {
241 1.1 lukem use_shadow = 1;
242 1.1 lukem break;
243 1.1 lukem }
244 1.1 lukem }
245 1.1 lukem }
246 1.1 lukem if ( use_shadow )
247 1.1 lukem {
248 1.1 lukem /* if the entry has a shadowAccount entry, point to that instead */
249 1.1 lukem passwd = shadow_passwd;
250 1.1 lukem }
251 1.1 lukem else
252 1.1 lukem {
253 1.1 lukem a = attr_find(entry->e_attrs, cbp->mi->mi_attrs[PWD_KEY].an_desc);
254 1.1 lukem if (a)
255 1.1 lukem get_userpassword(&a->a_vals[0], &passwd);
256 1.1 lukem if (BER_BVISNULL(&passwd))
257 1.1 lukem passwd=default_passwd_userPassword;
258 1.1 lukem }
259 1.1 lukem /* get the uids for this entry */
260 1.1 lukem if (BER_BVISNULL(&cbp->id))
261 1.1 lukem {
262 1.1 lukem a = attr_find(entry->e_attrs, cbp->mi->mi_attrs[UIDN_KEY].an_desc);
263 1.1 lukem if ( !a )
264 1.1 lukem {
265 1.1 lukem Debug(LDAP_DEBUG_ANY,"passwd entry %s does not contain %s value",
266 1.1 lukem entry->e_name.bv_val, cbp->mi->mi_attrs[UIDN_KEY].an_desc->ad_cname.bv_val,0);
267 1.1 lukem return 0;
268 1.1 lukem }
269 1.1 lukem uids = a->a_vals;
270 1.1 lukem }
271 1.1 lukem else
272 1.1 lukem {
273 1.1 lukem uids = tmpuid;
274 1.1 lukem uids[0] = cbp->id;
275 1.1 lukem BER_BVZERO(&uids[1]);
276 1.1 lukem }
277 1.1 lukem /* get the gid for this entry */
278 1.1 lukem a = attr_find(entry->e_attrs, cbp->mi->mi_attrs[GIDN_KEY].an_desc);
279 1.1 lukem if (!a)
280 1.1 lukem {
281 1.1 lukem Debug(LDAP_DEBUG_ANY,"passwd entry %s does not contain %s value",
282 1.1 lukem entry->e_name.bv_val, cbp->mi->mi_attrs[GIDN_KEY].an_desc->ad_cname.bv_val,0);
283 1.1 lukem return 0;
284 1.1 lukem }
285 1.1 lukem else if (a->a_numvals != 1)
286 1.1 lukem {
287 1.1 lukem Debug(LDAP_DEBUG_ANY,"passwd entry %s contains multiple %s values",
288 1.1 lukem entry->e_name.bv_val, cbp->mi->mi_attrs[GIDN_KEY].an_desc->ad_cname.bv_val,0);
289 1.1 lukem }
290 1.1 lukem gid=(gid_t)strtol(a->a_vals[0].bv_val,&tmp,0);
291 1.1 lukem if ((a->a_vals[0].bv_val[0]=='\0')||(*tmp!='\0'))
292 1.1 lukem {
293 1.1 lukem Debug(LDAP_DEBUG_ANY,"passwd entry %s contains non-numeric %s value",
294 1.1 lukem entry->e_name.bv_val, cbp->mi->mi_attrs[GIDN_KEY].an_desc->ad_cname.bv_val,0);
295 1.1 lukem return 0;
296 1.1 lukem }
297 1.1 lukem /* get the gecos for this entry (fall back to cn) */
298 1.1 lukem a = attr_find(entry->e_attrs, cbp->mi->mi_attrs[GEC_KEY].an_desc);
299 1.1 lukem if (!a)
300 1.1 lukem a = attr_find(entry->e_attrs, cbp->mi->mi_attrs[CN_KEY].an_desc);
301 1.1 lukem if (!a || !a->a_numvals)
302 1.1 lukem {
303 1.1 lukem Debug(LDAP_DEBUG_ANY,"passwd entry %s does not contain %s or %s value",
304 1.1 lukem entry->e_name.bv_val,
305 1.1 lukem cbp->mi->mi_attrs[GEC_KEY].an_desc->ad_cname.bv_val,
306 1.1 lukem cbp->mi->mi_attrs[CN_KEY].an_desc->ad_cname.bv_val);
307 1.1 lukem return 0;
308 1.1 lukem }
309 1.1 lukem else if (a->a_numvals > 1)
310 1.1 lukem {
311 1.1 lukem Debug(LDAP_DEBUG_ANY,"passwd entry %s contains multiple %s or %s values",
312 1.1 lukem entry->e_name.bv_val,
313 1.1 lukem cbp->mi->mi_attrs[GEC_KEY].an_desc->ad_cname.bv_val,
314 1.1 lukem cbp->mi->mi_attrs[CN_KEY].an_desc->ad_cname.bv_val);
315 1.1 lukem }
316 1.1 lukem gecos=a->a_vals[0];
317 1.1 lukem /* get the home directory for this entry */
318 1.1 lukem a = attr_find(entry->e_attrs, cbp->mi->mi_attrs[DIR_KEY].an_desc);
319 1.1 lukem if (!a)
320 1.1 lukem {
321 1.1 lukem Debug(LDAP_DEBUG_ANY,"passwd entry %s does not contain %s value",
322 1.1 lukem entry->e_name.bv_val, cbp->mi->mi_attrs[DIR_KEY].an_desc->ad_cname.bv_val,0);
323 1.1 lukem homedir=default_passwd_homeDirectory;
324 1.1 lukem }
325 1.1 lukem else
326 1.1 lukem {
327 1.1 lukem if (a->a_numvals > 1)
328 1.1 lukem {
329 1.1 lukem Debug(LDAP_DEBUG_ANY,"passwd entry %s contains multiple %s values",
330 1.1 lukem entry->e_name.bv_val, cbp->mi->mi_attrs[DIR_KEY].an_desc->ad_cname.bv_val,0);
331 1.1 lukem }
332 1.1 lukem homedir=a->a_vals[0];
333 1.1 lukem if (homedir.bv_val[0]=='\0')
334 1.1 lukem homedir=default_passwd_homeDirectory;
335 1.1 lukem }
336 1.1 lukem /* get the shell for this entry */
337 1.1 lukem a = attr_find(entry->e_attrs, cbp->mi->mi_attrs[SHL_KEY].an_desc);
338 1.1 lukem if (!a)
339 1.1 lukem {
340 1.1 lukem shell=default_passwd_loginShell;
341 1.1 lukem }
342 1.1 lukem else
343 1.1 lukem {
344 1.1 lukem if (a->a_numvals > 1)
345 1.1 lukem {
346 1.1 lukem Debug(LDAP_DEBUG_ANY,"passwd entry %s contains multiple %s values",
347 1.1 lukem entry->e_name.bv_val, cbp->mi->mi_attrs[SHL_KEY].an_desc->ad_cname.bv_val,0);
348 1.1 lukem }
349 1.1 lukem shell=a->a_vals[0];
350 1.1 lukem if (shell.bv_val[0]=='\0')
351 1.1 lukem shell=default_passwd_loginShell;
352 1.1 lukem }
353 1.1 lukem /* write the entries */
354 1.1 lukem for (i=0;!BER_BVISNULL(&names[i]);i++)
355 1.1 lukem {
356 1.1 lukem if (!isvalidusername(&names[i]))
357 1.1 lukem {
358 1.1 lukem Debug(LDAP_DEBUG_ANY,"nssov: passwd entry %s contains invalid user name: \"%s\"",
359 1.1 lukem entry->e_name.bv_val,names[i].bv_val,0);
360 1.1 lukem }
361 1.1 lukem else
362 1.1 lukem {
363 1.1 lukem for (j=0;!BER_BVISNULL(&uids[j]);j++)
364 1.1 lukem {
365 1.1 lukem char *tmp;
366 1.1 lukem uid_t uid;
367 1.1 lukem uid = strtol(uids[j].bv_val, &tmp, 0);
368 1.1 lukem if ( *tmp ) {
369 1.1 lukem Debug(LDAP_DEBUG_ANY,"nssov: passwd entry %s contains non-numeric %s value: \"%s\"",
370 1.1 lukem entry->e_name.bv_val, cbp->mi->mi_attrs[UIDN_KEY].an_desc->ad_cname.bv_val,
371 1.1 lukem names[i].bv_val);
372 1.1 lukem continue;
373 1.1 lukem }
374 1.1 lukem WRITE_INT32(cbp->fp,NSLCD_RESULT_SUCCESS);
375 1.1 lukem WRITE_BERVAL(cbp->fp,&names[i]);
376 1.1 lukem WRITE_BERVAL(cbp->fp,&passwd);
377 1.1 lukem WRITE_TYPE(cbp->fp,uid,uid_t);
378 1.1 lukem WRITE_TYPE(cbp->fp,gid,gid_t);
379 1.1 lukem WRITE_BERVAL(cbp->fp,&gecos);
380 1.1 lukem WRITE_BERVAL(cbp->fp,&homedir);
381 1.1 lukem WRITE_BERVAL(cbp->fp,&shell);
382 1.1 lukem }
383 1.1 lukem }
384 1.1 lukem }
385 1.1 lukem return 0;
386 1.1 lukem }
387 1.1 lukem
388 1.1 lukem NSSOV_CB(passwd)
389 1.1 lukem
390 1.1 lukem NSSOV_HANDLE(
391 1.1 lukem passwd,byname,
392 1.1 lukem char fbuf[1024];
393 1.1 lukem struct berval filter = {sizeof(fbuf)};
394 1.1 lukem filter.bv_val = fbuf;
395 1.1 lukem READ_STRING_BUF2(fp,cbp.buf,sizeof(cbp.buf));
396 1.1 lukem cbp.name.bv_len = tmpint32;
397 1.1 lukem cbp.name.bv_val = cbp.buf;
398 1.1 lukem if (!isvalidusername(&cbp.name)) {
399 1.1 lukem Debug(LDAP_DEBUG_ANY,"nssov_passwd_byname(%s): invalid user name",cbp.name.bv_val,0,0);
400 1.1 lukem return -1;
401 1.1 lukem }
402 1.1 lukem BER_BVZERO(&cbp.id); ,
403 1.1 lukem Debug(LDAP_DEBUG_TRACE,"nssov_passwd_byname(%s)",cbp.name.bv_val,0,0);,
404 1.1 lukem NSLCD_ACTION_PASSWD_BYNAME,
405 1.1 lukem nssov_filter_byname(cbp.mi,UID_KEY,&cbp.name,&filter)
406 1.1 lukem )
407 1.1 lukem
408 1.1 lukem NSSOV_HANDLE(
409 1.1 lukem passwd,byuid,
410 1.1 lukem uid_t uid;
411 1.1 lukem char fbuf[1024];
412 1.1 lukem struct berval filter = {sizeof(fbuf)};
413 1.1 lukem filter.bv_val = fbuf;
414 1.1 lukem READ_TYPE(fp,uid,uid_t);
415 1.1 lukem cbp.id.bv_val = cbp.buf;
416 1.1 lukem cbp.id.bv_len = snprintf(cbp.buf,sizeof(cbp.buf),"%d",uid);
417 1.1 lukem BER_BVZERO(&cbp.name);,
418 1.1 lukem Debug(LDAP_DEBUG_TRACE,"nssov_passwd_byuid(%s)",cbp.id.bv_val,0,0);,
419 1.1 lukem NSLCD_ACTION_PASSWD_BYUID,
420 1.1 lukem nssov_filter_byid(cbp.mi,UIDN_KEY,&cbp.id,&filter)
421 1.1 lukem )
422 1.1 lukem
423 1.1 lukem NSSOV_HANDLE(
424 1.1 lukem passwd,all,
425 1.1 lukem struct berval filter;
426 1.1 lukem /* no parameters to read */
427 1.1 lukem BER_BVZERO(&cbp.name);
428 1.1 lukem BER_BVZERO(&cbp.id);,
429 1.1 lukem Debug(LDAP_DEBUG_TRACE,"nssov_passwd_all()",0,0,0);,
430 1.1 lukem NSLCD_ACTION_PASSWD_ALL,
431 1.1 lukem (filter=cbp.mi->mi_filter,0)
432 1.1 lukem )
433