Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
idmap.c File Reference
#include <linux/types.h>
#include <linux/parser.h>
#include <linux/fs.h>
#include <linux/nfs_idmap.h>
#include <net/net_namespace.h>
#include <linux/sunrpc/rpc_pipe_fs.h>
#include <linux/nfs_fs.h>
#include <linux/nfs_fs_sb.h>
#include <linux/key.h>
#include <linux/keyctl.h>
#include <linux/key-type.h>
#include <keys/user-type.h>
#include <linux/module.h>
#include "internal.h"
#include "netns.h"

Go to the source code of this file.

Data Structures

struct  idmap_legacy_upcalldata
 
struct  idmap
 

Macros

#define NFS_UINT_MAXLEN   11
 
#define PIPEFS_NFS_PRIO   1
 

Enumerations

enum  {
  Opt_find_uid, Opt_find_gid, Opt_find_user, Opt_find_group,
  Opt_find_err
}
 

Functions

void nfs_fattr_init_names (struct nfs_fattr *fattr, struct nfs4_string *owner_name, struct nfs4_string *group_name)
 
void nfs_fattr_free_names (struct nfs_fattr *fattr)
 
void nfs_fattr_map_and_free_names (struct nfs_server *server, struct nfs_fattr *fattr)
 
int nfs_idmap_new (struct nfs_client *clp)
 
void nfs_idmap_delete (struct nfs_client *clp)
 
int nfs_idmap_init (void)
 
void nfs_idmap_quit (void)
 
int nfs_map_name_to_uid (const struct nfs_server *server, const char *name, size_t namelen, __u32 *uid)
 
int nfs_map_group_to_gid (const struct nfs_server *server, const char *name, size_t namelen, __u32 *gid)
 
int nfs_map_uid_to_name (const struct nfs_server *server, __u32 uid, char *buf, size_t buflen)
 
int nfs_map_gid_to_group (const struct nfs_server *server, __u32 gid, char *buf, size_t buflen)
 

Macro Definition Documentation

#define NFS_UINT_MAXLEN   11

Definition at line 53 of file idmap.c.

#define PIPEFS_NFS_PRIO   1

Definition at line 599 of file idmap.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
Opt_find_uid 
Opt_find_gid 
Opt_find_user 
Opt_find_group 
Opt_find_err 

Definition at line 375 of file idmap.c.

Function Documentation

void nfs_fattr_free_names ( struct nfs_fattr fattr)

nfs_fattr_free_names - free up the NFSv4 owner and group strings : a fully initialised nfs_fattr structure

Definition at line 129 of file idmap.c.

void nfs_fattr_init_names ( struct nfs_fattr fattr,
struct nfs4_string owner_name,
struct nfs4_string group_name 
)

nfs_fattr_init_names - initialise the nfs_fattr owner_name/group_name fields : fully initialised struct nfs_fattr : owner name string cache : group name string cache

Definition at line 77 of file idmap.c.

void nfs_fattr_map_and_free_names ( struct nfs_server server,
struct nfs_fattr fattr 
)

nfs_fattr_map_and_free_names - map owner/group strings into uid/gid and free : pointer to the filesystem nfs_server structure : a fully initialised nfs_fattr structure

This helper maps the cached NFSv4 owner/group strings in fattr into their numeric uid/gid equivalents, and then frees the cached strings.

Definition at line 145 of file idmap.c.

void nfs_idmap_delete ( struct nfs_client clp)

Definition at line 492 of file idmap.c.

int nfs_idmap_init ( void  )

Definition at line 606 of file idmap.c.

int nfs_idmap_new ( struct nfs_client clp)

Definition at line 462 of file idmap.c.

void nfs_idmap_quit ( void  )

Definition at line 619 of file idmap.c.

int nfs_map_gid_to_group ( const struct nfs_server server,
__u32  gid,
char buf,
size_t  buflen 
)

Definition at line 872 of file idmap.c.

int nfs_map_group_to_gid ( const struct nfs_server server,
const char name,
size_t  namelen,
__u32 gid 
)

Definition at line 852 of file idmap.c.

int nfs_map_name_to_uid ( const struct nfs_server server,
const char name,
size_t  namelen,
__u32 uid 
)

Definition at line 843 of file idmap.c.

int nfs_map_uid_to_name ( const struct nfs_server server,
__u32  uid,
char buf,
size_t  buflen 
)

Definition at line 861 of file idmap.c.