Re: [PATCH] Various suser() -> capable() chang

From: Chris Wright (chris@wirex.com)
Date: Sat Apr 27 2002 - 20:52:38 EST


* Colin Slater (hoho@binbash.net) wrote:
>
> I figured that it would be functionaly equivilent and didn't pay mutch
> more attention to the issue. I've gone through it all again, and changed
> alot of them to CAP_SYS_TTY_CONFIG and CAP_RAW_IO. New patch attached.

Thanks for working on this change, it's been on the LSM todo list as well.
It looks like the patch is still all CAP_SYS_ADMIN, perhaps you attached
the wrong one. I see one fsuser() check in fs/ufs/balloc.c that should
be converted also.

cheers,
-chris

--- 1.8/fs/ufs/balloc.c Sun Feb 10 04:27:35 2002
+++ edited/fs/ufs/balloc.c Sat Apr 27 18:40:22 2002
@@ -288,7 +288,7 @@
         /*
          * 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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Apr 30 2002 - 22:00:15 EST