Revision 758e8e38 hw/file-op-9p.h
b/hw/file-op-9p.h | ||
---|---|---|
18 | 18 |
#include <utime.h> |
19 | 19 |
#include <sys/stat.h> |
20 | 20 |
#include <sys/uio.h> |
21 |
#include <sys/vfs.h> |
|
22 |
#define SM_LOCAL_MODE_BITS 0600 |
|
23 |
#define SM_LOCAL_DIR_MODE_BITS 0700 |
|
24 |
|
|
25 |
typedef enum |
|
26 |
{ |
|
27 |
SM_PASSTHROUGH = 1, /* uid/gid set on fileserver files */ |
|
28 |
SM_MAPPED, /* uid/gid part of xattr */ |
|
29 |
} SecModel; |
|
30 |
|
|
31 |
typedef struct FsCred |
|
32 |
{ |
|
33 |
uid_t fc_uid; |
|
34 |
gid_t fc_gid; |
|
35 |
mode_t fc_mode; |
|
36 |
dev_t fc_rdev; |
|
37 |
} FsCred; |
|
21 | 38 |
|
22 | 39 |
typedef struct FsContext |
23 | 40 |
{ |
24 | 41 |
char *fs_root; |
42 |
SecModel fs_sm; |
|
25 | 43 |
uid_t uid; |
26 | 44 |
} FsContext; |
27 | 45 |
|
46 |
extern void cred_init(FsCred *); |
|
47 |
|
|
28 | 48 |
typedef struct FileOperations |
29 | 49 |
{ |
30 | 50 |
int (*lstat)(FsContext *, const char *, struct stat *); |
Also available in: Unified diff