Re: stat bug?

From: Jan-Simon Pendry (JS.Pendry@msdw.com)
Date: Fri Mar 10 2000 - 03:46:01 EST


Otto E Solares wrote:
> [snip]
>
> In my case this program fails to stat the file with the following
> conditions:
> The /home directory is group owned by any other group where your user
> belongs but root doesn't belong.
> The /home directory is in 0750 mode.
> The file to stat is not a relative path but an absolute one.
> The program is run as root but as you can see it changes the euid
> to your user.
>
> When this conditions are in place stat fails under linux, so the
> temporary fix is to chmod 0755 the /home directory.

this sounds correct to me. the sample program sets euid to 500,
and leaves the group set alone. since /home is owned by root,
the process will have neither owner access (not root) nor group
access (you state that root isn't in the group that owns the
directory). therefore the stat() will fail trying to access /home.
presumably that's why relative paths work since none of the one's
you tested go through /home?

jan-simon.

-
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 : Wed Mar 15 2000 - 21:00:17 EST