473,503 Members | 11,018 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

perl "Insecure dependency in `` while running setuid"

3 New Member
When I ran a perl script named script.pl which have the the follwing line:
system("echo hostname = $HOSTNAME > /tmp/myinfo");
I have another shell script script.ksh which simply call script.pl within the script. the permission on script.ksh is: -rwsr-sr-x
WHen I ran script.ksh, I got the error message:
Insecure dependency in `` while running setuid at script.pl line 4.
If I do not use $HOSTNAME in script.pl, I have no trouble at all.
Could someone help me on this? Looks like setuid and $HOSTNAME variable cannot work together.

Thanks in advance.
Aug 29 '06 #1
2 9266
bharad
7 New Member
make sure you untaint the data before executing the scripts.

try this
if ($HOSTNAME =~ /^([ &:#-\@\w.]+)$/) {
$HOSTNAME = $1; #data is now untainted
} else {
print "bad data\n";
}

-bharad


When I ran a perl script named script.pl which have the the follwing line:
system("echo hostname = $HOSTNAME > /tmp/myinfo");
I have another shell script script.ksh which simply call script.pl within the script. the permission on script.ksh is: -rwsr-sr-x
WHen I ran script.ksh, I got the error message:
Insecure dependency in `` while running setuid at script.pl line 4.
If I do not use $HOSTNAME in script.pl, I have no trouble at all.
Could someone help me on this? Looks like setuid and $HOSTNAME variable cannot work together.

Thanks in advance.
Aug 30 '06 #2
123jainmin
3 New Member
Thank you so much! it works.
Aug 30 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
3475
by: John Spiegel | last post by:
Hi all, I think this is a longshot, but is there a technique for programmatically run a webpage? Let's say one of our vendors has a page that we go to daily to pick up some files. Each time,...
2
4724
by: Wiktor Zychla | last post by:
After signing all my assemblies with strong keys, I've found that the application refuses to deserialize any SOAP serialized data. The message says: Parse error, no assembly associated with the...
3
1629
by: Claire | last post by:
Sorry for such a daft question. Ive been following some tutorials on creating windows services. Ive not done them before. In my original debuggable windows form application, I create my worker...
2
1882
by: Mike Kingscott | last post by:
Hi all, Ok, I'm running Windows 2000, service pack 4. I have .Net framework installed, version 1.1.4322, I'm running IIS 5.0. When I try to open a solution that was opening just dandy last week,...
2
1663
by: removethispamfilter | last post by:
Hi Im working in a company where windows systems are set up for different "countries". When setting up the "import from csv file" the decimal separator is set up to "," (the thousands...
4
1818
by: Mr BigSmoke | last post by:
Hi All, I'm developing a website to handle some code/application version control on a intranet. I'm using cherrypy and pysvn. Everything runs quite good but i want the user to be able to checkout...
0
1411
by: 123jainmin | last post by:
When I ran a perl script named script.pl which have the the follwing line: system("echo hostname = $HOSTNAME > /tmp/myinfo"); I have another shell script script.ksh which simply call script.pl...
5
2811
by: =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= | last post by:
Hi; How are we supposed to handle this. It appears that this must be run on a system for an ASP.NET app to run. On WinXP we are finding that the user ASPNET does not exist until this is run. ...
2
1281
by: Javier1958 | last post by:
Hi all I have a problem running Visual Basic 2005 (.NET) programs in other computers different of that where I have Visual Studio installed. I know I have to install the .NET framework in the...
0
1576
by: =?Utf-8?B?QmVybnJkIE5vcm1pZXI=?= | last post by:
The code in question is very simple: PACL acl = 0; PACL newAcl = 0; PSECURITY_DESCRIPTOR sd = 0; DWORD res = GetNamedSecurityInfo(const_cast<char*>(path.c_str()), type,...
0
7095
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7361
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7470
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5602
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4693
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3183
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3173
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1523
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
749
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.