Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!convex!usenet From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.lang.perl Subject: Re: I get "Insecure PATH" when I run commands from emacs... Message-ID: <1991Jun16.212315.4751@convex.com> Date: 16 Jun 91 21:23:15 GMT References: Sender: usenet@convex.com (news access account) Reply-To: tchrist@convex.COM (Tom Christiansen) Distribution: comp.lang.perl Organization: CONVEX Software Development, Richardson, TX Lines: 44 Nntp-Posting-Host: pixel.convex.com From the keyboard of chetal@pyrps5.pyramid.com (Pradeep Chetal): :I have a perl script which runs fine if I run it at shell level. :However when I pipe stuff to it as a "shell command" in emacs I get :the :message: : :Insecure PATH at ppr line 18. :Insecure PATH at ppr line 81. : :These two correspond to : chop($hostname = `hostname`); : AND : system($comamnd); :respectively. The perl I had built fine with slight modifications to :Configure script to get the libraries, etc BUT there were no other :changes. This is : :This is perl, version 4.0 : :$Header: perl.c,v 4.0 91/03/20 01:37:44 lwall Locked $ :Patch level: 0 Sounds like an evil emacs running set[ug]id. What does id say? Here's the one from the camel book in case you don't have one. #!/usr/bin/perl # Usage: id sub u { local($name) = getpwuid($_[0]); $name && "($name)";} sub g { local($name) = getgrgid($_[0]); $name && "($name)";} sub bynum { $a <=> $b; } print "uid=$<", &u($<); print " gid=", $(+0, &g($(); print " euid=$>", &u($>) if $> != $<; print " egid=", $)+0, &g($)) if $) != $(; @groups=split(' ', $(); shift(@groups); @groups && print " groups=", join(',', sort bynum grep(($_ .= &g($_)) || 1, @groups)); print "\n"; --tom -- Tom Christiansen tchrist@convex.com convex!tchrist "So much mail, so little time."