From 4587e053e7ac2f4e80ac6ca66607190de0f1fc69 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 27 Oct 2006 19:37:04 +0000 Subject: [PATCH] Misc LDAPbis comment update Remove unnecessary ISOC notices --- libraries/libldap/abandon.c | 14 +++++------ libraries/libldap/add.c | 38 +++++++++++++++++----------- libraries/libldap/bind.c | 30 +++++++++++----------- libraries/libldap/compare.c | 23 ++++++++--------- libraries/libldap/controls.c | 22 +++++++---------- libraries/libldap/delete.c | 15 +++++------ libraries/libldap/error.c | 3 --- libraries/libldap/extended.c | 28 ++++++++++----------- libraries/libldap/filter.c | 5 ++-- libraries/libldap/ftest.c | 2 +- libraries/libldap/getdn.c | 10 ++++---- libraries/libldap/kbind.c | 31 +++++++++++------------ libraries/libldap/modify.c | 48 +++++++++++++++++++----------------- libraries/libldap/modrdn.c | 22 ++++++++--------- libraries/libldap/pagectrl.c | 3 --- libraries/libldap/passwd.c | 2 +- libraries/libldap/result.c | 3 --- libraries/libldap/sasl.c | 3 --- libraries/libldap/sbind.c | 3 --- libraries/libldap/sortctrl.c | 3 --- libraries/libldap/unbind.c | 17 ++++++------- libraries/libldap/url.c | 4 +-- libraries/libldap/vlvctrl.c | 3 --- 23 files changed, 150 insertions(+), 182 deletions(-) diff --git a/libraries/libldap/abandon.c b/libraries/libldap/abandon.c index 30742ea825..d340286cb1 100644 --- a/libraries/libldap/abandon.c +++ b/libraries/libldap/abandon.c @@ -16,14 +16,6 @@ /* Portions Copyright (c) 1990 Regents of the University of Michigan. * All rights reserved. */ -/* Portions Copyright (C) The Internet Society (1997). - * ASN.1 fragments are from RFC 2251; see RFC for full legal notices. - */ - -/* - * An abandon request looks like this: - * AbandonRequest ::= MessageID - */ #include "portable.h" @@ -37,6 +29,12 @@ #include "ldap-int.h" +/* + * An abandon request looks like this: + * AbandonRequest ::= [APPLICATION 16] MessageID + * and has no response. (Source: RFC 4511) + */ + static int do_abandon( LDAP *ld, diff --git a/libraries/libldap/add.c b/libraries/libldap/add.c index 3f4487354c..95b0742a37 100644 --- a/libraries/libldap/add.c +++ b/libraries/libldap/add.c @@ -16,20 +16,6 @@ /* Portions Copyright (c) 1990 Regents of the University of Michigan. * All rights reserved. */ -/* Portions Copyright (C) The Internet Society (1997). - * ASN.1 fragments are from RFC 2251; see RFC for full legal notices. - */ - -/* - * An add request looks like this: - * AddRequest ::= SEQUENCE { - * entry DistinguishedName, - * attrs SEQUENCE OF SEQUENCE { - * type AttributeType, - * values SET OF AttributeValue - * } - * } - */ #include "portable.h" @@ -41,6 +27,30 @@ #include "ldap-int.h" +/* An LDAP Add Request/Response looks like this: + * AddRequest ::= [APPLICATION 8] SEQUENCE { + * entry LDAPDN, + * attributes AttributeList } + * + * AttributeList ::= SEQUENCE OF attribute Attribute + * + * Attribute ::= PartialAttribute(WITH COMPONENTS { + * ..., + * vals (SIZE(1..MAX))}) + * + * PartialAttribute ::= SEQUENCE { + * type AttributeDescription, + * vals SET OF value AttributeValue } + * + * AttributeDescription ::= LDAPString + * -- Constrained to [RFC4512] + * + * AttributeValue ::= OCTET STRING + * + * AddResponse ::= [APPLICATION 9] LDAPResult + * (Source: RFC 4511) + */ + /* * ldap_add - initiate an ldap add operation. Parameters: * diff --git a/libraries/libldap/bind.c b/libraries/libldap/bind.c index 91d682bc69..2e7dd74ada 100644 --- a/libraries/libldap/bind.c +++ b/libraries/libldap/bind.c @@ -16,9 +16,19 @@ /* Portions Copyright (c) 1990 Regents of the University of Michigan. * All rights reserved. */ -/* Portions Copyright (C) The Internet Society (1997) - * ASN.1 fragments are from RFC 2251; see RFC for full legal notices. - */ + +#include "portable.h" + +#include + +#include + +#include +#include +#include + +#include "ldap-int.h" +#include "ldap_log.h" /* * BindRequest ::= SEQUENCE { @@ -39,21 +49,9 @@ * serverSaslCreds OCTET STRING OPTIONAL -- LDAPv3 * } * + * (Source: RFC 2251) */ -#include "portable.h" - -#include - -#include - -#include -#include -#include - -#include "ldap-int.h" -#include "ldap_log.h" - /* * ldap_bind - bind to the ldap server (and X.500). The dn and password * of the entry to which to bind are supplied, along with the authentication diff --git a/libraries/libldap/compare.c b/libraries/libldap/compare.c index 18db9c3198..879caff5b7 100644 --- a/libraries/libldap/compare.c +++ b/libraries/libldap/compare.c @@ -15,19 +15,6 @@ /* Portions Copyright (c) 1990 Regents of the University of Michigan. * All rights reserved. */ -/* Portions Copyright (C) The Internet Society (1997) - * ASN.1 fragments are from RFC 2251; see RFC for full legal notices. - */ - -/* The compare request looks like this: - * CompareRequest ::= SEQUENCE { - * entry DistinguishedName, - * ava SEQUENCE { - * type AttributeType, - * value AttributeValue - * } - * } - */ #include "portable.h" @@ -40,6 +27,16 @@ #include "ldap-int.h" #include "ldap_log.h" +/* The compare request looks like this: + * CompareRequest ::= SEQUENCE { + * entry DistinguishedName, + * ava SEQUENCE { + * type AttributeType, + * value AttributeValue + * } + * } + */ + /* * ldap_compare_ext - perform an ldap extended compare operation. The dn * of the entry to compare to and the attribute and value to compare (in diff --git a/libraries/libldap/controls.c b/libraries/libldap/controls.c index ad8384e9c3..067e4eaa5e 100644 --- a/libraries/libldap/controls.c +++ b/libraries/libldap/controls.c @@ -30,9 +30,15 @@ * can be found in the file "build/LICENSE-2.0.1" in this distribution * of OpenLDAP Software. */ -/* Portions Copyright (C) The Internet Society (2006) - * ASN.1 fragments are from RFC 4511; see RFC for full legal notices. - */ + +#include "portable.h" + +#include + +#include +#include + +#include "ldap-int.h" /* LDAPv3 Controls (RFC 4511) * @@ -45,16 +51,6 @@ * } */ -#include "portable.h" - -#include - -#include -#include - -#include "ldap-int.h" - - /* * ldap_int_put_controls */ diff --git a/libraries/libldap/delete.c b/libraries/libldap/delete.c index 2226ff61c8..dcb2bde47e 100644 --- a/libraries/libldap/delete.c +++ b/libraries/libldap/delete.c @@ -15,15 +15,6 @@ /* Portions Copyright (c) 1990 Regents of the University of Michigan. * All rights reserved. */ -/* - * Portions Copyright (C) The Internet Society (1997) - * ASN.1 fragments are from RFC 2251; see RFC for full legal notices. - */ - -/* - * A delete request looks like this: - * DelRequet ::= DistinguishedName, - */ #include "portable.h" @@ -35,6 +26,12 @@ #include "ldap-int.h" +/* + * A delete request looks like this: + * DelRequet ::= DistinguishedName, + */ + + /* * ldap_delete_ext - initiate an ldap extended delete operation. Parameters: * diff --git a/libraries/libldap/error.c b/libraries/libldap/error.c index ac28ccc880..5920024903 100644 --- a/libraries/libldap/error.c +++ b/libraries/libldap/error.c @@ -12,9 +12,6 @@ * top-level directory of the distribution or, alternatively, at * . */ -/* Portions Copyright (C) The Internet Society (1997) - * ASN.1 fragments are from RFC 2251; see RFC for full legal notices. - */ #include "portable.h" diff --git a/libraries/libldap/extended.c b/libraries/libldap/extended.c index 6afc1d7f63..391a7ef486 100644 --- a/libraries/libldap/extended.c +++ b/libraries/libldap/extended.c @@ -12,9 +12,18 @@ * top-level directory of the distribution or, alternatively, at * . */ -/* Portions Copyright (C) The Internet Society (1997). - * ASN.1 fragments are from RFC 2251; see RFC for full legal notices. - */ + +#include "portable.h" + +#include +#include + +#include +#include +#include + +#include "ldap-int.h" +#include "ldap_log.h" /* * LDAPv3 Extended Operation Request @@ -30,20 +39,9 @@ * response [11] OCTET STRING OPTIONAL * } * + * (Source RFC 4511) */ -#include "portable.h" - -#include -#include - -#include -#include -#include - -#include "ldap-int.h" -#include "ldap_log.h" - int ldap_extended_operation( LDAP *ld, diff --git a/libraries/libldap/filter.c b/libraries/libldap/filter.c index c6453a09fa..673147225a 100644 --- a/libraries/libldap/filter.c +++ b/libraries/libldap/filter.c @@ -16,9 +16,6 @@ /* Portions Copyright (c) 1990 Regents of the University of Michigan. * All rights reserved. */ -/* Portions Copyright (C) The Internet Society (2006) - * ASN.1 fragments are from RFC 4511; see RFC for full legal notices. - */ #include "portable.h" @@ -804,6 +801,8 @@ put_vrFilter( BerElement *ber, const char *str_in ) * matchingRule [1] MatchingRuleId OPTIONAL, * type [2] AttributeDescription OPTIONAL, * matchValue [3] AssertionValue } + * + * (Source: RFC 3876) */ Debug( LDAP_DEBUG_TRACE, "put_vrFilter: \"%s\"\n", str_in, 0, 0 ); diff --git a/libraries/libldap/ftest.c b/libraries/libldap/ftest.c index e7c1c8be79..a70e457da0 100644 --- a/libraries/libldap/ftest.c +++ b/libraries/libldap/ftest.c @@ -38,7 +38,7 @@ int usage() { fprintf( stderr, "usage:\n" " ftest [-d n] filter\n" - " filter - RFC 2254 string representation of an " + " filter - RFC 4515 string representation of an " "LDAP search filter\n" ); return EXIT_FAILURE; } diff --git a/libraries/libldap/getdn.c b/libraries/libldap/getdn.c index 389dd0a03c..5d9d7e1a1c 100644 --- a/libraries/libldap/getdn.c +++ b/libraries/libldap/getdn.c @@ -337,16 +337,16 @@ ldap_dn2ad_canonical( LDAP_CONST char *dn ) * from ( fin & LDAP_DN_FORMAT_MASK ) to ( fout & LDAP_DN_FORMAT_MASK ) * * fin can be one of: - * LDAP_DN_FORMAT_LDAP (rfc 2253 and ldapbis liberal, - * plus some rfc 1779) - * LDAP_DN_FORMAT_LDAPV3 (rfc 2253 and ldapbis) - * LDAP_DN_FORMAT_LDAPV2 (rfc 1779) + * LDAP_DN_FORMAT_LDAP (RFC 4514 and ldapbis liberal, + * plus some RFC 1779) + * LDAP_DN_FORMAT_LDAPV3 (RFC 4514 and ldapbis) + * LDAP_DN_FORMAT_LDAPV2 (RFC 1779) * LDAP_DN_FORMAT_DCE (?) * * fout can be any of the above except * LDAP_DN_FORMAT_LDAP * plus: - * LDAP_DN_FORMAT_UFN (rfc 1781, partial and with extensions) + * LDAP_DN_FORMAT_UFN (RFC 1781, partial and with extensions) * LDAP_DN_FORMAT_AD_CANONICAL (?) */ int diff --git a/libraries/libldap/kbind.c b/libraries/libldap/kbind.c index ef21432fdd..473a2cf325 100644 --- a/libraries/libldap/kbind.c +++ b/libraries/libldap/kbind.c @@ -15,9 +15,20 @@ /* Portions Copyright (c) 1993 Regents of the University of Michigan. * All rights reserved. */ -/* Portions Copyright (C) The Internet Society (1997) - * ASN.1 fragments are from RFC 2251; see RFC for full legal notices. - */ + +#include "portable.h" + +#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND + +#include +#include + +#include +#include +#include +#include + +#include "ldap-int.h" /* * BindRequest ::= SEQUENCE { @@ -40,20 +51,6 @@ * */ -#include "portable.h" - -#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND - -#include -#include - -#include -#include -#include -#include - -#include "ldap-int.h" - /* * ldap_kerberos_bind1 - initiate a bind to the ldap server using * kerberos authentication. The dn is supplied. It is assumed the user diff --git a/libraries/libldap/modify.c b/libraries/libldap/modify.c index 6c8fb38420..45ccfbc98a 100644 --- a/libraries/libldap/modify.c +++ b/libraries/libldap/modify.c @@ -15,9 +15,6 @@ /* Portions Copyright (c) 1990 Regents of the University of Michigan. * All rights reserved. */ -/* Portions Copyright (C) The Internet Society (1997) - * ASN.1 fragments are from RFC 2251; see RFC for full legal notices. - */ #include "portable.h" @@ -29,6 +26,32 @@ #include "ldap-int.h" +/* A modify request/response looks like this: + * ModifyRequest ::= [APPLICATION 6] SEQUENCE { + * object LDAPDN, + * changes SEQUENCE OF change SEQUENCE { + * operation ENUMERATED { + * add (0), + * delete (1), + * replace (2), + * ... }, + * modification PartialAttribute } } + * + * PartialAttribute ::= SEQUENCE { + * type AttributeDescription, + * vals SET OF value AttributeValue } + * + * AttributeDescription ::= LDAPString + * -- Constrained to [RFC4512] + * + * AttributeValue ::= OCTET STRING + * + * ModifyResponse ::= [APPLICATION 7] LDAPResult + * + * (Source: RFC 4511) + */ + + /* * ldap_modify_ext - initiate an ldap extended modify operation. * @@ -65,25 +88,6 @@ ldap_modify_ext( LDAP *ld, int i, rc; ber_int_t id; - /* - * A modify request looks like this: - * ModifyRequet ::= SEQUENCE { - * object DistinguishedName, - * modifications SEQUENCE OF SEQUENCE { - * operation ENUMERATED { - * add (0), - * delete (1), - * replace (2), - * increment (3) -- extension - * }, - * modification SEQUENCE { - * type AttributeType, - * values SET OF AttributeValue - * } - * } - * } - */ - Debug( LDAP_DEBUG_TRACE, "ldap_modify_ext\n", 0, 0, 0 ); /* check client controls */ diff --git a/libraries/libldap/modrdn.c b/libraries/libldap/modrdn.c index c160ea87b4..2973b12ecd 100644 --- a/libraries/libldap/modrdn.c +++ b/libraries/libldap/modrdn.c @@ -23,14 +23,21 @@ * without restriction or fee of any kind as long as this notice * is preserved. */ -/* Portions Copyright (C) The Internet Society (1997) - * ASN.1 fragments are from RFC 2251; see RFC 2251 for full legal notices. - */ /* ACKNOWLEDGEMENTS: * Juan C. Gomez */ +#include "portable.h" + +#include + +#include +#include +#include + +#include "ldap-int.h" + /* * A modify rdn request looks like this: * ModifyRDNRequest ::= SEQUENCE { @@ -41,15 +48,6 @@ * } */ -#include "portable.h" - -#include - -#include -#include -#include - -#include "ldap-int.h" /* * ldap_rename - initiate an ldap extended modifyDN operation. diff --git a/libraries/libldap/pagectrl.c b/libraries/libldap/pagectrl.c index c6f1c4ab75..6e444fa54b 100644 --- a/libraries/libldap/pagectrl.c +++ b/libraries/libldap/pagectrl.c @@ -12,9 +12,6 @@ * top-level directory of the distribution or, alternatively, at * . */ -/* Portions Copyright (C) The Internet Society (1999) - * ASN.1 fragments are from RFC 2696; see RFC for full legal notices. - */ #include "portable.h" diff --git a/libraries/libldap/passwd.c b/libraries/libldap/passwd.c index ab330a81b7..222dd285ef 100644 --- a/libraries/libldap/passwd.c +++ b/libraries/libldap/passwd.c @@ -27,7 +27,7 @@ #include "ldap-int.h" /* - * LDAP Password Modify (Extended) Operation + * LDAP Password Modify (Extended) Operation (RFC 3062) */ int ldap_parse_passwd( diff --git a/libraries/libldap/result.c b/libraries/libldap/result.c index f1ed0d91d2..242eb4eb1b 100644 --- a/libraries/libldap/result.c +++ b/libraries/libldap/result.c @@ -37,9 +37,6 @@ * can be found in the file "build/LICENSE-2.0.1" in this distribution * of OpenLDAP Software. */ -/* Portions Copyright (C) The Internet Society (2006) - * ASN.1 fragments are from RFC 4511; see RFC for full legal notices. - */ /* * LDAPv3 (RFC 4511) diff --git a/libraries/libldap/sasl.c b/libraries/libldap/sasl.c index 0624394c3f..5d612be319 100644 --- a/libraries/libldap/sasl.c +++ b/libraries/libldap/sasl.c @@ -12,9 +12,6 @@ * top-level directory of the distribution or, alternatively, at * . */ -/* Portions Copyright (C) The Internet Society (1997) - * ASN.1 fragments are from RFC 2251; see RFC for full legal notices. - */ /* * BindRequest ::= SEQUENCE { diff --git a/libraries/libldap/sbind.c b/libraries/libldap/sbind.c index 15a04defc4..c72389dceb 100644 --- a/libraries/libldap/sbind.c +++ b/libraries/libldap/sbind.c @@ -15,9 +15,6 @@ /* Portions Copyright (c) 1993 Regents of the University of Michigan. * All rights reserved. */ -/* Portions Copyright (C) The Internet Society (1997) - * ASN.1 fragments are from RFC 2251; see RFC for full legal notices. - */ /* * BindRequest ::= SEQUENCE { diff --git a/libraries/libldap/sortctrl.c b/libraries/libldap/sortctrl.c index 1850461672..0594018cea 100644 --- a/libraries/libldap/sortctrl.c +++ b/libraries/libldap/sortctrl.c @@ -27,9 +27,6 @@ * can be found in the file "build/LICENSE-2.0.1" in this distribution * of OpenLDAP Software. */ -/* Portions Copyright (C) The Internet Society (1997) - * ASN.1 fragments are from RFC 2251; see RFC for full legal notices. - */ #include "portable.h" diff --git a/libraries/libldap/unbind.c b/libraries/libldap/unbind.c index da41633545..29abb75026 100644 --- a/libraries/libldap/unbind.c +++ b/libraries/libldap/unbind.c @@ -15,16 +15,6 @@ /* Portions Copyright (c) 1990 Regents of the University of Michigan. * All rights reserved. */ -/* Portions Copyright (C) The Internet Society (1997) - * ASN.1 fragments are from RFC 2251; see RFC for full legal notices. - */ - -/* An Unbind Request looks like this: - * - * UnbindRequest ::= NULL - * - * and has no response. - */ #include "portable.h" @@ -37,6 +27,13 @@ #include "ldap-int.h" +/* An Unbind Request looks like this: + * + * UnbindRequest ::= [APPLICATION 2] NULL + * + * and has no response. (Source: RFC 4511) + */ + int ldap_unbind_ext( LDAP *ld, diff --git a/libraries/libldap/url.c b/libraries/libldap/url.c index df9be5e0a2..0780b6ca07 100644 --- a/libraries/libldap/url.c +++ b/libraries/libldap/url.c @@ -1,4 +1,4 @@ -/* LIBLDAP url.c -- LDAP URL (RFC 2255) related routines */ +/* LIBLDAP url.c -- LDAP URL (RFC 4516) related routines */ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * @@ -25,7 +25,7 @@ * where: * attributes is a comma separated list * scope is one of these three strings: base one sub (default=base) - * filter is an string-represented filter as in RFC 2254 + * filter is an string-represented filter as in RFC 4515 * * e.g., ldap://host:port/dc=com?o,cn?base?(o=openldap)?extension * diff --git a/libraries/libldap/vlvctrl.c b/libraries/libldap/vlvctrl.c index 86528c503c..cd3efba139 100644 --- a/libraries/libldap/vlvctrl.c +++ b/libraries/libldap/vlvctrl.c @@ -27,9 +27,6 @@ * can be found in the file "build/LICENSE-2.0.1" in this distribution * of OpenLDAP Software. */ -/* Portions Copyright (C) The Internet Society (1997) - * ASN.1 fragments are from RFC 2251; see RFC for full legal notices. - */ #include "portable.h" -- 2.39.5