~ubuntu-branches/ubuntu/maverick/openldap/maverick-proposed

« back to all changes in this revision

Viewing changes to include/ldap.h

  • 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/include/ldap.h,v 1.312.2.10 2008/07/09 00:29:57 quanah Exp $ */
 
1
/* $OpenLDAP: pkg/ldap/include/ldap.h,v 1.312.2.18 2009/01/26 23:29:53 quanah 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
108
108
#define LDAP_OPT_ERROR_STRING                   LDAP_OPT_DIAGNOSTIC_MESSAGE
109
109
#define LDAP_OPT_MATCHED_DN                     0x0033
110
110
/* 0x0034 - 0x3fff not defined */
 
111
/* 0x0091 used by Microsoft for LDAP_OPT_AUTO_RECONNECT */
 
112
#define LDAP_OPT_SSPI_FLAGS                     0x0092
 
113
/* 0x0093 used by Microsoft for LDAP_OPT_SSL_INFO */
 
114
/* 0x0094 used by Microsoft for LDAP_OPT_REF_DEREF_CONN_PER_MSG */
 
115
#define LDAP_OPT_SIGN                           0x0095
 
116
#define LDAP_OPT_ENCRYPT                        0x0096
 
117
#define LDAP_OPT_SASL_METHOD                    0x0097
 
118
/* 0x0098 used by Microsoft for LDAP_OPT_AREC_EXCLUSIVE */
 
119
#define LDAP_OPT_SECURITY_CONTEXT               0x0099
 
120
/* 0x009A used by Microsoft for LDAP_OPT_ROOTDSE_CACHE */
 
121
/* 0x009B - 0x3fff not defined */
111
122
 
112
123
/* API Extensions */
113
124
#define LDAP_OPT_API_EXTENSION_BASE 0x4000  /* API extensions */
123
134
#define LDAP_OPT_SOCKBUF            0x5008  /* sockbuf */
124
135
#define LDAP_OPT_DEFBASE                0x5009  /* searchbase */
125
136
#define LDAP_OPT_CONNECT_ASYNC          0x5010  /* create connections asynchronously */
 
137
#define LDAP_OPT_CONNECT_CB                     0x5011  /* connection callbacks */
126
138
 
127
139
/* OpenLDAP TLS options */
128
140
#define LDAP_OPT_X_TLS                          0x6000
129
 
#define LDAP_OPT_X_TLS_CTX                      0x6001  /* OpenSSL CTX */
 
141
#define LDAP_OPT_X_TLS_CTX                      0x6001  /* OpenSSL CTX* */
130
142
#define LDAP_OPT_X_TLS_CACERTFILE       0x6002
131
143
#define LDAP_OPT_X_TLS_CACERTDIR        0x6003
132
144
#define LDAP_OPT_X_TLS_CERTFILE         0x6004
133
145
#define LDAP_OPT_X_TLS_KEYFILE          0x6005
134
146
#define LDAP_OPT_X_TLS_REQUIRE_CERT     0x6006
135
 
/* #define LDAP_OPT_X_TLS_PROTOCOL              0x6007 */
 
147
#define LDAP_OPT_X_TLS_PROTOCOL_MIN     0x6007
136
148
#define LDAP_OPT_X_TLS_CIPHER_SUITE     0x6008
137
149
#define LDAP_OPT_X_TLS_RANDOM_FILE      0x6009
138
 
#define LDAP_OPT_X_TLS_SSL_CTX          0x600a
 
150
#define LDAP_OPT_X_TLS_SSL_CTX          0x600a  /* OpenSSL SSL* */
139
151
#define LDAP_OPT_X_TLS_CRLCHECK         0x600b
140
152
#define LDAP_OPT_X_TLS_CONNECT_CB       0x600c
141
153
#define LDAP_OPT_X_TLS_CONNECT_ARG      0x600d
153
165
#define LDAP_OPT_X_TLS_CRL_PEER 1
154
166
#define LDAP_OPT_X_TLS_CRL_ALL  2
155
167
 
 
168
/* for LDAP_OPT_X_TLS_PROTOCOL_MIN */
 
169
#define LDAP_OPT_X_TLS_PROTOCOL(maj,min)        (((maj) << 8) + (min))
 
170
#define LDAP_OPT_X_TLS_PROTOCOL_SSL2            (2 << 8)
 
171
#define LDAP_OPT_X_TLS_PROTOCOL_SSL3            (3 << 8)
 
172
#define LDAP_OPT_X_TLS_PROTOCOL_TLS1_0          ((3 << 8) + 1)
 
173
#define LDAP_OPT_X_TLS_PROTOCOL_TLS1_1          ((3 << 8) + 2)
 
174
#define LDAP_OPT_X_TLS_PROTOCOL_TLS1_2          ((3 << 8) + 3)
 
175
 
156
176
/* OpenLDAP SASL options */
157
177
#define LDAP_OPT_X_SASL_MECH                    0x6100
158
178
#define LDAP_OPT_X_SASL_REALM                   0x6101
163
183
#define LDAP_OPT_X_SASL_SECPROPS                0x6106 /* write-only */
164
184
#define LDAP_OPT_X_SASL_SSF_MIN                 0x6107
165
185
#define LDAP_OPT_X_SASL_SSF_MAX                 0x6108
166
 
#define LDAP_OPT_X_SASL_MAXBUFSIZE              0x6109
 
186
#define LDAP_OPT_X_SASL_MAXBUFSIZE              0x6109
 
187
#define LDAP_OPT_X_SASL_MECHLIST                0x610a /* read-only */
 
188
#define LDAP_OPT_X_SASL_NOCANON                 0x610b
 
189
 
 
190
/* OpenLDAP GSSAPI options */
 
191
#define LDAP_OPT_X_GSSAPI_DO_NOT_FREE_CONTEXT      0x6200
 
192
#define LDAP_OPT_X_GSSAPI_ALLOW_REMOTE_PRINCIPAL   0x6201
 
193
 
167
194
 
168
195
/* Private API Extensions -- reserved for application use */
169
196
#define LDAP_OPT_PRIVATE_EXTENSION_BASE 0x7000  /* Private API inclusive */
270
297
#define LDAP_CONTROL_SLURP                              "1.3.6.1.4.1.4203.666.5.13"
271
298
#define LDAP_CONTROL_VALSORT                    "1.3.6.1.4.1.4203.666.5.14"
272
299
#define LDAP_CONTROL_DONTUSECOPY                "1.3.6.1.4.1.4203.666.5.15"
273
 
 
 
300
#define LDAP_CONTROL_X_DEREF                    "1.3.6.1.4.1.4203.666.5.16"
 
301
#define LDAP_CONTROL_X_WHATFAILED               "1.3.6.1.4.1.4203.666.5.17"
274
302
 
275
303
/* LDAP Chaining Behavior Control *//* work in progress */
276
304
/* <draft-sermersheim-ldap-chaining>;
480
508
#define LDAP_AUTH_KRBV41 ((ber_tag_t) 0x81U) /* context specific + primitive */
481
509
#define LDAP_AUTH_KRBV42 ((ber_tag_t) 0x82U) /* context specific + primitive */
482
510
 
 
511
/* used by the Windows API but not used on the wire */
 
512
#define LDAP_AUTH_NEGOTIATE ((ber_tag_t) 0x04FFU)
483
513
 
484
514
/* filter types */
485
515
#define LDAP_FILTER_AND ((ber_tag_t) 0xa0U)     /* context specific + constructed */
882
912
 */
883
913
 
884
914
/*
 
915
 * Connection callbacks...
 
916
 */
 
917
struct ldap_conncb;
 
918
struct sockaddr;
 
919
 
 
920
/* Called after a connection is established */
 
921
typedef int (ldap_conn_add_f) LDAP_P(( LDAP *ld, Sockbuf *sb, LDAPURLDesc *srv, struct sockaddr *addr,
 
922
        struct ldap_conncb *ctx ));
 
923
/* Called before a connection is closed */
 
924
typedef void (ldap_conn_del_f) LDAP_P(( LDAP *ld, Sockbuf *sb, struct ldap_conncb *ctx ));
 
925
 
 
926
/* Callbacks are pushed on a stack. Last one pushed is first one executed. The
 
927
 * delete callback is called with a NULL Sockbuf just before freeing the LDAP handle.
 
928
 */
 
929
typedef struct ldap_conncb {
 
930
        ldap_conn_add_f *lc_add;
 
931
        ldap_conn_del_f *lc_del;
 
932
        void *lc_arg;
 
933
} ldap_conncb;
 
934
 
 
935
/*
885
936
 * The API draft spec says we should declare (or cause to be declared)
886
937
 * 'struct timeval'.   We don't.  See IETF LDAPext discussions.
887
938
 */
2359
2410
        int             iscritical,
2360
2411
        LDAPControl     **ctrlp ));
2361
2412
 
 
2413
/*
 
2414
 * in deref.c
 
2415
 */
 
2416
 
 
2417
typedef struct LDAPDerefSpec {
 
2418
        char *derefAttr;
 
2419
        char **attributes;
 
2420
} LDAPDerefSpec;
 
2421
 
 
2422
typedef struct LDAPDerefVal {
 
2423
        char *type;
 
2424
        BerVarray vals;
 
2425
        struct LDAPDerefVal *next;
 
2426
} LDAPDerefVal;
 
2427
 
 
2428
typedef struct LDAPDerefRes {
 
2429
        char *derefAttr;
 
2430
        struct berval derefVal;
 
2431
        LDAPDerefVal *attrVals;
 
2432
        struct LDAPDerefRes *next;
 
2433
} LDAPDerefRes;
 
2434
 
 
2435
LDAP_F( int )
 
2436
ldap_create_deref_control_value LDAP_P((
 
2437
        LDAP *ld,
 
2438
        LDAPDerefSpec *ds,
 
2439
        struct berval *value ));
 
2440
 
 
2441
LDAP_F( int )
 
2442
ldap_create_deref_control LDAP_P((
 
2443
        LDAP            *ld,
 
2444
        LDAPDerefSpec   *ds,
 
2445
        int             iscritical,
 
2446
        LDAPControl     **ctrlp ));
 
2447
 
 
2448
LDAP_F( void )
 
2449
ldap_derefresponse_free LDAP_P((
 
2450
        LDAPDerefRes *dr ));
 
2451
 
 
2452
LDAP_F( int )
 
2453
ldap_parse_derefresponse_control LDAP_P((
 
2454
        LDAP *ld,
 
2455
        LDAPControl *ctrl,
 
2456
        LDAPDerefRes **drp ));
 
2457
 
 
2458
LDAP_F( int )
 
2459
ldap_parse_deref_control LDAP_P((
 
2460
        LDAP            *ld,
 
2461
        LDAPControl     **ctrls,
 
2462
        LDAPDerefRes    **drp ));
 
2463
 
2362
2464
LDAP_END_DECL
2363
2465
#endif /* _LDAP_H */