[8142] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

Re: [PATCH] scsi reset from user space

daemon@ATHENA.MIT.EDU (Douglas Gilbert)
Tue Feb 22 00:15:44 2000

Message-ID: <38B1FF67.4A6606B7@interlog.com>
Date:   Mon, 21 Feb 2000 22:15:51 -0500
From: Douglas Gilbert <dgilbert@interlog.com>
MIME-Version: 1.0
To: James Bottomley <James.Bottomley@columbiasc.ncr.com>
Cc: Ricky Beam <jfbeam@bluetopia.net>, linux-scsi@vger.rutgers.edu
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

James Bottomley wrote:
> 
> jfbeam@bluetopia.net said:
> > This is indeed an invaluable feature... there are all sorts of reasons
> > to want to reset a single device or entire bus of an active scsi card.
> >  HOWEVER, serious care must be taken in allowing this.
> [...]
> > If userland applications can request target and/or bus resets, then
> > there needs to be a mechanism for userland applications to request
> > that others DON'T do these actions.  (This redefines "bloody mess."
> > :-))
> 
> Doug Gilbert put in a check to prevent anyone other than root from issuing a
> reset.  I believe this is sufficient, since philosophically UNIX doesn't
> usually have checks to prevent root from blowing their foot off.

I put in the line:
	if(! capable(CAP_SYS_ADMIN))  return -EACCES;

prior to anything dangerous being done. After reading a thread on
the linux kernel newsgroup I am wondering whether that should be:
	if(! capable(CAP_SYS_RAWIO)  return -EACCES;

Guidance anyone?


Doug Gilbert

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu

home help back first fref pref prev next nref lref last post