~ubuntu-branches/ubuntu/maverick/openldap/maverick-updates

« back to all changes in this revision

Viewing changes to servers/slapd/sasl.c

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug, Steve Langasek, Mathias Gug
  • Date: 2009-02-18 18:44:00 UTC
  • mfrom: (1.1.2 upstream) (0.1.2 lenny)
  • Revision ID: james.westby@ubuntu.com-20090218184400-zw4mjse9eywt5566
Tags: 2.4.14-0ubuntu1
[ Steve Langasek ]
* New upstream version
  - Fixes a bug with the pcache overlay not returning cached entries
    (closes: #497697)
  - Update evolution-ntlm patch to apply to current Makefiles.
  - (tentatively) drop gnutls-ciphers, since this bug was reported to be
    fixed upstream in 2.4.8.  The fix applied in 2.4.8 didn't match the
    patch from the bug report, so this should be watched for regressions.
* Build against db4.7 instead of db4.2 at last!  Closes: #421946.
* Build with --disable-ndb, to avoid a misbuild when libmysqlclient is
  installed in the build environment.
* New patch, no-crlcheck-for-gnutls, to fix a build failure when using
  --with-tls=gnutls.

[ Mathias Gug ]
* Merge from debian unstable, remaining changes:
  - debian/apparmor-profile: add AppArmor profile
  - debian/slapd.postinst: Reload AA profile on configuration
  - updated debian/slapd.README.Debian for note on AppArmor
  - debian/control: Recommends apparmor >= 2.1+1075-0ubuntu6
  - debian/control: Conflicts with apparmor-profiles << 2.1+1075-0ubuntu4
    to make sure that if earlier version of apparmour-profiles gets
    installed it won't overwrite our profile.
  - Modify Maintainer value to match the DebianMaintainerField
    speficication.
  - follow ApparmorProfileMigration and force apparmor compalin mode on 
    some upgrades (LP: #203529)
  - debian/slapd.dirs: add etc/apparmor.d/force-complain
  - debian/slapd.preinst: create symlink for force-complain on pre-feisty
    upgrades, upgrades where apparmor-profiles profile is unchanged (ie
    non-enforcing) and upgrades where apparmor profile does not exist.
  - debian/slapd.postrm: remove symlink in force-complain/ on purge
  - debian/patches/fix-ucred-libc due to changes how newer glibc handle
    the ucred struct now.
  - debian/control:
    - Build-depend on libltdl7-dev rather then libltdl3-dev.
  - debian/patches/autogen.sh:
    - Call libtoolize with the --install option to install config.{guess,sub}
      files.
  - Don't use local statement in config script as it fails if /bin/sh
    points to bash (LP: #286063).
  - Disable the testsuite on hppa. Allows building of packages on this
    architecture again, once this package is in the archive.
    LP: #288908.
  - debian/slapd.postinst, debian/slapd.script-common: set correct ownership
    and permissions on /var/lib/ldap, /etc/ldap/slapd.d (group readable) and
    /var/run/slapd (world readable). (LP: #257667).
  - debian/patches/nssov-build, debian/rules: 
    Build and package the nss overlay.
    debian/schema/misc.ldif: add ldif file for the misc schema, which defines
    rfc822MailMember (required by the nss overlay).
  - debian/{control,rules}: enable PIE hardening
  - Use cn=config as the default configuration backend instead of 
    slapd.conf. Migrate slapd.conf  file to /etc/ldap/slapd.d/ on upgrade
    asking the end user to enter a new password to control the access to the
    cn=config tree.
* debian/patches/corrupt-contextCSN: The contextCSN can get corrupted at
  times. (ITS: #5947)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $OpenLDAP: pkg/ldap/servers/slapd/sasl.c,v 1.239.2.12 2008/02/12 00:54:34 quanah Exp $ */
 
1
/* $OpenLDAP: pkg/ldap/servers/slapd/sasl.c,v 1.239.2.16 2009/01/22 00:01:03 kurt Exp $ */
2
2
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
3
3
 *
4
 
 * Copyright 1998-2008 The OpenLDAP Foundation.
 
4
 * Copyright 1998-2009 The OpenLDAP Foundation.
5
5
 * All rights reserved.
6
6
 *
7
7
 * Redistribution and use in source and binary forms, with or without
117
117
        }
118
118
 
119
119
        Debug( level, "SASL [conn=%ld] %s: %s\n",
120
 
                conn ? conn->c_connid: -1,
 
120
                conn ? (long) conn->c_connid: -1L,
121
121
                label, message );
122
122
 
123
123
 
397
397
        Operation op = {0};
398
398
        Opheader oph;
399
399
        SlapReply rs = {REP_RESULT};
400
 
        int rc, i, j;
 
400
        int rc, i;
 
401
        unsigned j;
401
402
        Connection *conn = NULL;
402
403
        const struct propval *pr;
403
404
        Modifications *modlist = NULL, **modtail = &modlist, *mod;
554
555
        *out_len = 0;
555
556
 
556
557
        Debug( LDAP_DEBUG_ARGS, "SASL Canonicalize [conn=%ld]: %s=\"%s\"\n",
557
 
                conn ? conn->c_connid : -1,
 
558
                conn ? (long) conn->c_connid : -1L,
558
559
                (flags & SASL_CU_AUTHID) ? "authcid" : "authzid",
559
560
                in ? in : "<empty>");
560
561
 
636
637
        prop_set( props, names[0], dn.bv_val, dn.bv_len );
637
638
 
638
639
        Debug( LDAP_DEBUG_ARGS, "SASL Canonicalize [conn=%ld]: %s=\"%s\"\n",
639
 
                conn ? conn->c_connid : -1, names[0]+1,
 
640
                conn ? (long) conn->c_connid : -1L, names[0]+1,
640
641
                dn.bv_val ? dn.bv_val : "<EMPTY>" );
641
642
 
642
643
        /* Not needed any more, SASL has copied it */
679
680
 
680
681
        Debug( LDAP_DEBUG_ARGS, "SASL proxy authorize [conn=%ld]: "
681
682
                "authcid=\"%s\" authzid=\"%s\"\n",
682
 
                conn ? conn->c_connid : -1, auth_identity, requested_user );
 
683
                conn ? (long) conn->c_connid : -1L, auth_identity, requested_user );
683
684
        if ( conn->c_sasl_dn.bv_val ) {
684
685
                BER_BVZERO( &conn->c_sasl_dn );
685
686
        }
709
710
        if ( rc != LDAP_SUCCESS ) {
710
711
                Debug( LDAP_DEBUG_TRACE, "SASL Proxy Authorize [conn=%ld]: "
711
712
                        "proxy authorization disallowed (%d)\n",
712
 
                        (long) (conn ? conn->c_connid : -1), rc, 0 );
 
713
                        conn ? (long) conn->c_connid : -1L, rc, 0 );
713
714
 
714
715
                sasl_seterror( sconn, 0, "not authorized" );
715
716
                return SASL_NOAUTHZ;
729
730
 
730
731
        Debug( LDAP_DEBUG_TRACE, "SASL Authorize [conn=%ld]: "
731
732
                " proxy authorization allowed authzDN=\"%s\"\n",
732
 
                (long) (conn ? conn->c_connid : -1), 
 
733
                conn ? (long) conn->c_connid : -1L, 
733
734
                authzDN.bv_val ? authzDN.bv_val : "", 0 );
734
735
        return SASL_OK;
735
736
1044
1045
                }
1045
1046
                rc = REWRITE_ERR;
1046
1047
        }
1047
 
        filter_free_x( op, op->ors_filter );
 
1048
        filter_free_x( op, op->ors_filter, 1 );
1048
1049
        op->o_tmpfree( op->ors_filterstr.bv_val, op->o_tmpmemctx );
1049
1050
        return rc;
1050
1051
}