to do guesswork.
*****************************************************************/
-BOOL lookup_name(TALLOC_CTX *mem_ctx,
+bool lookup_name(TALLOC_CTX *mem_ctx,
const char *full_name, int flags,
const char **ret_domain, const char **ret_name,
DOM_SID *ret_sid, enum lsa_SidType *ret_type)
and then "Unix Users"\foo (or "Unix Groups"\foo).
************************************************************************/
-BOOL lookup_name_smbconf(TALLOC_CTX *mem_ctx,
+bool lookup_name_smbconf(TALLOC_CTX *mem_ctx,
const char *full_name, int flags,
const char **ret_domain, const char **ret_name,
DOM_SID *ret_sid, enum lsa_SidType *ret_type)
ret_sid, ret_type);
}
-static BOOL wb_lookup_rids(TALLOC_CTX *mem_ctx,
+static bool wb_lookup_rids(TALLOC_CTX *mem_ctx,
const DOM_SID *domain_sid,
int num_rids, uint32 *rids,
const char **domain_name,
return True;
}
-static BOOL lookup_rids(TALLOC_CTX *mem_ctx, const DOM_SID *domain_sid,
+static bool lookup_rids(TALLOC_CTX *mem_ctx, const DOM_SID *domain_sid,
int num_rids, uint32_t *rids,
const char **domain_name,
const char ***names, enum lsa_SidType **types)
* Is the SID a domain as such? If yes, lookup its name.
*/
-static BOOL lookup_as_domain(const DOM_SID *sid, TALLOC_CTX *mem_ctx,
+static bool lookup_as_domain(const DOM_SID *sid, TALLOC_CTX *mem_ctx,
const char **name)
{
const char *tmp;
* Level 6: Like 4
*/
-static BOOL check_dom_sid_to_level(const DOM_SID *sid, int level)
+static bool check_dom_sid_to_level(const DOM_SID *sid, int level)
{
int ret = False;
*THE CANONICAL* convert SID to name function.
*****************************************************************/
-BOOL lookup_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
+bool lookup_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
const char **ret_domain, const char **ret_name,
enum lsa_SidType *ret_type)
{
struct lsa_dom_info *domain;
struct lsa_name_info *name;
TALLOC_CTX *tmp_ctx;
- BOOL ret = False;
+ bool ret = False;
if (!(tmp_ctx = talloc_new(mem_ctx))) {
DEBUG(0, ("talloc_new failed\n"));
Find a SID given a uid.
*****************************************************************/
-static BOOL fetch_sid_from_uid_cache(DOM_SID *psid, uid_t uid)
+static bool fetch_sid_from_uid_cache(DOM_SID *psid, uid_t uid)
{
struct uid_sid_cache *pc;
Find a uid given a SID.
*****************************************************************/
-static BOOL fetch_uid_from_cache( uid_t *puid, const DOM_SID *psid )
+static bool fetch_uid_from_cache( uid_t *puid, const DOM_SID *psid )
{
struct uid_sid_cache *pc;
Find a SID given a gid.
*****************************************************************/
-static BOOL fetch_sid_from_gid_cache(DOM_SID *psid, gid_t gid)
+static bool fetch_sid_from_gid_cache(DOM_SID *psid, gid_t gid)
{
struct gid_sid_cache *pc;
Find a gid given a SID.
*****************************************************************/
-static BOOL fetch_gid_from_cache(gid_t *pgid, const DOM_SID *psid)
+static bool fetch_gid_from_cache(gid_t *pgid, const DOM_SID *psid)
{
struct gid_sid_cache *pc;
static void legacy_uid_to_sid(DOM_SID *psid, uid_t uid)
{
uint32 rid;
- BOOL ret;
+ bool ret;
ZERO_STRUCTP(psid);
static void legacy_gid_to_sid(DOM_SID *psid, gid_t gid)
{
- BOOL ret;
+ bool ret;
ZERO_STRUCTP(psid);
*THE LEGACY* convert SID to uid function.
*****************************************************************/
-static BOOL legacy_sid_to_uid(const DOM_SID *psid, uid_t *puid)
+static bool legacy_sid_to_uid(const DOM_SID *psid, uid_t *puid)
{
enum lsa_SidType type;
uint32 rid;
if (sid_peek_check_rid(get_global_sam_sid(), psid, &rid)) {
union unid_t id;
- BOOL ret;
+ bool ret;
become_root();
ret = pdb_sid_to_id(psid, &id, &type);
Group mapping is used for gids that maps to Wellknown SIDs
*****************************************************************/
-static BOOL legacy_sid_to_gid(const DOM_SID *psid, gid_t *pgid)
+static bool legacy_sid_to_gid(const DOM_SID *psid, gid_t *pgid)
{
uint32 rid;
GROUP_MAP map;
if ((sid_check_is_in_builtin(psid) ||
sid_check_is_in_wellknown_domain(psid))) {
- BOOL ret;
+ bool ret;
become_root();
ret = pdb_getgrsid(&map, *psid);
}
if (sid_peek_check_rid(get_global_sam_sid(), psid, &rid)) {
- BOOL ret;
+ bool ret;
become_root();
ret = pdb_sid_to_id(psid, &id, &type);
*THE CANONICAL* convert SID to uid function.
*****************************************************************/
-BOOL sid_to_uid(const DOM_SID *psid, uid_t *puid)
+bool sid_to_uid(const DOM_SID *psid, uid_t *puid)
{
uint32 rid;
gid_t gid;
Group mapping is used for gids that maps to Wellknown SIDs
*****************************************************************/
-BOOL sid_to_gid(const DOM_SID *psid, gid_t *pgid)
+bool sid_to_gid(const DOM_SID *psid, gid_t *pgid)
{
uint32 rid;
uid_t uid;