From 3cc34062200907fe2dd539565039cb2c7cb76a6e Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 16 Mar 2016 15:35:51 +0100 Subject: [PATCH] winbind: Remove unused idmap_backends_unixid_to_sid Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Wed Mar 30 17:58:48 CEST 2016 on sn-devel-144 --- source3/torture/test_idmap_tdb_common.c | 5 --- source3/winbindd/idmap.c | 46 ------------------------- source3/winbindd/idmap_proto.h | 1 - 3 files changed, 52 deletions(-) diff --git a/source3/torture/test_idmap_tdb_common.c b/source3/torture/test_idmap_tdb_common.c index dd736ad40c2..897d2173002 100644 --- a/source3/torture/test_idmap_tdb_common.c +++ b/source3/torture/test_idmap_tdb_common.c @@ -62,11 +62,6 @@ bool idmap_is_online(void) return true; } -NTSTATUS idmap_backends_unixid_to_sid(struct id_map *id) -{ - return NT_STATUS_OK; -} - static bool open_db(struct idmap_tdb_common_context *ctx) { NTSTATUS status; diff --git a/source3/winbindd/idmap.c b/source3/winbindd/idmap.c index 0ff35caacf7..84834f1a3db 100644 --- a/source3/winbindd/idmap.c +++ b/source3/winbindd/idmap.c @@ -617,49 +617,3 @@ NTSTATUS idmap_backend_unixids_to_sids(struct id_map **maps, return status; } - -NTSTATUS idmap_backends_unixid_to_sid(struct id_map *id) -{ - struct idmap_domain *dom; - struct id_map *maps[2]; - bool ok; - int i; - - ok = idmap_init(); - if (!ok) { - return NT_STATUS_NONE_MAPPED; - } - - DEBUG(10, ("idmap_backend_unixid_to_sid: xid = %d (type %d)\n", - id->xid.id, id->xid.type)); - - maps[0] = id; - maps[1] = NULL; - - /* - * Always give passdb a chance first - */ - - dom = passdb_idmap_domain; - if ((dom != NULL) - && NT_STATUS_IS_OK(dom->methods->unixids_to_sids(dom, maps)) - && id->status == ID_MAPPED) { - return NT_STATUS_OK; - } - - dom = default_idmap_domain; - - for (i=0; ixid.id >= idmap_domains[i]->low_id) && - (id->xid.id <= idmap_domains[i]->high_id)) { - dom = idmap_domains[i]; - break; - } - } - - if (dom == NULL) { - return NT_STATUS_NONE_MAPPED; - } - - return dom->methods->unixids_to_sids(dom, maps); -} diff --git a/source3/winbindd/idmap_proto.h b/source3/winbindd/idmap_proto.h index c690d27bd84..ea96d728713 100644 --- a/source3/winbindd/idmap_proto.h +++ b/source3/winbindd/idmap_proto.h @@ -34,7 +34,6 @@ NTSTATUS smb_register_idmap(int version, const char *name, void idmap_close(void); NTSTATUS idmap_allocate_uid(struct unixid *id); NTSTATUS idmap_allocate_gid(struct unixid *id); -NTSTATUS idmap_backends_unixid_to_sid(struct id_map *id); NTSTATUS idmap_backend_unixids_to_sids(struct id_map **maps, const char *domain_name); -- 2.34.1