s3:dom_sid Global replace of DOM_SID with struct dom_sid
[sfrench/samba-autobuild/.git] / source3 / include / nss_info.h
index 1ff9ebcd55945b91ca75c90a6b353883fedf25af..9b910ca256728d09799b6b5c928a46069886ffd7 100644 (file)
@@ -8,12 +8,12 @@
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 3 of the License, or (at your option) any later version.
-   
+
    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Library General Public License for more details.
-   
+
    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
@@ -36,7 +36,7 @@
 
 struct nss_function_entry {
        struct nss_function_entry *prev, *next;
-       
+
        const char *name;
        struct nss_info_methods *methods;
 };
@@ -62,10 +62,17 @@ struct nss_domain_entry {
 struct nss_info_methods {
        NTSTATUS (*init)( struct nss_domain_entry *e );
        NTSTATUS (*get_nss_info)( struct nss_domain_entry *e, 
-                                 const DOM_SID *sid, 
+                                 const struct dom_sid *sid,
                                  TALLOC_CTX *ctx, 
                                  ADS_STRUCT *ads, LDAPMessage *msg,
-                                 char **homedir, char **shell, char **gecos, gid_t *p_gid);
+                                 const char **homedir, const char **shell,
+                                 const char **gecos, gid_t *p_gid);
+       NTSTATUS (*map_to_alias)(TALLOC_CTX *mem_ctx,
+                                struct nss_domain_entry *e,
+                                const char *name, char **alias);
+       NTSTATUS (*map_from_alias)(TALLOC_CTX *mem_ctx,
+                                  struct nss_domain_entry *e,
+                                  const char *alias, char **name);
        NTSTATUS (*close_fn)( void );
 };
 
@@ -76,13 +83,17 @@ NTSTATUS smb_register_idmap_nss(int version,
                                const char *name, 
                                struct nss_info_methods *methods);
 
-NTSTATUS nss_init( const char **nss_list );
-
-NTSTATUS nss_get_info( const char *domain, const DOM_SID *user_sid,
-                       TALLOC_CTX *ctx,
+NTSTATUS nss_get_info( const char *domain, const struct dom_sid *user_sid,
+                      TALLOC_CTX *ctx,
                       ADS_STRUCT *ads, LDAPMessage *msg,
-                       char **homedir, char **shell, char **gecos,
-                       gid_t *p_gid);
+                      const char **homedir, const char **shell,
+                      const 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 );