From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <6f25e419b0cd267b0b69ba0065ec4e4c.axp-list@archive.invalid> X-Archive-Original-Message-ID: <9710022345.AA03939@batu.hip.atr.co.jp> Date: Fri, 03 Oct 1997 08:45:05 +0900 From: Eric Woudenberg Subject: Re: ruserok? In-Reply-To: <199710021752.KAA25831@wasatch.ps.uci.edu> Hi Christopher, Thanks for checking it out, but ... it looks right to me. a.out -> ruserok(, 0, , ) Rick >> I'd be very happy if some kind Alpha Linux Redhat 4.2 user could >> compile this test program and run it: >> >> /* simple ruserok test */ >> >> main(int argc, char **argv) >> { >> printf("ruserok=%d\n", >> ruserok(argv[1], 0, argv[2], argv[2])); >> } >> >> $ gcc ruserok.c >> $ a.out yourhostname yourloginname >> >> When I run it it core dumps. On my SunOS system it prints "ruserok=0". >> >> Thanks, >> Rick Woudenberg > >Hey, this is cool. Behold: >------------------------------------------------------------------------ >(wasatch)home/cgrayce% gcc ruserok.c >(wasatch)home/cgrayce% a.out wasatch cgrayce >Segmentation fault >(wasatch)home/cgrayce% a.out cgrayce wasatch >ruserok=-1 >(wasatch)home/cgrayce% >------------------------------------------------------------------------ >"wasatch" is a PC164 running RH 4.2, kernel 2.0.30. >------------------------------------------------------------------------ >(flattop)home/cgrayce% gcc ruserok.c >(flattop)home/cgrayce% a.out flattop cgrayce >ruserok=-1 >(flattop)home/cgrayce% a.out cgrayce flattop >ruserok=-1 >(flattop)home/cgrayce% >------------------------------------------------------------------------ >"flattop" is a P5-133 using Slakware Linux, kernel 2.0.30. >------------------------------------------------------------------------ >(limantour)home/cgrayce% gcc ruserok.c >(limantour)home/cgrayce% a.out limantour cgrayce >ruserok=-1 >(limantour)home/cgrayce% a.out cgrayce limantour >ruserok=-1 >(limantour)home/cgrayce% >------------------------------------------------------------------------ >and "limantour" is a Digital AlphaStation 600, running DU 3.2C. > >Now "man 3 ruserok" under Linux produces zip, but under DU -- bless >those careful Digital engineers -- we're told the prototype is: > >int ruserok (char *host,int root_user,char *remote_user,char *local_user); > >so from this point of view it looks like your calling sequence is >backward and when it's done right things work. Why the "wrong" calling >sequence segfaults under Linux/Alpha only I've not pursued. > >Christopher Grayce >UCI Dept of Chemistry > >-- >To unsubscribe: send e-mail to axp-list-request@redhat.com with >'unsubscribe' as the subject. Do not send it to axp-list@redhat.com -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com