Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 48873 Details for
Bug 77132
sys-devel/patch: patch reports uncorrect failures with --dry-run
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
the whole patch
rsbac-bugfix-v1.2.3-9.diff (text/plain), 10.66 KB, created by
Guillaume Destuynder (RETIRED)
on 2005-01-18 13:02:36 UTC
(
hide
)
Description:
the whole patch
Filename:
MIME Type:
Creator:
Guillaume Destuynder (RETIRED)
Created:
2005-01-18 13:02:36 UTC
Size:
10.66 KB
patch
obsolete
>Index: linux-2.4.27-rsbac-v1.2.3/include/rsbac/aci.h >=================================================================== >--- linux-2.4.27-rsbac-v1.2.3/include/rsbac/aci.h (revision 38) >+++ linux-2.4.27-rsbac-v1.2.3/include/rsbac/aci.h (working copy) >@@ -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); >Index: linux-2.4.27-rsbac-v1.2.3/include/rsbac/fs.h >=================================================================== >--- linux-2.4.27-rsbac-v1.2.3/include/rsbac/fs.h (revision 38) >+++ linux-2.4.27-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.4.27-rsbac-v1.2.3/rsbac/adf/auth/auth_main.c >=================================================================== >--- linux-2.4.27-rsbac-v1.2.3/rsbac/adf/auth/auth_main.c (revision 38) >+++ linux-2.4.27-rsbac-v1.2.3/rsbac/adf/auth/auth_main.c (working copy) >@@ -118,7 +118,7 @@ > case T_PROCESS: > if(attr != A_owner) > return(UNDEFINED); >- if(i_attr_val1.owner == owner) >+ if(attr_val.owner == owner) > return DO_NOT_CARE; > /* check auth_may_setuid of process */ > if (rsbac_get_attr(AUTH, >@@ -151,7 +151,7 @@ > case T_PROCESS: > if(attr != A_owner) > return(UNDEFINED); >- if(i_attr_val1.owner == owner) >+ if(attr_val.owner == owner) > return DO_NOT_CARE; > /* check auth_may_setuid of process */ > if (rsbac_get_attr(AUTH, >Index: linux-2.4.27-rsbac-v1.2.3/rsbac/adf/reg/kproc_hide.c >=================================================================== >--- linux-2.4.27-rsbac-v1.2.3/rsbac/adf/reg/kproc_hide.c (revision 38) >+++ linux-2.4.27-rsbac-v1.2.3/rsbac/adf/reg/kproc_hide.c (working copy) >@@ -10,6 +10,8 @@ > #include <linux/kernel.h> > #include <linux/string.h> > #include <linux/fs.h> >+#include <linux/sched.h> >+#include <linux/file.h> > #include <rsbac/types.h> > #include <rsbac/reg.h> > #include <rsbac/adf.h> >@@ -17,8 +19,6 @@ > #include <rsbac/getname.h> > #include <rsbac/error.h> > #include <rsbac/proc_fs.h> >-#include <linux/sched.h> >-#include <linux/file.h> > > MODULE_AUTHOR("Michal Purzynski"); > MODULE_DESCRIPTION("RSBAC REG kproc_hide decision module"); >Index: linux-2.4.27-rsbac-v1.2.3/rsbac/adf/reg/root_plug.c >=================================================================== >--- linux-2.4.27-rsbac-v1.2.3/rsbac/adf/reg/root_plug.c (revision 38) >+++ linux-2.4.27-rsbac-v1.2.3/rsbac/adf/reg/root_plug.c (working copy) >@@ -44,9 +44,11 @@ > > static long handle = 999999; > >+#ifdef CONFIG_USB > /* default is a generic type of usb to serial converter */ > static int vendor_id = 0x0557; > static int product_id = 0x2008; >+#endif > > /**** Decision Functions ****/ > >@@ -58,9 +60,11 @@ > union rsbac_attribute_value_t attr_val, > rsbac_uid_t owner) > { >- struct usb_device *dev; >+ struct usb_device *dev = NULL; > >+#ifdef CONFIG_USB > dev = usb_find_device(vendor_id, product_id); >+#endif > > if (!dev) { > >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 38) >+++ linux-2.4.27-rsbac-v1.2.3/rsbac/data_structures/aci_data_structures.c (working copy) >@@ -9733,7 +9733,7 @@ > #if defined(CONFIG_RSBAC_REG) > EXPORT_SYMBOL(rsbac_is_initialized); > #endif >-inline boolean rsbac_is_initialized(void) >+boolean rsbac_is_initialized(void) > { > return rsbac_initialized; > }; >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 38) >+++ linux-2.4.27-rsbac-v1.2.3/rsbac/data_structures/auth_data_structures.c (working copy) >@@ -2487,9 +2487,9 @@ > return rsbac_list_lol_remove(process_handle, &pid); > #ifdef CONFIG_RSBAC_AUTH_DAC_OWNER > case ACT_eff: >- return rsbac_list_lol_remove(process_handle, &pid); >+ return rsbac_list_lol_remove(process_eff_handle, &pid); > case ACT_fs: >- return rsbac_list_lol_remove(process_handle, &pid); >+ return rsbac_list_lol_remove(process_fs_handle, &pid); > #endif > default: > return -RSBAC_EINVALIDTARGET; >Index: linux-2.4.28-rsbac-v1.2.3/rsbac/help/syscalls.c >=================================================================== >--- linux-2.4.28-rsbac-v1.2.3/rsbac/help/syscalls.c (revision 82) >+++ linux-2.4.28-rsbac-v1.2.3/rsbac/help/syscalls.c (working copy) >@@ -4398,14 +4398,14 @@ > k_arg.mac_add_p_tru.ttl); > case RSYS_mac_remove_p_tru: > return sys_rsbac_mac_remove_p_tru(k_arg.mac_remove_p_tru.pid, >- k_arg.mac_add_p_tru.uid); >+ k_arg.mac_remove_p_tru.uid); > case RSYS_mac_add_f_tru: > return sys_rsbac_mac_add_f_tru(k_arg.mac_add_f_tru.filename, >- k_arg.mac_add_p_tru.uid, >+ k_arg.mac_add_f_tru.uid, > k_arg.mac_add_f_tru.ttl); > case RSYS_mac_remove_f_tru: > return sys_rsbac_mac_remove_f_tru(k_arg.mac_remove_f_tru.filename, >- k_arg.mac_add_p_tru.uid); >+ k_arg.mac_remove_f_tru.uid); > case RSYS_mac_get_f_trulist: > return sys_rsbac_mac_get_f_trulist(k_arg.mac_get_f_trulist.filename, > k_arg.mac_get_f_trulist.trulist, >Index: linux-2.4.28-rsbac-v1.2.3/rsbac/data_structures/aci_data_structures.c >=================================================================== >--- linux-2.4.28-rsbac-v1.2.3/rsbac/data_structures/aci_data_structures.c (revision 82) >+++ linux-2.4.28-rsbac-v1.2.3/rsbac/data_structures/aci_data_structures.c (working copy) >@@ -10994,8 +10994,8 @@ > return(0); > }; > >-/* check for inode on disk (but not for reiserfs, because of broken 64bit inode numbers, >- * or for non-devices) */ >+/* check for inode on disk (but only for ext2, other fs had too many problems) >+ */ > int rsbac_check_inode(struct super_block * sb_p, rsbac_inode_nr_t inode) > { > struct inode * inode_p; >@@ -11008,6 +11008,9 @@ > if(!MAJOR(sb_p->s_dev)) > return 0; > >+ if(sb_p->s_magic != EXT2_SUPER_MAGIC) >+ return 0; >+ > #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) > if(sb_p->s_op && sb_p->s_op->read_inode2) > return 0; >Index: linux-2.4.28-rsbac-v1.2.3/include/rsbac/fs.h >=================================================================== >--- linux-2.4.28-rsbac-v1.2.3/include/rsbac/fs.h (revision 95) >+++ linux-2.4.28-rsbac-v1.2.3/include/rsbac/fs.h (working copy) >@@ -33,9 +33,13 @@ > > struct super_block * rsbac_get_super_block(kdev_t kdev); > >+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) >+extern void FASTCALL(__fput(struct file *)); >+#else > #ifndef __fput > extern void __fput(struct file *); > #endif >+#endif > > #ifndef SHM_FS_MAGIC > #define SHM_FS_MAGIC 0x02011994 >Index: linux-2.6.9-rsbac-v1.2.3/include/rsbac/helpers.h >=================================================================== >--- linux-2.6.9-rsbac-v1.2.3/include/rsbac/helpers.h (revision 95) >+++ linux-2.6.9-rsbac-v1.2.3/include/rsbac/helpers.h (working copy) >@@ -65,7 +65,7 @@ > > int rsbac_get_user(unsigned char *, unsigned char *, int); > >-extern inline void clear_user_buf(char * ubuf, int len); >+extern inline int clear_user_buf(char * ubuf, int len); > > char * rsbac_getname(const char *); > >Index: linux-2.6.9-rsbac-v1.2.3/rsbac/help/helpers.c >=================================================================== >--- linux-2.6.9-rsbac-v1.2.3/rsbac/help/helpers.c (revision 95) >+++ linux-2.6.9-rsbac-v1.2.3/rsbac/help/helpers.c (working copy) >@@ -696,7 +696,7 @@ > return copy_from_user(kern_p, user_p, size); > } > return(0); >- }; >+ } > > > #if defined(CONFIG_RSBAC_REG) || defined(CONFIG_RSBAC_REG_MAINT) >@@ -725,11 +725,11 @@ > void rsbac_putname(const char * name) > { > putname(name); >- }; >+ } > >-inline void clear_user_buf(char * ubuf, int len) >+inline int clear_user_buf(char * ubuf, int len) > { >- clear_user(ubuf,len); >- }; >+ return clear_user(ubuf,len); >+ } > > #endif /* __KERNEL__ */ >Index: linux-2.6.9-rsbac-v1.2.3/rsbac/help/debug.c >=================================================================== >--- linux-2.6.9-rsbac-v1.2.3/rsbac/help/debug.c (revision 95) >+++ linux-2.6.9-rsbac-v1.2.3/rsbac/help/debug.c (working copy) >@@ -1706,7 +1706,9 @@ > > if (!(k_buf = (char *) __get_free_page(GFP_KERNEL))) > return(-ENOMEM); >- copy_from_user(k_buf, buf, count); >+ err = copy_from_user(k_buf, buf, count); >+ if(err < 0) >+ return err; > > if(count < 15 || strncmp("log_levels", k_buf, 10)) > { >@@ -2436,7 +2438,9 @@ > > if (!(k_buf = (char *) __get_free_page(GFP_KERNEL))) > return(-ENOMEM); >- copy_from_user(k_buf, buf, count); >+ err = copy_from_user(k_buf, buf, count); >+ if(err < 0) >+ return err; > > if(count < 10) > goto out; >Index: linux-2.6.9-rsbac-v1.2.3/rsbac/data_structures/aci_data_structures.c >=================================================================== >--- linux-2.6.9-rsbac-v1.2.3/rsbac/data_structures/aci_data_structures.c (revision 95) >+++ linux-2.6.9-rsbac-v1.2.3/rsbac/data_structures/aci_data_structures.c (working copy) >@@ -5174,7 +5174,9 @@ > > if (!(k_buf = (char *) __get_free_page(GFP_KERNEL))) > return(-ENOMEM); >- copy_from_user(k_buf, buf, count); >+ err = copy_from_user(k_buf, buf, count); >+ if(err < 0) >+ return err; > > if(count < 13 || strncmp("auto", k_buf, 4)) > { >Index: linux-2.6.9-rsbac-v1.2.3/rsbac/help/pm_getname.c >=================================================================== >--- linux-2.6.9-rsbac-v1.2.3/rsbac/help/pm_getname.c (revision 81) >+++ linux-2.6.9-rsbac-v1.2.3/rsbac/help/pm_getname.c (revision 82) >@@ -265,7 +265,7 @@ > return(name); > }; > >-enum rsbac_pm_list_t get_pm_all_list_nr(const char * name) >+enum rsbac_pm_all_list_t get_pm_all_list_nr(const char * name) > { > enum rsbac_pm_all_list_t i; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 77132
:
48872
| 48873