LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices

Reply
 
Thread Tools
Old 11-07-2009, 10:58 PM   #1
David2010
Member
 
Registered: May 2009
Posts: 63
Thanked: 1
Insecure dependency in open while running setuid at?


[Log in to get rid of this advertisement]
Ok I am trying to make an almost bleeding edge linux distro using the LFS version 6.5 but I keep getting this error during the linux kernel headers check.

Insecure dependency in open while running setuid at scripts/headers_install.pl line 31

Then the script fails.

I already tried chowning all the files in my working directory for the lfs user to be readable, writable, and executable.

I opened up the linux kernel scripts/headers_install.pl file and this was the contents:

Code:
use strict;

my ($readdir, $installdir, $arch, @files) = @ARGV;

my $unifdef = "scripts/unifdef -U__KERNEL__";

foreach my $file (@files) {
	local *INFILE;
	local *OUTFILE;
	my $tmpfile = "$installdir/$file.tmp";
	open(INFILE, "<$readdir/$file")
		or die "$readdir/$file: $!\n";
	open(OUTFILE, ">$tmpfile") or die "$tmpfile: $!\n";
	while (my $line = <INFILE>) {
		$line =~ s/([\s(])__user\s/$1/g;
		$line =~ s/([\s(])__force\s/$1/g;
		$line =~ s/([\s(])__iomem\s/$1/g;
		$line =~ s/\s__attribute_const__\s/ /g;
		$line =~ s/\s__attribute_const__$//g;
		$line =~ s/^#include <linux\/compiler.h>//;
		$line =~ s/(^|\s)(inline)\b/$1__$2__/g;
		$line =~ s/(^|\s)(asm)\b(\s|[(]|$)/$1__$2__$3/g;
		$line =~ s/(^|\s|[(])(volatile)\b(\s|[(]|$)/$1__$2__$3/g;
		printf OUTFILE "%s", $line;
	}
	close OUTFILE;
	close INFILE;
	system $unifdef . " $tmpfile > $installdir/$file";
	unlink $tmpfile;
}
exit 0;
Line 31 would be this line:

Code:
open(OUTFILE, ">$tmpfile") or die "$tmpfile: $!\n";
I am not sure what that error means let alone how to fix it.

Can you help me?

I work specifically in C and C++ but NOT in Perl. :-/

Last edited by David2010; 11-07-2009 at 11:01 PM..
linux David2010 is offline     Reply With Quote
Old 11-08-2009, 04:01 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 16,716
Blog Entries: 30
Thanked: 283
Quote:
Originally Posted by David2010 View Post
Insecure dependency in open while running setuid at scripts/headers_install.pl line 31 (..) I am not sure what that error means let alone how to fix it.
What are you exactly running and as which user and what files does it try to write to and who are they owned by? Is there a reason to run something setuid ('man perlsec' , discussion)? Could first restoring permissions on everything you changed and then using Sudo help? Just wondering.
linux unSpawn is offline     Reply With Quote
Old 11-08-2009, 09:38 AM   #3
David2010
Member
 
Registered: May 2009
Posts: 63
Thanked: 1

Original Poster
Quote:
Originally Posted by unSpawn View Post
What are you exactly running and as which user and what files does it try to write to and who are they owned by? Is there a reason to run something setuid ('man perlsec' , discussion)? Could first restoring permissions on everything you changed and then using Sudo help? Just wondering.

1: It opens this file: $installdir/$file.tmp

but that file doesn't exist.

2: All of the files are owned by the user LFS that I created in the start.

3: Its required in the kernel to run setuid.

4: I already tried restoring the permissions but that didn't help.

5: This linux distro doesn't come with Sudo.

Last edited by David2010; 11-08-2009 at 02:09 PM..
linux David2010 is offline     Reply With Quote
Old 11-09-2009, 03:25 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 16,716
Blog Entries: 30
Thanked: 283
Quote:
Originally Posted by David2010 View Post
This linux distro doesn't come with Sudo.
Well, can't you simply install and use it???
linux unSpawn is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insecure dependency in chmod while running setuid ak4good Programming 3 06-13-2009 11:22 AM
Why is system() insecure? reverse Linux - Security 5 12-03-2007 07:47 PM
Insecure dependency errror(perl-cgi) akaash Programming 1 04-02-2004 11:17 AM
running gnome apps without gnome and dependency problems vdemuth Linux - Software 3 03-19-2004 05:02 PM
Telnet is insecure but ... Q*Bert Linux - Security 2 03-29-2003 02:21 PM


All times are GMT -5. The time now is 09:05 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration