Re: [PATCH-NEW] allow root to modify raw scsi command permissions list

From: Marc Ballarin (Ballarin.Marc_at_gmx.de)
Date: 09/16/04

  • Next message: Oliver M. Bolzer: "qla2xxx: frequent total lockups (2.6.8, 2.6.9-rc{1-mm5,2})"
    Date:	Thu, 16 Sep 2004 01:33:51 +0200
    To: Alan Cox <alan@lxorguk.ukuu.org.uk>
    
    

    On Wed, 15 Sep 2004 22:38:47 +0100
    Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:

    > You need to check for capable(CAP_SYS_RAWIO) otherwise you elevate
    > anyone with access bypass capabilities to CAP_SYS_RAWIO equivalent
    > powers.

    True. File permissions aren't enough.

    Will something like this suffice?

    static ssize_t rcf_store_write(struct rawio_cmd_filter *rcf, const char *page,
                            size_t count)
    {

            ...
            
            if (!capable(CAP_SYS_RAWIO))
                    return -EPERM;
            
            while(i < RCF_MAX_NR_CMDS)
                    clear_bit(i++, rcf->write_ok);
            ...

    Regards
    -
    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/


  • Next message: Oliver M. Bolzer: "qla2xxx: frequent total lockups (2.6.8, 2.6.9-rc{1-mm5,2})"

    Relevant Pages

    • Re: o/t Its been great fun
      ... Regards ... > Well Im going to unsubscribe from the ng later, ... > competitions, or tales of greed, because I really don't agree with people ...
      (uk.rec.competitions)
    • Re: [SLE] SPAM: Test
      ... And why send regards? ... before posting to the list. ... To unsubscribe, send an email to ... My incoming spam to my list address ...
      (SuSE)
    • Re: [SLE] SPAM: Test
      ... And why send regards? ... before posting to the list. ... retreive the list FAQ now ... To unsubscribe, send an email to ...
      (SuSE)
    • Re: Installing FreeBSD 5.1 on i386 (ASUS motherboard).
      ... > ago and disabling ACPI ... > Best regards, ... >> Do you Yahoo!? ... To unsubscribe, ...
      (freebsd-questions)
    • Re: The FreeBSD Diary: 2004-07-04 - 2004-07-24
      ... but why freesbie-1.0 cant detect my nic on T41 ... Do you Yahoo!? ... To unsubscribe, ...
      (freebsd-questions)