/* Call winbindd to convert a name to a sid */
-BOOL winbind_lookup_name(const char *dom_name, const char *name, DOM_SID *sid,
+bool winbind_lookup_name(const char *dom_name, const char *name, DOM_SID *sid,
enum lsa_SidType *name_type)
{
struct winbindd_request request;
/* Call winbindd to convert sid to name */
-BOOL winbind_lookup_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
+bool winbind_lookup_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
const char **domain, const char **name,
enum lsa_SidType *name_type)
{
return True;
}
-BOOL winbind_lookup_rids(TALLOC_CTX *mem_ctx,
+bool winbind_lookup_rids(TALLOC_CTX *mem_ctx,
const DOM_SID *domain_sid,
int num_rids, uint32 *rids,
const char **domain_name,
"%ld\n", rids[i]);
}
- if ((num_rids != 0) && (ridlist == NULL)) {
+ if (ridlist == NULL) {
return False;
}
*domain_name = talloc_strdup(mem_ctx, response.data.domain_name);
- if (num_rids) {
- *names = TALLOC_ARRAY(mem_ctx, const char *, num_rids);
- *types = TALLOC_ARRAY(mem_ctx, enum lsa_SidType, num_rids);
+ *names = TALLOC_ARRAY(mem_ctx, const char *, num_rids);
+ *types = TALLOC_ARRAY(mem_ctx, enum lsa_SidType, num_rids);
- if ((*names == NULL) || (*types == NULL)) {
- goto fail;
- }
- } else {
- *names = NULL;
- *types = NULL;
+ if ((*names == NULL) || (*types == NULL)) {
+ goto fail;
}
p = (char *)response.extra_data.data;
/* Call winbindd to convert SID to uid */
-BOOL winbind_sid_to_uid(uid_t *puid, const DOM_SID *sid)
+bool winbind_sid_to_uid(uid_t *puid, const DOM_SID *sid)
{
struct winbindd_request request;
struct winbindd_response response;
/* Call winbindd to convert uid to sid */
-BOOL winbind_uid_to_sid(DOM_SID *sid, uid_t uid)
+bool winbind_uid_to_sid(DOM_SID *sid, uid_t uid)
{
struct winbindd_request request;
struct winbindd_response response;
/* Call winbindd to convert SID to gid */
-BOOL winbind_sid_to_gid(gid_t *pgid, const DOM_SID *sid)
+bool winbind_sid_to_gid(gid_t *pgid, const DOM_SID *sid)
{
struct winbindd_request request;
struct winbindd_response response;
/* Call winbindd to convert gid to sid */
-BOOL winbind_gid_to_sid(DOM_SID *sid, gid_t gid)
+bool winbind_gid_to_sid(DOM_SID *sid, gid_t gid)
{
struct winbindd_request request;
struct winbindd_response response;
/* Call winbindd to convert SID to uid */
-BOOL winbind_sids_to_unixids(struct id_map *ids, int num_ids)
+bool winbind_sids_to_unixids(struct id_map *ids, int num_ids)
{
struct winbindd_request request;
struct winbindd_response response;
return (result == NSS_STATUS_SUCCESS);
}
-BOOL winbind_idmap_dump_maps(TALLOC_CTX *memctx, const char *file)
+bool winbind_idmap_dump_maps(TALLOC_CTX *memctx, const char *file)
{
struct winbindd_request request;
struct winbindd_response response;
return (result == NSS_STATUS_SUCCESS);
}
-BOOL winbind_allocate_uid(uid_t *uid)
+bool winbind_allocate_uid(uid_t *uid)
{
struct winbindd_request request;
struct winbindd_response response;
return True;
}
-BOOL winbind_allocate_gid(gid_t *gid)
+bool winbind_allocate_gid(gid_t *gid)
{
struct winbindd_request request;
struct winbindd_response response;
return True;
}
-BOOL winbind_set_mapping(const struct id_map *map)
+bool winbind_set_mapping(const struct id_map *map)
{
struct winbindd_request request;
struct winbindd_response response;
return (result == NSS_STATUS_SUCCESS);
}
-BOOL winbind_set_uid_hwm(unsigned long id)
+bool winbind_set_uid_hwm(unsigned long id)
{
struct winbindd_request request;
struct winbindd_response response;
return (result == NSS_STATUS_SUCCESS);
}
-BOOL winbind_set_gid_hwm(unsigned long id)
+bool winbind_set_gid_hwm(unsigned long id)
{
struct winbindd_request request;
struct winbindd_response response;
simple wrapper function to see if winbindd is alive
**********************************************************************/
-BOOL winbind_ping( void )
+bool winbind_ping( void )
{
NSS_STATUS result;