Back to index

openldap  2.4.31
Functions | Variables
alias.c File Reference
#include "nssov.h"

Go to the source code of this file.

Functions

 NSSOV_CBPRIV (alias, struct berval name;char buf[256];)
static int write_alias (nssov_alias_cbp *cbp, Entry *entry)

Variables

static struct berval = BER_BVC("(objectClass=nisMailAlias)")

Function Documentation

NSSOV_CBPRIV ( alias  ,
struct berval name;char buf [256] 
)
static int write_alias ( nssov_alias_cbp *  cbp,
Entry entry 
) [static]

Definition at line 49 of file alias.c.

{
       int32_t tmpint32,tmp2int32,tmp3int32;
       struct berval tmparr[2], empty;
       struct berval *names, *members;
       Attribute *a;
       int i;

       /* get the name of the alias */
       if (BER_BVISNULL(&cbp->name))
       {
              a = attr_find(entry->e_attrs, cbp->mi->mi_attrs[0].an_desc);
              if ( !a )
              {
                     Debug(LDAP_DEBUG_ANY,"alias entry %s does not contain %s value\n",
                            entry->e_name.bv_val,cbp->mi->mi_attrs[0].an_desc->ad_cname.bv_val,0 );
                     return 0;
              }
              names = a->a_vals;
       }
       else
       {
              names=tmparr;
              names[0]=cbp->name;
              BER_BVZERO(&names[1]);
       }
       /* get the members of the alias */
       a = attr_find(entry->e_attrs, cbp->mi->mi_attrs[1].an_desc);
       if ( !a ) {
              BER_BVZERO( &empty );
              members = ∅
       } else {
              members = a->a_vals;
       }
       /* for each name, write an entry */
       for (i=0;!BER_BVISNULL(&names[i]);i++)
       {
              WRITE_INT32(cbp->fp,NSLCD_RESULT_BEGIN);
              WRITE_BERVAL(cbp->fp,&names[i]);
              WRITE_BVARRAY(cbp->fp,members);
       }
       return 0;
}

Here is the call graph for this function:


Variable Documentation

static struct berval = BER_BVC("(objectClass=nisMailAlias)") [static]

Definition at line 34 of file alias.c.