From d6de32db2f8d080cb746b3032c128f210154b75e Mon Sep 17 00:00:00 2001 From: "Gerald (Jerry) Carter" Date: Mon, 15 Sep 2008 15:41:37 -0500 Subject: winbindd: Add support for name aliasing. * Add support user and group name aliasing by expanding the ws_name_replace() and ws_name_return() functions. The lookup path is aliases -> qualified name -> SID SID -> fully qualified name -> alias In other words, the name aliasing support is a thin layer built on top of SID/NAME translation. * Rename the ws_name_XX() functions to normalize_name_map() and normalize_name_unmap(). Chaneg interface to return NTSTATUS rather than char *. * Add associated cache validation functions. --- source3/include/nss_info.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source3/include/nss_info.h') diff --git a/source3/include/nss_info.h b/source3/include/nss_info.h index 1ff9ebcd55..e756136b76 100644 --- a/source3/include/nss_info.h +++ b/source3/include/nss_info.h @@ -66,6 +66,10 @@ struct nss_info_methods { TALLOC_CTX *ctx, ADS_STRUCT *ads, LDAPMessage *msg, char **homedir, char **shell, char **gecos, gid_t *p_gid); + NTSTATUS (*map_to_alias)( TALLOC_CTX *mem_ctx, const char *domain, + const char *name, char **alias ); + NTSTATUS (*map_from_alias)( TALLOC_CTX *mem_ctx, const char *domain, + const char *alias, char **name ); NTSTATUS (*close_fn)( void ); }; @@ -84,6 +88,12 @@ NTSTATUS nss_get_info( const char *domain, const DOM_SID *user_sid, char **homedir, char **shell, char **gecos, gid_t *p_gid); +NTSTATUS nss_map_to_alias( TALLOC_CTX *mem_ctx, const char *domain, + const char *name, char **alias ); + +NTSTATUS nss_map_from_alias( TALLOC_CTX *mem_ctx, const char *domain, + const char *alias, char **name ); + NTSTATUS nss_close( const char *parameters ); #endif /* _IDMAP_NSS_H_ */ -- cgit