Re: Forking Java GUI Apps

From: Sadrul H C (imadil_at_gmail.com)
Date: 09/30/04

  • Next message: Joseph: "ASCII to binary and /proc"
    Date: 29 Sep 2004 22:20:08 -0700
    
    

    Kasper Dupont <kasperd@daimi.au.dk> wrote in message
    news:<415AA4FF.6D5986BF@daimi.au.dk>...
    > Sadrul H C wrote:
    > >
    > > you can set the uid of the forked child process to another user. that
    > > should prevent the child from making any successful X-server calls.
    >
    > This is a misunderstanding. You don't communicate
    > with the X-server through function calls. You
    > communicate over a socket.
    thanks for clearing that up :)

    >
    > To prevent a process from communicating with the
    > X-server you must do two things. Prevent it from
    > using an already established socket, that would
    > usually just mean close it. And you must prevent
    > it from getting the cookie. Usually you read the
    > cookie from ~/.Xauthority unless overriden by a
    > XAUTHORITY environment variable. But even if it
    > does not have read access to that file, it may
    > still find the cookie if it exist in the process
    > address space. A successfull execve call will
    > remove it from address space.
    if from root, i wanted to run a child process which
    communicates with the X server as a low-privileged
    user, then i change the permission levels to that
    ~/.Xauthority file so that the user can read from it.
    is that a good way of doing things?

    -- Adil


  • Next message: Joseph: "ASCII to binary and /proc"

    Relevant Pages

    • Newbie question on pipe() system call
      ... I want to communicate to these childs from the parent using ... So I create a pipe using the pipesystem call like:- ... for writing into the pipe. ... but nowhere I am mentioning the pid of which child process I ...
      (comp.unix.programmer)
    • Newbie question on pipe() system call
      ... I want to communicate to these childs from the parent using ... So I create a pipe using the pipesystem call like:- ... for writing into the pipe. ... but nowhere I am mentioning the pid of which child process I ...
      (comp.unix.programmer)
    • Buffer of stdio and pty
      ... stdio is full buffered and pseudo-terminal is line-buffered. ... When a process calls pty_forkto spawn a child process, ... communicate through line-buffered pseudo-terminal and both the stdio ...
      (comp.unix.programmer)
    • Re: Forking Java GUI Apps
      ... > should prevent the child from making any successful X-server calls. ... communicate over a socket. ... must provide a cookie. ...
      (comp.os.linux.development.system)
    • Re: Stdin/stdout tunneling through sockets to child process under Win9X
      ... I don't think this can be done with Windows 9x. ... that sits between your process and the other process, passing the data back ... the child process usually does not know that its ... - Socket handles are not inheritable when created. ...
      (microsoft.public.win32.programmer.networks)