summaryrefslogtreecommitdiff
path: root/source3/sam
diff options
context:
space:
mode:
Diffstat (limited to 'source3/sam')
-rw-r--r--source3/sam/gumm_tdb.c9
-rw-r--r--source3/sam/idmap_tdb.c4
2 files changed, 8 insertions, 5 deletions
diff --git a/source3/sam/gumm_tdb.c b/source3/sam/gumm_tdb.c
index 5e390490cf..5da2407faa 100644
--- a/source3/sam/gumm_tdb.c
+++ b/source3/sam/gumm_tdb.c
@@ -264,7 +264,8 @@ static NTSTATUS get_object_by_name(TALLOC_CTX *mem_ctx, struct tdbsam2_object *o
return ret;
}
- unix_strlower(name, -1, objname, sizeof(objname));
+ fstrcpy(objname, name);
+ strlower(objname);
slprintf(keystr, sizeof(keystr)-1, "%s%s", NAMEPREFIX, objname);
key.dptr = keystr;
@@ -603,7 +604,8 @@ static NTSTATUS tdbsam2_get_domain_sid(DOM_SID *sid, const char* name)
goto done;
}
- unix_strlower(name, -1, domname, sizeof(domname));
+ fstrcpy(domname, name);
+ strlower(domname);
ret = get_object_by_name(mem_ctx, &obj, domname);
@@ -650,7 +652,8 @@ static NTSTATUS tdbsam2_set_domain_sid (const DOM_SID *sid, const char *name)
}
}
- unix_strlower(name, -1, domname, sizeof(domname));
+ fstrcpy(domname, name);
+ strlower(domname);
/* TODO: we need to lock this entry until updated! */
diff --git a/source3/sam/idmap_tdb.c b/source3/sam/idmap_tdb.c
index 7080ac56e6..c494cf595f 100644
--- a/source3/sam/idmap_tdb.c
+++ b/source3/sam/idmap_tdb.c
@@ -236,11 +236,11 @@ static NTSTATUS db_set_mapping(DOM_SID *sid, unid_t id, int id_type)
kid.dsize = strlen(kidstr) + 1;
if (tdb_store(idmap_tdb, ksid, kid, TDB_INSERT) == -1) {
- DEBUG(0, ("idb_set_mapping: tdb_store 1 error: %s", tdb_errorstr(idmap_tdb)));
+ DEBUG(0, ("idb_set_mapping: tdb_store 1 error: %s\n", tdb_errorstr(idmap_tdb)));
return NT_STATUS_UNSUCCESSFUL;
}
if (tdb_store(idmap_tdb, kid, ksid, TDB_INSERT) == -1) {
- DEBUG(0, ("idb_set_mapping: tdb_store 2 error: %s", tdb_errorstr(idmap_tdb)));
+ DEBUG(0, ("idb_set_mapping: tdb_store 2 error: %s\n", tdb_errorstr(idmap_tdb)));
return NT_STATUS_UNSUCCESSFUL;
}
return NT_STATUS_OK;