Package: libc6-dev Version: 2.3.2-9 Using this perl script and c code pair getlogin will often randomly return another users name or null exp.pl
#!/usr/local/bin/perl -w
use strict; use Expect; my $exp = Expect->spawn("./getlogin"); $exp->expect(10,"hello");
getlogin.c #include <unistd.h>
int main (){ char * name; name=getlogin(); printf("%s\n",name); }
it also happens with this expect script #!/usr/bin/expect -f
set timeout 5 spawn ./a.out expect "hello";
Kevin Stewart |