Re: where is the point the client command is executed?

This is a discussion on Re: where is the point the client command is executed? within the OpenSSH Development forums, part of the Networking and Network Related category; Zhang Kexin wrote: > Hi, > > I met some difficult in reading ssh/sshd souce code, I want to &...


Go Back   Usenet Forums > Networking and Network Related > OpenSSH Development

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-17-2007
Darren Tucker
 
Posts: n/a
Default Re: where is the point the client command is executed?

Zhang Kexin wrote:
> Hi,
>
> I met some difficult in reading ssh/sshd souce code, I want to
> find out how the command that user input in client is executed on the
> server. I only found out the process_input function put the command in a
> buffer,but can not find how it is executed. Could you please help me on
> that?


You mean when you run "ssh someserver echo foo" or similar?

Look in session.c in do_exec() and do_exec_no_pty(). Ultimately it will
end up running the command via the user's shell via execve(1) after
setting up its environment, descriptors and such.

> Thank you very much.


You're welcome.

--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
http://lists.mindrot.org/mailman/lis...enssh-unix-dev
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:51 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0