[NFSD] [TELNET] Remove the hardcoded directory paths C:\ReactOS
[reactos.git] / base / services / nfsd / idmap.h
1 /* NFSv4.1 client for Windows
2 * Copyright © 2012 The Regents of the University of Michigan
3 *
4 * Olga Kornievskaia <aglo@umich.edu>
5 * Casey Bodley <cbodley@umich.edu>
6 *
7 * This library is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation; either version 2.1 of the License, or (at
10 * your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful, but
13 * without any warranty; without even the implied warranty of merchantability
14 * or fitness for a particular purpose. See the GNU Lesser General Public
15 * License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this library; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 */
21
22 #ifndef IDMAP_H
23 #define IDMAP_H
24
25 #include "nfs41_types.h"
26
27
28 /* idmap.c */
29 typedef struct idmap_context nfs41_idmapper;
30
31 int nfs41_idmap_create(
32 nfs41_idmapper **context_out);
33
34 void nfs41_idmap_free(
35 nfs41_idmapper *context);
36
37
38 int nfs41_idmap_name_to_ids(
39 nfs41_idmapper *context,
40 const char *username,
41 uid_t *uid_out,
42 gid_t *gid_out);
43
44 int nfs41_idmap_uid_to_name(
45 nfs41_idmapper *context,
46 uid_t uid,
47 char *name_out,
48 size_t len);
49
50 int nfs41_idmap_principal_to_ids(
51 nfs41_idmapper *context,
52 const char *principal,
53 uid_t *uid_out,
54 gid_t *gid_out);
55
56 int nfs41_idmap_group_to_gid(
57 nfs41_idmapper *context,
58 const char *name,
59 gid_t *gid_out);
60
61 int nfs41_idmap_gid_to_group(
62 nfs41_idmapper *context,
63 gid_t gid,
64 char *name_out,
65 size_t len);
66
67 #endif /* !IDMAP_H */