diff options
author | Volker Lendecke <vl@samba.org> | 2016-12-27 13:08:58 +0000 |
---|---|---|
committer | Uri Simchoni <uri@samba.org> | 2016-12-29 00:05:25 +0100 |
commit | 2e1dc952f0505154f649c04da4b2194f433a6cbe (patch) | |
tree | 76e14a939185971d81e26ddea41efb01134f8ae1 /source4/winbind | |
parent | e06a342f80bf75863d0c0f057c19aeab2bcb3c29 (diff) | |
download | samba-2e1dc952f0505154f649c04da4b2194f433a6cbe.tar.gz |
idmap4: Use sid_check_is_in_unix_groups()
This avoids the need for the special unix groups sid
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Thu Dec 29 00:05:25 CET 2016 on sn-devel-144
Diffstat (limited to 'source4/winbind')
-rw-r--r-- | source4/winbind/idmap.c | 8 | ||||
-rw-r--r-- | source4/winbind/idmap.h | 1 |
2 files changed, 1 insertions, 8 deletions
diff --git a/source4/winbind/idmap.c b/source4/winbind/idmap.c index bcf45874374..edeb72419bb 100644 --- a/source4/winbind/idmap.c +++ b/source4/winbind/idmap.c @@ -175,12 +175,6 @@ struct idmap_context *idmap_init(TALLOC_CTX *mem_ctx, goto fail; } - idmap_ctx->unix_groups_sid = dom_sid_parse_talloc( - idmap_ctx, "S-1-22-2"); - if (idmap_ctx->unix_groups_sid == NULL) { - goto fail; - } - idmap_ctx->samdb = samdb_connect(idmap_ctx, ev_ctx, lp_ctx, system_session(lp_ctx), 0); if (idmap_ctx->samdb == NULL) { DEBUG(0, ("Failed to load sam.ldb in idmap_init\n")); @@ -423,7 +417,7 @@ static NTSTATUS idmap_sid_to_xid(struct idmap_context *idmap_ctx, return NT_STATUS_OK; } - if (dom_sid_in_domain(idmap_ctx->unix_groups_sid, sid)) { + if (sid_check_is_in_unix_groups(sid)) { uint32_t rid; DEBUG(6, ("This is a local unix gid, just calculate that.\n")); status = dom_sid_split_rid(tmp_ctx, sid, NULL, &rid); diff --git a/source4/winbind/idmap.h b/source4/winbind/idmap.h index bc753b227ab..04770c308eb 100644 --- a/source4/winbind/idmap.h +++ b/source4/winbind/idmap.h @@ -27,7 +27,6 @@ struct idmap_context { struct loadparm_context *lp_ctx; struct ldb_context *ldb_ctx; - struct dom_sid *unix_groups_sid; struct ldb_context *samdb; }; |