lkml.org 
[lkml]   [2006]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Add a "enable" sysfs attribute to the pci devices to allow userspace (Xorg) to enable devices without doing foul direct access
From
Date
Arjan van de Ven <arjan@linux.intel.com> writes:

>> > + if (!pdev)
>> > + return 1;
>>
>> Can this happen?
>
> eh I suppose not; the other code doesn't check it either; fixed
>
>>
>> > + /* this can crash the machine when done on the "wrong" device */
>> > + if (!capable(CAP_SYS_ADMIN))
>> > + return 1;
>>
>> Don't the file's permissions suffice?
>
> that's a more philosophical question; you can ask that question about
> the entire capability system ;) Other code in the same file uses this
> same capability for a same level of access though.


A minor nit. This level of access should really be CAP_SYS_RAWIO.

Eric
-
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: 2006-05-15 04:14    [from the cache]
©2003-2011 Jasper Spaans