From de7db3e8c526d8d4037e231f9eeaec886a05b13b Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Mon, 4 Apr 2011 14:16:44 +0200 Subject: [PATCH] s3-smbldap: make octet_strings/DATA_BLOBs const. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Günther Deschner (cherry picked from commit f3b1a68f5f540fa3674c5594ad3ede1568bab6cb) --- source3/include/smbldap.h | 4 ++-- source3/lib/smbldap.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source3/include/smbldap.h b/source3/include/smbldap.h index ed1af0b2d98..7bb9895b38c 100644 --- a/source3/include/smbldap.h +++ b/source3/include/smbldap.h @@ -138,13 +138,13 @@ NTSTATUS smbldap_init(TALLOC_CTX *mem_ctx, const char* get_attr_key2string( ATTRIB_MAP_ENTRY table[], int key ); const char** get_attr_list( TALLOC_CTX *mem_ctx, ATTRIB_MAP_ENTRY table[] ); void smbldap_set_mod (LDAPMod *** modlist, int modop, const char *attribute, const char *value); -void smbldap_set_mod_blob(LDAPMod *** modlist, int modop, const char *attribute, DATA_BLOB *newblob); +void smbldap_set_mod_blob(LDAPMod *** modlist, int modop, const char *attribute, const DATA_BLOB *newblob); void smbldap_make_mod(LDAP *ldap_struct, LDAPMessage *existing, LDAPMod ***mods, const char *attribute, const char *newval); void smbldap_make_mod_blob(LDAP *ldap_struct, LDAPMessage *existing, LDAPMod ***mods, - const char *attribute, DATA_BLOB *newblob); + const char *attribute, const DATA_BLOB *newblob); bool smbldap_get_single_attribute (LDAP * ldap_struct, LDAPMessage * entry, const char *attribute, char *value, int max_len); diff --git a/source3/lib/smbldap.c b/source3/lib/smbldap.c index 9cf1b63937d..0c5ea981031 100644 --- a/source3/lib/smbldap.c +++ b/source3/lib/smbldap.c @@ -505,7 +505,7 @@ ATTRIB_MAP_ENTRY sidmap_attr_list[] = { manage memory used by the array, by each struct, and values ***********************************************************************/ -static void smbldap_set_mod_internal(LDAPMod *** modlist, int modop, const char *attribute, const char *value, DATA_BLOB *blob) +static void smbldap_set_mod_internal(LDAPMod *** modlist, int modop, const char *attribute, const char *value, const DATA_BLOB *blob) { LDAPMod **mods; int i; @@ -610,7 +610,7 @@ static void smbldap_set_mod_internal(LDAPMod *** modlist, int modop, const char smbldap_set_mod_internal(modlist, modop, attribute, value, NULL); } - void smbldap_set_mod_blob(LDAPMod *** modlist, int modop, const char *attribute, DATA_BLOB *value) + void smbldap_set_mod_blob(LDAPMod *** modlist, int modop, const char *attribute, const DATA_BLOB *value) { smbldap_set_mod_internal(modlist, modop | LDAP_MOD_BVALUES, attribute, NULL, value); } @@ -624,7 +624,7 @@ static void smbldap_make_mod_internal(LDAP *ldap_struct, LDAPMessage *existing, LDAPMod ***mods, const char *attribute, int op, const char *newval, - DATA_BLOB *newblob) + const DATA_BLOB *newblob) { char oldval[2048]; /* current largest allowed value is mungeddial */ bool existed; @@ -711,7 +711,7 @@ static void smbldap_make_mod_internal(LDAP *ldap_struct, LDAPMessage *existing, void smbldap_make_mod_blob(LDAP *ldap_struct, LDAPMessage *existing, LDAPMod ***mods, - const char *attribute, DATA_BLOB *newblob) + const char *attribute, const DATA_BLOB *newblob) { smbldap_make_mod_internal(ldap_struct, existing, mods, attribute, LDAP_MOD_BVALUES, NULL, newblob); -- 2.11.4.GIT