-
Notifications
You must be signed in to change notification settings - Fork 284
Expand file tree
/
Copy pathnfs.x
More file actions
60 lines (52 loc) · 1.52 KB
/
nfs.x
File metadata and controls
60 lines (52 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
* This file contains a subset of the RPC protocol for NFS, as described in
* RFC 1813:
*
* https://www.ietf.org/rfc/rfc1813.txt
*
* Apart from omitting parts of the protocol that are not needed, only one
* modification has been made:
*
* 1. The upper bound of the opaque data in an fhandle3 has been omitted,
* to demonstrate a buffer overflow in Mac OS version 10.13.5.
*/
struct fhandle3 {
opaque data<>; /* Note: upper bound deliberately omitted */
};
enum mountstat3 {
MNT3_OK = 0, /* no error */
MNT3ERR_PERM = 1, /* Not owner */
MNT3ERR_NOENT = 2, /* No such file or directory */
MNT3ERR_IO = 5, /* I/O error */
MNT3ERR_ACCES = 13, /* Permission denied */
MNT3ERR_NOTDIR = 20, /* Not a directory */
MNT3ERR_INVAL = 22, /* Invalid argument */
MNT3ERR_NAMETOOLONG = 63, /* Filename too long */
MNT3ERR_NOTSUPP = 10004, /* Operation not supported */
MNT3ERR_SERVERFAULT = 10006 /* A failure on the server */
};
program NFS_PROGRAM {
version NFS_V3 {
void
NFSPROC3_NULL(void) = 0;
} = 3;
} = 100003;
const MNTPATHLEN = 1024;
typedef string dirpath<MNTPATHLEN>;
struct mountres3_ok {
fhandle3 fhandle;
int auth_flavors<>;
};
const MNT_OK = 0;
union mountres3 switch (mountstat3 fhs_status) {
case MNT_OK:
mountres3_ok mountinfo;
default:
void;
};
program MOUNT_PROGRAM {
version MOUNT_V3 {
void MOUNTPROC3_NULL(void) = 0;
mountres3 MOUNTPROC3_MNT(dirpath) = 1;
} = 3;
} = 100005;