diff options
Diffstat (limited to 'include/linux/security.h')
| -rw-r--r-- | include/linux/security.h | 281 |
1 files changed, 66 insertions, 215 deletions
diff --git a/include/linux/security.h b/include/linux/security.h index 2c627d361c02..c642bb8b8f5a 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #define __LINUX_SECURITY_H | 23 | #define __LINUX_SECURITY_H |
| 24 | 24 | ||
| 25 | #include <linux/fs.h> | 25 | #include <linux/fs.h> |
| 26 | #include <linux/fsnotify.h> | ||
| 26 | #include <linux/binfmts.h> | 27 | #include <linux/binfmts.h> |
| 27 | #include <linux/signal.h> | 28 | #include <linux/signal.h> |
| 28 | #include <linux/resource.h> | 29 | #include <linux/resource.h> |
| @@ -33,7 +34,7 @@ | |||
| 33 | #include <linux/sched.h> | 34 | #include <linux/sched.h> |
| 34 | #include <linux/key.h> | 35 | #include <linux/key.h> |
| 35 | #include <linux/xfrm.h> | 36 | #include <linux/xfrm.h> |
| 36 | #include <linux/gfp.h> | 37 | #include <linux/slab.h> |
| 37 | #include <net/flow.h> | 38 | #include <net/flow.h> |
| 38 | 39 | ||
| 39 | /* Maximum number of letters for an LSM name string */ | 40 | /* Maximum number of letters for an LSM name string */ |
| @@ -73,10 +74,9 @@ extern int cap_file_mmap(struct file *file, unsigned long reqprot, | |||
| 73 | extern int cap_task_fix_setuid(struct cred *new, const struct cred *old, int flags); | 74 | extern int cap_task_fix_setuid(struct cred *new, const struct cred *old, int flags); |
| 74 | extern int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3, | 75 | extern int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3, |
| 75 | unsigned long arg4, unsigned long arg5); | 76 | unsigned long arg4, unsigned long arg5); |
| 76 | extern int cap_task_setscheduler(struct task_struct *p, int policy, struct sched_param *lp); | 77 | extern int cap_task_setscheduler(struct task_struct *p); |
| 77 | extern int cap_task_setioprio(struct task_struct *p, int ioprio); | 78 | extern int cap_task_setioprio(struct task_struct *p, int ioprio); |
| 78 | extern int cap_task_setnice(struct task_struct *p, int nice); | 79 | extern int cap_task_setnice(struct task_struct *p, int nice); |
| 79 | extern int cap_syslog(int type); | ||
| 80 | extern int cap_vm_enough_memory(struct mm_struct *mm, long pages); | 80 | extern int cap_vm_enough_memory(struct mm_struct *mm, long pages); |
| 81 | 81 | ||
| 82 | struct msghdr; | 82 | struct msghdr; |
| @@ -95,6 +95,8 @@ struct seq_file; | |||
| 95 | extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb); | 95 | extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb); |
| 96 | extern int cap_netlink_recv(struct sk_buff *skb, int cap); | 96 | extern int cap_netlink_recv(struct sk_buff *skb, int cap); |
| 97 | 97 | ||
| 98 | void reset_security_ops(void); | ||
| 99 | |||
| 98 | #ifdef CONFIG_MMU | 100 | #ifdef CONFIG_MMU |
| 99 | extern unsigned long mmap_min_addr; | 101 | extern unsigned long mmap_min_addr; |
| 100 | extern unsigned long dac_mmap_min_addr; | 102 | extern unsigned long dac_mmap_min_addr; |
| @@ -265,49 +267,16 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 265 | * @orig the original mount data copied from userspace. | 267 | * @orig the original mount data copied from userspace. |
| 266 | * @copy copied data which will be passed to the security module. | 268 | * @copy copied data which will be passed to the security module. |
| 267 | * Returns 0 if the copy was successful. | 269 | * Returns 0 if the copy was successful. |
| 268 | * @sb_check_sb: | ||
| 269 | * Check permission before the device with superblock @mnt->sb is mounted | ||
| 270 | * on the mount point named by @nd. | ||
| 271 | * @mnt contains the vfsmount for device being mounted. | ||
| 272 | * @path contains the path for the mount point. | ||
| 273 | * Return 0 if permission is granted. | ||
| 274 | * @sb_umount: | 270 | * @sb_umount: |
| 275 | * Check permission before the @mnt file system is unmounted. | 271 | * Check permission before the @mnt file system is unmounted. |
| 276 | * @mnt contains the mounted file system. | 272 | * @mnt contains the mounted file system. |
| 277 | * @flags contains the unmount flags, e.g. MNT_FORCE. | 273 | * @flags contains the unmount flags, e.g. MNT_FORCE. |
| 278 | * Return 0 if permission is granted. | 274 | * Return 0 if permission is granted. |
| 279 | * @sb_umount_close: | ||
| 280 | * Close any files in the @mnt mounted filesystem that are held open by | ||
| 281 | * the security module. This hook is called during an umount operation | ||
| 282 | * prior to checking whether the filesystem is still busy. | ||
| 283 | * @mnt contains the mounted filesystem. | ||
| 284 | * @sb_umount_busy: | ||
| 285 | * Handle a failed umount of the @mnt mounted filesystem, e.g. re-opening | ||
| 286 | * any files that were closed by umount_close. This hook is called during | ||
| 287 | * an umount operation if the umount fails after a call to the | ||
| 288 | * umount_close hook. | ||
| 289 | * @mnt contains the mounted filesystem. | ||
| 290 | * @sb_post_remount: | ||
| 291 | * Update the security module's state when a filesystem is remounted. | ||
| 292 | * This hook is only called if the remount was successful. | ||
| 293 | * @mnt contains the mounted file system. | ||
| 294 | * @flags contains the new filesystem flags. | ||
| 295 | * @data contains the filesystem-specific data. | ||
| 296 | * @sb_post_addmount: | ||
| 297 | * Update the security module's state when a filesystem is mounted. | ||
| 298 | * This hook is called any time a mount is successfully grafetd to | ||
| 299 | * the tree. | ||
| 300 | * @mnt contains the mounted filesystem. | ||
| 301 | * @mountpoint contains the path for the mount point. | ||
| 302 | * @sb_pivotroot: | 275 | * @sb_pivotroot: |
| 303 | * Check permission before pivoting the root filesystem. | 276 | * Check permission before pivoting the root filesystem. |
| 304 | * @old_path contains the path for the new location of the current root (put_old). | 277 | * @old_path contains the path for the new location of the current root (put_old). |
| 305 | * @new_path contains the path for the new root (new_root). | 278 | * @new_path contains the path for the new root (new_root). |
| 306 | * Return 0 if permission is granted. | 279 | * Return 0 if permission is granted. |
| 307 | * @sb_post_pivotroot: | ||
| 308 | * Update module state after a successful pivot. | ||
| 309 | * @old_path contains the path for the old root. | ||
| 310 | * @new_path contains the path for the new root. | ||
| 311 | * @sb_set_mnt_opts: | 280 | * @sb_set_mnt_opts: |
| 312 | * Set the security relevant mount options used for a superblock | 281 | * Set the security relevant mount options used for a superblock |
| 313 | * @sb the superblock to set security mount options for | 282 | * @sb the superblock to set security mount options for |
| @@ -488,7 +457,6 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 488 | * called when the actual read/write operations are performed. | 457 | * called when the actual read/write operations are performed. |
| 489 | * @inode contains the inode structure to check. | 458 | * @inode contains the inode structure to check. |
| 490 | * @mask contains the permission mask. | 459 | * @mask contains the permission mask. |
| 491 | * @nd contains the nameidata (may be NULL). | ||
| 492 | * Return 0 if permission is granted. | 460 | * Return 0 if permission is granted. |
| 493 | * @inode_setattr: | 461 | * @inode_setattr: |
| 494 | * Check permission before setting file attributes. Note that the kernel | 462 | * Check permission before setting file attributes. Note that the kernel |
| @@ -501,20 +469,12 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 501 | * @path_truncate: | 469 | * @path_truncate: |
| 502 | * Check permission before truncating a file. | 470 | * Check permission before truncating a file. |
| 503 | * @path contains the path structure for the file. | 471 | * @path contains the path structure for the file. |
| 504 | * @length is the new length of the file. | ||
| 505 | * @time_attrs is the flags passed to do_truncate(). | ||
| 506 | * Return 0 if permission is granted. | 472 | * Return 0 if permission is granted. |
| 507 | * @inode_getattr: | 473 | * @inode_getattr: |
| 508 | * Check permission before obtaining file attributes. | 474 | * Check permission before obtaining file attributes. |
| 509 | * @mnt is the vfsmount where the dentry was looked up | 475 | * @mnt is the vfsmount where the dentry was looked up |
| 510 | * @dentry contains the dentry structure for the file. | 476 | * @dentry contains the dentry structure for the file. |
| 511 | * Return 0 if permission is granted. | 477 | * Return 0 if permission is granted. |
| 512 | * @inode_delete: | ||
| 513 | * @inode contains the inode structure for deleted inode. | ||
| 514 | * This hook is called when a deleted inode is released (i.e. an inode | ||
| 515 | * with no hard links has its use count drop to zero). A security module | ||
| 516 | * can use this hook to release any persistent label associated with the | ||
| 517 | * inode. | ||
| 518 | * @inode_setxattr: | 478 | * @inode_setxattr: |
| 519 | * Check permission before setting the extended attributes | 479 | * Check permission before setting the extended attributes |
| 520 | * @value identified by @name for @dentry. | 480 | * @value identified by @name for @dentry. |
| @@ -689,10 +649,6 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 689 | * @old points to the original credentials. | 649 | * @old points to the original credentials. |
| 690 | * @gfp indicates the atomicity of any memory allocations. | 650 | * @gfp indicates the atomicity of any memory allocations. |
| 691 | * Prepare a new set of credentials by copying the data from the old set. | 651 | * Prepare a new set of credentials by copying the data from the old set. |
| 692 | * @cred_commit: | ||
| 693 | * @new points to the new credentials. | ||
| 694 | * @old points to the original credentials. | ||
| 695 | * Install a new set of credentials. | ||
| 696 | * @cred_transfer: | 652 | * @cred_transfer: |
| 697 | * @new points to the new credentials. | 653 | * @new points to the new credentials. |
| 698 | * @old points to the original credentials. | 654 | * @old points to the original credentials. |
| @@ -715,18 +671,6 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 715 | * userspace to load a kernel module with the given name. | 671 | * userspace to load a kernel module with the given name. |
| 716 | * @kmod_name name of the module requested by the kernel | 672 | * @kmod_name name of the module requested by the kernel |
| 717 | * Return 0 if successful. | 673 | * Return 0 if successful. |
| 718 | * @task_setuid: | ||
| 719 | * Check permission before setting one or more of the user identity | ||
| 720 | * attributes of the current process. The @flags parameter indicates | ||
| 721 | * which of the set*uid system calls invoked this hook and how to | ||
| 722 | * interpret the @id0, @id1, and @id2 parameters. See the LSM_SETID | ||
| 723 | * definitions at the beginning of this file for the @flags values and | ||
| 724 | * their meanings. | ||
| 725 | * @id0 contains a uid. | ||
| 726 | * @id1 contains a uid. | ||
| 727 | * @id2 contains a uid. | ||
| 728 | * @flags contains one of the LSM_SETID_* values. | ||
| 729 | * Return 0 if permission is granted. | ||
| 730 | * @task_fix_setuid: | 674 | * @task_fix_setuid: |
| 731 | * Update the module's state after setting one or more of the user | 675 | * Update the module's state after setting one or more of the user |
| 732 | * identity attributes of the current process. The @flags parameter | 676 | * identity attributes of the current process. The @flags parameter |
| @@ -736,18 +680,6 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 736 | * @old is the set of credentials that are being replaces | 680 | * @old is the set of credentials that are being replaces |
| 737 | * @flags contains one of the LSM_SETID_* values. | 681 | * @flags contains one of the LSM_SETID_* values. |
| 738 | * Return 0 on success. | 682 | * Return 0 on success. |
| 739 | * @task_setgid: | ||
| 740 | * Check permission before setting one or more of the group identity | ||
| 741 | * attributes of the current process. The @flags parameter indicates | ||
| 742 | * which of the set*gid system calls invoked this hook and how to | ||
| 743 | * interpret the @id0, @id1, and @id2 parameters. See the LSM_SETID | ||
| 744 | * definitions at the beginning of this file for the @flags values and | ||
| 745 | * their meanings. | ||
| 746 | * @id0 contains a gid. | ||
| 747 | * @id1 contains a gid. | ||
| 748 | * @id2 contains a gid. | ||
| 749 | * @flags contains one of the LSM_SETID_* values. | ||
| 750 | * Return 0 if permission is granted. | ||
| 751 | * @task_setpgid: | 683 | * @task_setpgid: |
| 752 | * Check permission before setting the process group identifier of the | 684 | * Check permission before setting the process group identifier of the |
| 753 | * process @p to @pgid. | 685 | * process @p to @pgid. |
| @@ -769,11 +701,6 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 769 | * @p contains the task_struct for the process and place is into @secid. | 701 | * @p contains the task_struct for the process and place is into @secid. |
| 770 | * In case of failure, @secid will be set to zero. | 702 | * In case of failure, @secid will be set to zero. |
| 771 | * | 703 | * |
| 772 | * @task_setgroups: | ||
| 773 | * Check permission before setting the supplementary group set of the | ||
| 774 | * current process. | ||
| 775 | * @group_info contains the new group information. | ||
| 776 | * Return 0 if permission is granted. | ||
| 777 | * @task_setnice: | 704 | * @task_setnice: |
| 778 | * Check permission before setting the nice value of @p to @nice. | 705 | * Check permission before setting the nice value of @p to @nice. |
| 779 | * @p contains the task_struct of process. | 706 | * @p contains the task_struct of process. |
| @@ -868,8 +795,9 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 868 | * @unix_stream_connect: | 795 | * @unix_stream_connect: |
| 869 | * Check permissions before establishing a Unix domain stream connection | 796 | * Check permissions before establishing a Unix domain stream connection |
| 870 | * between @sock and @other. | 797 | * between @sock and @other. |
| 871 | * @sock contains the socket structure. | 798 | * @sock contains the sock structure. |
| 872 | * @other contains the peer socket structure. | 799 | * @other contains the peer sock structure. |
| 800 | * @newsk contains the new sock structure. | ||
| 873 | * Return 0 if permission is granted. | 801 | * Return 0 if permission is granted. |
| 874 | * @unix_may_send: | 802 | * @unix_may_send: |
| 875 | * Check permissions before connecting or sending datagrams from @sock to | 803 | * Check permissions before connecting or sending datagrams from @sock to |
| @@ -985,6 +913,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 985 | * Check permissions on incoming network packets. This hook is distinct | 913 | * Check permissions on incoming network packets. This hook is distinct |
| 986 | * from Netfilter's IP input hooks since it is the first time that the | 914 | * from Netfilter's IP input hooks since it is the first time that the |
| 987 | * incoming sk_buff @skb has been associated with a particular socket, @sk. | 915 | * incoming sk_buff @skb has been associated with a particular socket, @sk. |
| 916 | * Must not sleep inside this hook because some callers hold spinlocks. | ||
| 988 | * @sk contains the sock (not socket) associated with the incoming sk_buff. | 917 | * @sk contains the sock (not socket) associated with the incoming sk_buff. |
| 989 | * @skb contains the incoming network data. | 918 | * @skb contains the incoming network data. |
| 990 | * @socket_getpeersec_stream: | 919 | * @socket_getpeersec_stream: |
| @@ -1029,6 +958,12 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 1029 | * Sets the new child socket's sid to the openreq sid. | 958 | * Sets the new child socket's sid to the openreq sid. |
| 1030 | * @inet_conn_established: | 959 | * @inet_conn_established: |
| 1031 | * Sets the connection's peersid to the secmark on skb. | 960 | * Sets the connection's peersid to the secmark on skb. |
| 961 | * @secmark_relabel_packet: | ||
| 962 | * check if the process should be allowed to relabel packets to the given secid | ||
| 963 | * @security_secmark_refcount_inc | ||
| 964 | * tells the LSM to increment the number of secmark labeling rules loaded | ||
| 965 | * @security_secmark_refcount_dec | ||
| 966 | * tells the LSM to decrement the number of secmark labeling rules loaded | ||
| 1032 | * @req_classify_flow: | 967 | * @req_classify_flow: |
| 1033 | * Sets the flow's sid to the openreq sid. | 968 | * Sets the flow's sid to the openreq sid. |
| 1034 | * @tun_dev_create: | 969 | * @tun_dev_create: |
| @@ -1123,8 +1058,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 1123 | * @cred points to the credentials to provide the context against which to | 1058 | * @cred points to the credentials to provide the context against which to |
| 1124 | * evaluate the security data on the key. | 1059 | * evaluate the security data on the key. |
| 1125 | * @perm describes the combination of permissions required of this key. | 1060 | * @perm describes the combination of permissions required of this key. |
| 1126 | * Return 1 if permission granted, 0 if permission denied and -ve it the | 1061 | * Return 0 if permission is granted, -ve error otherwise. |
| 1127 | * normal permissions model should be effected. | ||
| 1128 | * @key_getsecurity: | 1062 | * @key_getsecurity: |
| 1129 | * Get a textual representation of the security context attached to a key | 1063 | * Get a textual representation of the security context attached to a key |
| 1130 | * for the purposes of honouring KEYCTL_GETSECURITY. This function | 1064 | * for the purposes of honouring KEYCTL_GETSECURITY. This function |
| @@ -1136,13 +1070,6 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 1136 | * Return the length of the string (including terminating NUL) or -ve if | 1070 | * Return the length of the string (including terminating NUL) or -ve if |
| 1137 | * an error. | 1071 | * an error. |
| 1138 | * May also return 0 (and a NULL buffer pointer) if there is no label. | 1072 | * May also return 0 (and a NULL buffer pointer) if there is no label. |
| 1139 | * @key_session_to_parent: | ||
| 1140 | * Forcibly assign the session keyring from a process to its parent | ||
| 1141 | * process. | ||
| 1142 | * @cred: Pointer to process's credentials | ||
| 1143 | * @parent_cred: Pointer to parent process's credentials | ||
| 1144 | * @keyring: Proposed new session keyring | ||
| 1145 | * Return 0 if permission is granted, -ve error otherwise. | ||
| 1146 | * | 1073 | * |
| 1147 | * Security hooks affecting all System V IPC operations. | 1074 | * Security hooks affecting all System V IPC operations. |
| 1148 | * | 1075 | * |
| @@ -1330,13 +1257,6 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 1330 | * @cap contains the capability <include/linux/capability.h>. | 1257 | * @cap contains the capability <include/linux/capability.h>. |
| 1331 | * @audit: Whether to write an audit message or not | 1258 | * @audit: Whether to write an audit message or not |
| 1332 | * Return 0 if the capability is granted for @tsk. | 1259 | * Return 0 if the capability is granted for @tsk. |
| 1333 | * @acct: | ||
| 1334 | * Check permission before enabling or disabling process accounting. If | ||
| 1335 | * accounting is being enabled, then @file refers to the open file used to | ||
| 1336 | * store accounting records. If accounting is being disabled, then @file | ||
| 1337 | * is NULL. | ||
| 1338 | * @file contains the file structure for the accounting file (may be NULL). | ||
| 1339 | * Return 0 if permission is granted. | ||
| 1340 | * @sysctl: | 1260 | * @sysctl: |
| 1341 | * Check permission before accessing the @table sysctl variable in the | 1261 | * Check permission before accessing the @table sysctl variable in the |
| 1342 | * manner specified by @op. | 1262 | * manner specified by @op. |
| @@ -1348,6 +1268,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 1348 | * logging to the console. | 1268 | * logging to the console. |
| 1349 | * See the syslog(2) manual page for an explanation of the @type values. | 1269 | * See the syslog(2) manual page for an explanation of the @type values. |
| 1350 | * @type contains the type of action. | 1270 | * @type contains the type of action. |
| 1271 | * @from_file indicates the context of action (if it came from /proc). | ||
| 1351 | * Return 0 if permission is granted. | 1272 | * Return 0 if permission is granted. |
| 1352 | * @settime: | 1273 | * @settime: |
| 1353 | * Check permission to change the system time. | 1274 | * Check permission to change the system time. |
| @@ -1362,9 +1283,13 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 1362 | * Return 0 if permission is granted. | 1283 | * Return 0 if permission is granted. |
| 1363 | * | 1284 | * |
| 1364 | * @secid_to_secctx: | 1285 | * @secid_to_secctx: |
| 1365 | * Convert secid to security context. | 1286 | * Convert secid to security context. If secdata is NULL the length of |
| 1287 | * the result will be returned in seclen, but no secdata will be returned. | ||
| 1288 | * This does mean that the length could change between calls to check the | ||
| 1289 | * length and the next call which actually allocates and returns the secdata. | ||
| 1366 | * @secid contains the security ID. | 1290 | * @secid contains the security ID. |
| 1367 | * @secdata contains the pointer that stores the converted security context. | 1291 | * @secdata contains the pointer that stores the converted security context. |
| 1292 | * @seclen pointer which contains the length of the data | ||
| 1368 | * @secctx_to_secid: | 1293 | * @secctx_to_secid: |
| 1369 | * Convert security context to secid. | 1294 | * Convert security context to secid. |
| 1370 | * @secid contains the pointer to the generated security ID. | 1295 | * @secid contains the pointer to the generated security ID. |
| @@ -1458,7 +1383,6 @@ struct security_operations { | |||
| 1458 | const kernel_cap_t *permitted); | 1383 | const kernel_cap_t *permitted); |
| 1459 | int (*capable) (struct task_struct *tsk, const struct cred *cred, | 1384 | int (*capable) (struct task_struct *tsk, const struct cred *cred, |
| 1460 | int cap, int audit); | 1385 | int cap, int audit); |
| 1461 | int (*acct) (struct file *file); | ||
| 1462 | int (*sysctl) (struct ctl_table *table, int op); | 1386 | int (*sysctl) (struct ctl_table *table, int op); |
| 1463 | int (*quotactl) (int cmds, int type, int id, struct super_block *sb); | 1387 | int (*quotactl) (int cmds, int type, int id, struct super_block *sb); |
| 1464 | int (*quota_on) (struct dentry *dentry); | 1388 | int (*quota_on) (struct dentry *dentry); |
| @@ -1480,18 +1404,9 @@ struct security_operations { | |||
| 1480 | int (*sb_statfs) (struct dentry *dentry); | 1404 | int (*sb_statfs) (struct dentry *dentry); |
| 1481 | int (*sb_mount) (char *dev_name, struct path *path, | 1405 | int (*sb_mount) (char *dev_name, struct path *path, |
| 1482 | char *type, unsigned long flags, void *data); | 1406 | char *type, unsigned long flags, void *data); |
| 1483 | int (*sb_check_sb) (struct vfsmount *mnt, struct path *path); | ||
| 1484 | int (*sb_umount) (struct vfsmount *mnt, int flags); | 1407 | int (*sb_umount) (struct vfsmount *mnt, int flags); |
| 1485 | void (*sb_umount_close) (struct vfsmount *mnt); | ||
| 1486 | void (*sb_umount_busy) (struct vfsmount *mnt); | ||
| 1487 | void (*sb_post_remount) (struct vfsmount *mnt, | ||
| 1488 | unsigned long flags, void *data); | ||
| 1489 | void (*sb_post_addmount) (struct vfsmount *mnt, | ||
| 1490 | struct path *mountpoint); | ||
| 1491 | int (*sb_pivotroot) (struct path *old_path, | 1408 | int (*sb_pivotroot) (struct path *old_path, |
| 1492 | struct path *new_path); | 1409 | struct path *new_path); |
| 1493 | void (*sb_post_pivotroot) (struct path *old_path, | ||
| 1494 | struct path *new_path); | ||
| 1495 | int (*sb_set_mnt_opts) (struct super_block *sb, | 1410 | int (*sb_set_mnt_opts) (struct super_block *sb, |
| 1496 | struct security_mnt_opts *opts); | 1411 | struct security_mnt_opts *opts); |
| 1497 | void (*sb_clone_mnt_opts) (const struct super_block *oldsb, | 1412 | void (*sb_clone_mnt_opts) (const struct super_block *oldsb, |
| @@ -1504,8 +1419,7 @@ struct security_operations { | |||
| 1504 | int (*path_rmdir) (struct path *dir, struct dentry *dentry); | 1419 | int (*path_rmdir) (struct path *dir, struct dentry *dentry); |
| 1505 | int (*path_mknod) (struct path *dir, struct dentry *dentry, int mode, | 1420 | int (*path_mknod) (struct path *dir, struct dentry *dentry, int mode, |
| 1506 | unsigned int dev); | 1421 | unsigned int dev); |
| 1507 | int (*path_truncate) (struct path *path, loff_t length, | 1422 | int (*path_truncate) (struct path *path); |
| 1508 | unsigned int time_attrs); | ||
| 1509 | int (*path_symlink) (struct path *dir, struct dentry *dentry, | 1423 | int (*path_symlink) (struct path *dir, struct dentry *dentry, |
| 1510 | const char *old_name); | 1424 | const char *old_name); |
| 1511 | int (*path_link) (struct dentry *old_dentry, struct path *new_dir, | 1425 | int (*path_link) (struct dentry *old_dentry, struct path *new_dir, |
| @@ -1540,7 +1454,6 @@ struct security_operations { | |||
| 1540 | int (*inode_permission) (struct inode *inode, int mask); | 1454 | int (*inode_permission) (struct inode *inode, int mask); |
| 1541 | int (*inode_setattr) (struct dentry *dentry, struct iattr *attr); | 1455 | int (*inode_setattr) (struct dentry *dentry, struct iattr *attr); |
| 1542 | int (*inode_getattr) (struct vfsmount *mnt, struct dentry *dentry); | 1456 | int (*inode_getattr) (struct vfsmount *mnt, struct dentry *dentry); |
| 1543 | void (*inode_delete) (struct inode *inode); | ||
| 1544 | int (*inode_setxattr) (struct dentry *dentry, const char *name, | 1457 | int (*inode_setxattr) (struct dentry *dentry, const char *name, |
| 1545 | const void *value, size_t size, int flags); | 1458 | const void *value, size_t size, int flags); |
| 1546 | void (*inode_post_setxattr) (struct dentry *dentry, const char *name, | 1459 | void (*inode_post_setxattr) (struct dentry *dentry, const char *name, |
| @@ -1581,26 +1494,22 @@ struct security_operations { | |||
| 1581 | void (*cred_free) (struct cred *cred); | 1494 | void (*cred_free) (struct cred *cred); |
| 1582 | int (*cred_prepare)(struct cred *new, const struct cred *old, | 1495 | int (*cred_prepare)(struct cred *new, const struct cred *old, |
| 1583 | gfp_t gfp); | 1496 | gfp_t gfp); |
| 1584 | void (*cred_commit)(struct cred *new, const struct cred *old); | ||
| 1585 | void (*cred_transfer)(struct cred *new, const struct cred *old); | 1497 | void (*cred_transfer)(struct cred *new, const struct cred *old); |
| 1586 | int (*kernel_act_as)(struct cred *new, u32 secid); | 1498 | int (*kernel_act_as)(struct cred *new, u32 secid); |
| 1587 | int (*kernel_create_files_as)(struct cred *new, struct inode *inode); | 1499 | int (*kernel_create_files_as)(struct cred *new, struct inode *inode); |
| 1588 | int (*kernel_module_request)(char *kmod_name); | 1500 | int (*kernel_module_request)(char *kmod_name); |
| 1589 | int (*task_setuid) (uid_t id0, uid_t id1, uid_t id2, int flags); | ||
| 1590 | int (*task_fix_setuid) (struct cred *new, const struct cred *old, | 1501 | int (*task_fix_setuid) (struct cred *new, const struct cred *old, |
| 1591 | int flags); | 1502 | int flags); |
| 1592 | int (*task_setgid) (gid_t id0, gid_t id1, gid_t id2, int flags); | ||
| 1593 | int (*task_setpgid) (struct task_struct *p, pid_t pgid); | 1503 | int (*task_setpgid) (struct task_struct *p, pid_t pgid); |
| 1594 | int (*task_getpgid) (struct task_struct *p); | 1504 | int (*task_getpgid) (struct task_struct *p); |
| 1595 | int (*task_getsid) (struct task_struct *p); | 1505 | int (*task_getsid) (struct task_struct *p); |
| 1596 | void (*task_getsecid) (struct task_struct *p, u32 *secid); | 1506 | void (*task_getsecid) (struct task_struct *p, u32 *secid); |
| 1597 | int (*task_setgroups) (struct group_info *group_info); | ||
| 1598 | int (*task_setnice) (struct task_struct *p, int nice); | 1507 | int (*task_setnice) (struct task_struct *p, int nice); |
| 1599 | int (*task_setioprio) (struct task_struct *p, int ioprio); | 1508 | int (*task_setioprio) (struct task_struct *p, int ioprio); |
| 1600 | int (*task_getioprio) (struct task_struct *p); | 1509 | int (*task_getioprio) (struct task_struct *p); |
| 1601 | int (*task_setrlimit) (unsigned int resource, struct rlimit *new_rlim); | 1510 | int (*task_setrlimit) (struct task_struct *p, unsigned int resource, |
| 1602 | int (*task_setscheduler) (struct task_struct *p, int policy, | 1511 | struct rlimit *new_rlim); |
| 1603 | struct sched_param *lp); | 1512 | int (*task_setscheduler) (struct task_struct *p); |
| 1604 | int (*task_getscheduler) (struct task_struct *p); | 1513 | int (*task_getscheduler) (struct task_struct *p); |
| 1605 | int (*task_movememory) (struct task_struct *p); | 1514 | int (*task_movememory) (struct task_struct *p); |
| 1606 | int (*task_kill) (struct task_struct *p, | 1515 | int (*task_kill) (struct task_struct *p, |
| @@ -1658,8 +1567,7 @@ struct security_operations { | |||
| 1658 | int (*inode_getsecctx)(struct inode *inode, void **ctx, u32 *ctxlen); | 1567 | int (*inode_getsecctx)(struct inode *inode, void **ctx, u32 *ctxlen); |
| 1659 | 1568 | ||
| 1660 | #ifdef CONFIG_SECURITY_NETWORK | 1569 | #ifdef CONFIG_SECURITY_NETWORK |
| 1661 | int (*unix_stream_connect) (struct socket *sock, | 1570 | int (*unix_stream_connect) (struct sock *sock, struct sock *other, struct sock *newsk); |
| 1662 | struct socket *other, struct sock *newsk); | ||
| 1663 | int (*unix_may_send) (struct socket *sock, struct socket *other); | 1571 | int (*unix_may_send) (struct socket *sock, struct socket *other); |
| 1664 | 1572 | ||
| 1665 | int (*socket_create) (int family, int type, int protocol, int kern); | 1573 | int (*socket_create) (int family, int type, int protocol, int kern); |
| @@ -1692,6 +1600,9 @@ struct security_operations { | |||
| 1692 | struct request_sock *req); | 1600 | struct request_sock *req); |
| 1693 | void (*inet_csk_clone) (struct sock *newsk, const struct request_sock *req); | 1601 | void (*inet_csk_clone) (struct sock *newsk, const struct request_sock *req); |
| 1694 | void (*inet_conn_established) (struct sock *sk, struct sk_buff *skb); | 1602 | void (*inet_conn_established) (struct sock *sk, struct sk_buff *skb); |
| 1603 | int (*secmark_relabel_packet) (u32 secid); | ||
| 1604 | void (*secmark_refcount_inc) (void); | ||
| 1605 | void (*secmark_refcount_dec) (void); | ||
| 1695 | void (*req_classify_flow) (const struct request_sock *req, struct flowi *fl); | 1606 | void (*req_classify_flow) (const struct request_sock *req, struct flowi *fl); |
| 1696 | int (*tun_dev_create)(void); | 1607 | int (*tun_dev_create)(void); |
| 1697 | void (*tun_dev_post_create)(struct sock *sk); | 1608 | void (*tun_dev_post_create)(struct sock *sk); |
| @@ -1724,9 +1635,6 @@ struct security_operations { | |||
| 1724 | const struct cred *cred, | 1635 | const struct cred *cred, |
| 1725 | key_perm_t perm); | 1636 | key_perm_t perm); |
| 1726 | int (*key_getsecurity)(struct key *key, char **_buffer); | 1637 | int (*key_getsecurity)(struct key *key, char **_buffer); |
| 1727 | int (*key_session_to_parent)(const struct cred *cred, | ||
| 1728 | const struct cred *parent_cred, | ||
| 1729 | struct key *key); | ||
| 1730 | #endif /* CONFIG_KEYS */ | 1638 | #endif /* CONFIG_KEYS */ |
| 1731 | 1639 | ||
| 1732 | #ifdef CONFIG_AUDIT | 1640 | #ifdef CONFIG_AUDIT |
| @@ -1757,7 +1665,6 @@ int security_capset(struct cred *new, const struct cred *old, | |||
| 1757 | int security_capable(int cap); | 1665 | int security_capable(int cap); |
| 1758 | int security_real_capable(struct task_struct *tsk, int cap); | 1666 | int security_real_capable(struct task_struct *tsk, int cap); |
| 1759 | int security_real_capable_noaudit(struct task_struct *tsk, int cap); | 1667 | int security_real_capable_noaudit(struct task_struct *tsk, int cap); |
| 1760 | int security_acct(struct file *file); | ||
| 1761 | int security_sysctl(struct ctl_table *table, int op); | 1668 | int security_sysctl(struct ctl_table *table, int op); |
| 1762 | int security_quotactl(int cmds, int type, int id, struct super_block *sb); | 1669 | int security_quotactl(int cmds, int type, int id, struct super_block *sb); |
| 1763 | int security_quota_on(struct dentry *dentry); | 1670 | int security_quota_on(struct dentry *dentry); |
| @@ -1779,14 +1686,8 @@ int security_sb_show_options(struct seq_file *m, struct super_block *sb); | |||
| 1779 | int security_sb_statfs(struct dentry *dentry); | 1686 | int security_sb_statfs(struct dentry *dentry); |
| 1780 | int security_sb_mount(char *dev_name, struct path *path, | 1687 | int security_sb_mount(char *dev_name, struct path *path, |
| 1781 | char *type, unsigned long flags, void *data); | 1688 | char *type, unsigned long flags, void *data); |
| 1782 | int security_sb_check_sb(struct vfsmount *mnt, struct path *path); | ||
| 1783 | int security_sb_umount(struct vfsmount *mnt, int flags); | 1689 | int security_sb_umount(struct vfsmount *mnt, int flags); |
| 1784 | void security_sb_umount_close(struct vfsmount *mnt); | ||
| 1785 | void security_sb_umount_busy(struct vfsmount *mnt); | ||
| 1786 | void security_sb_post_remount(struct vfsmount *mnt, unsigned long flags, void *data); | ||
| 1787 | void security_sb_post_addmount(struct vfsmount *mnt, struct path *mountpoint); | ||
| 1788 | int security_sb_pivotroot(struct path *old_path, struct path *new_path); | 1690 | int security_sb_pivotroot(struct path *old_path, struct path *new_path); |
| 1789 | void security_sb_post_pivotroot(struct path *old_path, struct path *new_path); | ||
| 1790 | int security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts); | 1691 | int security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts); |
| 1791 | void security_sb_clone_mnt_opts(const struct super_block *oldsb, | 1692 | void security_sb_clone_mnt_opts(const struct super_block *oldsb, |
| 1792 | struct super_block *newsb); | 1693 | struct super_block *newsb); |
| @@ -1810,9 +1711,9 @@ int security_inode_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
| 1810 | int security_inode_readlink(struct dentry *dentry); | 1711 | int security_inode_readlink(struct dentry *dentry); |
| 1811 | int security_inode_follow_link(struct dentry *dentry, struct nameidata *nd); | 1712 | int security_inode_follow_link(struct dentry *dentry, struct nameidata *nd); |
| 1812 | int security_inode_permission(struct inode *inode, int mask); | 1713 | int security_inode_permission(struct inode *inode, int mask); |
| 1714 | int security_inode_exec_permission(struct inode *inode, unsigned int flags); | ||
| 1813 | int security_inode_setattr(struct dentry *dentry, struct iattr *attr); | 1715 | int security_inode_setattr(struct dentry *dentry, struct iattr *attr); |
| 1814 | int security_inode_getattr(struct vfsmount *mnt, struct dentry *dentry); | 1716 | int security_inode_getattr(struct vfsmount *mnt, struct dentry *dentry); |
| 1815 | void security_inode_delete(struct inode *inode); | ||
| 1816 | int security_inode_setxattr(struct dentry *dentry, const char *name, | 1717 | int security_inode_setxattr(struct dentry *dentry, const char *name, |
| 1817 | const void *value, size_t size, int flags); | 1718 | const void *value, size_t size, int flags); |
| 1818 | void security_inode_post_setxattr(struct dentry *dentry, const char *name, | 1719 | void security_inode_post_setxattr(struct dentry *dentry, const char *name, |
| @@ -1846,26 +1747,22 @@ int security_task_create(unsigned long clone_flags); | |||
| 1846 | int security_cred_alloc_blank(struct cred *cred, gfp_t gfp); | 1747 | int security_cred_alloc_blank(struct cred *cred, gfp_t gfp); |
| 1847 | void security_cred_free(struct cred *cred); | 1748 | void security_cred_free(struct cred *cred); |
| 1848 | int security_prepare_creds(struct cred *new, const struct cred *old, gfp_t gfp); | 1749 | int security_prepare_creds(struct cred *new, const struct cred *old, gfp_t gfp); |
| 1849 | void security_commit_creds(struct cred *new, const struct cred *old); | ||
| 1850 | void security_transfer_creds(struct cred *new, const struct cred *old); | 1750 | void security_transfer_creds(struct cred *new, const struct cred *old); |
| 1851 | int security_kernel_act_as(struct cred *new, u32 secid); | 1751 | int security_kernel_act_as(struct cred *new, u32 secid); |
| 1852 | int security_kernel_create_files_as(struct cred *new, struct inode *inode); | 1752 | int security_kernel_create_files_as(struct cred *new, struct inode *inode); |
| 1853 | int security_kernel_module_request(char *kmod_name); | 1753 | int security_kernel_module_request(char *kmod_name); |
| 1854 | int security_task_setuid(uid_t id0, uid_t id1, uid_t id2, int flags); | ||
| 1855 | int security_task_fix_setuid(struct cred *new, const struct cred *old, | 1754 | int security_task_fix_setuid(struct cred *new, const struct cred *old, |
| 1856 | int flags); | 1755 | int flags); |
| 1857 | int security_task_setgid(gid_t id0, gid_t id1, gid_t id2, int flags); | ||
| 1858 | int security_task_setpgid(struct task_struct *p, pid_t pgid); | 1756 | int security_task_setpgid(struct task_struct *p, pid_t pgid); |
| 1859 | int security_task_getpgid(struct task_struct *p); | 1757 | int security_task_getpgid(struct task_struct *p); |
| 1860 | int security_task_getsid(struct task_struct *p); | 1758 | int security_task_getsid(struct task_struct *p); |
| 1861 | void security_task_getsecid(struct task_struct *p, u32 *secid); | 1759 | void security_task_getsecid(struct task_struct *p, u32 *secid); |
| 1862 | int security_task_setgroups(struct group_info *group_info); | ||
| 1863 | int security_task_setnice(struct task_struct *p, int nice); | 1760 | int security_task_setnice(struct task_struct *p, int nice); |
| 1864 | int security_task_setioprio(struct task_struct *p, int ioprio); | 1761 | int security_task_setioprio(struct task_struct *p, int ioprio); |
| 1865 | int security_task_getioprio(struct task_struct *p); | 1762 | int security_task_getioprio(struct task_struct *p); |
| 1866 | int security_task_setrlimit(unsigned int resource, struct rlimit *new_rlim); | 1763 | int security_task_setrlimit(struct task_struct *p, unsigned int resource, |
| 1867 | int security_task_setscheduler(struct task_struct *p, | 1764 | struct rlimit *new_rlim); |
| 1868 | int policy, struct sched_param *lp); | 1765 | int security_task_setscheduler(struct task_struct *p); |
| 1869 | int security_task_getscheduler(struct task_struct *p); | 1766 | int security_task_getscheduler(struct task_struct *p); |
| 1870 | int security_task_movememory(struct task_struct *p); | 1767 | int security_task_movememory(struct task_struct *p); |
| 1871 | int security_task_kill(struct task_struct *p, struct siginfo *info, | 1768 | int security_task_kill(struct task_struct *p, struct siginfo *info, |
| @@ -1986,11 +1883,6 @@ int security_real_capable_noaudit(struct task_struct *tsk, int cap) | |||
| 1986 | return ret; | 1883 | return ret; |
| 1987 | } | 1884 | } |
| 1988 | 1885 | ||
| 1989 | static inline int security_acct(struct file *file) | ||
| 1990 | { | ||
| 1991 | return 0; | ||
| 1992 | } | ||
| 1993 | |||
| 1994 | static inline int security_sysctl(struct ctl_table *table, int op) | 1886 | static inline int security_sysctl(struct ctl_table *table, int op) |
| 1995 | { | 1887 | { |
| 1996 | return 0; | 1888 | return 0; |
| @@ -2009,7 +1901,7 @@ static inline int security_quota_on(struct dentry *dentry) | |||
| 2009 | 1901 | ||
| 2010 | static inline int security_syslog(int type) | 1902 | static inline int security_syslog(int type) |
| 2011 | { | 1903 | { |
| 2012 | return cap_syslog(type); | 1904 | return 0; |
| 2013 | } | 1905 | } |
| 2014 | 1906 | ||
| 2015 | static inline int security_settime(struct timespec *ts, struct timezone *tz) | 1907 | static inline int security_settime(struct timespec *ts, struct timezone *tz) |
| @@ -2095,41 +1987,17 @@ static inline int security_sb_mount(char *dev_name, struct path *path, | |||
| 2095 | return 0; | 1987 | return 0; |
| 2096 | } | 1988 | } |
| 2097 | 1989 | ||
| 2098 | static inline int security_sb_check_sb(struct vfsmount *mnt, | ||
| 2099 | struct path *path) | ||
| 2100 | { | ||
| 2101 | return 0; | ||
| 2102 | } | ||
| 2103 | |||
| 2104 | static inline int security_sb_umount(struct vfsmount *mnt, int flags) | 1990 | static inline int security_sb_umount(struct vfsmount *mnt, int flags) |
| 2105 | { | 1991 | { |
| 2106 | return 0; | 1992 | return 0; |
| 2107 | } | 1993 | } |
| 2108 | 1994 | ||
| 2109 | static inline void security_sb_umount_close(struct vfsmount *mnt) | ||
| 2110 | { } | ||
| 2111 | |||
| 2112 | static inline void security_sb_umount_busy(struct vfsmount *mnt) | ||
| 2113 | { } | ||
| 2114 | |||
| 2115 | static inline void security_sb_post_remount(struct vfsmount *mnt, | ||
| 2116 | unsigned long flags, void *data) | ||
| 2117 | { } | ||
| 2118 | |||
| 2119 | static inline void security_sb_post_addmount(struct vfsmount *mnt, | ||
| 2120 | struct path *mountpoint) | ||
| 2121 | { } | ||
| 2122 | |||
| 2123 | static inline int security_sb_pivotroot(struct path *old_path, | 1995 | static inline int security_sb_pivotroot(struct path *old_path, |
| 2124 | struct path *new_path) | 1996 | struct path *new_path) |
| 2125 | { | 1997 | { |
| 2126 | return 0; | 1998 | return 0; |
| 2127 | } | 1999 | } |
| 2128 | 2000 | ||
| 2129 | static inline void security_sb_post_pivotroot(struct path *old_path, | ||
| 2130 | struct path *new_path) | ||
| 2131 | { } | ||
| 2132 | |||
| 2133 | static inline int security_sb_set_mnt_opts(struct super_block *sb, | 2001 | static inline int security_sb_set_mnt_opts(struct super_block *sb, |
| 2134 | struct security_mnt_opts *opts) | 2002 | struct security_mnt_opts *opts) |
| 2135 | { | 2003 | { |
| @@ -2233,6 +2101,12 @@ static inline int security_inode_permission(struct inode *inode, int mask) | |||
| 2233 | return 0; | 2101 | return 0; |
| 2234 | } | 2102 | } |
| 2235 | 2103 | ||
| 2104 | static inline int security_inode_exec_permission(struct inode *inode, | ||
| 2105 | unsigned int flags) | ||
| 2106 | { | ||
| 2107 | return 0; | ||
| 2108 | } | ||
| 2109 | |||
| 2236 | static inline int security_inode_setattr(struct dentry *dentry, | 2110 | static inline int security_inode_setattr(struct dentry *dentry, |
| 2237 | struct iattr *attr) | 2111 | struct iattr *attr) |
| 2238 | { | 2112 | { |
| @@ -2245,9 +2119,6 @@ static inline int security_inode_getattr(struct vfsmount *mnt, | |||
| 2245 | return 0; | 2119 | return 0; |
| 2246 | } | 2120 | } |
| 2247 | 2121 | ||
| 2248 | static inline void security_inode_delete(struct inode *inode) | ||
| 2249 | { } | ||
| 2250 | |||
| 2251 | static inline int security_inode_setxattr(struct dentry *dentry, | 2122 | static inline int security_inode_setxattr(struct dentry *dentry, |
| 2252 | const char *name, const void *value, size_t size, int flags) | 2123 | const char *name, const void *value, size_t size, int flags) |
| 2253 | { | 2124 | { |
| @@ -2394,11 +2265,6 @@ static inline int security_prepare_creds(struct cred *new, | |||
| 2394 | return 0; | 2265 | return 0; |
| 2395 | } | 2266 | } |
| 2396 | 2267 | ||
| 2397 | static inline void security_commit_creds(struct cred *new, | ||
| 2398 | const struct cred *old) | ||
| 2399 | { | ||
| 2400 | } | ||
| 2401 | |||
| 2402 | static inline void security_transfer_creds(struct cred *new, | 2268 | static inline void security_transfer_creds(struct cred *new, |
| 2403 | const struct cred *old) | 2269 | const struct cred *old) |
| 2404 | { | 2270 | { |
| @@ -2420,12 +2286,6 @@ static inline int security_kernel_module_request(char *kmod_name) | |||
| 2420 | return 0; | 2286 | return 0; |
| 2421 | } | 2287 | } |
| 2422 | 2288 | ||
| 2423 | static inline int security_task_setuid(uid_t id0, uid_t id1, uid_t id2, | ||
| 2424 | int flags) | ||
| 2425 | { | ||
| 2426 | return 0; | ||
| 2427 | } | ||
| 2428 | |||
| 2429 | static inline int security_task_fix_setuid(struct cred *new, | 2289 | static inline int security_task_fix_setuid(struct cred *new, |
| 2430 | const struct cred *old, | 2290 | const struct cred *old, |
| 2431 | int flags) | 2291 | int flags) |
| @@ -2433,12 +2293,6 @@ static inline int security_task_fix_setuid(struct cred *new, | |||
| 2433 | return cap_task_fix_setuid(new, old, flags); | 2293 | return cap_task_fix_setuid(new, old, flags); |
| 2434 | } | 2294 | } |
| 2435 | 2295 | ||
| 2436 | static inline int security_task_setgid(gid_t id0, gid_t id1, gid_t id2, | ||
| 2437 | int flags) | ||
| 2438 | { | ||
| 2439 | return 0; | ||
| 2440 | } | ||
| 2441 | |||
| 2442 | static inline int security_task_setpgid(struct task_struct *p, pid_t pgid) | 2296 | static inline int security_task_setpgid(struct task_struct *p, pid_t pgid) |
| 2443 | { | 2297 | { |
| 2444 | return 0; | 2298 | return 0; |
| @@ -2459,11 +2313,6 @@ static inline void security_task_getsecid(struct task_struct *p, u32 *secid) | |||
| 2459 | *secid = 0; | 2313 | *secid = 0; |
| 2460 | } | 2314 | } |
| 2461 | 2315 | ||
| 2462 | static inline int security_task_setgroups(struct group_info *group_info) | ||
| 2463 | { | ||
| 2464 | return 0; | ||
| 2465 | } | ||
| 2466 | |||
| 2467 | static inline int security_task_setnice(struct task_struct *p, int nice) | 2316 | static inline int security_task_setnice(struct task_struct *p, int nice) |
| 2468 | { | 2317 | { |
| 2469 | return cap_task_setnice(p, nice); | 2318 | return cap_task_setnice(p, nice); |
| @@ -2479,17 +2328,16 @@ static inline int security_task_getioprio(struct task_struct *p) | |||
| 2479 | return 0; | 2328 | return 0; |
| 2480 | } | 2329 | } |
| 2481 | 2330 | ||
| 2482 | static inline int security_task_setrlimit(unsigned int resource, | 2331 | static inline int security_task_setrlimit(struct task_struct *p, |
| 2332 | unsigned int resource, | ||
| 2483 | struct rlimit *new_rlim) | 2333 | struct rlimit *new_rlim) |
| 2484 | { | 2334 | { |
| 2485 | return 0; | 2335 | return 0; |
| 2486 | } | 2336 | } |
| 2487 | 2337 | ||
| 2488 | static inline int security_task_setscheduler(struct task_struct *p, | 2338 | static inline int security_task_setscheduler(struct task_struct *p) |
| 2489 | int policy, | ||
| 2490 | struct sched_param *lp) | ||
| 2491 | { | 2339 | { |
| 2492 | return cap_task_setscheduler(p, policy, lp); | 2340 | return cap_task_setscheduler(p); |
| 2493 | } | 2341 | } |
| 2494 | 2342 | ||
| 2495 | static inline int security_task_getscheduler(struct task_struct *p) | 2343 | static inline int security_task_getscheduler(struct task_struct *p) |
| @@ -2682,8 +2530,7 @@ static inline int security_inode_getsecctx(struct inode *inode, void **ctx, u32 | |||
| 2682 | 2530 | ||
| 2683 | #ifdef CONFIG_SECURITY_NETWORK | 2531 | #ifdef CONFIG_SECURITY_NETWORK |
| 2684 | 2532 | ||
| 2685 | int security_unix_stream_connect(struct socket *sock, struct socket *other, | 2533 | int security_unix_stream_connect(struct sock *sock, struct sock *other, struct sock *newsk); |
| 2686 | struct sock *newsk); | ||
| 2687 | int security_unix_may_send(struct socket *sock, struct socket *other); | 2534 | int security_unix_may_send(struct socket *sock, struct socket *other); |
| 2688 | int security_socket_create(int family, int type, int protocol, int kern); | 2535 | int security_socket_create(int family, int type, int protocol, int kern); |
| 2689 | int security_socket_post_create(struct socket *sock, int family, | 2536 | int security_socket_post_create(struct socket *sock, int family, |
| @@ -2716,13 +2563,16 @@ void security_inet_csk_clone(struct sock *newsk, | |||
| 2716 | const struct request_sock *req); | 2563 | const struct request_sock *req); |
| 2717 | void security_inet_conn_established(struct sock *sk, | 2564 | void security_inet_conn_established(struct sock *sk, |
| 2718 | struct sk_buff *skb); | 2565 | struct sk_buff *skb); |
| 2566 | int security_secmark_relabel_packet(u32 secid); | ||
| 2567 | void security_secmark_refcount_inc(void); | ||
| 2568 | void security_secmark_refcount_dec(void); | ||
| 2719 | int security_tun_dev_create(void); | 2569 | int security_tun_dev_create(void); |
| 2720 | void security_tun_dev_post_create(struct sock *sk); | 2570 | void security_tun_dev_post_create(struct sock *sk); |
| 2721 | int security_tun_dev_attach(struct sock *sk); | 2571 | int security_tun_dev_attach(struct sock *sk); |
| 2722 | 2572 | ||
| 2723 | #else /* CONFIG_SECURITY_NETWORK */ | 2573 | #else /* CONFIG_SECURITY_NETWORK */ |
| 2724 | static inline int security_unix_stream_connect(struct socket *sock, | 2574 | static inline int security_unix_stream_connect(struct sock *sock, |
| 2725 | struct socket *other, | 2575 | struct sock *other, |
| 2726 | struct sock *newsk) | 2576 | struct sock *newsk) |
| 2727 | { | 2577 | { |
| 2728 | return 0; | 2578 | return 0; |
| @@ -2870,6 +2720,19 @@ static inline void security_inet_conn_established(struct sock *sk, | |||
| 2870 | { | 2720 | { |
| 2871 | } | 2721 | } |
| 2872 | 2722 | ||
| 2723 | static inline int security_secmark_relabel_packet(u32 secid) | ||
| 2724 | { | ||
| 2725 | return 0; | ||
| 2726 | } | ||
| 2727 | |||
| 2728 | static inline void security_secmark_refcount_inc(void) | ||
| 2729 | { | ||
| 2730 | } | ||
| 2731 | |||
| 2732 | static inline void security_secmark_refcount_dec(void) | ||
| 2733 | { | ||
| 2734 | } | ||
| 2735 | |||
| 2873 | static inline int security_tun_dev_create(void) | 2736 | static inline int security_tun_dev_create(void) |
| 2874 | { | 2737 | { |
| 2875 | return 0; | 2738 | return 0; |
| @@ -2972,8 +2835,7 @@ int security_path_mkdir(struct path *dir, struct dentry *dentry, int mode); | |||
| 2972 | int security_path_rmdir(struct path *dir, struct dentry *dentry); | 2835 | int security_path_rmdir(struct path *dir, struct dentry *dentry); |
| 2973 | int security_path_mknod(struct path *dir, struct dentry *dentry, int mode, | 2836 | int security_path_mknod(struct path *dir, struct dentry *dentry, int mode, |
| 2974 | unsigned int dev); | 2837 | unsigned int dev); |
| 2975 | int security_path_truncate(struct path *path, loff_t length, | 2838 | int security_path_truncate(struct path *path); |
| 2976 | unsigned int time_attrs); | ||
| 2977 | int security_path_symlink(struct path *dir, struct dentry *dentry, | 2839 | int security_path_symlink(struct path *dir, struct dentry *dentry, |
| 2978 | const char *old_name); | 2840 | const char *old_name); |
| 2979 | int security_path_link(struct dentry *old_dentry, struct path *new_dir, | 2841 | int security_path_link(struct dentry *old_dentry, struct path *new_dir, |
| @@ -3007,8 +2869,7 @@ static inline int security_path_mknod(struct path *dir, struct dentry *dentry, | |||
| 3007 | return 0; | 2869 | return 0; |
| 3008 | } | 2870 | } |
| 3009 | 2871 | ||
| 3010 | static inline int security_path_truncate(struct path *path, loff_t length, | 2872 | static inline int security_path_truncate(struct path *path) |
| 3011 | unsigned int time_attrs) | ||
| 3012 | { | 2873 | { |
| 3013 | return 0; | 2874 | return 0; |
| 3014 | } | 2875 | } |
| @@ -3060,9 +2921,6 @@ void security_key_free(struct key *key); | |||
| 3060 | int security_key_permission(key_ref_t key_ref, | 2921 | int security_key_permission(key_ref_t key_ref, |
| 3061 | const struct cred *cred, key_perm_t perm); | 2922 | const struct cred *cred, key_perm_t perm); |
| 3062 | int security_key_getsecurity(struct key *key, char **_buffer); | 2923 | int security_key_getsecurity(struct key *key, char **_buffer); |
| 3063 | int security_key_session_to_parent(const struct cred *cred, | ||
| 3064 | const struct cred *parent_cred, | ||
| 3065 | struct key *key); | ||
| 3066 | 2924 | ||
| 3067 | #else | 2925 | #else |
| 3068 | 2926 | ||
| @@ -3090,13 +2948,6 @@ static inline int security_key_getsecurity(struct key *key, char **_buffer) | |||
| 3090 | return 0; | 2948 | return 0; |
| 3091 | } | 2949 | } |
| 3092 | 2950 | ||
| 3093 | static inline int security_key_session_to_parent(const struct cred *cred, | ||
| 3094 | const struct cred *parent_cred, | ||
| 3095 | struct key *key) | ||
| 3096 | { | ||
| 3097 | return 0; | ||
| 3098 | } | ||
| 3099 | |||
| 3100 | #endif | 2951 | #endif |
| 3101 | #endif /* CONFIG_KEYS */ | 2952 | #endif /* CONFIG_KEYS */ |
| 3102 | 2953 | ||
