* Search path directory limit
@ 2008-12-19 14:44 Niklaus
2008-12-19 15:51 ` John (Eljay) Love-Jensen
2008-12-19 16:48 ` Ian Lance Taylor
0 siblings, 2 replies; 3+ messages in thread
From: Niklaus @ 2008-12-19 14:44 UTC (permalink / raw)
To: gcc-help
hi,
The below program takes a long time to compile (in minutes). I 've
these small indiviudal .c/.cpp files which i have to compile and
execute. The problem is with rouge "/dev/random or /dev/urandom".
Solutions like limit the process execution time of gcc is not
appealing.
Can we restrict the paths from which gcc includes the header files.
Can we tell gcc on a command line parameters/makefile to not include
anything from "/dev" ? If possible how to do it ?
Removing read access on those devices are not possible.
$ cat a.c
#include "/dev/random"
#include<stdio.h>
int main()
{
return 0;
}
regards, Nik
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Search path directory limit
2008-12-19 14:44 Search path directory limit Niklaus
@ 2008-12-19 15:51 ` John (Eljay) Love-Jensen
2008-12-19 16:48 ` Ian Lance Taylor
1 sibling, 0 replies; 3+ messages in thread
From: John (Eljay) Love-Jensen @ 2008-12-19 15:51 UTC (permalink / raw)
To: Niklaus, GCC-help
Hi Nik,
> Can we restrict the paths from which gcc includes the header files.
No, I do not believe anyone has added that kind of functionality to the
preprocessor.
If you want, you can submit a patch to cpp with that feature.
> Can we tell gcc on a command line parameters/makefile to not include anything
from "/dev" ?
No, I do not believe anyone has added that kind of functionality to GNU Make
or GCC.
If you want, you can submit a patch to GCC and/or GNU Make with that
feature.
> Removing read access on those devices are not possible.
Depends on the operating system. Using ACLs I was able to prohibit myself
from accessing /dev/random. I probably could prohibit myself by chmod'ing
the UGO bits. Also consider chroot (or jail), quotas and ulimit.
HTH,
--Eljay
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Search path directory limit
2008-12-19 14:44 Search path directory limit Niklaus
2008-12-19 15:51 ` John (Eljay) Love-Jensen
@ 2008-12-19 16:48 ` Ian Lance Taylor
1 sibling, 0 replies; 3+ messages in thread
From: Ian Lance Taylor @ 2008-12-19 16:48 UTC (permalink / raw)
To: Niklaus; +Cc: gcc-help
Niklaus <niklaus@gmail.com> writes:
> The below program takes a long time to compile (in minutes). I 've
> these small indiviudal .c/.cpp files which i have to compile and
> execute. The problem is with rouge "/dev/random or /dev/urandom".
> Solutions like limit the process execution time of gcc is not
> appealing.
>
> Can we restrict the paths from which gcc includes the header files.
> Can we tell gcc on a command line parameters/makefile to not include
> anything from "/dev" ? If possible how to do it ?
> Removing read access on those devices are not possible.
I have to say that I think you're trying to fix this problem at
entirely the wrong level.
Ian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-12-19 15:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-19 14:44 Search path directory limit Niklaus
2008-12-19 15:51 ` John (Eljay) Love-Jensen
2008-12-19 16:48 ` Ian Lance Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).