Unix Programming - Re: program calls rcmd() twice, _second_ call works for root but not normal users

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > June 2005 > Re: program calls rcmd() twice, _second_ call works for root but not normal users





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: program calls rcmd() twice, _second_ call works for root but not normal users
Barry Margolin

2005-06-17, 2:52 am

In article <d8sre4$j4q$1@naig.caltech.edu>,
David Mathog <mathog@caltech.edu> wrote:

> Now the odd part: this modified rsh works just fine for root but for any
> other user the rcmd call works once (for the first host) and
> then gives a
>
> rcmd: socket: Permission denied
>
> when it attempts a second rcmd call.


I'm very surprised the first call works. rcmd() has to be run by root,
because it uses a privileged port as the local port. This is necessary
for the remote system to trust the userid information, since rcmd()
doesn't send any authentication information.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com