Re: nfsv3 and su problem (more info)

Andrew Schretter (schrett@math.duke.edu)
Wed, 14 Jul 1999 16:50:32 -0400 (EDT)


Trond,
I was messing with it some more and determined that if the hostname
was set to xxxx.math.duke.edu, the su fails every other time. However,
if the hostname is xxxx instead, it works everytime. In addition, the
directory ~/.xauth is not created when the hostname is xxxx but is when
the hostname is xxxx.math.duke.edu.

For now I'll just use the hostname without domain name and it appears to
work but hopefully this info will help you squash some bugs.

Andrew

> Trond,
> I've encountered at least a slight problem with your latest
> (linux-2.2.10-nfsv3-0.9.11.3.dif) revision of your nfsv3 patches. It does
> not appear with the stock kernel and goes back at least until your patches
> were against the 2.2.9 kernel.
>
> Thierry Davis posted this a while back :
>
> http://x21.deja.com/[ST_rn=ps]/getdoc.xp?AN=490858644&CONTEXT=931980918.1742798954&hitnum=0
>
> The problem is that su causes a bus error every other time it is used.
> The only idea I have about the relation su has to nfs is in the straces
> below. I don't know where the problem begins, but I have verified it is
> somewhere in your patch that breaks it.
>
> This is completely reproducible. This is under redhat 6.0 with the
> 2.2.10 kernel and the above patch (I'm not currently using the ac
> patches).
>
> It only occurs when doing an su from a user, doing an su from root (dumb I
> know) works fine which makes it darn hard to do an strace on.
> Nevertheless, here is where is is crashing...
>
> This one is the "bus error" su :
>
> mkdir("/home/staff/schrett/.xauth", 0700) = -1 EEXIST (File exists)
> mkdir("/home/staff/schrett/.xauth/refcount", 0700) = -1 EEXIST (File exists)
> mkdir("/home/staff/schrett/.xauth/refcount/root", 0700) = -1 EEXIST (File exists)
> mkdir("/home/staff/schrett/.xauth/refcount/root/xxxx.math.duke.edu", 0700) = -1 EEXIST (File exists)
> stat("/home/staff/schrett/.xauth/refcount/root/xxxx.math.duke.edu/unix:0", 0xbffff77c) = -1 ENOENT (No such file or directory)
> open("/home/staff/schrett/.xauth/refcount/root/xxxx.math.duke.edu/unix:0", O_RDWR|O_CREAT, 0600) = 4
> fstat(4, {st_mode=0, st_size=0, ...}) = 0
> ftruncate(4, 1) = 0
> mmap(0, 2, PROT_READ|PROT_WRITE, MAP_SHARED, 4, 0) = 0x40014000
> --- SIGBUS (Bus error) ---
>
> This one is the su that works :
>
> mkdir("/home/staff/schrett/.xauth", 0700) = -1 EEXIST (File exists)
> mkdir("/home/staff/schrett/.xauth/refcount", 0700) = -1 EEXIST (File exists)
> mkdir("/home/staff/schrett/.xauth/refcount/root", 0700) = -1 EEXIST (File exists)
> mkdir("/home/staff/schrett/.xauth/refcount/root/xxxx.math.duke.edu", 0700) = -1 EEXIST (File exists)
> stat("/home/staff/schrett/.xauth/refcount/root/xxxx.math.duke.edu/unix:0", {st_mode=0, st_size=0, ...}) = 0
> open("/home/staff/schrett/.xauth/refcount/root/xxxx.math.duke.edu/unix:0", O_RDWR|O_CREAT, 0600) = 4
> ftruncate(4, 2) = 0
> mmap(0, 3, PROT_READ|PROT_WRITE, MAP_SHARED, 4, 0) = 0x40014000
> setfsuid(0) = 520
> time(NULL) = 931981413
>
> Obviously /home/staff/schrett is an nfsv3 mounted filesystem so I suspect
> the problem lies here.
>
> Can I provide any more info to help?
>
> Andrew Schretter
> Systems Programmer, Duke University
> Dept. of Mathematics (919) 660-2866
>
>
>

Andrew Schretter
Systems Programmer, Duke University
Dept. of Mathematics (919) 660-2866

-
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/