Subject: Re: special bbs user's login shell Date: Wed, 30 May 2001 14:55:43 -0400 (EDT) From: Jose Nazario To: Walter de Jong and here is the shel program. stupidly simple, but it works. here is an openbsd /etc/passwd entry for this user: bbs-user:*:1004:1004:bbs100 user:/home/bbs-user:/usr/local/bin/bbsshell this user has no password, by the way, and no rights: they can't do much of anything on the system. a firewall keeps external connections from getting to port 1234/tcp. #include #include #include char *args[5]; int main() { args[0] = "telnet"; args[1] = "-Ec"; args[2] = "127.0.0.1"; args[3] = "1234"; args[4] = NULL; if (execv("/usr/bin/telnet", args) < 0) { fprintf(stderr, "logging in failed.\n"); exit(-1); } return (0); } enjoy, and i hope you find this useful. and thanks for bbs-100. an openbsd port is set soon. our isp folded (northpoint) and so the bbs was on a useless link for two months. we're finaly back on our feet. ____________________________ jose nazario jose@cwru.edu PGP: 89 B0 81 DA 5B FD 7E 00 99 C3 B2 CD 48 A0 07 80 PGP key ID 0xFD37F4E5 (pgp.mit.edu)