DEBUG(10, ("%s SID %s in level %d\n",
ret ? "Accepting" : "Rejecting",
- sid_string_static(sid), level));
+ sid_string_dbg(sid), level));
return ret;
}
done:
if (ret) {
- DEBUG(10, ("Sid %s -> %s\\%s(%d)\n",
- sid_string_static(sid), domain->name,
- name->name, name->type));
+ DEBUG(10, ("Sid %s -> %s\\%s(%d)\n", sid_string_dbg(sid),
+ domain->name, name->name, name->type));
} else {
- DEBUG(10, ("failed to lookup sid %s\n",
- sid_string_static(sid)));
+ DEBUG(10, ("failed to lookup sid %s\n", sid_string_dbg(sid)));
}
TALLOC_FREE(tmp_ctx);
return ret;
if (pc->uid == uid) {
*psid = pc->sid;
DEBUG(3,("fetch sid from uid cache %u -> %s\n",
- (unsigned int)uid, sid_string_static(psid)));
+ (unsigned int)uid, sid_string_dbg(psid)));
DLIST_PROMOTE(uid_sid_cache_head, pc);
return true;
}
if (sid_compare(&pc->sid, psid) == 0) {
*puid = pc->uid;
DEBUG(3,("fetch uid from cache %u -> %s\n",
- (unsigned int)*puid, sid_string_static(psid)));
+ (unsigned int)*puid, sid_string_dbg(psid)));
DLIST_PROMOTE(uid_sid_cache_head, pc);
return true;
}
if (pc->gid == gid) {
*psid = pc->sid;
DEBUG(3,("fetch sid from gid cache %u -> %s\n",
- (unsigned int)gid, sid_string_static(psid)));
+ (unsigned int)gid, sid_string_dbg(psid)));
DLIST_PROMOTE(gid_sid_cache_head, pc);
return true;
}
if (sid_compare(&pc->sid, psid) == 0) {
*pgid = pc->gid;
DEBUG(3,("fetch gid from cache %u -> %s\n",
- (unsigned int)*pgid, sid_string_static(psid)));
+ (unsigned int)*pgid, sid_string_dbg(psid)));
DLIST_PROMOTE(gid_sid_cache_head, pc);
return true;
}
sid_copy(&pc->sid, psid);
DLIST_ADD(gid_sid_cache_head, pc);
- DEBUG(3,("store_gid_sid_cache: gid %u in cache -> %s\n", (unsigned int)gid,
- sid_string_static(psid)));
+ DEBUG(3,("store_gid_sid_cache: gid %u in cache -> %s\n",
+ (unsigned int)gid, sid_string_dbg(psid)));
n_gid_sid_cache++;
}
done:
DEBUG(10,("LEGACY: uid %u -> sid %s\n", (unsigned int)uid,
- sid_string_static(psid)));
+ sid_string_dbg(psid)));
store_uid_sid_cache(psid, uid);
return;
done:
DEBUG(10,("LEGACY: gid %u -> sid %s\n", (unsigned int)gid,
- sid_string_static(psid)));
+ sid_string_dbg(psid)));
store_gid_sid_cache(psid, gid);
return;
if (ret) {
if (type != SID_NAME_USER) {
DEBUG(5, ("sid %s is a %s, expected a user\n",
- sid_string_static(psid),
+ sid_string_dbg(psid),
sid_type_lookup(type)));
return false;
}
/* This was ours, but it was not mapped. Fail */
}
- DEBUG(10,("LEGACY: mapping failed for sid %s\n", sid_string_static(psid)));
+ DEBUG(10,("LEGACY: mapping failed for sid %s\n",
+ sid_string_dbg(psid)));
return false;
done:
- DEBUG(10,("LEGACY: sid %s -> uid %u\n", sid_string_static(psid),
- (unsigned int)*puid ));
+ DEBUG(10,("LEGACY: sid %s -> uid %u\n", sid_string_dbg(psid),
+ (unsigned int)*puid ));
store_uid_sid_cache(psid, *puid);
return true;
*pgid = map.gid;
goto done;
}
- DEBUG(10,("LEGACY: mapping failed for sid %s\n", sid_string_static(psid)));
+ DEBUG(10,("LEGACY: mapping failed for sid %s\n",
+ sid_string_dbg(psid)));
return false;
}
if (ret) {
if ((type != SID_NAME_DOM_GRP) &&
(type != SID_NAME_ALIAS)) {
- DEBUG(5, ("LEGACY: sid %s is a %s, expected a group\n",
- sid_string_static(psid),
+ DEBUG(5, ("LEGACY: sid %s is a %s, expected "
+ "a group\n", sid_string_dbg(psid),
sid_type_lookup(type)));
return false;
}
/* This was ours, but it was not mapped. Fail */
}
- DEBUG(10,("LEGACY: mapping failed for sid %s\n", sid_string_static(psid)));
+ DEBUG(10,("LEGACY: mapping failed for sid %s\n",
+ sid_string_dbg(psid)));
return false;
done:
- DEBUG(10,("LEGACY: sid %s -> gid %u\n", sid_string_static(psid),
+ DEBUG(10,("LEGACY: sid %s -> gid %u\n", sid_string_dbg(psid),
(unsigned int)*pgid ));
store_gid_sid_cache(psid, *pgid);
return;
}
- DEBUG(10,("uid %u -> sid %s\n",
- (unsigned int)uid, sid_string_static(psid)));
+ DEBUG(10,("uid %u -> sid %s\n", (unsigned int)uid,
+ sid_string_dbg(psid)));
store_uid_sid_cache(psid, uid);
return;
return;
}
- DEBUG(10,("gid %u -> sid %s\n",
- (unsigned int)gid, sid_string_static(psid)));
+ DEBUG(10,("gid %u -> sid %s\n", (unsigned int)gid,
+ sid_string_dbg(psid)));
store_gid_sid_cache(psid, gid);
return;
*puid = uid;
/* return here, don't cache */
- DEBUG(10,("sid %s -> uid %u\n", sid_string_static(psid),
+ DEBUG(10,("sid %s -> uid %u\n", sid_string_dbg(psid),
(unsigned int)*puid ));
return true;
}
}
DEBUG(5, ("winbind failed to find a uid for sid %s\n",
- sid_string_static(psid)));
+ sid_string_dbg(psid)));
return false;
}
/* TODO: Here would be the place to allocate both a gid and a uid for
* the SID in question */
- DEBUG(10,("sid %s -> uid %u\n", sid_string_static(psid),
+ DEBUG(10,("sid %s -> uid %u\n", sid_string_dbg(psid),
(unsigned int)*puid ));
store_uid_sid_cache(psid, *puid);
*pgid = gid;
/* return here, don't cache */
- DEBUG(10,("sid %s -> gid %u\n", sid_string_static(psid),
+ DEBUG(10,("sid %s -> gid %u\n", sid_string_dbg(psid),
(unsigned int)*pgid ));
return true;
}
}
DEBUG(10,("winbind failed to find a gid for sid %s\n",
- sid_string_static(psid)));
+ sid_string_dbg(psid)));
return false;
}
- DEBUG(10,("sid %s -> gid %u\n", sid_string_static(psid),
+ DEBUG(10,("sid %s -> gid %u\n", sid_string_dbg(psid),
(unsigned int)*pgid ));
store_gid_sid_cache(psid, *pgid);