Messages in this thread | | | Subject | Re: [PATCH] Various suser() -> capable() chang | Date | Sat, 27 Apr 2002 19:56:48 +0100 (BST) | From | Alan Cox <> |
| |
> 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/
| |