From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 18108 invoked from network); 11 Mar 1998 20:19:45 -0000 Received: from unknown (HELO netserver.cafe.ch) (195.65.117.17) by mail2.redhat.com with SMTP; 11 Mar 1998 20:19:45 -0000 Received: from cafe.ch ([193.247.73.18]) by netserver.cafe.ch (Netscape Messaging Server 3.5) with ESMTP id 311 for ; Wed, 11 Mar 1998 21:15:10 +0100 Message-ID: <3506F1D4.2AC2FBB1@cafe.ch> Date: Wed, 11 Mar 1998 21:19:33 +0100 From: "Gavin Woodhatch" Reply-To: gavin@cafe.ch X-Mailer: Mozilla 4.03 [en] (WinNT; I) MIME-Version: 1.0 To: axp-list@redhat.com Subject: chroot and login Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi Guys I know this is not quite Alpha specific .. but i do want it working on my AS500 :) I am Trying to do the following .. when you login as a specific user I would like to have a chroot shell up .. so my customers cant wrek to mutch havok .. The command 'chroot /usr/local/telnetroot' works fine. If i add '/usr/bin/chroot /usr/local/telnetroot' to /etc/passwd (as shell) It does not work ,even after adding '/usr/bin/chroot' to /etc/shells .. doesnt help I have come to the conclusion that Login can't handel any parameters ? So i have tried my (very bad ) C knowlege : #include void main(int argc, char * argv[]) { chroot("/usr/local/telnetlogin"); execl("/bin/bash",0); } compiled with gcc . no errors .. but when executing the binary : Segmentation Fault Using : #include void main(int argc, char * argv[]) { chroot("/usr/local/telnetlogin"); execl("/bin/bash","/bin/bash",0); } gcc no errors again .. this time it works .... i get a new shell .. but the chroot part does not work .. it returns a value of '-1' thats means an error acurred .. but i dont know what.. Any ideas ? Gavin Woodhatch