~ubuntu-branches/ubuntu/hardy/gnupg/hardy-updates

« back to all changes in this revision

Viewing changes to keyserver/gpgkeys_ldap.c

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2006-12-12 15:56:56 UTC
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: james.westby@ubuntu.com-20061212155656-kk00wp4x0uq4tm1y
Tags: upstream-1.4.6
ImportĀ upstreamĀ versionĀ 1.4.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 * along with this program; if not, write to the Free Software
18
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
19
19
 * USA.
 
20
 *
 
21
 * In addition, as a special exception, the Free Software Foundation
 
22
 * gives permission to link the code of the keyserver helper tools:
 
23
 * gpgkeys_ldap, gpgkeys_curl and gpgkeys_hkp with the OpenSSL
 
24
 * project's "OpenSSL" library (or with modified versions of it that
 
25
 * use the same license as the "OpenSSL" library), and distribute the
 
26
 * linked executables.  You must obey the GNU General Public License
 
27
 * in all respects for all of the code used other than "OpenSSL".  If
 
28
 * you modify this file, you may extend this exception to your version
 
29
 * of the file, but you are not obligated to do so.  If you do not
 
30
 * wish to do so, delete this exception statement from your version.
20
31
 */
21
32
 
22
33
#include <config.h>
29
40
#endif
30
41
#include <stdlib.h>
31
42
#include <errno.h>
 
43
#include <assert.h>
32
44
 
33
45
#ifdef _WIN32
34
46
#include <winsock2.h>
42
54
#include <ldap.h>
43
55
#endif
44
56
 
45
 
#include "util.h"
 
57
#include "compat.h"
46
58
#include "keyserver.h"
47
59
#include "ksutil.h"
48
60
 
355
367
  if((record=strsep(&line,":"))==NULL)
356
368
    return;
357
369
 
358
 
  if(ascii_strcasecmp("pub",record)==0)
 
370
  if (strcmp("pub",record)==0)
359
371
    {
360
372
      char *tok;
361
373
      int disabled=0,revoked=0;
461
473
      make_one_attr(modlist,"pgpDisabled",disabled?"1":"0");
462
474
      make_one_attr(modlist,"pgpRevoked",revoked?"1":"0");
463
475
    }
464
 
  else if(ascii_strcasecmp("sub",record)==0)
 
476
  else if (strcmp("sub",record)==0)
465
477
    {
466
478
      char *tok;
467
479
 
499
511
      /* Ignore the rest of the items for subkeys since the LDAP
500
512
         schema doesn't store them. */
501
513
    }
502
 
  else if(ascii_strcasecmp("uid",record)==0)
 
514
  else if (strcmp("uid",record)==0)
503
515
    {
504
516
      char *userid,*tok;
505
517
 
536
548
 
537
549
      make_one_attr(modlist,"pgpUserID",userid);
538
550
    }
539
 
  else if(ascii_strcasecmp("sig",record)==0)
 
551
  else if(strcmp("sig",record)==0)
540
552
    {
541
553
      char *tok;
542
554
 
2325
2337
      free(searchkey);
2326
2338
    }
2327
2339
  else
2328
 
    BUG();
 
2340
    assert (!"invalid action");
2329
2341
 
2330
2342
  if(!failed)
2331
2343
    ret=KEYSERVER_OK;