summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorHerb Lewis <herb@samba.org>2003-08-15 01:42:30 +0000
committerHerb Lewis <herb@samba.org>2003-08-15 01:42:30 +0000
commit062f89bc2833bf49f873a7fd5c2624babd702db0 (patch)
tree2b0224355c23e67b21fa01ce537f6f22e53cbc18 /source3/passdb
parentcc865e1edc57052877ae542058d62dfd16152369 (diff)
downloadsamba-062f89bc2833bf49f873a7fd5c2624babd702db0.tar.gz
samba-062f89bc2833bf49f873a7fd5c2624babd702db0.tar.bz2
samba-062f89bc2833bf49f873a7fd5c2624babd702db0.zip
get rid of some sompiler warnings on IRIX
(This used to be commit a6a39c61e8228c8b3b7552ab3c61ec3a6a639143)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/passdb.c4
-rw-r--r--source3/passdb/pdb_ldap.c5
-rw-r--r--source3/passdb/pdb_tdb.c6
-rw-r--r--source3/passdb/secrets.c8
4 files changed, 11 insertions, 12 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index 8e775ed87f..34a5f7e32a 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -1315,7 +1315,7 @@ BOOL init_sam_from_buffer(SAM_ACCOUNT *sampass, uint8 *buf, uint32 buflen)
}
/* unpack the buffer into variables */
- len = tdb_unpack (buf, buflen, TDB_FORMAT_STRING,
+ len = tdb_unpack ((char *)buf, buflen, TDB_FORMAT_STRING,
&logon_time,
&logoff_time,
&kickoff_time,
@@ -1658,7 +1658,7 @@ uint32 init_buffer_from_sam (uint8 **buf, const SAM_ACCOUNT *sampass, BOOL size_
}
/* now for the real call to tdb_pack() */
- buflen = tdb_pack(*buf, len, TDB_FORMAT_STRING,
+ buflen = tdb_pack((char *)*buf, len, TDB_FORMAT_STRING,
logon_time,
logoff_time,
kickoff_time,
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index d458267b08..66c4133c4a 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -1694,7 +1694,7 @@ static BOOL init_group_from_ldap(struct ldapsam_privates *ldap_state,
get_attr_key2string( groupmap_attr_list, LDAP_ATTR_GROUP_TYPE)));
return False;
}
- map->sid_name_use = (uint32)atol(temp);
+ map->sid_name_use = (enum SID_NAME_USE)atol(temp);
if ((map->sid_name_use < SID_NAME_USER) ||
(map->sid_name_use > SID_NAME_UNKNOWN)) {
@@ -2137,7 +2137,6 @@ static NTSTATUS ldapsam_enum_group_mapping(struct pdb_methods *methods,
GROUP_MAP map;
GROUP_MAP *mapt;
int entries = 0;
- NTSTATUS nt_status;
*num_entries = 0;
*rmap = NULL;
@@ -2147,7 +2146,7 @@ static NTSTATUS ldapsam_enum_group_mapping(struct pdb_methods *methods,
return NT_STATUS_ACCESS_DENIED;
}
- while (NT_STATUS_IS_OK(nt_status = ldapsam_getsamgrent(methods, &map))) {
+ while (NT_STATUS_IS_OK(ldapsam_getsamgrent(methods, &map))) {
if (sid_name_use != SID_NAME_UNKNOWN &&
sid_name_use != map.sid_name_use) {
DEBUG(11,("enum_group_mapping: group %s is not of the requested type\n", map.nt_name));
diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c
index 7c2156455a..c9a84f3242 100644
--- a/source3/passdb/pdb_tdb.c
+++ b/source3/passdb/pdb_tdb.c
@@ -133,7 +133,7 @@ static NTSTATUS tdbsam_getsampwent(struct pdb_methods *my_methods, SAM_ACCOUNT *
}
/* unpack the buffer */
- if (!init_sam_from_buffer(user, data.dptr, data.dsize)) {
+ if (!init_sam_from_buffer(user, (unsigned char *)data.dptr, data.dsize)) {
DEBUG(0,("pdb_getsampwent: Bad SAM_ACCOUNT entry returned from TDB!\n"));
SAFE_FREE(data.dptr);
return nt_status;
@@ -213,7 +213,7 @@ static NTSTATUS tdbsam_getsampwnam (struct pdb_methods *my_methods, SAM_ACCOUNT
}
/* unpack the buffer */
- if (!init_sam_from_buffer(user, data.dptr, data.dsize)) {
+ if (!init_sam_from_buffer(user, (unsigned char *)data.dptr, data.dsize)) {
DEBUG(0,("pdb_getsampwent: Bad SAM_ACCOUNT entry returned from TDB!\n"));
SAFE_FREE(data.dptr);
tdb_close(pwd_tdb);
@@ -390,7 +390,7 @@ static BOOL tdb_update_sam(struct pdb_methods *my_methods, SAM_ACCOUNT* newpwd,
ret = False;
goto done;
}
- data.dptr = buf;
+ data.dptr = (char *)buf;
fstrcpy(name, pdb_get_username(newpwd));
strlower_m(name);
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c
index 23413e4026..2c99631e13 100644
--- a/source3/passdb/secrets.c
+++ b/source3/passdb/secrets.c
@@ -58,7 +58,7 @@ void *secrets_fetch(const char *key, size_t *size)
secrets_init();
if (!tdb)
return NULL;
- kbuf.dptr = key;
+ kbuf.dptr = (char *)key;
kbuf.dsize = strlen(key);
dbuf = tdb_fetch(tdb, kbuf);
if (size)
@@ -74,9 +74,9 @@ BOOL secrets_store(const char *key, const void *data, size_t size)
secrets_init();
if (!tdb)
return False;
- kbuf.dptr = key;
+ kbuf.dptr = (char *)key;
kbuf.dsize = strlen(key);
- dbuf.dptr = data;
+ dbuf.dptr = (char *)data;
dbuf.dsize = size;
return tdb_store(tdb, kbuf, dbuf, TDB_REPLACE) == 0;
}
@@ -90,7 +90,7 @@ BOOL secrets_delete(const char *key)
secrets_init();
if (!tdb)
return False;
- kbuf.dptr = key;
+ kbuf.dptr = (char *)key;
kbuf.dsize = strlen(key);
return tdb_delete(tdb, kbuf) == 0;
}