idmap_rid: remove a legacy comment from sid_to_id
[obnox/samba/samba-obnox.git] / source3 / winbindd / idmap_rid.c
index 4112fb860aee9cb5abcb3978dc01ce2f330024cc..099f68c5ee31562c9f4756908e2aabde216df9d7 100644 (file)
@@ -87,11 +87,8 @@ static NTSTATUS idmap_rid_id_to_sid(struct idmap_domain *dom, struct id_map *map
 
        sid_compose(map->sid, &domain->sid, map->xid.id - dom->low_id + ctx->base_rid);
 
-       /* We **really** should have some way of validating 
-          the SID exists and is the correct type here.  But 
-          that is a deficiency in the idmap_rid design. */
-
        map->status = ID_MAPPED;
+       map->xid.type = ID_TYPE_BOTH;
 
        return NT_STATUS_OK;
 }
@@ -109,6 +106,7 @@ static NTSTATUS idmap_rid_sid_to_id(struct idmap_domain *dom, struct id_map *map
 
        sid_peek_rid(map->sid, &rid);
        map->xid.id = rid - ctx->base_rid + dom->low_id;
+       map->xid.type = ID_TYPE_BOTH;
 
        /* apply filters before returning result */
 
@@ -187,7 +185,7 @@ static struct idmap_methods rid_methods = {
        .sids_to_unixids = idmap_rid_sids_to_unixids,
 };
 
-NTSTATUS samba_init_module(void)
+NTSTATUS idmap_rid_init(void)
 {
        return smb_register_idmap(SMB_IDMAP_INTERFACE_VERSION, "rid", &rid_methods);
 }