Re: program calls rcmd() twice, _second_ call works for root but
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > Re: program calls rcmd() twice, _second_ call works for root but




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Re: program calls rcmd() twice, _second_ call works for root but  
David Mathog


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-17-05 10:53 PM

David Schwartz wrote:
> "David Mathog" <mathog@caltech.edu> wrote in message
> news:d8v116$b29$1@naig.caltech.edu...
>
> 
>
>
>     I believe those two lines are to drop permissions after the port is
> opened. You should *DEIFNITELY* not remove security-sensitive code unless
> you are sure you understand what is doing and can prove it isn't needed.

Good point.  I put those back in and added instead an

seteuid(0);

at the bottom of the loop over hosts.  That also cured the original
problem and should be about as secure as the original single target
rsh.

I'm still not clear what the setuid(uid) was doing since the uid value
was read from the original process via a getuid(uid), and uid didn't
change in between.

Thanks,

David Mathog
mathog@caltech.edu





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 10:49 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register