Re: suid GUI apps

From: Paul Barton-Davis (pbd@Op.Net)
Date: Fri May 19 2000 - 08:52:46 EDT

  • Next message: Lorenzo Allegrucci: "A variant of mlockall()"

    [ sorry for the bogus original subject ]

    Alan Cox <alan@lxorguk.ukuu.org.uk> wrote

    >> perhaps you can explain how an audio application with a GUI that needs
    >> to take advantage of SCHED_FIFO in some subset of its threads, and/or
    >> mlock(2), can be run without suid (or sudo, though it seems that the
    >> problems there are pretty similar) ?
    >
    >Capabilities let you control which you get. The normal approach is to run
    >the X11 interface unpriviledged - after all it is just display not real time
    >tied. When you get to video playback you get X and stuff involved and it
    >does get harder.

    What do I start reading to catch up on capabilities ?

    ---------
    Aaron Denney < wnoise@ugcs.caltech.edu> wrote:

    >SCHED_FIFO can be done with a 18-line suid helper wrapper. I don't

    Sorry, it can't. You're assuming that the target app is single
    threaded. The apps I'm talking about are multithreaded, and only some
    of them should run SCHED_FIFO.

    >see why it couldn't fork() and exec() a helper app to mlock() a shared
    >memory segment for audio data buffering.

    Unfortunately, I didn't mean what I said: mlockall(2), not
    mlock(2). Locking down the audio buffer when the text can still be
    paged tends to not accomplish the desired effect.

    And using IPC for low latency real-time audio tends to not work very
    well. I think you're confusing apps like xmms with the demands of
    multichannel disk recording, heavy duty software synthesis, etc.

    >(No, that won't let you mlock in the code, etc. For that, you do need
    >suid.)

    Exactly.

    --p

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Fri May 19 2000 - 08:59:27 EDT