summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/ldb/common/ldb_msg.c4
-rw-r--r--source4/lib/ldb/include/ldb.h2
-rw-r--r--source4/libcli/auth/credentials.h4
3 files changed, 5 insertions, 5 deletions
diff --git a/source4/lib/ldb/common/ldb_msg.c b/source4/lib/ldb/common/ldb_msg.c
index 5ab2088744..3ef25e566f 100644
--- a/source4/lib/ldb/common/ldb_msg.c
+++ b/source4/lib/ldb/common/ldb_msg.c
@@ -202,11 +202,11 @@ int ldb_msg_add_value(struct ldb_context *ldb,
add a string element to a message
*/
int ldb_msg_add_string(struct ldb_context *ldb, struct ldb_message *msg,
- const char *attr_name, char *str)
+ const char *attr_name, const char *str)
{
struct ldb_val val;
- val.data = str;
+ val.data = discard_const_p(char, str);
val.length = strlen(str);
return ldb_msg_add_value(ldb, msg, attr_name, &val);
diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h
index 0bb8105c44..310000b244 100644
--- a/source4/lib/ldb/include/ldb.h
+++ b/source4/lib/ldb/include/ldb.h
@@ -258,7 +258,7 @@ int ldb_msg_add_value(struct ldb_context *ldb,
const char *attr_name,
const struct ldb_val *val);
int ldb_msg_add_string(struct ldb_context *ldb, struct ldb_message *msg,
- const char *attr_name, char *str);
+ const char *attr_name, const char *str);
/* compare two message elements - return 0 on match */
int ldb_msg_element_compare(struct ldb_message_element *el1,
diff --git a/source4/libcli/auth/credentials.h b/source4/libcli/auth/credentials.h
index ffefcc0305..7c3c4379d1 100644
--- a/source4/libcli/auth/credentials.h
+++ b/source4/libcli/auth/credentials.h
@@ -30,8 +30,8 @@ struct creds_CredentialState {
struct netr_Credential client;
struct netr_Credential server;
uint16_t secure_channel_type;
- char *computer_name;
- char *account_name;
+ const char *computer_name;
+ const char *account_name;
};
/* for the timebeing, use the same neg flags as Samba3. */