~ttx/openldap/lucid-gssapi-495418

« back to all changes in this revision

Viewing changes to servers/slapd/back-monitor/bind.c

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug
  • Date: 2008-07-10 14:45:49 UTC
  • Revision ID: james.westby@ubuntu.com-20080710144549-wck73med0e72gfyo
Tags: upstream-2.4.10
ImportĀ upstreamĀ versionĀ 2.4.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* bind.c - monitor backend bind routine */
 
2
/* $OpenLDAP: pkg/ldap/servers/slapd/back-monitor/bind.c,v 1.17.2.3 2008/02/11 23:26:47 kurt Exp $ */
 
3
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
 
4
 *
 
5
 * Copyright 2001-2008 The OpenLDAP Foundation.
 
6
 * Portions Copyright 2001-2003 Pierangelo Masarati.
 
7
 * All rights reserved.
 
8
 *
 
9
 * Redistribution and use in source and binary forms, with or without
 
10
 * modification, are permitted only as authorized by the OpenLDAP
 
11
 * Public License.
 
12
 *
 
13
 * A copy of this license is available in file LICENSE in the
 
14
 * top-level directory of the distribution or, alternatively, at
 
15
 * <http://www.OpenLDAP.org/license.html>.
 
16
 */
 
17
/* ACKNOWLEDGEMENTS:
 
18
 * This work was initially developed by Pierangelo Masarati for inclusion
 
19
 * in OpenLDAP Software.
 
20
 */
 
21
 
 
22
#include "portable.h"
 
23
 
 
24
#include <stdio.h>
 
25
 
 
26
#include <slap.h>
 
27
#include "back-monitor.h"
 
28
 
 
29
/*
 
30
 * At present, only rootdn can bind with simple bind
 
31
 */
 
32
 
 
33
int
 
34
monitor_back_bind( Operation *op, SlapReply *rs )
 
35
{
 
36
        Debug(LDAP_DEBUG_ARGS, "==> monitor_back_bind: dn: %s\n", 
 
37
                        op->o_req_dn.bv_val, 0, 0 );
 
38
 
 
39
        if ( be_isroot_pw( op ) ) {
 
40
                return LDAP_SUCCESS;
 
41
        }
 
42
 
 
43
        rs->sr_err = LDAP_INVALID_CREDENTIALS;
 
44
        send_ldap_result( op, rs );
 
45
 
 
46
        return rs->sr_err;
 
47
}
 
48