SunQuest
           UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old March 2nd, 2004, 04:35 PM
roopak roopak is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 1 roopak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
setuid does noo respect .profile

OS: Sun Solaris 5.8.

I have a C program that uses setuid to set the effective user id of the process to a specific user.

This C program calls some csh scripts. To inherit the user in the csh scripts, I use a '-b' option. This works fine as long as I do not run my .profile in the csh script.

But when I do a $HOME/.profile in my csh script, I get the error:
csh: Permission denied.

Looks like the .profile cannot be executed under the new user.

Any ideas on how to resolve this ?
Thanks.

Reply With Quote
  #2  
Old March 3rd, 2004, 07:20 AM
Perderabo Perderabo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 121 Perderabo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 m 54 sec
Reputation Power: 5
Why do you want to do this? .profile is for sh or ksh or bash type shells. csh uses .login typically. The syntax is not the same.

But anyway you are trying to execute .profile as if it were a script. It probably only has read permission set. You need to turn on the execute permission as well. That will get you past this error. But this is probably destined to not do anything useful.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > setuid does noo respect .profile


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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 On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway