[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ports in symlink server (was: Re: ssh as user: setrlimit failed)

From: Moritz Schulte
Subject: ports in symlink server (was: Re: ssh as user: setrlimit failed)
Date: 08 Oct 2001 14:33:58 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

James Morrison <rocketmail_com@rocketmail.com> writes:

>  Off the current topic I've been looking at the symlink server
> recently and there are two mach_port_t 's that I noticed.  One is
> realnode and the other is realnodenoauth.  What is the difference
> between these port_t's.

realnode comes from the fsys_startup() call:

  error =
    fsys_startup (bootstrap, 0, control, MACH_MSG_TYPE_COPY_SEND, &realnode);

realnodenoauth is like realnode, but without any associated [UG]IDs:

  io_restrict_auth (realnode, &realnodenoauth, 0, 0, 0, 0);

realnode isn't used any more:

  mach_port_deallocate (mach_task_self (), realnode);

realnodenoauth gets returned to O_NOLINK lookups:

  if (flags & O_NOLINK)
      /* Return our underlying node. */
      *ret = realnodenoauth;

[0] hurd/fsys.defs:

/* Sent by filesystem on its bootstrap port upon startup.
   REALNODE is the node this filesystem is the translator for,
   opened with flags FLAGS (O_NOTRANS is assumed even if not
   provided). */
routine fsys_startup (
        bootstrap: mach_port_t;
        openflags: int;
        control_port: mach_port_send_t;
        out realnode: mach_port_send_t);

[1] hurd/io.defs:

/* Return another port which has been restricted to do only those
   things which both the current user and the newly specified user can
   do.  */
routine io_restrict_auth (
        io_object: io_t;
        out new_object: mach_port_send_t;
        uids: idarray_t SCP;
        gids: idarray_t SCP);

Moritz Schulte <moritz@chaosdorf.de> http://www.chaosdorf.de/moritz/
Debian/GNU supporter - http://www.debian.org/ http://www.gnu.org/
GPG fingerprint = 3A14 3923 15BE FD57 FC06  B501 0841 2D7B 6F98 4199

reply via email to

[Prev in Thread] Current Thread [Next in Thread]