From: Guillaume Destuynder Date: Sat, 13 Nov 2004 13:20:27 +0000 (+0000) Subject: Fixes #70681 (binfmt_elf), #62524 (pmtx) X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=85d1413d8fd7e4a0d3834b2275b6261777baa21f;p=gentoo.git Fixes #70681 (binfmt_elf), #62524 (pmtx) --- diff --git a/sys-kernel/rsbac-dev-sources/ChangeLog b/sys-kernel/rsbac-dev-sources/ChangeLog index ac7053f1025c..7b8135a55467 100644 --- a/sys-kernel/rsbac-dev-sources/ChangeLog +++ b/sys-kernel/rsbac-dev-sources/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-kernel/rsbac-dev-sources # Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/rsbac-dev-sources/ChangeLog,v 1.11 2004/10/22 11:57:07 kang Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/rsbac-dev-sources/ChangeLog,v 1.12 2004/11/13 13:20:27 kang Exp $ + +*rsbac-dev-sources-2.6.7-r7 (13 Nov 2004) + + 13 Nov 2004; Guillaume Destuynder + +files/rsbac-bugfix-v1.2.3-6.diff, + +files/rsbac-dev-sources-2.6.7-62524-ptmx.patch, + -rsbac-dev-sources-2.6.7-r6.ebuild, +rsbac-dev-sources-2.6.7-r7.ebuild: + Fixes #70681 (binfmt_elf), #62524 (pmtx) *rsbac-dev-sources-2.6.7-r6 (22 Oct 2004) diff --git a/sys-kernel/rsbac-dev-sources/Manifest b/sys-kernel/rsbac-dev-sources/Manifest index 0ef6d57c8a0d..aac9dd1c87e1 100644 --- a/sys-kernel/rsbac-dev-sources/Manifest +++ b/sys-kernel/rsbac-dev-sources/Manifest @@ -1,10 +1,15 @@ +MD5 d6e9a47914bfea45dc8e1d3d474cd808 ChangeLog 3428 MD5 ed6fb50f79e8049f3f3576bb25c32747 metadata.xml 465 -MD5 66d25484a216736af980d96f49fb00cf rsbac-dev-sources-2.6.7-r6.ebuild 1627 -MD5 0e733120479fa0934ca5bcf6e58ae0bc ChangeLog 3125 -MD5 a869ab037c7e264df5f8e899864f08e9 files/rsbac-dev-sources-v1.2.3-3.patch 557 -MD5 6451bd210935a3978fd3a3edac673591 files/rsbac-dev-sources-iptables-dos.patch 389 +MD5 818a888099a93e2e2054b898e2c6f1f5 rsbac-dev-sources-2.6.7-r7.ebuild 1710 +MD5 706d7794a822074aaf31502d7a7e48d3 files/2.6.7-cmdline.patch 455 MD5 b6e38b41c8a79943df2ab2642149d06f files/rsbac-dev-sources-CAN-2004-0497.patch 2214 MD5 f0e12ba218f53c2694a91259bdc2fdc7 files/rsbac-dev-sources-CAN-2004-0596.patch 494 -MD5 706d7794a822074aaf31502d7a7e48d3 files/2.6.7-cmdline.patch 455 MD5 263a9f529a3b80e2c91340a73c0c5920 files/rsbac-dev-sources-CAN-2004-0816.patch 1445 -MD5 fd024d5229ee08ef90d6a532bdf99977 files/digest-rsbac-dev-sources-2.6.7-r6 281 +MD5 6451bd210935a3978fd3a3edac673591 files/rsbac-dev-sources-iptables-dos.patch 389 +MD5 a869ab037c7e264df5f8e899864f08e9 files/rsbac-dev-sources-v1.2.3-3.patch 557 +MD5 6197e52bf5742c3f61716fe6a681055c files/rsbac-bugfix-v1.2.3-6.diff 13068 +MD5 97a40292e0b33025c43888a20190ef29 files/rsbac-bugfix-v1.2.3-ao-01.diff 1180 +MD5 b70bcb7c4896526b671f12695522cb0e files/rsbac-bugfix-v1.2.3-kang-01.diff 510 +MD5 452e04a312368605e145428c35bd0e05 files/rsbac-dev-sources-2.6.7-62524-ptmx.patch 572 +MD5 1ee8ba8362089c31fdd7d88b32eaf63e files/rsbac-dev-sources-2.6.7-70681-binfmt.patch 1938 +MD5 fd024d5229ee08ef90d6a532bdf99977 files/digest-rsbac-dev-sources-2.6.7-r7 281 diff --git a/sys-kernel/rsbac-dev-sources/files/digest-rsbac-dev-sources-2.6.7-r7 b/sys-kernel/rsbac-dev-sources/files/digest-rsbac-dev-sources-2.6.7-r7 new file mode 100644 index 000000000000..354ef30ca678 --- /dev/null +++ b/sys-kernel/rsbac-dev-sources/files/digest-rsbac-dev-sources-2.6.7-r7 @@ -0,0 +1,4 @@ +MD5 a74671ea68b0e3c609e8785ed8497c14 linux-2.6.7.tar.bz2 35092228 +MD5 f3759250e9c4bb5ccb773174fafe0ba7 rsbac-v1.2.3.tar.bz2 489127 +MD5 60fb38c61d8d8cc913d81ab93ff74972 rsbac-patches-2.6-7.1.tar.bz2 107363 +MD5 52996b643afbd6ed9ba38b9483c2cac3 linux-2.6.7-CAN-2004-0415.patch 112612 diff --git a/sys-kernel/rsbac-dev-sources/files/rsbac-bugfix-v1.2.3-6.diff b/sys-kernel/rsbac-dev-sources/files/rsbac-bugfix-v1.2.3-6.diff new file mode 100644 index 000000000000..e87509f12cde --- /dev/null +++ b/sys-kernel/rsbac-dev-sources/files/rsbac-bugfix-v1.2.3-6.diff @@ -0,0 +1,339 @@ +Index: linux-2.4.27-rsbac-v1.2.3/include/rsbac/aci_data_structures.h +=================================================================== +--- linux-2.4.27-rsbac-v1.2.3/include/rsbac/aci_data_structures.h (revision 16) ++++ linux-2.4.27-rsbac-v1.2.3/include/rsbac/aci_data_structures.h (working copy) +@@ -1134,7 +1134,7 @@ + #endif + + +-#define RSBAC_USER_NR_ATTRIBUTES 28 ++#define RSBAC_USER_NR_ATTRIBUTES 24 + #define RSBAC_USER_ATTR_LIST { \ + A_pseudo, \ + A_log_user_based, \ +Index: linux-2.4.27-rsbac-v1.2.3/rsbac/help/syscalls.c +=================================================================== +--- linux-2.4.27-rsbac-v1.2.3/rsbac/help/syscalls.c (revision 16) ++++ linux-2.4.27-rsbac-v1.2.3/rsbac/help/syscalls.c (working copy) +@@ -1405,7 +1405,7 @@ + + int sys_rsbac_switch(enum rsbac_switch_target_t target, int value) + { +-#ifdef CONFIG_RSBAC_SWITCH ++#if defined(CONFIG_RSBAC_SWITCH) || defined(CONFIG_RSBAC_SOFTMODE) + union rsbac_target_id_t rsbac_target_id; + union rsbac_attribute_value_t rsbac_attribute_value; + char * switch_name; +@@ -1509,6 +1509,7 @@ + case SOFTMODE: rsbac_softmode = value; + break; + #endif ++#ifdef CONFIG_RSBAC_SWITCH + #ifdef CONFIG_RSBAC_MAC + case MAC: rsbac_switch_mac = value; + break; +@@ -1557,6 +1558,7 @@ + case RES: rsbac_switch_res = value; + break; + #endif ++#endif /* SWITCH */ + default: + return (-RSBAC_EINVALIDMODULE); + } +Index: linux-2.4.27-rsbac-v1.2.3/rsbac/adf/jail/jail_syscalls.c +=================================================================== +--- linux-2.4.27-rsbac-v1.2.3/rsbac/adf/jail/jail_syscalls.c (revision 16) ++++ linux-2.4.27-rsbac-v1.2.3/rsbac/adf/jail/jail_syscalls.c (working copy) +@@ -41,8 +41,10 @@ + /* Externally visible functions */ + /************************************************* */ + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) + extern long sys_chroot(const char * filename); + extern long sys_chdir(const char * filename); ++#endif + + /* Create a jail for current process */ + /* Note: It is allowed to create jails within jails, but with restrictions */ +Index: linux-2.4.27-rsbac-v1.2.3/rsbac/adf/adf_main.c +=================================================================== +--- linux-2.4.27-rsbac-v1.2.3/rsbac/adf/adf_main.c (revision 16) ++++ linux-2.4.27-rsbac-v1.2.3/rsbac/adf/adf_main.c (working copy) +@@ -333,6 +333,14 @@ + && (sb_p->s_magic == PIPEFS_MAGIC) + ) + return DO_NOT_CARE; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) ++ /* No decision on pseudo sockfs */ ++ if( (target == T_FILE) ++ && (!RSBAC_MAJOR(tid.file.device)) ++ && (!RSBAC_MINOR(tid.file.device)) ++ ) ++ return DO_NOT_CARE; ++#endif + switch(request) + { + case R_GET_STATUS_DATA: +@@ -1008,6 +1016,7 @@ + rsbac_pid_t parent_pid = 0; + + /* Get owner's logging pseudo */ ++ i_tid.user = owner; + if (rsbac_get_attr(GEN,T_USER,i_tid,A_pseudo,&i_attr_val,FALSE)) + { + rsbac_ds_get_error("rsbac_adf_request()", A_pseudo); +@@ -2448,6 +2457,7 @@ + #endif /* SECDEL */ + + #ifdef CONFIG_RSBAC_SYM_REDIR ++EXPORT_SYMBOL(rsbac_symlink_redirect); + void rsbac_symlink_redirect(struct dentry * dentry_p, char * name) + { + int err; +Index: linux-2.4.27-rsbac-v1.2.3/rsbac/adf/adf_check.c +=================================================================== +--- linux-2.4.27-rsbac-v1.2.3/rsbac/adf/adf_check.c (revision 16) ++++ linux-2.4.27-rsbac-v1.2.3/rsbac/adf/adf_check.c (working copy) +@@ -439,6 +439,7 @@ + { + case T_DIR: + case T_SCD: ++ case T_IPC: + #ifdef CONFIG_RSBAC_RW + case T_FILE: + case T_FIFO: +Index: linux-2.4.27-rsbac-v1.2.3/rsbac/data_structures/rc_data_structures.c +=================================================================== +--- linux-2.4.27-rsbac-v1.2.3/rsbac/data_structures/rc_data_structures.c (revision 16) ++++ linux-2.4.27-rsbac-v1.2.3/rsbac/data_structures/rc_data_structures.c (working copy) +@@ -146,7 +146,7 @@ + off_t pos = 0; + off_t begin = 0; + +- if (!rsbac_is_initialized) ++ if (!rsbac_is_initialized()) + { + printk(KERN_WARNING "stats_rc_proc_info(): RSBAC not initialized\n"); + return(-RSBAC_ENOTINITIALIZED); +@@ -1540,7 +1540,7 @@ + + int rsbac_stats_rc(void) + { +- if (!rsbac_is_initialized) ++ if (!rsbac_is_initialized()) + { + printk(KERN_WARNING "rsbac_stats_rc(): RSBAC not initialized\n"); + return(-RSBAC_ENOTINITIALIZED); +Index: linux-2.4.27-rsbac-v1.2.3/rsbac/data_structures/aci_data_structures.c +=================================================================== +--- linux-2.4.27-rsbac-v1.2.3/rsbac/data_structures/aci_data_structures.c (revision 16) ++++ linux-2.4.27-rsbac-v1.2.3/rsbac/data_structures/aci_data_structures.c (working copy) +@@ -9504,10 +9504,11 @@ + /* All functions return 0, if no error occurred, and a negative error code */ + /* otherwise. The error codes are defined in rsbac_error.h. */ + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) + /* declare sys_kill */ + extern long sys_kill(int pid, int sig); ++#endif + +- + #ifdef CONFIG_RSBAC_INIT_DELAY + int rsbac_init(kdev_t root_dev) + #else +Index: linux-2.4.27-rsbac-v1.2.3/rsbac/data_structures/pm_data_structures.c +=================================================================== +--- linux-2.4.27-rsbac-v1.2.3/rsbac/data_structures/pm_data_structures.c (revision 16) ++++ linux-2.4.27-rsbac-v1.2.3/rsbac/data_structures/pm_data_structures.c (working copy) +@@ -90,7 +90,7 @@ + union rsbac_attribute_value_t rsbac_attribute_value; + #endif + +- if (!rsbac_is_initialized) ++ if (!rsbac_is_initialized()) + { + #ifdef CONFIG_RSBAC_RMSG + rsbac_printk(KERN_WARNING "stats_pm_proc_info(): RSBAC not initialized\n"); +@@ -1661,7 +1661,7 @@ + u_long all_member_count = 0; + u_long all_count = 0; + +- if (!rsbac_is_initialized) ++ if (!rsbac_is_initialized()) + { + #ifdef CONFIG_RSBAC_RMSG + rsbac_printk(KERN_WARNING "rsbac_stats_pm(): RSBAC not initialized\n"); +Index: linux-2.4.27-rsbac-v1.2.3/rsbac/data_structures/acl_data_structures.c +=================================================================== +--- linux-2.4.27-rsbac-v1.2.3/rsbac/data_structures/acl_data_structures.c (revision 16) ++++ linux-2.4.27-rsbac-v1.2.3/rsbac/data_structures/acl_data_structures.c (working copy) +@@ -539,7 +539,7 @@ + union rsbac_target_id_t rsbac_target_id; + union rsbac_attribute_value_t rsbac_attribute_value; + +- if (!rsbac_is_initialized) ++ if (!rsbac_is_initialized()) + { + #ifdef CONFIG_RSBAC_RMSG + rsbac_printk(KERN_WARNING "stats_acl_proc_info(): RSBAC not initialized\n"); +@@ -759,7 +759,7 @@ + union rsbac_target_id_t rsbac_target_id; + union rsbac_attribute_value_t rsbac_attribute_value; + +- if (!rsbac_is_initialized) ++ if (!rsbac_is_initialized()) + { + #ifdef CONFIG_RSBAC_RMSG + rsbac_printk(KERN_WARNING "acl_acllist_proc_info(): RSBAC not initialized\n"); +@@ -1697,7 +1697,7 @@ + union rsbac_target_id_t rsbac_target_id; + union rsbac_attribute_value_t rsbac_attribute_value; + +- if (!rsbac_is_initialized) ++ if (!rsbac_is_initialized()) + { + #ifdef CONFIG_RSBAC_RMSG + rsbac_printk(KERN_WARNING "acl_grouplist_proc_info(): RSBAC not initialized\n"); +@@ -3057,7 +3057,7 @@ + union rsbac_target_id_t rsbac_target_id; + union rsbac_attribute_value_t rsbac_attribute_value; + +- if (!rsbac_is_initialized) ++ if (!rsbac_is_initialized()) + { + printk(KERN_WARNING "rsbac_stats_acl(): RSBAC not initialized\n"); + return(-RSBAC_ENOTINITIALIZED); +Index: linux-2.4.27-rsbac-v1.2.3/rsbac/data_structures/mac_data_structures.c +=================================================================== +--- linux-2.4.27-rsbac-v1.2.3/rsbac/data_structures/mac_data_structures.c (revision 16) ++++ linux-2.4.27-rsbac-v1.2.3/rsbac/data_structures/mac_data_structures.c (working copy) +@@ -483,7 +483,7 @@ + union rsbac_target_id_t rsbac_target_id; + union rsbac_attribute_value_t rsbac_attribute_value; + +- if (!rsbac_is_initialized) ++ if (!rsbac_is_initialized()) + { + printk(KERN_WARNING "stats_mac_proc_info(): RSBAC not initialized\n"); + return(-RSBAC_ENOTINITIALIZED); +@@ -587,7 +587,7 @@ + union rsbac_target_id_t rsbac_target_id; + union rsbac_attribute_value_t rsbac_attribute_value; + +- if (!rsbac_is_initialized) ++ if (!rsbac_is_initialized()) + { + printk(KERN_WARNING "mac_trulist_proc_info(): RSBAC not initialized\n"); + return(-RSBAC_ENOTINITIALIZED); +@@ -1174,7 +1174,7 @@ + union rsbac_target_id_t rsbac_target_id; + union rsbac_attribute_value_t rsbac_attribute_value; + +- if (!rsbac_is_initialized) ++ if (!rsbac_is_initialized()) + { + #ifdef CONFIG_RSBAC_RMSG + rsbac_printk(KERN_WARNING "rsbac_stats_mac(): RSBAC not initialized\n"); +@@ -1771,7 +1771,7 @@ + struct rsbac_mac_device_list_item_t * device_p; + int err=0; + +- if (!rsbac_is_initialized) ++ if (!rsbac_is_initialized()) + { + printk(KERN_WARNING "rsbac_mac_copy_fp_truset(): RSBAC not initialized\n"); + return(-RSBAC_ENOTINITIALIZED); +@@ -1822,7 +1822,7 @@ + int rsbac_mac_copy_pp_truset(rsbac_pid_t old_p_set_id, + rsbac_pid_t new_p_set_id) + { +- if (!rsbac_is_initialized) ++ if (!rsbac_is_initialized()) + { + printk(KERN_WARNING "rsbac_mac_copy_pp_truset(): RSBAC not initialized\n"); + return(-RSBAC_ENOTINITIALIZED); +@@ -1850,7 +1850,7 @@ + struct rsbac_mac_device_list_item_t * device_p; + long count; + +- if (!rsbac_is_initialized) ++ if (!rsbac_is_initialized()) + { + printk(KERN_WARNING "rsbac_mac_get_f_trulist(): RSBAC not initialized\n"); + return(-RSBAC_ENOTINITIALIZED); +@@ -1904,7 +1904,7 @@ + rsbac_uid_t **trulist_p, + rsbac_time_t **ttllist_p) + { +- if (!rsbac_is_initialized) ++ if (!rsbac_is_initialized()) + { + printk(KERN_WARNING "rsbac_mac_get_p_trulist(): RSBAC not initialized\n"); + return(-RSBAC_ENOTINITIALIZED); +Index: linux-2.4.27-rsbac-v1.2.3/rsbac/data_structures/auth_data_structures.c +=================================================================== +--- linux-2.4.27-rsbac-v1.2.3/rsbac/data_structures/auth_data_structures.c (revision 16) ++++ linux-2.4.27-rsbac-v1.2.3/rsbac/data_structures/auth_data_structures.c (working copy) +@@ -770,7 +770,7 @@ + union rsbac_target_id_t rsbac_target_id; + union rsbac_attribute_value_t rsbac_attribute_value; + +- if (!rsbac_is_initialized) ++ if (!rsbac_is_initialized()) + { + printk(KERN_WARNING "stats_auth_proc_info(): RSBAC not initialized\n"); + return(-RSBAC_ENOTINITIALIZED); +@@ -940,7 +940,7 @@ + union rsbac_target_id_t rsbac_target_id; + union rsbac_attribute_value_t rsbac_attribute_value; + +- if (!rsbac_is_initialized) ++ if (!rsbac_is_initialized()) + { + printk(KERN_WARNING "auth_caplist_proc_info(): RSBAC not initialized\n"); + return(-RSBAC_ENOTINITIALIZED); +@@ -1908,7 +1908,7 @@ + union rsbac_target_id_t rsbac_target_id; + union rsbac_attribute_value_t rsbac_attribute_value; + +- if (!rsbac_is_initialized) ++ if (!rsbac_is_initialized()) + { + #ifdef CONFIG_RSBAC_RMSG + rsbac_printk(KERN_WARNING "rsbac_stats_auth(): RSBAC not initialized\n"); +@@ -2940,7 +2940,7 @@ + struct rsbac_auth_device_list_item_t * device_p; + int err=0; + +- if (!rsbac_is_initialized) ++ if (!rsbac_is_initialized()) + { + printk(KERN_WARNING "rsbac_auth_copy_fp_capset(): RSBAC not initialized\n"); + return(-RSBAC_ENOTINITIALIZED); +@@ -2991,7 +2991,7 @@ + int rsbac_auth_copy_pp_capset(rsbac_pid_t old_p_set_id, + rsbac_pid_t new_p_set_id) + { +- if (!rsbac_is_initialized) ++ if (!rsbac_is_initialized()) + { + printk(KERN_WARNING "rsbac_auth_copy_pp_capset(): RSBAC not initialized\n"); + return(-RSBAC_ENOTINITIALIZED); +@@ -3020,7 +3020,7 @@ + struct rsbac_auth_device_list_item_t * device_p; + long count; + +- if (!rsbac_is_initialized) ++ if (!rsbac_is_initialized()) + { + printk(KERN_WARNING "rsbac_auth_get_f_caplist(): RSBAC not initialized\n"); + return(-RSBAC_ENOTINITIALIZED); +@@ -3098,7 +3098,7 @@ + { + long count; + +- if (!rsbac_is_initialized) ++ if (!rsbac_is_initialized()) + { + printk(KERN_WARNING "rsbac_auth_get_p_caplist(): RSBAC not initialized\n"); + return(-RSBAC_ENOTINITIALIZED); diff --git a/sys-kernel/rsbac-dev-sources/files/rsbac-bugfix-v1.2.3-ao-01.diff b/sys-kernel/rsbac-dev-sources/files/rsbac-bugfix-v1.2.3-ao-01.diff new file mode 100644 index 000000000000..47ef679afd71 --- /dev/null +++ b/sys-kernel/rsbac-dev-sources/files/rsbac-bugfix-v1.2.3-ao-01.diff @@ -0,0 +1,37 @@ + +Index: linux-2.6.9-rsbac-v1.2.3/include/rsbac/fs.h +=================================================================== +--- linux-2.6.9-rsbac-v1.2.3/include/rsbac/fs.h (revision 46) ++++ linux-2.6.9-rsbac-v1.2.3/include/rsbac/fs.h (working copy) +@@ -33,7 +33,9 @@ + + struct super_block * rsbac_get_super_block(kdev_t kdev); + ++#ifndef __fput + extern void __fput(struct file *); ++#endif + + #ifndef SHM_FS_MAGIC + #define SHM_FS_MAGIC 0x02011994 +Index: linux-2.6.9-rsbac-v1.2.3/rsbac/adf/reg/kproc_hide.c +=================================================================== +--- linux-2.6.9-rsbac-v1.2.3/rsbac/adf/reg/kproc_hide.c (revision 46) ++++ linux-2.6.9-rsbac-v1.2.3/rsbac/adf/reg/kproc_hide.c (working copy) +@@ -10,6 +10,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + #include +@@ -17,8 +19,6 @@ + #include + #include + #include +-#include +-#include + + MODULE_AUTHOR("Michal Purzynski"); + MODULE_DESCRIPTION("RSBAC REG kproc_hide decision module"); diff --git a/sys-kernel/rsbac-dev-sources/files/rsbac-bugfix-v1.2.3-kang-01.diff b/sys-kernel/rsbac-dev-sources/files/rsbac-bugfix-v1.2.3-kang-01.diff new file mode 100644 index 000000000000..570df3e3e236 --- /dev/null +++ b/sys-kernel/rsbac-dev-sources/files/rsbac-bugfix-v1.2.3-kang-01.diff @@ -0,0 +1,12 @@ +--- include/rsbac/aci.h.ori 2004-11-13 13:39:21.092404152 +0100 ++++ include/rsbac/aci.h 2004-11-13 13:42:13.402209080 +0100 +@@ -39,7 +39,7 @@ + extern void rsbac_off(void); + + /* For other kernel parts to check, whether RSBAC was initialized correctly */ +-extern inline boolean rsbac_is_initialized(void); ++extern boolean rsbac_is_initialized(void); + + /* When mounting a device, its ACI must be read and added to the ACI lists. */ + extern int rsbac_mount(struct super_block * sb_p, struct dentry * d_covers); + diff --git a/sys-kernel/rsbac-dev-sources/files/rsbac-dev-sources-2.6.7-62524-ptmx.patch b/sys-kernel/rsbac-dev-sources/files/rsbac-dev-sources-2.6.7-62524-ptmx.patch new file mode 100644 index 000000000000..2312a2bf5e3b --- /dev/null +++ b/sys-kernel/rsbac-dev-sources/files/rsbac-dev-sources-2.6.7-62524-ptmx.patch @@ -0,0 +1,21 @@ +Index: linux-2.6.5/fs/devpts/inode.c +=================================================================== +--- linux-2.6.5.orig/fs/devpts/inode.c ++++ linux-2.6.5/fs/devpts/inode.c +@@ -178,9 +178,13 @@ struct tty_struct *devpts_get_tty(int nu + { + struct dentry *dentry = get_node(number); + struct tty_struct *tty; +- +- tty = (IS_ERR(dentry) || !dentry->d_inode) ? NULL : +- dentry->d_inode->u.generic_ip; ++ ++ tty = NULL; ++ if (!IS_ERR(dentry)) { ++ if (dentry->d_inode) ++ tty = dentry->d_inode->u.generic_ip; ++ dput(dentry); ++ } + + up(&devpts_root->d_inode->i_sem); + diff --git a/sys-kernel/rsbac-dev-sources/files/rsbac-dev-sources-2.6.7-70681-binfmt.patch b/sys-kernel/rsbac-dev-sources/files/rsbac-dev-sources-2.6.7-70681-binfmt.patch new file mode 100644 index 000000000000..9ca23675f25d --- /dev/null +++ b/sys-kernel/rsbac-dev-sources/files/rsbac-dev-sources-2.6.7-70681-binfmt.patch @@ -0,0 +1,72 @@ +--- linux-2.6.7-uc0-r8/fs/binfmt_elf.c 2004-11-12 11:50:08 -08:00 ++++ linux-2.6.7-uc0-r8-plasmaroo/fs/binfmt_elf.c 2004-11-12 11:50:08 -08:00 +@@ -335,9 +335,12 @@ + goto out; + + retval = kernel_read(interpreter,interp_elf_ex->e_phoff,(char *)elf_phdata,size); +- error = retval; +- if (retval < 0) ++ error = -EIO; ++ if (retval != size) { ++ if (retval < 0) ++ error = retval; + goto out_close; ++ } + + eppnt = elf_phdata; + for (i=0; ie_phnum; i++, eppnt++) { +@@ -532,8 +535,11 @@ + goto out; + + retval = kernel_read(bprm->file, elf_ex.e_phoff, (char *) elf_phdata, size); +- if (retval < 0) ++ if (retval != size) { ++ if (retval >= 0) ++ retval = -EIO; + goto out_free_ph; ++ } + + files = current->files; /* Refcounted so ok */ + retval = unshare_files(); +@@ -580,8 +586,14 @@ + retval = kernel_read(bprm->file, elf_ppnt->p_offset, + elf_interpreter, + elf_ppnt->p_filesz); +- if (retval < 0) ++ if (retval != elf_ppnt->p_filesz) { ++ if (retval >= 0) ++ retval = -EIO; + goto out_free_interp; ++ } ++ /* make sure path is NULL terminated */ ++ elf_interpreter[elf_ppnt->p_filesz - 1] = '\0'; ++ + /* If the program interpreter is one of these two, + * then assume an iBCS2 image. Otherwise assume + * a native linux image. +@@ -616,8 +628,11 @@ + if (IS_ERR(interpreter)) + goto out_free_interp; + retval = kernel_read(interpreter, 0, bprm->buf, BINPRM_BUF_SIZE); +- if (retval < 0) ++ if (retval != BINPRM_BUF_SIZE) { ++ if (retval >= 0) ++ retval = -EIO; + goto out_free_dentry; ++ } + + /* Get the exec headers */ + loc->interp_ex = *((struct exec *) bprm->buf); +@@ -776,8 +791,10 @@ + } + + error = elf_map(bprm->file, load_bias + vaddr, elf_ppnt, elf_prot, elf_flags); +- if (BAD_ADDR(error)) +- continue; ++ if (BAD_ADDR(error)) { ++ send_sig(SIGKILL, current, 0); ++ goto out_free_dentry; ++ } + + if (!load_addr_set) { + load_addr_set = 1; diff --git a/sys-kernel/rsbac-dev-sources/rsbac-dev-sources-2.6.7-r6.ebuild b/sys-kernel/rsbac-dev-sources/rsbac-dev-sources-2.6.7-r7.ebuild similarity index 89% rename from sys-kernel/rsbac-dev-sources/rsbac-dev-sources-2.6.7-r6.ebuild rename to sys-kernel/rsbac-dev-sources/rsbac-dev-sources-2.6.7-r7.ebuild index f981ae09c345..1e6f91753b17 100644 --- a/sys-kernel/rsbac-dev-sources/rsbac-dev-sources-2.6.7-r6.ebuild +++ b/sys-kernel/rsbac-dev-sources/rsbac-dev-sources-2.6.7-r7.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/rsbac-dev-sources/rsbac-dev-sources-2.6.7-r6.ebuild,v 1.1 2004/10/22 11:57:07 kang Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/rsbac-dev-sources/rsbac-dev-sources-2.6.7-r7.ebuild,v 1.1 2004/11/13 13:20:27 kang Exp $ IUSE="" ETYPE="sources" @@ -22,9 +22,11 @@ UNIPATCH_LIST="${FILESDIR}/${PN}-iptables-dos.patch ${FILESDIR}/${PN}-CAN-2004-0596.patch ${FILESDIR}/${OKV}-cmdline.patch ${FILESDIR}/${PN}-CAN-2004-0816.patch + ${FILESDIR}/${PN}-${OKV}-62524-ptmx.patch ${DISTDIR}/linux-2.6.7-CAN-2004-0415.patch ${DISTDIR}/rsbac-patches-${KV_MAJOR}.${KV_MINOR}-${RGPV}.tar.bz2 - ${FILESDIR}/${PN}-v1.2.3-3.patch" + ${FILESDIR}/${PN}-v1.2.3-3.patch + ${FILESDIR}/rsbac-bugfix-v1.2.3-*.diff" UNIPATCH_DOCS="${WORKDIR}/patches/rsbac-patches-${KV_MAJOR}.${KV_MINOR}-${RGPV}/0000_README" HOMEPAGE="http://hardened.gentoo.org/rsbac/"