initial commit with v2.6.9
[linux-2.6.9-moxart.git] / security / dummy.c
bloba9e69659533ebd97692317469bfc54a8556ef21a
1 /*
2 * Stub functions for the default security function pointers in case no
3 * security model is loaded.
5 * Copyright (C) 2001 WireX Communications, Inc <chris@wirex.com>
6 * Copyright (C) 2001-2002 Greg Kroah-Hartman <greg@kroah.com>
7 * Copyright (C) 2001 Networks Associates Technology, Inc <ssmalley@nai.com>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
15 #undef DEBUG
17 #include <linux/config.h>
18 #include <linux/module.h>
19 #include <linux/kernel.h>
20 #include <linux/mman.h>
21 #include <linux/pagemap.h>
22 #include <linux/swap.h>
23 #include <linux/security.h>
24 #include <linux/skbuff.h>
25 #include <linux/netlink.h>
26 #include <net/sock.h>
27 #include <linux/xattr.h>
28 #include <linux/hugetlb.h>
29 #include <linux/ptrace.h>
30 #include <linux/file.h>
32 static int dummy_ptrace (struct task_struct *parent, struct task_struct *child)
34 return 0;
37 static int dummy_capget (struct task_struct *target, kernel_cap_t * effective,
38 kernel_cap_t * inheritable, kernel_cap_t * permitted)
40 *effective = *inheritable = *permitted = 0;
41 if (!issecure(SECURE_NOROOT)) {
42 if (target->euid == 0) {
43 *permitted |= (~0 & ~CAP_FS_MASK);
44 *effective |= (~0 & ~CAP_TO_MASK(CAP_SETPCAP) & ~CAP_FS_MASK);
46 if (target->fsuid == 0) {
47 *permitted |= CAP_FS_MASK;
48 *effective |= CAP_FS_MASK;
51 return 0;
54 static int dummy_capset_check (struct task_struct *target,
55 kernel_cap_t * effective,
56 kernel_cap_t * inheritable,
57 kernel_cap_t * permitted)
59 return -EPERM;
62 static void dummy_capset_set (struct task_struct *target,
63 kernel_cap_t * effective,
64 kernel_cap_t * inheritable,
65 kernel_cap_t * permitted)
67 return;
70 static int dummy_acct (struct file *file)
72 return 0;
75 static int dummy_capable (struct task_struct *tsk, int cap)
77 if (cap_is_fs_cap (cap) ? tsk->fsuid == 0 : tsk->euid == 0)
78 /* capability granted */
79 return 0;
81 /* capability denied */
82 return -EPERM;
85 static int dummy_sysctl (ctl_table * table, int op)
87 return 0;
90 static int dummy_quotactl (int cmds, int type, int id, struct super_block *sb)
92 return 0;
95 static int dummy_quota_on (struct file *f)
97 return 0;
100 static int dummy_syslog (int type)
102 if ((type != 3 && type != 10) && current->euid)
103 return -EPERM;
104 return 0;
108 * Check that a process has enough memory to allocate a new virtual
109 * mapping. 0 means there is enough memory for the allocation to
110 * succeed and -ENOMEM implies there is not.
112 * We currently support three overcommit policies, which are set via the
113 * vm.overcommit_memory sysctl. See Documentation/vm/overcommit-accounting
115 static int dummy_vm_enough_memory(long pages)
117 unsigned long free, allowed;
119 vm_acct_memory(pages);
122 * Sometimes we want to use more memory than we have
124 if (sysctl_overcommit_memory == OVERCOMMIT_ALWAYS)
125 return 0;
127 if (sysctl_overcommit_memory == OVERCOMMIT_GUESS) {
128 free = get_page_cache_size();
129 free += nr_free_pages();
130 free += nr_swap_pages;
133 * Any slabs which are created with the
134 * SLAB_RECLAIM_ACCOUNT flag claim to have contents
135 * which are reclaimable, under pressure. The dentry
136 * cache and most inode caches should fall into this
138 free += atomic_read(&slab_reclaim_pages);
141 * Leave the last 3% for root
143 if (current->euid)
144 free -= free / 32;
146 if (free > pages)
147 return 0;
148 vm_unacct_memory(pages);
149 return -ENOMEM;
152 allowed = (totalram_pages - hugetlb_total_pages())
153 * sysctl_overcommit_ratio / 100;
154 allowed += total_swap_pages;
156 if (atomic_read(&vm_committed_space) < allowed)
157 return 0;
159 vm_unacct_memory(pages);
161 return -ENOMEM;
164 static int dummy_bprm_alloc_security (struct linux_binprm *bprm)
166 return 0;
169 static void dummy_bprm_free_security (struct linux_binprm *bprm)
171 return;
174 static void dummy_bprm_apply_creds (struct linux_binprm *bprm, int unsafe)
176 if (bprm->e_uid != current->uid || bprm->e_gid != current->gid) {
177 current->mm->dumpable = 0;
179 if ((unsafe & ~LSM_UNSAFE_PTRACE_CAP) && !capable(CAP_SETUID)) {
180 bprm->e_uid = current->uid;
181 bprm->e_gid = current->gid;
185 current->suid = current->euid = current->fsuid = bprm->e_uid;
186 current->sgid = current->egid = current->fsgid = bprm->e_gid;
189 static int dummy_bprm_set_security (struct linux_binprm *bprm)
191 return 0;
194 static int dummy_bprm_check_security (struct linux_binprm *bprm)
196 return 0;
199 static int dummy_bprm_secureexec (struct linux_binprm *bprm)
201 /* The new userland will simply use the value provided
202 in the AT_SECURE field to decide whether secure mode
203 is required. Hence, this logic is required to preserve
204 the legacy decision algorithm used by the old userland. */
205 return (current->euid != current->uid ||
206 current->egid != current->gid);
209 static int dummy_sb_alloc_security (struct super_block *sb)
211 return 0;
214 static void dummy_sb_free_security (struct super_block *sb)
216 return;
219 static int dummy_sb_copy_data (struct file_system_type *type,
220 void *orig, void *copy)
222 return 0;
225 static int dummy_sb_kern_mount (struct super_block *sb, void *data)
227 return 0;
230 static int dummy_sb_statfs (struct super_block *sb)
232 return 0;
235 static int dummy_sb_mount (char *dev_name, struct nameidata *nd, char *type,
236 unsigned long flags, void *data)
238 return 0;
241 static int dummy_sb_check_sb (struct vfsmount *mnt, struct nameidata *nd)
243 return 0;
246 static int dummy_sb_umount (struct vfsmount *mnt, int flags)
248 return 0;
251 static void dummy_sb_umount_close (struct vfsmount *mnt)
253 return;
256 static void dummy_sb_umount_busy (struct vfsmount *mnt)
258 return;
261 static void dummy_sb_post_remount (struct vfsmount *mnt, unsigned long flags,
262 void *data)
264 return;
268 static void dummy_sb_post_mountroot (void)
270 return;
273 static void dummy_sb_post_addmount (struct vfsmount *mnt, struct nameidata *nd)
275 return;
278 static int dummy_sb_pivotroot (struct nameidata *old_nd, struct nameidata *new_nd)
280 return 0;
283 static void dummy_sb_post_pivotroot (struct nameidata *old_nd, struct nameidata *new_nd)
285 return;
288 static int dummy_inode_alloc_security (struct inode *inode)
290 return 0;
293 static void dummy_inode_free_security (struct inode *inode)
295 return;
298 static int dummy_inode_create (struct inode *inode, struct dentry *dentry,
299 int mask)
301 return 0;
304 static void dummy_inode_post_create (struct inode *inode, struct dentry *dentry,
305 int mask)
307 return;
310 static int dummy_inode_link (struct dentry *old_dentry, struct inode *inode,
311 struct dentry *new_dentry)
313 return 0;
316 static void dummy_inode_post_link (struct dentry *old_dentry,
317 struct inode *inode,
318 struct dentry *new_dentry)
320 return;
323 static int dummy_inode_unlink (struct inode *inode, struct dentry *dentry)
325 return 0;
328 static int dummy_inode_symlink (struct inode *inode, struct dentry *dentry,
329 const char *name)
331 return 0;
334 static void dummy_inode_post_symlink (struct inode *inode,
335 struct dentry *dentry, const char *name)
337 return;
340 static int dummy_inode_mkdir (struct inode *inode, struct dentry *dentry,
341 int mask)
343 return 0;
346 static void dummy_inode_post_mkdir (struct inode *inode, struct dentry *dentry,
347 int mask)
349 return;
352 static int dummy_inode_rmdir (struct inode *inode, struct dentry *dentry)
354 return 0;
357 static int dummy_inode_mknod (struct inode *inode, struct dentry *dentry,
358 int mode, dev_t dev)
360 return 0;
363 static void dummy_inode_post_mknod (struct inode *inode, struct dentry *dentry,
364 int mode, dev_t dev)
366 return;
369 static int dummy_inode_rename (struct inode *old_inode,
370 struct dentry *old_dentry,
371 struct inode *new_inode,
372 struct dentry *new_dentry)
374 return 0;
377 static void dummy_inode_post_rename (struct inode *old_inode,
378 struct dentry *old_dentry,
379 struct inode *new_inode,
380 struct dentry *new_dentry)
382 return;
385 static int dummy_inode_readlink (struct dentry *dentry)
387 return 0;
390 static int dummy_inode_follow_link (struct dentry *dentry,
391 struct nameidata *nameidata)
393 return 0;
396 static int dummy_inode_permission (struct inode *inode, int mask, struct nameidata *nd)
398 return 0;
401 static int dummy_inode_setattr (struct dentry *dentry, struct iattr *iattr)
403 return 0;
406 static int dummy_inode_getattr (struct vfsmount *mnt, struct dentry *dentry)
408 return 0;
411 static void dummy_inode_delete (struct inode *ino)
413 return;
416 static int dummy_inode_setxattr (struct dentry *dentry, char *name, void *value,
417 size_t size, int flags)
419 if (!strncmp(name, XATTR_SECURITY_PREFIX,
420 sizeof(XATTR_SECURITY_PREFIX) - 1) &&
421 !capable(CAP_SYS_ADMIN))
422 return -EPERM;
423 return 0;
426 static void dummy_inode_post_setxattr (struct dentry *dentry, char *name, void *value,
427 size_t size, int flags)
431 static int dummy_inode_getxattr (struct dentry *dentry, char *name)
433 return 0;
436 static int dummy_inode_listxattr (struct dentry *dentry)
438 return 0;
441 static int dummy_inode_removexattr (struct dentry *dentry, char *name)
443 if (!strncmp(name, XATTR_SECURITY_PREFIX,
444 sizeof(XATTR_SECURITY_PREFIX) - 1) &&
445 !capable(CAP_SYS_ADMIN))
446 return -EPERM;
447 return 0;
450 static int dummy_inode_getsecurity(struct dentry *dentry, const char *name, void *buffer, size_t size)
452 return -EOPNOTSUPP;
455 static int dummy_inode_setsecurity(struct dentry *dentry, const char *name, const void *value, size_t size, int flags)
457 return -EOPNOTSUPP;
460 static int dummy_inode_listsecurity(struct dentry *dentry, char *buffer)
462 return 0;
465 static int dummy_file_permission (struct file *file, int mask)
467 return 0;
470 static int dummy_file_alloc_security (struct file *file)
472 return 0;
475 static void dummy_file_free_security (struct file *file)
477 return;
480 static int dummy_file_ioctl (struct file *file, unsigned int command,
481 unsigned long arg)
483 return 0;
486 static int dummy_file_mmap (struct file *file, unsigned long prot,
487 unsigned long flags)
489 return 0;
492 static int dummy_file_mprotect (struct vm_area_struct *vma, unsigned long prot)
494 return 0;
497 static int dummy_file_lock (struct file *file, unsigned int cmd)
499 return 0;
502 static int dummy_file_fcntl (struct file *file, unsigned int cmd,
503 unsigned long arg)
505 return 0;
508 static int dummy_file_set_fowner (struct file *file)
510 return 0;
513 static int dummy_file_send_sigiotask (struct task_struct *tsk,
514 struct fown_struct *fown, int fd,
515 int reason)
517 return 0;
520 static int dummy_file_receive (struct file *file)
522 return 0;
525 static int dummy_task_create (unsigned long clone_flags)
527 return 0;
530 static int dummy_task_alloc_security (struct task_struct *p)
532 return 0;
535 static void dummy_task_free_security (struct task_struct *p)
537 return;
540 static int dummy_task_setuid (uid_t id0, uid_t id1, uid_t id2, int flags)
542 return 0;
545 static int dummy_task_post_setuid (uid_t id0, uid_t id1, uid_t id2, int flags)
547 return 0;
550 static int dummy_task_setgid (gid_t id0, gid_t id1, gid_t id2, int flags)
552 return 0;
555 static int dummy_task_setpgid (struct task_struct *p, pid_t pgid)
557 return 0;
560 static int dummy_task_getpgid (struct task_struct *p)
562 return 0;
565 static int dummy_task_getsid (struct task_struct *p)
567 return 0;
570 static int dummy_task_setgroups (struct group_info *group_info)
572 return 0;
575 static int dummy_task_setnice (struct task_struct *p, int nice)
577 return 0;
580 static int dummy_task_setrlimit (unsigned int resource, struct rlimit *new_rlim)
582 return 0;
585 static int dummy_task_setscheduler (struct task_struct *p, int policy,
586 struct sched_param *lp)
588 return 0;
591 static int dummy_task_getscheduler (struct task_struct *p)
593 return 0;
596 static int dummy_task_wait (struct task_struct *p)
598 return 0;
601 static int dummy_task_kill (struct task_struct *p, struct siginfo *info,
602 int sig)
604 return 0;
607 static int dummy_task_prctl (int option, unsigned long arg2, unsigned long arg3,
608 unsigned long arg4, unsigned long arg5)
610 return 0;
613 static void dummy_task_reparent_to_init (struct task_struct *p)
615 p->euid = p->fsuid = 0;
616 return;
619 static void dummy_task_to_inode(struct task_struct *p, struct inode *inode)
622 static int dummy_ipc_permission (struct kern_ipc_perm *ipcp, short flag)
624 return 0;
627 static int dummy_msg_msg_alloc_security (struct msg_msg *msg)
629 return 0;
632 static void dummy_msg_msg_free_security (struct msg_msg *msg)
634 return;
637 static int dummy_msg_queue_alloc_security (struct msg_queue *msq)
639 return 0;
642 static void dummy_msg_queue_free_security (struct msg_queue *msq)
644 return;
647 static int dummy_msg_queue_associate (struct msg_queue *msq,
648 int msqflg)
650 return 0;
653 static int dummy_msg_queue_msgctl (struct msg_queue *msq, int cmd)
655 return 0;
658 static int dummy_msg_queue_msgsnd (struct msg_queue *msq, struct msg_msg *msg,
659 int msgflg)
661 return 0;
664 static int dummy_msg_queue_msgrcv (struct msg_queue *msq, struct msg_msg *msg,
665 struct task_struct *target, long type,
666 int mode)
668 return 0;
671 static int dummy_shm_alloc_security (struct shmid_kernel *shp)
673 return 0;
676 static void dummy_shm_free_security (struct shmid_kernel *shp)
678 return;
681 static int dummy_shm_associate (struct shmid_kernel *shp, int shmflg)
683 return 0;
686 static int dummy_shm_shmctl (struct shmid_kernel *shp, int cmd)
688 return 0;
691 static int dummy_shm_shmat (struct shmid_kernel *shp, char __user *shmaddr,
692 int shmflg)
694 return 0;
697 static int dummy_sem_alloc_security (struct sem_array *sma)
699 return 0;
702 static void dummy_sem_free_security (struct sem_array *sma)
704 return;
707 static int dummy_sem_associate (struct sem_array *sma, int semflg)
709 return 0;
712 static int dummy_sem_semctl (struct sem_array *sma, int cmd)
714 return 0;
717 static int dummy_sem_semop (struct sem_array *sma,
718 struct sembuf *sops, unsigned nsops, int alter)
720 return 0;
723 static int dummy_netlink_send (struct sock *sk, struct sk_buff *skb)
725 if (current->euid == 0)
726 cap_raise (NETLINK_CB (skb).eff_cap, CAP_NET_ADMIN);
727 else
728 NETLINK_CB (skb).eff_cap = 0;
729 return 0;
732 static int dummy_netlink_recv (struct sk_buff *skb)
734 if (!cap_raised (NETLINK_CB (skb).eff_cap, CAP_NET_ADMIN))
735 return -EPERM;
736 return 0;
739 #ifdef CONFIG_SECURITY_NETWORK
740 static int dummy_unix_stream_connect (struct socket *sock,
741 struct socket *other,
742 struct sock *newsk)
744 return 0;
747 static int dummy_unix_may_send (struct socket *sock,
748 struct socket *other)
750 return 0;
753 static int dummy_socket_create (int family, int type,
754 int protocol, int kern)
756 return 0;
759 static void dummy_socket_post_create (struct socket *sock, int family, int type,
760 int protocol, int kern)
762 return;
765 static int dummy_socket_bind (struct socket *sock, struct sockaddr *address,
766 int addrlen)
768 return 0;
771 static int dummy_socket_connect (struct socket *sock, struct sockaddr *address,
772 int addrlen)
774 return 0;
777 static int dummy_socket_listen (struct socket *sock, int backlog)
779 return 0;
782 static int dummy_socket_accept (struct socket *sock, struct socket *newsock)
784 return 0;
787 static void dummy_socket_post_accept (struct socket *sock,
788 struct socket *newsock)
790 return;
793 static int dummy_socket_sendmsg (struct socket *sock, struct msghdr *msg,
794 int size)
796 return 0;
799 static int dummy_socket_recvmsg (struct socket *sock, struct msghdr *msg,
800 int size, int flags)
802 return 0;
805 static int dummy_socket_getsockname (struct socket *sock)
807 return 0;
810 static int dummy_socket_getpeername (struct socket *sock)
812 return 0;
815 static int dummy_socket_setsockopt (struct socket *sock, int level, int optname)
817 return 0;
820 static int dummy_socket_getsockopt (struct socket *sock, int level, int optname)
822 return 0;
825 static int dummy_socket_shutdown (struct socket *sock, int how)
827 return 0;
830 static int dummy_socket_sock_rcv_skb (struct sock *sk, struct sk_buff *skb)
832 return 0;
835 static int dummy_socket_getpeersec(struct socket *sock, char __user *optval,
836 int __user *optlen, unsigned len)
838 return -ENOPROTOOPT;
841 static inline int dummy_sk_alloc_security (struct sock *sk, int family, int priority)
843 return 0;
846 static inline void dummy_sk_free_security (struct sock *sk)
849 #endif /* CONFIG_SECURITY_NETWORK */
851 static int dummy_register_security (const char *name, struct security_operations *ops)
853 return -EINVAL;
856 static int dummy_unregister_security (const char *name, struct security_operations *ops)
858 return -EINVAL;
861 static void dummy_d_instantiate (struct dentry *dentry, struct inode *inode)
863 return;
866 static int dummy_getprocattr(struct task_struct *p, char *name, void *value, size_t size)
868 return -EINVAL;
871 static int dummy_setprocattr(struct task_struct *p, char *name, void *value, size_t size)
873 return -EINVAL;
877 struct security_operations dummy_security_ops;
879 #define set_to_dummy_if_null(ops, function) \
880 do { \
881 if (!ops->function) { \
882 ops->function = dummy_##function; \
883 pr_debug("Had to override the " #function \
884 " security operation with the dummy one.\n");\
886 } while (0)
888 void security_fixup_ops (struct security_operations *ops)
890 set_to_dummy_if_null(ops, ptrace);
891 set_to_dummy_if_null(ops, capget);
892 set_to_dummy_if_null(ops, capset_check);
893 set_to_dummy_if_null(ops, capset_set);
894 set_to_dummy_if_null(ops, acct);
895 set_to_dummy_if_null(ops, capable);
896 set_to_dummy_if_null(ops, quotactl);
897 set_to_dummy_if_null(ops, quota_on);
898 set_to_dummy_if_null(ops, sysctl);
899 set_to_dummy_if_null(ops, syslog);
900 set_to_dummy_if_null(ops, vm_enough_memory);
901 set_to_dummy_if_null(ops, bprm_alloc_security);
902 set_to_dummy_if_null(ops, bprm_free_security);
903 set_to_dummy_if_null(ops, bprm_apply_creds);
904 set_to_dummy_if_null(ops, bprm_set_security);
905 set_to_dummy_if_null(ops, bprm_check_security);
906 set_to_dummy_if_null(ops, bprm_secureexec);
907 set_to_dummy_if_null(ops, sb_alloc_security);
908 set_to_dummy_if_null(ops, sb_free_security);
909 set_to_dummy_if_null(ops, sb_copy_data);
910 set_to_dummy_if_null(ops, sb_kern_mount);
911 set_to_dummy_if_null(ops, sb_statfs);
912 set_to_dummy_if_null(ops, sb_mount);
913 set_to_dummy_if_null(ops, sb_check_sb);
914 set_to_dummy_if_null(ops, sb_umount);
915 set_to_dummy_if_null(ops, sb_umount_close);
916 set_to_dummy_if_null(ops, sb_umount_busy);
917 set_to_dummy_if_null(ops, sb_post_remount);
918 set_to_dummy_if_null(ops, sb_post_mountroot);
919 set_to_dummy_if_null(ops, sb_post_addmount);
920 set_to_dummy_if_null(ops, sb_pivotroot);
921 set_to_dummy_if_null(ops, sb_post_pivotroot);
922 set_to_dummy_if_null(ops, inode_alloc_security);
923 set_to_dummy_if_null(ops, inode_free_security);
924 set_to_dummy_if_null(ops, inode_create);
925 set_to_dummy_if_null(ops, inode_post_create);
926 set_to_dummy_if_null(ops, inode_link);
927 set_to_dummy_if_null(ops, inode_post_link);
928 set_to_dummy_if_null(ops, inode_unlink);
929 set_to_dummy_if_null(ops, inode_symlink);
930 set_to_dummy_if_null(ops, inode_post_symlink);
931 set_to_dummy_if_null(ops, inode_mkdir);
932 set_to_dummy_if_null(ops, inode_post_mkdir);
933 set_to_dummy_if_null(ops, inode_rmdir);
934 set_to_dummy_if_null(ops, inode_mknod);
935 set_to_dummy_if_null(ops, inode_post_mknod);
936 set_to_dummy_if_null(ops, inode_rename);
937 set_to_dummy_if_null(ops, inode_post_rename);
938 set_to_dummy_if_null(ops, inode_readlink);
939 set_to_dummy_if_null(ops, inode_follow_link);
940 set_to_dummy_if_null(ops, inode_permission);
941 set_to_dummy_if_null(ops, inode_setattr);
942 set_to_dummy_if_null(ops, inode_getattr);
943 set_to_dummy_if_null(ops, inode_delete);
944 set_to_dummy_if_null(ops, inode_setxattr);
945 set_to_dummy_if_null(ops, inode_post_setxattr);
946 set_to_dummy_if_null(ops, inode_getxattr);
947 set_to_dummy_if_null(ops, inode_listxattr);
948 set_to_dummy_if_null(ops, inode_removexattr);
949 set_to_dummy_if_null(ops, inode_getsecurity);
950 set_to_dummy_if_null(ops, inode_setsecurity);
951 set_to_dummy_if_null(ops, inode_listsecurity);
952 set_to_dummy_if_null(ops, file_permission);
953 set_to_dummy_if_null(ops, file_alloc_security);
954 set_to_dummy_if_null(ops, file_free_security);
955 set_to_dummy_if_null(ops, file_ioctl);
956 set_to_dummy_if_null(ops, file_mmap);
957 set_to_dummy_if_null(ops, file_mprotect);
958 set_to_dummy_if_null(ops, file_lock);
959 set_to_dummy_if_null(ops, file_fcntl);
960 set_to_dummy_if_null(ops, file_set_fowner);
961 set_to_dummy_if_null(ops, file_send_sigiotask);
962 set_to_dummy_if_null(ops, file_receive);
963 set_to_dummy_if_null(ops, task_create);
964 set_to_dummy_if_null(ops, task_alloc_security);
965 set_to_dummy_if_null(ops, task_free_security);
966 set_to_dummy_if_null(ops, task_setuid);
967 set_to_dummy_if_null(ops, task_post_setuid);
968 set_to_dummy_if_null(ops, task_setgid);
969 set_to_dummy_if_null(ops, task_setpgid);
970 set_to_dummy_if_null(ops, task_getpgid);
971 set_to_dummy_if_null(ops, task_getsid);
972 set_to_dummy_if_null(ops, task_setgroups);
973 set_to_dummy_if_null(ops, task_setnice);
974 set_to_dummy_if_null(ops, task_setrlimit);
975 set_to_dummy_if_null(ops, task_setscheduler);
976 set_to_dummy_if_null(ops, task_getscheduler);
977 set_to_dummy_if_null(ops, task_wait);
978 set_to_dummy_if_null(ops, task_kill);
979 set_to_dummy_if_null(ops, task_prctl);
980 set_to_dummy_if_null(ops, task_reparent_to_init);
981 set_to_dummy_if_null(ops, task_to_inode);
982 set_to_dummy_if_null(ops, ipc_permission);
983 set_to_dummy_if_null(ops, msg_msg_alloc_security);
984 set_to_dummy_if_null(ops, msg_msg_free_security);
985 set_to_dummy_if_null(ops, msg_queue_alloc_security);
986 set_to_dummy_if_null(ops, msg_queue_free_security);
987 set_to_dummy_if_null(ops, msg_queue_associate);
988 set_to_dummy_if_null(ops, msg_queue_msgctl);
989 set_to_dummy_if_null(ops, msg_queue_msgsnd);
990 set_to_dummy_if_null(ops, msg_queue_msgrcv);
991 set_to_dummy_if_null(ops, shm_alloc_security);
992 set_to_dummy_if_null(ops, shm_free_security);
993 set_to_dummy_if_null(ops, shm_associate);
994 set_to_dummy_if_null(ops, shm_shmctl);
995 set_to_dummy_if_null(ops, shm_shmat);
996 set_to_dummy_if_null(ops, sem_alloc_security);
997 set_to_dummy_if_null(ops, sem_free_security);
998 set_to_dummy_if_null(ops, sem_associate);
999 set_to_dummy_if_null(ops, sem_semctl);
1000 set_to_dummy_if_null(ops, sem_semop);
1001 set_to_dummy_if_null(ops, netlink_send);
1002 set_to_dummy_if_null(ops, netlink_recv);
1003 set_to_dummy_if_null(ops, register_security);
1004 set_to_dummy_if_null(ops, unregister_security);
1005 set_to_dummy_if_null(ops, d_instantiate);
1006 set_to_dummy_if_null(ops, getprocattr);
1007 set_to_dummy_if_null(ops, setprocattr);
1008 #ifdef CONFIG_SECURITY_NETWORK
1009 set_to_dummy_if_null(ops, unix_stream_connect);
1010 set_to_dummy_if_null(ops, unix_may_send);
1011 set_to_dummy_if_null(ops, socket_create);
1012 set_to_dummy_if_null(ops, socket_post_create);
1013 set_to_dummy_if_null(ops, socket_bind);
1014 set_to_dummy_if_null(ops, socket_connect);
1015 set_to_dummy_if_null(ops, socket_listen);
1016 set_to_dummy_if_null(ops, socket_accept);
1017 set_to_dummy_if_null(ops, socket_post_accept);
1018 set_to_dummy_if_null(ops, socket_sendmsg);
1019 set_to_dummy_if_null(ops, socket_recvmsg);
1020 set_to_dummy_if_null(ops, socket_getsockname);
1021 set_to_dummy_if_null(ops, socket_getpeername);
1022 set_to_dummy_if_null(ops, socket_setsockopt);
1023 set_to_dummy_if_null(ops, socket_getsockopt);
1024 set_to_dummy_if_null(ops, socket_shutdown);
1025 set_to_dummy_if_null(ops, socket_sock_rcv_skb);
1026 set_to_dummy_if_null(ops, socket_getpeersec);
1027 set_to_dummy_if_null(ops, sk_alloc_security);
1028 set_to_dummy_if_null(ops, sk_free_security);
1029 #endif /* CONFIG_SECURITY_NETWORK */