diff options
Diffstat (limited to 'source3/utils/net_sam.c')
-rw-r--r-- | source3/utils/net_sam.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/utils/net_sam.c b/source3/utils/net_sam.c index aadabc1435..2ee9a91b70 100644 --- a/source3/utils/net_sam.c +++ b/source3/utils/net_sam.c @@ -30,6 +30,7 @@ #include "passdb/pdb_ldap_schema.h" #include "lib/privileges.h" #include "secrets.h" +#include "idmap.h" /* * Set a user's data @@ -912,6 +913,7 @@ static int net_sam_mapunixgroup(struct net_context *c, int argc, const char **ar static NTSTATUS unmap_unix_group(const struct group *grp) { struct dom_sid dom_sid; + struct unixid id; if (!lookup_name(talloc_tos(), grp->gr_name, LOOKUP_NAME_LOCAL, NULL, NULL, NULL, NULL)) { @@ -919,7 +921,9 @@ static NTSTATUS unmap_unix_group(const struct group *grp) return NT_STATUS_NO_SUCH_GROUP; } - if (!pdb_gid_to_sid(grp->gr_gid, &dom_sid)) { + id.id = grp->gr_gid; + id.type = ID_TYPE_GID; + if (!pdb_id_to_sid(&id, &dom_sid)) { return NT_STATUS_UNSUCCESSFUL; } |