Lines Matching refs:op
48 static void pwdfile_search LDAP_P(( struct ldop *op, FILE *ofp ));
49 static struct ldentry *pw2entry LDAP_P(( struct ldop *op, struct passwd *pw ));
58 struct ldop op;
90 (void) memset( (char *)&op, '\0', sizeof( op ));
92 if ( parse_input( stdin, stdout, &op ) < 0 ) {
96 if ( op.ldop_op != LDOP_SEARCH ) {
103 dump_ldop( &op );
106 pwdfile_search( &op, stdout );
113 pwdfile_search( struct ldop *op, FILE *ofp )
119 oneentry = ( strchr( op->ldop_dn, '@' ) != NULL );
122 if (( entry = pw2entry( op, pw )) != NULL ) {
124 if ( strcasecmp( op->ldop_dn, entry->lde_dn ) == 0 ) {
125 write_entry( op, entry, ofp );
128 } else if ( test_filter( op, entry ) == LDAP_COMPARE_TRUE ) {
129 write_entry( op, entry, ofp );
141 pw2entry( struct ldop *op, struct passwd *pw )
150 if ( strchr( op->ldop_suffixes[ 0 ], '=' ) != NULL ) {
154 i = snprintf( tmpbuf, sizeof( tmpbuf ), "cn=%s, %s", pw->pw_name, op->ldop_suffixes[ 0 ] );
159 i = snprintf( tmpbuf, sizeof( tmpbuf ), "%s@%s", pw->pw_name, op->ldop_suffixes[ 0 ] );