r23792: convert Samba4 to GPLv3
[jra/samba/.git] / source4 / libcli / ldap / ldap.h
index 072070f723bd5e32d81ae1de9ced01a9346ce27f..fd622de4494664934fe7737e80b91d3f441c8bcd 100644 (file)
@@ -5,7 +5,7 @@
     
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
@@ -14,8 +14,7 @@
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
 */
 
@@ -79,7 +78,7 @@ enum ldap_result_code {
        LDAP_ALIAS_DEREFERENCING_PROBLEM        = 36,
        LDAP_INAPPROPRIATE_AUTHENTICATION       = 48,
        LDAP_INVALID_CREDENTIALS                = 49,
-       LDAP_INSUFFICIENT_ACCESS_RIGHTs         = 50,
+       LDAP_INSUFFICIENT_ACCESS_RIGHTS         = 50,
        LDAP_BUSY                               = 51,
        LDAP_UNAVAILABLE                        = 52,
        LDAP_UNWILLING_TO_PERFORM               = 53,
@@ -109,7 +108,7 @@ struct ldap_BindRequest {
                const char *password;
                struct {
                        const char *mechanism;
-                       DATA_BLOB secblob;
+                       DATA_BLOB *secblob;/* optional */
                } SASL;
        } creds;
 };
@@ -117,7 +116,7 @@ struct ldap_BindRequest {
 struct ldap_BindResponse {
        struct ldap_Result response;
        union {
-               DATA_BLOB secblob;
+               DATA_BLOB *secblob;/* optional */
        } SASL;
 };
 
@@ -192,7 +191,7 @@ struct ldap_ModifyDNRequest {
        const char *dn;
        const char *newrdn;
        BOOL deleteolddn;
-       const char *newsuperior;
+       const char *newsuperior;/* optional */
 };
 
 struct ldap_CompareRequest {
@@ -207,16 +206,17 @@ struct ldap_AbandonRequest {
 
 struct ldap_ExtendedRequest {
        const char *oid;
-       DATA_BLOB value;
+       DATA_BLOB *value;/* optional */
 };
 
 struct ldap_ExtendedResponse {
        struct ldap_Result response;
-       const char *name;
-       DATA_BLOB value;
+       const char *oid;/* optional */
+       DATA_BLOB *value;/* optional */
 };
 
 union ldap_Request {
+       struct ldap_Result              GeneralResult;
        struct ldap_BindRequest         BindRequest;
        struct ldap_BindResponse        BindResponse;
        struct ldap_UnbindRequest       UnbindRequest;
@@ -239,18 +239,18 @@ union ldap_Request {
        struct ldap_ExtendedResponse    ExtendedResponse;
 };
 
-struct ldap_Control {
-       const char *oid;
-       BOOL        critical;
-       DATA_BLOB   value;
-};
-
 struct ldap_message {
-       uint32_t                messageid;
+       int                     messageid;
        enum ldap_request_tag   type;
        union ldap_Request      r;
-       int                     num_controls;
-       struct ldap_Control    *controls;
+       struct ldb_control    **controls;
 };
 
+struct event_context;
+struct cli_credentials;
+struct dom_sid;
+struct asn1_data;
+
+#include "libcli/ldap/ldap_proto.h"
+
 #endif