lkml.org 
[lkml]   [2002]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Various suser() -> capable() chang
Date
From
>  	case IDAPASSTHRU:
> - if (!suser()) return -EPERM;
> + if (!capable(CAP_SYS_ADMIN)) return -EPERM;

The cpqarray ones should be CAP_SYS_RAWIO

> diff -Nru a/drivers/scsi/cpqfcTSinit.c b/drivers/scsi/cpqfcTSinit.c
> --- a/drivers/scsi/cpqfcTSinit.c Fri Apr 26 18:34:23 2002
> +++ b/drivers/scsi/cpqfcTSinit.c Fri Apr 26 18:34:23 2002
> @@ -532,7 +532,7 @@
> =20
> // must be super user to send stuff directly to the
> // controller and/or physical drives...
> - if( !suser() )
> + if( !capable(CAP_SYS_ADMIN) )

Also RAWIO


Basically - stuff giving raw hardware access sohuld be CAP_SYS_RAWIO, the
others CAP_SYS_ADMIN is a good general case, but as you change then check
its appropriate
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:25    [W:1.375 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site