upgrade to fedora-2.6.12-1.1398.FC4 + vserver 2.0.rc7
[linux-2.6.git] / include / linux / vserver / inode.h
1 #ifndef _VX_INODE_H
2 #define _VX_INODE_H
3
4 #define IATTR_XID       0x01000000
5
6 #define IATTR_ADMIN     0x00000001
7 #define IATTR_WATCH     0x00000002
8 #define IATTR_HIDE      0x00000004
9 #define IATTR_FLAGS     0x00000007
10
11 #define IATTR_BARRIER   0x00010000
12 #define IATTR_IUNLINK   0x00020000
13 #define IATTR_IMMUTABLE 0x00040000
14
15 #ifdef  __KERNEL__
16
17 #ifndef CONFIG_VSERVER
18 #warning config options missing
19 #endif
20
21 #ifdef  CONFIG_VSERVER_PROC_SECURE
22 #define IATTR_PROC_DEFAULT      ( IATTR_ADMIN | IATTR_HIDE )
23 #define IATTR_PROC_SYMLINK      ( IATTR_ADMIN )
24 #else
25 #define IATTR_PROC_DEFAULT      ( IATTR_ADMIN )
26 #define IATTR_PROC_SYMLINK      ( IATTR_ADMIN )
27 #endif
28
29 #define vx_hide_check(c,m)      (((m) & IATTR_HIDE) ? vx_check(c,m) : 1)
30
31 extern int vc_get_iattr_v0(uint32_t, void __user *);
32 extern int vc_set_iattr_v0(uint32_t, void __user *);
33
34 extern int vc_get_iattr(uint32_t, void __user *);
35 extern int vc_set_iattr(uint32_t, void __user *);
36
37 extern int vc_iattr_ioctl(struct dentry *de,
38                           unsigned int cmd,
39                           unsigned long arg);
40 #endif  /* __KERNEL__ */
41
42 /* inode ioctls */
43
44 #define FIOC_GETXFLG    _IOR('x', 5, long)
45 #define FIOC_SETXFLG    _IOW('x', 6, long)
46 #define FIOC_GETIATTR   _IOR('x', 7, long)
47 #define FIOC_SETIATTR   _IOR('x', 8, long)
48
49 #else   /* _VX_INODE_H */
50 #warning duplicate inclusion
51 #endif  /* _VX_INODE_H */