if (ret) {
if (!sid_check_is_in_our_sam(&user_sid)) {
- DEBUG(0, ("User %s with invalid SID %s in passdb\n",
- name, sid_string_dbg(&user_sid)));
+ struct dom_sid_buf buf;
+ DBG_ERR("User %s with invalid SID %s"
+ " in passdb\n",
+ name,
+ dom_sid_str_buf(&user_sid, &buf));
return False;
}
/* BUILTIN groups are looked up elsewhere */
if (!sid_check_is_in_our_sam(&map->sid)) {
+ struct dom_sid_buf buf;
DEBUG(10, ("Found group %s (%s) not in our domain -- "
"ignoring.\n",
- name, sid_string_dbg(&map->sid)));
+ name,
+ dom_sid_str_buf(&map->sid, &buf)));
TALLOC_FREE(map);
return False;
}
bool pdb_set_user_sid_from_rid (struct samu *sampass, uint32_t rid, enum pdb_value_state flag)
{
struct dom_sid u_sid;
+ struct dom_sid_buf buf;
const struct dom_sid *global_sam_sid;
if (!sampass)
return False;
DEBUG(10, ("pdb_set_user_sid_from_rid:\n\tsetting user sid %s from rid %d\n",
- sid_string_dbg(&u_sid),rid));
+ dom_sid_str_buf(&u_sid, &buf), rid));
return True;
}
bool pdb_set_group_sid_from_rid (struct samu *sampass, uint32_t grid, enum pdb_value_state flag)
{
struct dom_sid g_sid;
+ struct dom_sid_buf buf;
const struct dom_sid *global_sam_sid;
if (!sampass)
return False;
DEBUG(10, ("pdb_set_group_sid_from_rid:\n\tsetting group sid %s from rid %d\n",
- sid_string_dbg(&g_sid), grid));
+ dom_sid_str_buf(&g_sid, &buf), grid));
return True;
}
bool pdb_set_user_sid(struct samu *sampass, const struct dom_sid *u_sid, enum pdb_value_state flag)
{
+ struct dom_sid_buf buf;
+
if (!u_sid)
return False;
sid_copy(&sampass->user_sid, u_sid);
DEBUG(10, ("pdb_set_user_sid: setting user sid %s\n",
- sid_string_dbg(&sampass->user_sid)));
+ dom_sid_str_buf(&sampass->user_sid, &buf)));
return pdb_set_init_flags(sampass, PDB_USERSID, flag);
}
{
gid_t gid;
struct dom_sid dug_sid;
+ struct dom_sid_buf buf;
if (!g_sid)
return False;
}
DEBUG(10, ("pdb_set_group_sid: setting group sid %s\n",
- sid_string_dbg(sampass->group_sid)));
+ dom_sid_str_buf(sampass->group_sid, &buf)));
return pdb_set_init_flags(sampass, PDB_GROUPSID, flag);
}
TALLOC_CTX *mem_ctx;
bool ret = False;
uint32_t rid;
+ struct dom_sid_buf buf;
+
id->id = -1;
mem_ctx = talloc_new(NULL);
"an object exists in the database, "
"but it is neither a user nor a "
"group (got type %d).\n",
- sid_string_dbg(sid), type));
+ dom_sid_str_buf(sid, &buf),
+ type));
ret = false;
}
} else {
DEBUG(5, ("SID %s belongs to our domain, but there is "
"no corresponding object in the database.\n",
- sid_string_dbg(sid)));
+ dom_sid_str_buf(sid, &buf)));
}
goto done;
}
if (!NT_STATUS_IS_OK(methods->getgrsid(methods, map, *sid))) {
DEBUG(10, ("Could not find map for sid %s\n",
- sid_string_dbg(sid)));
+ dom_sid_str_buf(sid, &buf)));
goto done;
}
if ((map->sid_name_use != SID_NAME_ALIAS) &&
(map->sid_name_use != SID_NAME_WKN_GRP)) {
DEBUG(10, ("Map for sid %s is a %s, expected an "
- "alias\n", sid_string_dbg(sid),
+ "alias\n",
+ dom_sid_str_buf(sid, &buf),
sid_type_lookup(map->sid_name_use)));
goto done;
}
}
DEBUG(5, ("Sid %s is neither ours, a Unix SID, nor builtin\n",
- sid_string_dbg(sid)));
+ dom_sid_str_buf(sid, &buf)));
done:
}
if (pass.domain_sid.num_auths != 4) {
+ struct dom_sid_buf buf;
DEBUG(0, ("SID %s is not a domain sid, has %d "
"auths instead of 4\n",
- sid_string_dbg(&pass.domain_sid),
+ dom_sid_str_buf(&pass.domain_sid, &buf),
pass.domain_sid.num_auths));
return 0;
}
status = pdb_add_aliasmem(builtin_sid, dom_sid);
if (NT_STATUS_EQUAL(status, NT_STATUS_MEMBER_IN_ALIAS)) {
+ struct dom_sid_buf buf1, buf2;
DEBUG(5, ("add_sid_to_builtin %s is already a member of %s\n",
- sid_string_dbg(dom_sid),
- sid_string_dbg(builtin_sid)));
+ dom_sid_str_buf(dom_sid, &buf1),
+ dom_sid_str_buf(builtin_sid, &buf2)));
return NT_STATUS_OK;
}
if (!NT_STATUS_IS_OK(status)) {
+ struct dom_sid_buf buf1, buf2;
DEBUG(4, ("add_sid_to_builtin %s could not be added to %s: "
- "%s\n", sid_string_dbg(dom_sid),
- sid_string_dbg(builtin_sid), nt_errstr(status)));
+ "%s\n",
+ dom_sid_str_buf(dom_sid, &buf1),
+ dom_sid_str_buf(builtin_sid, &buf2),
+ nt_errstr(status)));
}
return status;
}