@@ -978,7 +978,6 @@ int tomoyo_get_mode(const struct tomoyo_policy_namespace *ns, const u8 profile,
978978int tomoyo_init_request_info (struct tomoyo_request_info * r ,
979979 struct tomoyo_domain_info * domain ,
980980 const u8 index );
981- int __init tomoyo_interface_init (void );
982981int tomoyo_mkdev_perm (const u8 operation , const struct path * path ,
983982 const unsigned int mode , unsigned int dev );
984983int tomoyo_mount_permission (const char * dev_name , const struct path * path ,
@@ -1215,14 +1214,10 @@ static inline void tomoyo_put_group(struct tomoyo_group *group)
12151214 *
12161215 * Returns pointer to "struct tomoyo_task" for specified thread.
12171216 */
1218- #ifdef CONFIG_SECURITY_TOMOYO_LKM
1219- extern struct tomoyo_task * tomoyo_task (struct task_struct * task );
1220- #else
12211217static inline struct tomoyo_task * tomoyo_task (struct task_struct * task )
12221218{
12231219 return task -> security + tomoyo_blob_sizes .lbs_task ;
12241220}
1225- #endif
12261221
12271222/**
12281223 * tomoyo_same_name_union - Check for duplicated "struct tomoyo_name_union" entry.
@@ -1289,71 +1284,4 @@ static inline struct tomoyo_policy_namespace *tomoyo_current_namespace(void)
12891284 pos = srcu_dereference((head)->next, &tomoyo_ss); \
12901285 for ( ; pos != (head); pos = srcu_dereference(pos->next, &tomoyo_ss))
12911286
1292- #ifdef CONFIG_SECURITY_TOMOYO_LKM
1293-
1294- #define LSM_HOOK (RET , DEFAULT , NAME , ...) typedef RET (NAME##_t)(__VA_ARGS__);
1295- #include <linux/lsm_hook_defs.h>
1296- #undef LSM_HOOK
1297-
1298- struct tomoyo_hooks {
1299- cred_prepare_t * cred_prepare ;
1300- bprm_committed_creds_t * bprm_committed_creds ;
1301- task_alloc_t * task_alloc ;
1302- task_free_t * task_free ;
1303- bprm_check_security_t * bprm_check_security ;
1304- file_fcntl_t * file_fcntl ;
1305- file_open_t * file_open ;
1306- file_truncate_t * file_truncate ;
1307- path_truncate_t * path_truncate ;
1308- path_unlink_t * path_unlink ;
1309- path_mkdir_t * path_mkdir ;
1310- path_rmdir_t * path_rmdir ;
1311- path_symlink_t * path_symlink ;
1312- path_mknod_t * path_mknod ;
1313- path_link_t * path_link ;
1314- path_rename_t * path_rename ;
1315- inode_getattr_t * inode_getattr ;
1316- file_ioctl_t * file_ioctl ;
1317- file_ioctl_compat_t * file_ioctl_compat ;
1318- path_chmod_t * path_chmod ;
1319- path_chown_t * path_chown ;
1320- path_chroot_t * path_chroot ;
1321- sb_mount_t * sb_mount ;
1322- sb_umount_t * sb_umount ;
1323- sb_pivotroot_t * sb_pivotroot ;
1324- socket_bind_t * socket_bind ;
1325- socket_connect_t * socket_connect ;
1326- socket_listen_t * socket_listen ;
1327- socket_sendmsg_t * socket_sendmsg ;
1328- };
1329-
1330- extern void tomoyo_register_hooks (const struct tomoyo_hooks * tomoyo_hooks );
1331-
1332- struct tomoyo_operations {
1333- void (* check_profile )(void );
1334- int enabled ;
1335- };
1336-
1337- extern struct tomoyo_operations tomoyo_ops ;
1338-
1339- /*
1340- * Temporary hack: functions needed by tomoyo.ko . This will be removed
1341- * after all functions are marked as EXPORT_STMBOL_GPL().
1342- */
1343- struct tomoyo_tmp_exports {
1344- struct task_struct * (* find_task_by_vpid )(pid_t nr );
1345- struct task_struct * (* find_task_by_pid_ns )(pid_t nr , struct pid_namespace * ns );
1346- void (* put_filesystem )(struct file_system_type * fs );
1347- struct file * (* get_mm_exe_file )(struct mm_struct * mm );
1348- char * (* d_absolute_path )(const struct path * path , char * buf , int buflen );
1349- };
1350- extern const struct tomoyo_tmp_exports tomoyo_tmp_exports ;
1351- #define find_task_by_vpid tomoyo_tmp_exports.find_task_by_vpid
1352- #define find_task_by_pid_ns tomoyo_tmp_exports.find_task_by_pid_ns
1353- #define put_filesystem tomoyo_tmp_exports.put_filesystem
1354- #define get_mm_exe_file tomoyo_tmp_exports.get_mm_exe_file
1355- #define d_absolute_path tomoyo_tmp_exports.d_absolute_path
1356-
1357- #endif /* defined(CONFIG_SECURITY_TOMOYO_LKM) */
1358-
13591287#endif /* !defined(_SECURITY_TOMOYO_COMMON_H) */
0 commit comments