bug-hurd
[Top][All Lists]
Advanced

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

Feature (bug) in access() and/or /hurd/auth


From: Jon Arney
Subject: Feature (bug) in access() and/or /hurd/auth
Date: Wed, 30 Jan 2002 10:21:26 -0700

Hi.

In the course of "building my own" hurd system from the
sources, I came across an interesting "feature" of the
access() call.  It happened accidentally, and took me a little
while to figure out what caused it, but I have an easily
reproducable test-case for it.  The upshot of the whole
thing is that if you call access() on a recursive link,
the /hurd/auth process goes nuts!  Allow me to further illustrate
the point:

Create a test program and cross-copmile it to the hurd:

#include <unistd.h>
int main(int argc, char **argv)
{
        access("/foo/bar", X_OK);
}

$ i586-gnu-gcc test-access.c -o test-access

Boot up the hurd and create a recursive link:
ln -sf /foo /foo

$ ls -la /
...snip
lrwxrwxrwx    1 root     root            4 Jan 30 09:55 foo -> /foo
...snip

/hurd/test-programs/test-access &

Now look at the processes using 'ps -ef'.  If you are lucky enough
to have 'ps' not die on you, you'll see that '/hurd/auth' is eating
LOTS of cpu time.  The system gets awfully slugginsh and soon
will start to generate awful 'default_pager' messages.

I think this is a really neat feature of the 'access()' call and the
behavior of the /hurd/auth daemon, but not everyone sees things
the way I do :)

If you think it's appropriate, I'll try to track it further and
perhaps suggest a patch or something.  Of course it's possible to
take the stance that "you shouldn't create recursive links" which
is fairly obvious, but accidents DO happen.

-- 
------------------------------------------------------------------------
Jonathan S. Arney
Software Engineer
jarney1@cox.net
------------------------------------------------------------------------



reply via email to

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