Go to the source code of this file.
|
int | nfs41_idmap_create (nfs41_idmapper **context_out) |
|
void | nfs41_idmap_free (nfs41_idmapper *context) |
|
int | nfs41_idmap_name_to_ids (nfs41_idmapper *context, const char *username, uid_t *uid_out, gid_t *gid_out) |
|
int | nfs41_idmap_uid_to_name (nfs41_idmapper *context, uid_t uid, char *name_out, size_t len) |
|
int | nfs41_idmap_principal_to_ids (nfs41_idmapper *context, const char *principal, uid_t *uid_out, gid_t *gid_out) |
|
int | nfs41_idmap_group_to_gid (nfs41_idmapper *context, const char *name, gid_t *gid_out) |
|
int | nfs41_idmap_gid_to_group (nfs41_idmapper *context, gid_t gid, char *name_out, size_t len) |
|
◆ nfs41_idmapper
◆ nfs41_idmap_create()
Definition at line 805 of file idmap.c.
807{
810
815 }
816
817
820
821
825 goto out_err_free;
826 }
827
828
832 eprintf(
"ldap_init(%s) failed with %d: %s\n",
835 goto out_err_free;
836 }
837
839 (
void *)&
context->config.version);
841 eprintf(
"ldap_set_option(version=%d) failed with %d\n",
844 goto out_err_free;
845 }
846
849 (
void *)&
context->config.timeout);
851 eprintf(
"ldap_set_option(timeout=%d) failed with %d\n",
854 goto out_err_free;
855 }
856 }
857
861
862out_err_free:
865}
void eprintf(LPCSTR format,...)
PCHAR CDECL ldap_err2stringA(ULONG err)
ULONG CDECL LdapMapErrorToWin32(ULONG err)
ULONG CDECL LdapGetLastError(void)
static const struct cache_ops group_cache_ops
void nfs41_idmap_free(struct idmap_context *context)
static int config_init(struct idmap_config *config)
static const struct cache_ops user_cache_ops
DWORD WINAPI GetLastError(void)
#define LDAP_OPT_TIMELIMIT
#define LDAP_OPT_PROTOCOL_VERSION
Referenced by ServiceStart().
◆ nfs41_idmap_free()
◆ nfs41_idmap_gid_to_group()
Definition at line 1055 of file idmap.c.
1060{
1065
1067
1068 lookup.value = (
const void*)gidp;
1069
1070
1076 }
1077
1080 eprintf(
"group name buffer overflow: '%s' > %u\n",
1083 }
1084
1086 "returning '%s'\n",
gid,
name);
1089}
static int gid_cmp(const struct list_entry *list, const void *value)
static int idmap_lookup_group(struct idmap_context *context, const struct idmap_lookup *lookup, struct idmap_group *group)
unsigned __int3264 UINT_PTR
STRSAFEAPI StringCchCopyA(STRSAFE_LPSTR pszDest, size_t cchDest, STRSAFE_LPCSTR pszSrc)
#define ERROR_BUFFER_OVERFLOW
◆ nfs41_idmap_group_to_gid()
Definition at line 1017 of file idmap.c.
1021{
1026
1028
1030
1031
1037 }
1038
1039 *gid_out =
group.gid;
1044}
static int group_cmp(const struct list_entry *list, const void *value)
◆ nfs41_idmap_name_to_ids()
Definition at line 889 of file idmap.c.
894{
899
902
904
906
907
913 }
914
921}
void user(int argc, const char *argv[])
static int username_cmp(const struct list_entry *list, const void *value)
static int idmap_lookup_user(struct idmap_context *context, const struct idmap_lookup *lookup, struct idmap_user *user)
#define ERROR_FILE_NOT_FOUND
Referenced by map_user_to_ids().
◆ nfs41_idmap_principal_to_ids()
Definition at line 977 of file idmap.c.
982{
987
989
991
992
995 dprintf(
IDLVL,
"<-- nfs41_idmap_principal_to_ids('%s') "
998 }
999
1000 *uid_out =
user.uid;
1001 *gid_out =
user.gid;
1002 dprintf(
IDLVL,
"<-- nfs41_idmap_principal_to_ids('%s') "
1006}
static int principal_cmp(const struct list_entry *list, const void *value)
◆ nfs41_idmap_uid_to_name()
Definition at line 932 of file idmap.c.
937{
942
944
945 lookup.value = (
const void*)uidp;
946
947
953 }
954
957 eprintf(
"username buffer overflow: '%s' > %u\n",
960 }
961
963 "returning '%s'\n",
uid,
name);
966}
static int uid_cmp(const struct list_entry *list, const void *value)