getting rid of suser/fsuser for good, first part
Subsystems (2)
PATCH 1/1 getting rid of suser/fsuser for good, first part
It is after all 2.5-time, and hence time for a spring-cleaning.
This patch removes suser/fsuser, and while at it,
fixes ufs/balloc.c to use capable instead.
I figured that the only way to get people to fix their files was to break them ;-P
These files are still naughty (feel free to fix!):
arch/i386/kernel/mtrr.carch/sparc64/kernel/ioctl32.cdrivers/net/wan/lmc/lmc_main.cdrivers/net/fealnx.cdrivers/block/cciss.cdrivers/block/cpqarray.cdrivers/block/swim3.cdrivers/block/swim_iop.cdrivers/char/tty_io.cdrivers/char/vt.cdrivers/char/mxser.cdrivers/char/serial167.cdrivers/char/ip2main.cdrivers/char/rio/rio_linux.cdrivers/char/moxa.cdrivers/scsi/cpqfcTSinit.cdrivers/pcmcia/ds.cdrivers/s390/char/tubtty.c
I hope I didn't miss anything.
Regards: David Weinehall
_ _
// David Weinehall <[email protected]> /> Northern lights wander \\
// Maintainer of the v2.0 kernel // Dance across the winter sky // \> http://www.acc.umu.se/~tao/ </ Full colour fire </
fs/ufs/balloc.c renamed from fs/ufs/balloc.c.old +4 -4
@@ -284,16 +284,16 @@return 0 ; } } - +/* * There is not enough space for user on the device */ -if (!fsuser () &&ufs_freespace (usb1,UFS_MINFREE ) <=0 ) { +if (!capable (CAP_SYS_RESOURCE ) &&ufs_freespace (usb1,UFS_MINFREE ) <=0 ) {unlock_super (sb); UFSD(("EXIT (FAILED)\n"))return 0 ; - } - + } +if (goal >= uspi->s_size) goal =0 ;if (goal ==0 )
include/linux/sched.h renamed from include/linux/sched.h.old +3 -40
55 lines not on this page · raw message
include/linux/capability.h renamed from include/linux/capability.h.old +0 -6
@@ -99,10 +99,6 @@#define CAP_FSETID 4 -/* Used to decide between falling back on the old suser() or fsuser(). */ - -#define CAP_FS_MASK 0x1f -/* Overrides the restriction that the real or effective user ID of a process sending a signal must match the real or effective user ID of the process receiving the signal. */
@@ -345,8 +341,6 @@#define cap_clear (c) do { cap_t(c) = 0; } while(0)#define cap_set_full (c) do { cap_t(c) = ~0; } while(0)#define cap_mask (c,mask) do { cap_t(c) &= cap_t(mask); } while(0) - -#define cap_is_fs_cap (c) (CAP_TO_MASK(c) & CAP_FS_MASK)#endif /* __KERNEL__ */
Quoted 4 lines · David Weinehall
It is after all 2.5-time, and hence time for a spring-cleaning. These files are still naughty (feel free to fix!):
arch/i386/kernel/mtrr.c
This file in particular needs more than just a spring clean imo. As extra support was added for the different MTRR lookalikes, it got messier and messier until it turned into the goop we have now. Doing a real cleanup on this has been on my TODO for months now. Hopefully I'll get around to it in the 2.5 timeframe.
Signature · 2 lines
| Dave Jones. http://www.codemonkey.org.uk | SuSE Labs
Quoted 11 lines · Dave Jones
Quoted 4 lines · David Weinehall
It is after all 2.5-time, and hence time for a spring-cleaning. These files are still naughty (feel free to fix!):
arch/i386/kernel/mtrr.cThis file in particular needs more than just a spring clean imo. As extra support was added for the different MTRR lookalikes, it got messier and messier until it turned into the goop we have now. Doing a real cleanup on this has been on my TODO for months now. Hopefully I'll get around to it in the 2.5 timeframe.
Agreed. I had a look in it, and it looked like a horrible mess.
/David
_ _
// David Weinehall <[email protected]> /> Northern lights wander \\
// Maintainer of the v2.0 kernel // Dance across the winter sky // \> http://www.acc.umu.se/~tao/ </ Full colour fire </