[pso] [Tema1] Drepturi
Adrian - Razvan Deaconescu
razvand at gmail.com
Wed Mar 15 06:03:48 EET 2006
On 3/15/06, Bogdan Ardeleanu <bogdanardeleanu at gmail.com> wrote:
>
> Poate e bizar si de prost gust ca intreb...dar chestia cu verificarea de
> drepturi de acces se refera cumva la capabilitati si anume:
>
> if( !capable(CAP_SYS_NICE{sau altceva}) )
> return -EPERM;
>
> ...la functiile din <linux/capability.h> ???
>
Nu.
Sau la ce altceva anume!....Multumesc frumos!
>
Se refera doar la detinatorul procesului care face o cerere de
interceptare/deinterceptare/monitorizare; ceva de genul
#define PRIVILEGED_UID 0
...
switch (cmd) {
case REQUEST_SYSCALL_INTERCEPT:
if (current->uid != PRIVILEGED_UID) /* un proces apartinand
unui utilizator neprivilegiat solicita interceptarea unui apel de sistem */
return -EPERM;
...
Razvan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cursuri.cs.pub.ro/pipermail/pso/attachments/20060315/57c5fccc/attachment.html
More information about the pso
mailing list