From 8d25729705170733b565ccc1751302dc9962eea5 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 16 Jul 2008 18:14:33 +0200 Subject: [PATCH 1/1] Fix prototypes (This used to be commit 8b9d12714679745b98755e6805e71b75828ce227) --- source3/include/proto.h | 40 ++++++++++++++++++++--------------- source3/winbindd/idmap_ldap.c | 4 ++-- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/source3/include/proto.h b/source3/include/proto.h index b5a1bfa56e9..b585bee70fb 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -5840,7 +5840,7 @@ bool lp_winbind_offline_logon(void); bool lp_winbind_normalize_names(void); bool lp_winbind_rpc_only(void); const char **lp_idmap_domains(void); -const char **lp_idmap_backend(void); +const char *lp_idmap_backend(void); char *lp_idmap_alloc_backend(void); int lp_idmap_cache_time(void); int lp_idmap_negative_cache_time(void); @@ -10511,30 +10511,36 @@ char *get_pass( const char *prompt, bool stdin_get); /* The following definitions come from winbindd/idmap.c */ bool idmap_is_offline(void); +bool idmap_is_online(void); NTSTATUS smb_register_idmap(int version, const char *name, struct idmap_methods *methods); NTSTATUS smb_register_idmap_alloc(int version, const char *name, struct idmap_alloc_methods *methods); -NTSTATUS idmap_close(void); +void idmap_close(void); NTSTATUS idmap_init_cache(void); NTSTATUS idmap_allocate_uid(struct unixid *id); NTSTATUS idmap_allocate_gid(struct unixid *id); NTSTATUS idmap_set_uid_hwm(struct unixid *id); NTSTATUS idmap_set_gid_hwm(struct unixid *id); -NTSTATUS idmap_unixids_to_sids(struct id_map **ids); -NTSTATUS idmap_sids_to_unixids(struct id_map **ids); -NTSTATUS idmap_set_mapping(const struct id_map *id); -char *idmap_fetch_secret(const char *backend, bool alloc, - const char *domain, const char *identity); +NTSTATUS idmap_backends_unixid_to_sid(const char *domname, + struct id_map *id); +NTSTATUS idmap_backends_sid_to_unixid(const char *domname, + struct id_map *id); +NTSTATUS idmap_new_mapping(const struct dom_sid *psid, enum id_type type, + struct unixid *pxid); +NTSTATUS idmap_set_mapping(const struct id_map *map); /* The following definitions come from winbindd/idmap_cache.c */ -struct idmap_cache_ctx *idmap_cache_init(TALLOC_CTX *memctx); -NTSTATUS idmap_cache_set(struct idmap_cache_ctx *cache, const struct id_map *id); -NTSTATUS idmap_cache_set_negative_sid(struct idmap_cache_ctx *cache, const struct id_map *id); -NTSTATUS idmap_cache_set_negative_id(struct idmap_cache_ctx *cache, const struct id_map *id); -NTSTATUS idmap_cache_map_sid(struct idmap_cache_ctx *cache, struct id_map *id); -NTSTATUS idmap_cache_map_id(struct idmap_cache_ctx *cache, struct id_map *id); +bool idmap_cache_find_sid2uid(const struct dom_sid *sid, uid_t *puid, + bool *expired); +bool idmap_cache_find_uid2sid(uid_t uid, struct dom_sid *sid, bool *expired); +void idmap_cache_set_sid2uid(const struct dom_sid *sid, uid_t uid); +bool idmap_cache_find_sid2gid(const struct dom_sid *sid, gid_t *pgid, + bool *expired); +bool idmap_cache_find_gid2sid(gid_t gid, struct dom_sid *sid, bool *expired); +void idmap_cache_set_sid2gid(const struct dom_sid *sid, gid_t gid); + /* The following definitions come from winbindd/idmap_nss.c */ @@ -10552,10 +10558,10 @@ NTSTATUS idmap_tdb_init(void); /* The following definitions come from winbindd/idmap_util.c */ -NTSTATUS idmap_uid_to_sid(DOM_SID *sid, uid_t uid); -NTSTATUS idmap_gid_to_sid(DOM_SID *sid, gid_t gid); -NTSTATUS idmap_sid_to_uid(DOM_SID *sid, uid_t *uid); -NTSTATUS idmap_sid_to_gid(DOM_SID *sid, gid_t *gid); +NTSTATUS idmap_uid_to_sid(const char *domname, DOM_SID *sid, uid_t uid); +NTSTATUS idmap_gid_to_sid(const char *domname, DOM_SID *sid, gid_t gid); +NTSTATUS idmap_sid_to_uid(const char *dom_name, DOM_SID *sid, uid_t *uid); +NTSTATUS idmap_sid_to_gid(const char *domname, DOM_SID *sid, gid_t *gid); /* The following definitions come from winbindd/nss_info.c */ diff --git a/source3/winbindd/idmap_ldap.c b/source3/winbindd/idmap_ldap.c index 5657cb591ec..c86a5023d0c 100644 --- a/source3/winbindd/idmap_ldap.c +++ b/source3/winbindd/idmap_ldap.c @@ -246,7 +246,6 @@ done: static NTSTATUS idmap_ldap_alloc_init(const char *params) { NTSTATUS ret = NT_STATUS_UNSUCCESSFUL; - const char *range; const char *tmp; uid_t low_uid = 0; uid_t high_uid = 0; @@ -1458,12 +1457,13 @@ static struct idmap_alloc_methods idmap_ldap_alloc_methods = { /* .dump_data = TODO */ }; -NTSTATUS idmap_alloc_ldap_init(void) +static NTSTATUS idmap_alloc_ldap_init(void) { return smb_register_idmap_alloc(SMB_IDMAP_INTERFACE_VERSION, "ldap", &idmap_ldap_alloc_methods); } +NTSTATUS idmap_ldap_init(void); NTSTATUS idmap_ldap_init(void) { NTSTATUS ret; -- 2.34.1