~ttx/openldap/lucid-gssapi-495418

« back to all changes in this revision

Viewing changes to contrib/slapd-modules/nssov/network.c

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2009-07-28 10:17:15 UTC
  • mto: (0.3.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: james.westby@ubuntu.com-20090728101715-g0isvetelfeqm48k
Tags: upstream-2.4.17
ImportĀ upstreamĀ versionĀ 2.4.17

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* network.c - network address lookup routines */
2
 
/* $OpenLDAP: pkg/ldap/contrib/slapd-modules/nssov/network.c,v 1.1.2.1 2008/07/08 18:53:57 quanah Exp $ */
 
2
/* $OpenLDAP: pkg/ldap/contrib/slapd-modules/nssov/network.c,v 1.1.2.2 2009/06/03 20:46:55 quanah Exp $ */
3
3
/*
4
4
 * Copyright 2008 by Howard Chu, Symas Corp.
5
5
 * All rights reserved.
59
59
        a = attr_find( entry->e_attrs, cbp->mi->mi_attrs[0].an_desc );
60
60
        if ( !a || !a->a_vals )
61
61
        {
62
 
                Debug(LDAP_DEBUG_ANY,"network entry %s does not contain %s value",
 
62
                Debug(LDAP_DEBUG_ANY,"network entry %s does not contain %s value\n",
63
63
                        entry->e_name.bv_val,cbp->mi->mi_attrs[0].an_desc->ad_cname.bv_val,0);
64
64
                return 0;
65
65
        }
82
82
        a = attr_find( entry->e_attrs, cbp->mi->mi_attrs[1].an_desc );
83
83
        if ( !a || !a->a_vals )
84
84
        {
85
 
                Debug(LDAP_DEBUG_ANY,"network entry %s does not contain %s value",
 
85
                Debug(LDAP_DEBUG_ANY,"network entry %s does not contain %s value\n",
86
86
                        entry->e_name.bv_val, cbp->mi->mi_attrs[1].an_desc->ad_cname.bv_val, 0 );
87
87
                return 0;
88
88
        }
119
119
        READ_STRING_BUF2(fp,cbp.buf,sizeof(cbp.buf));
120
120
        cbp.name.bv_len = tmpint32;
121
121
        cbp.name.bv_val = cbp.buf;,
122
 
        Debug(LDAP_DEBUG_TRACE,"nssov_network_byname(%s)",cbp.name.bv_val,0,0);,
 
122
        Debug(LDAP_DEBUG_TRACE,"nssov_network_byname(%s)\n",cbp.name.bv_val,0,0);,
123
123
        NSLCD_ACTION_NETWORK_BYNAME,
124
124
        nssov_filter_byname(cbp.mi,0,&cbp.name,&filter)
125
125
)
137
137
        /* translate the address to a string */
138
138
        if (inet_ntop(af,addr,cbp.buf,sizeof(cbp.buf))==NULL)
139
139
        {
140
 
                Debug(LDAP_DEBUG_ANY,"nssov: unable to convert address to string",0,0,0);
 
140
                Debug(LDAP_DEBUG_ANY,"nssov: unable to convert address to string\n",0,0,0);
141
141
                return -1;
142
142
        }
143
143
        cbp.addr.bv_val = cbp.buf;
144
144
        cbp.addr.bv_len = strlen(cbp.buf);,
145
 
        Debug(LDAP_DEBUG_TRACE,"nslcd_network_byaddr(%s)",cbp.addr.bv_val,0,0);,
 
145
        Debug(LDAP_DEBUG_TRACE,"nslcd_network_byaddr(%s)\n",cbp.addr.bv_val,0,0);,
146
146
        NSLCD_ACTION_NETWORK_BYADDR,
147
147
        nssov_filter_byid(cbp.mi,1,&cbp.addr,&filter)
148
148
)
153
153
        /* no parameters to read */
154
154
        BER_BVZERO(&cbp.name);
155
155
        BER_BVZERO(&cbp.addr);,
156
 
        Debug(LDAP_DEBUG_TRACE,"nssov_network_all()",0,0,0);,
 
156
        Debug(LDAP_DEBUG_TRACE,"nssov_network_all()\n",0,0,0);,
157
157
        NSLCD_ACTION_NETWORK_ALL,
158
158
        (filter=cbp.mi->mi_filter,0)
159
159
)