Skip to contentSkip to conversation

strange su behaviour

DISCUSSION Nick Murtagh 1 participant 2 messages Mar 2, 2002

lore
Share & tools
lore
#0 lore raw

Hi

When I exit from su in X, it takes about 10 seconds to return to the command prompt. This doesn't happen in console mode. I'm using Mandrake 8.1.

This didn't happen in
2.4.17-mjc1

But does happen in
2.4.18-pre7-ac2
2.4.19-pre2

I know this is not exactly a major problem or anything, but it's starting to bug me :)

Anyone got any ideas?

Nick

#1 lore raw
Quoted 1 line · Ville Herva

Well, you could try to strace it to see where it lurks when it hangs.

The -r did the trick. Basically there was a bug in pam_xauth where it was calling ftruncate with an un-initialised off_t length. Hence it was trying to ftruncate a 34 byte file to > 100 megabytes.

The ftruncate manpage says that the behaviour in this circumstance is undefined. I will investigate further to see why different kernel versions are acting differently here.

Thanks for your help.

Nick