Lines Matching refs:op
34 Operation *op, SlapReply *rs)
36 struct paminfo *pi = op->o_callback->sc_private;
103 static int pam_uid2dn(nssov_info *ni, Operation *op,
122 sdn.bv_val = op->o_tmpalloc( sdn.bv_len + 1, op->o_tmpmemctx );
125 slap_sasl2dn(op, &sdn, &pi->dn, 0);
126 op->o_tmpfree( sdn.bv_val, op->o_tmpmemctx );
131 nssov_uid2dn(op, ni, &pi->uid, &pi->dn);
134 dnNormalize( 0, NULL, NULL, &sdn, &pi->dn, op->o_tmpmemctx );
143 int pam_do_bind(nssov_info *ni,TFILE *fp,Operation *op,
155 rc = pam_uid2dn(ni, op, pi);
172 op->o_ctrlflag[ppolicy_cid] = SLAP_CONTROL_NONCRITICAL;
176 op->o_callback = &cb;
177 op->o_dn.bv_val[0] = 0;
178 op->o_dn.bv_len = 0;
179 op->o_ndn.bv_val[0] = 0;
180 op->o_ndn.bv_len = 0;
181 op->o_tag = LDAP_REQ_BIND;
182 op->o_protocol = LDAP_VERSION3;
183 op->orb_method = LDAP_AUTH_SIMPLE;
184 op->orb_cred = pi->pwd;
185 op->o_req_dn = pi->dn;
186 op->o_req_ndn = pi->dn;
187 slap_op_time( &op->o_time, &op->o_tincr );
188 rc = op->o_bd->be_bind( op, &rs );
194 send_ldap_result(op, &rs);
204 int pam_authc(nssov_info *ni,TFILE *fp,Operation *op)
232 rc = pam_do_bind(ni, fp, op, &pi);
255 static int pam_compare_cb(Operation *op, SlapReply *rs)
258 op->o_callback->sc_private = (void *)1;
262 int pam_authz(nssov_info *ni,TFILE *fp,Operation *op)
305 rc = pam_uid2dn(ni, op, &pi);
314 struct berval odn = op->o_ndn;
316 op->o_dn = dn;
317 op->o_ndn = dn;
328 op->o_callback = &cb;
329 op->o_req_dn = mi->mi_base;
330 op->o_req_ndn = mi->mi_base;
331 op->ors_scope = mi->mi_scope;
332 op->ors_filterstr = filter;
333 op->ors_filter = str2filter_x(op, filter.bv_val);
334 op->ors_attrs = slap_anlist_no_attrs;
335 op->ors_tlimit = SLAP_NO_LIMIT;
336 op->ors_slimit = 2;
337 rc = op->o_bd->be_search(op, &rs2);
338 filter_free_x(op, op->ors_filter, 1);
346 op->ors_filterstr = filter;
347 op->ors_filter = str2filter_x(op, filter.bv_val);
348 rc = op->o_bd->be_search(op, &rs2);
349 filter_free_x(op, op->ors_filter, 1);
362 op->o_tag = LDAP_REQ_COMPARE;
363 op->o_req_dn = hostdn;
364 op->o_req_ndn = hostdn;
367 op->orc_ava = &ava;
368 rc = op->o_bd->be_compare( op, &rs );
374 op->o_dn = odn;
375 op->o_ndn = odn;
384 op->o_callback = &cb;
386 op->o_tag = LDAP_REQ_COMPARE;
387 op->o_req_dn = ni->ni_pam_group_dn;
388 op->o_req_ndn = ni->ni_pam_group_dn;
391 op->orc_ava = &ava;
392 rc = op->o_bd->be_compare( op, &rs );
404 rc = be_entry_get_rw( op, &dn, NULL, NULL, 0, &e );
415 &global_host_bv, NULL, op->o_tmpmemctx )) {
426 &svc, NULL, op->o_tmpmemctx )) {
478 be_entry_release_r(op, e);
483 static int pam_sess(nssov_info *ni,TFILE *fp,Operation *op,int action)
538 slap_op_time( &op->o_time, &op->o_tincr );
542 stamp = op->o_time;
546 bv[0].bv_val = op->o_tmpalloc( bv[0].bv_len+1, op->o_tmpmemctx );
554 attr_normalize( ad_loginStatus, bv, &nbv, op->o_tmpmemctx );
563 op->o_callback = &cb;
564 op->o_tag = LDAP_REQ_MODIFY;
565 op->o_dn = op->o_bd->be_rootdn;
566 op->o_ndn = op->o_bd->be_rootndn;
567 op->orm_modlist = &mod;
568 op->orm_no_opattrs = 1;
569 op->o_req_dn = dn;
570 op->o_req_ndn = dn;
571 op->o_bd->be_modify( op, &rs );
575 ber_bvarray_free_x( nbv, op->o_tmpmemctx );
580 WRITE_INT32(fp,op->o_time);
584 int pam_sess_o(nssov_info *ni,TFILE *fp,Operation *op)
586 return pam_sess(ni,fp,op,NSLCD_ACTION_PAM_SESS_O);
589 int pam_sess_c(nssov_info *ni,TFILE *fp,Operation *op)
591 return pam_sess(ni,fp,op,NSLCD_ACTION_PAM_SESS_C);
594 int pam_pwmod(nssov_info *ni,TFILE *fp,Operation *op)
629 rc = pam_do_bind(ni,fp,op,&pi);
649 op->o_tag = LDAP_REQ_EXTENDED;
650 op->ore_reqoid = slap_EXOP_MODIFY_PASSWD;
651 op->ore_reqdata = &bv;
652 op->o_dn = pi.dn;
653 op->o_ndn = pi.dn;
654 op->o_callback = &cb;
655 op->o_conn->c_authz_backend = op->o_bd;
657 op->o_bd = frontendDB;
658 rc = op->o_bd->be_extended(op, &rs);