summaryrefslogtreecommitdiff
path: root/source3/groupdb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-03-29 09:35:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:19:00 -0500
commitbc2b6436d0f5f3e9ffdfaeb7f1b32996a83d5478 (patch)
tree45124e070043ee0fd3774d74b4cfdcf1c8919c27 /source3/groupdb
parentb9461058d59f8e4f4b69c31592bd12a179b2d8ac (diff)
downloadsamba-bc2b6436d0f5f3e9ffdfaeb7f1b32996a83d5478.tar.gz
samba-bc2b6436d0f5f3e9ffdfaeb7f1b32996a83d5478.tar.bz2
samba-bc2b6436d0f5f3e9ffdfaeb7f1b32996a83d5478.zip
r22009: change TDB_DATA from char * to unsigned char *
and fix all compiler warnings in the users metze (This used to be commit 3a28443079c141a6ce8182c65b56ca210e34f37f)
Diffstat (limited to 'source3/groupdb')
-rw-r--r--source3/groupdb/mapping_tdb.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source3/groupdb/mapping_tdb.c b/source3/groupdb/mapping_tdb.c
index 1d7eaa98d8..255ac9a5e5 100644
--- a/source3/groupdb/mapping_tdb.c
+++ b/source3/groupdb/mapping_tdb.c
@@ -99,7 +99,7 @@ static TDB_CONTEXT *tdb; /* used for driver files */
sid_to_string(string_sid, &map->sid);
- len = tdb_pack(buf, sizeof(buf), "ddff",
+ len = tdb_pack((uint8 *)buf, sizeof(buf), "ddff",
map->gid, map->sid_name_use, map->nt_name, map->comment);
if (len > sizeof(buf))
@@ -108,7 +108,7 @@ static TDB_CONTEXT *tdb; /* used for driver files */
slprintf(key, sizeof(key), "%s%s", GROUP_PREFIX, string_sid);
dbuf.dsize = len;
- dbuf.dptr = buf;
+ dbuf.dptr = (uint8 *)buf;
if (tdb_store_bystring(tdb, key, dbuf, flag) != 0) return False;
return True;
@@ -176,13 +176,13 @@ static TDB_CONTEXT *tdb; /* used for driver files */
kbuf.dptr;
newkey = tdb_nextkey(tdb, kbuf), safe_free(kbuf.dptr), kbuf=newkey) {
- if (strncmp(kbuf.dptr, GROUP_PREFIX, strlen(GROUP_PREFIX)) != 0) continue;
+ if (strncmp((const char *)kbuf.dptr, GROUP_PREFIX, strlen(GROUP_PREFIX)) != 0) continue;
dbuf = tdb_fetch(tdb, kbuf);
if (!dbuf.dptr)
continue;
- fstrcpy(string_sid, kbuf.dptr+strlen(GROUP_PREFIX));
+ fstrcpy(string_sid, (const char *)kbuf.dptr+strlen(GROUP_PREFIX));
string_to_sid(&map->sid, string_sid);
@@ -226,13 +226,13 @@ static TDB_CONTEXT *tdb; /* used for driver files */
kbuf.dptr;
newkey = tdb_nextkey(tdb, kbuf), safe_free(kbuf.dptr), kbuf=newkey) {
- if (strncmp(kbuf.dptr, GROUP_PREFIX, strlen(GROUP_PREFIX)) != 0) continue;
+ if (strncmp((const char *)kbuf.dptr, GROUP_PREFIX, strlen(GROUP_PREFIX)) != 0) continue;
dbuf = tdb_fetch(tdb, kbuf);
if (!dbuf.dptr)
continue;
- fstrcpy(string_sid, kbuf.dptr+strlen(GROUP_PREFIX));
+ fstrcpy(string_sid, (const char *)kbuf.dptr+strlen(GROUP_PREFIX));
string_to_sid(&map->sid, string_sid);
@@ -315,14 +315,14 @@ BOOL enum_group_mapping(const DOM_SID *domsid, enum lsa_SidType sid_name_use, GR
kbuf.dptr;
newkey = tdb_nextkey(tdb, kbuf), safe_free(kbuf.dptr), kbuf=newkey) {
- if (strncmp(kbuf.dptr, GROUP_PREFIX, strlen(GROUP_PREFIX)) != 0)
+ if (strncmp((const char *)kbuf.dptr, GROUP_PREFIX, strlen(GROUP_PREFIX)) != 0)
continue;
dbuf = tdb_fetch(tdb, kbuf);
if (!dbuf.dptr)
continue;
- fstrcpy(string_sid, kbuf.dptr+strlen(GROUP_PREFIX));
+ fstrcpy(string_sid, (const char *)kbuf.dptr+strlen(GROUP_PREFIX));
ret = tdb_unpack(dbuf.dptr, dbuf.dsize, "ddff",
&map.gid, &map.sid_name_use, &map.nt_name, &map.comment);
@@ -409,7 +409,7 @@ BOOL enum_group_mapping(const DOM_SID *domsid, enum lsa_SidType sid_name_use, GR
return NT_STATUS_OK;
}
- p = dbuf.dptr;
+ p = (const char *)dbuf.dptr;
while (next_token(&p, string_sid, " ", sizeof(string_sid))) {
@@ -528,11 +528,11 @@ static int collect_aliasmem(TDB_CONTEXT *tdb_ctx, TDB_DATA key, TDB_DATA data,
const char *p;
fstring alias_string;
- if (strncmp(key.dptr, MEMBEROF_PREFIX,
+ if (strncmp((const char *)key.dptr, MEMBEROF_PREFIX,
strlen(MEMBEROF_PREFIX)) != 0)
return 0;
- p = data.dptr;
+ p = (const char *)data.dptr;
while (next_token(&p, alias_string, " ", sizeof(alias_string))) {
@@ -550,7 +550,7 @@ static int collect_aliasmem(TDB_CONTEXT *tdb_ctx, TDB_DATA key, TDB_DATA data,
* list currently scanned. The key represents the alias
* member. Add that. */
- member_string = strchr(key.dptr, '/');
+ member_string = strchr((const char *)key.dptr, '/');
/* Above we tested for MEMBEROF_PREFIX which includes the
* slash. */