~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/lsm2ccsecurity.h

Version: ~ [ linux-5.12-rc1 ] ~ [ linux-5.11.2 ] ~ [ linux-5.10.19 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.101 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.177 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.222 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.258 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.258 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.18.140 ] ~ [ linux-3.16.85 ] ~ [ linux-3.14.79 ] ~ [ linux-3.12.74 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * include/linux/lsm2ccsecurity.h
  3  *
  4  * Copyright (C) 2005-2012  NTT DATA CORPORATION
  5  *
  6  * Version: 1.8.6   2019/08/20
  7  */
  8 
  9 #ifndef _LINUX_LSM2CCSECURITY_H
 10 #define _LINUX_LSM2CCSECURITY_H
 11 
 12 #include <linux/version.h>
 13 #include <linux/uidgid.h>
 14 
 15 #ifdef CONFIG_CCSECURITY
 16 
 17 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
 18 int ccs_settime(const struct timespec64 *ts, const struct timezone *tz);
 19 #else
 20 int ccs_settime(const struct timespec *ts, const struct timezone *tz);
 21 #endif
 22 int ccs_sb_umount(struct vfsmount *mnt, int flags);
 23 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0)
 24 int ccs_inode_getattr(struct vfsmount *mnt, struct dentry *dentry);
 25 #else
 26 int ccs_inode_getattr(const struct path *path);
 27 #endif
 28 int ccs_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
 29 int ccs_file_fcntl(struct file *file, unsigned int cmd, unsigned long arg);
 30 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0) || (defined(RHEL_MAJOR) && RHEL_MAJOR == 8)
 31 int ccs_file_open(struct file *file);
 32 #else
 33 int ccs_file_open(struct file *file, const struct cred *cred);
 34 #endif
 35 int ccs_socket_create(int family, int type, int protocol, int kern);
 36 int ccs_socket_bind(struct socket *sock, struct sockaddr *address,
 37                     int addrlen);
 38 int ccs_socket_connect(struct socket *sock, struct sockaddr *address,
 39                        int addrlen);
 40 int ccs_socket_listen(struct socket *sock, int backlog);
 41 int ccs_socket_sendmsg(struct socket *sock, struct msghdr *msg, int size);
 42 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
 43 int ccs_path_chmod(const struct path *path, umode_t mode);
 44 int ccs_path_chown(const struct path *path, kuid_t uid, kgid_t gid);
 45 int ccs_path_chroot(const struct path *path);
 46 int ccs_path_link(struct dentry *old_dentry, const struct path *new_dir,
 47                   struct dentry *new_dentry);
 48 int ccs_path_mkdir(const struct path *dir, struct dentry *dentry,
 49                    umode_t mode);
 50 int ccs_path_mknod(const struct path *dir, struct dentry *dentry, umode_t mode,
 51                    unsigned int dev);
 52 int ccs_path_rename(const struct path *old_dir, struct dentry *old_dentry,
 53                     const struct path *new_dir, struct dentry *new_dentry);
 54 int ccs_path_rmdir(const struct path *dir, struct dentry *dentry);
 55 int ccs_path_symlink(const struct path *dir, struct dentry *dentry,
 56                      const char *old_name);
 57 int ccs_path_truncate(const struct path *path);
 58 int ccs_path_unlink(const struct path *dir, struct dentry *dentry);
 59 int ccs_sb_mount(const char *dev_name, const struct path *path,
 60                  const char *type, unsigned long flags, void *data);
 61 int ccs_sb_pivotroot(const struct path *old_path, const struct path *new_path);
 62 #else
 63 int ccs_path_chmod(struct path *path, umode_t mode);
 64 int ccs_path_chown(struct path *path, kuid_t uid, kgid_t gid);
 65 int ccs_path_chroot(struct path *path);
 66 int ccs_path_link(struct dentry *old_dentry, struct path *new_dir,
 67                   struct dentry *new_dentry);
 68 int ccs_path_mkdir(struct path *dir, struct dentry *dentry, umode_t mode);
 69 int ccs_path_mknod(struct path *dir, struct dentry *dentry, umode_t mode,
 70                    unsigned int dev);
 71 int ccs_path_rename(struct path *old_dir, struct dentry *old_dentry,
 72                     struct path *new_dir, struct dentry *new_dentry);
 73 int ccs_path_rmdir(struct path *dir, struct dentry *dentry);
 74 int ccs_path_symlink(struct path *dir, struct dentry *dentry,
 75                      const char *old_name);
 76 int ccs_path_truncate(struct path *path);
 77 int ccs_path_unlink(struct path *dir, struct dentry *dentry);
 78 int ccs_sb_mount(const char *dev_name, struct path *path, const char *type,
 79                  unsigned long flags, void *data);
 80 int ccs_sb_pivotroot(struct path *old_path, struct path *new_path);
 81 #endif
 82 
 83 #else
 84 
 85 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
 86 static inline int ccs_settime(const struct timespec64 *ts,
 87                               const struct timezone *tz)
 88 {
 89         return 0;
 90 }
 91 #else
 92 static inline int ccs_settime(const struct timespec *ts,
 93                               const struct timezone *tz)
 94 {
 95         return 0;
 96 }
 97 #endif
 98 static inline int ccs_sb_mount(const char *dev_name, const struct path *path,
 99                                const char *type, unsigned long flags,
100                                void *data)
101 {
102         return 0;
103 }
104 static inline int ccs_sb_umount(struct vfsmount *mnt, int flags)
105 {
106         return 0;
107 }
108 static inline int ccs_sb_pivotroot(const struct path *old_path,
109                                    const struct path *new_path)
110 {
111         return 0;
112 }
113 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0)
114 static inline int ccs_inode_getattr(struct vfsmount *mnt,
115                                     struct dentry *dentry)
116 {
117         return 0;
118 }
119 #else
120 static inline int ccs_inode_getattr(const struct path *path)
121 {
122         return 0;
123 }
124 #endif
125 static inline int ccs_file_ioctl(struct file *file, unsigned int cmd,
126                                  unsigned long arg)
127 {
128         return 0;
129 }
130 static inline int ccs_file_fcntl(struct file *file, unsigned int cmd,
131                                  unsigned long arg)
132 {
133         return 0;
134 }
135 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
136 static inline int ccs_file_open(struct file *file)
137 {
138         return 0;
139 }
140 #else
141 static inline int ccs_file_open(struct file *file, const struct cred *cred)
142 {
143         return 0;
144 }
145 #endif
146 static inline int ccs_socket_create(int family, int type, int protocol,
147                                     int kern)
148 {
149         return 0;
150 }
151 static inline int ccs_socket_bind(struct socket *sock,
152                                   struct sockaddr *address, int addrlen)
153 {
154         return 0;
155 }
156 static inline int ccs_socket_connect(struct socket *sock,
157                                      struct sockaddr *address, int addrlen)
158 {
159         return 0;
160 }
161 static inline int ccs_socket_listen(struct socket *sock, int backlog)
162 {
163         return 0;
164 }
165 static inline int ccs_socket_sendmsg(struct socket *sock, struct msghdr *msg,
166                                      int size)
167 {
168         return 0;
169 }
170 static inline int ccs_path_unlink(const struct path *dir,
171                                   struct dentry *dentry)
172 {
173         return 0;
174 }
175 static inline int ccs_path_mkdir(const struct path *dir, struct dentry *dentry,
176                                  umode_t mode)
177 {
178         return 0;
179 }
180 static inline int ccs_path_rmdir(const struct path *dir, struct dentry *dentry)
181 {
182         return 0;
183 }
184 static inline int ccs_path_mknod(const struct path *dir, struct dentry *dentry,
185                                  umode_t mode, unsigned int dev)
186 {
187         return 0;
188 }
189 static inline int ccs_path_truncate(const struct path *path)
190 {
191         return 0;
192 }
193 static inline int ccs_path_symlink(const struct path *dir,
194                                    struct dentry *dentry, const char *old_name)
195 {
196         return 0;
197 }
198 static inline int ccs_path_link(struct dentry *old_dentry,
199                                 const struct path *new_dir,
200                                 struct dentry *new_dentry)
201 {
202         return 0;
203 }
204 static inline int ccs_path_rename(const struct path *old_dir,
205                                   struct dentry *old_dentry,
206                                   const struct path *new_dir,
207                                   struct dentry *new_dentry)
208 {
209         return 0;
210 }
211 static inline int ccs_path_chmod(const struct path *path, umode_t mode)
212 {
213         return 0;
214 }
215 static inline int ccs_path_chown(const struct path *path, kuid_t uid,
216                                  kgid_t gid)
217 {
218         return 0;
219 }
220 static inline int ccs_path_chroot(const struct path *path)
221 {
222         return 0;
223 }
224 
225 #endif /* defined(CONFIG_CCSECURITY) */
226 
227 #endif /* !defined(_LINUX_LSM2CCSECURITY_H) */
228 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp