hurd-devel
[Top][All Lists]
Advanced

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

address@hidden: Feature (bug) in access() and/or /hurd/auth]


From: Roland McGrath
Subject: address@hidden: Feature (bug) in access() and/or /hurd/auth]
Date: Mon, 4 Feb 2002 16:35:21 -0500 (EST)

Could somebody see if there is really a bug here and if so file a BTS
report for it?

Thanks,
Roland


--- Begin Message --- 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
address@hidden
------------------------------------------------------------------------

_______________________________________________
Bug-hurd mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/bug-hurd

--- End Message ---

reply via email to

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