Re: Insecure $ENV{PATH} while running setuid at /dev/fd/4 line 2.
Posted in 1999
In article <37C2FDC7.6CEA2601@bloomberg.net>, Art S. Kagel <kagel@bloomberg.net> wrote: >Sounds like a permissions problem. Nope. The problem is `date` without an explicit $ENV{PATH}. >> get the following error: "Insecure $ENV{PATH} while running setuid at >> /dev/fd/4 line 2.". Can anyone show me what line I need to add to get >> rid of this error? Thanks in advance... >> >> #!/usr/local/bin/perl >> $mmddhhmmss = `date +%m%d%H%M%S`; >> chop $mmddhhmmss; 1) Change line 2 to be $mmddhhss = `/usr/bin/date +%m%d%H%M%S`; or 2) Add $ENV{PATH} = "/usr/bin:/bin"; just before line 2. or 3) Replace lines 2 and 3 with ($sec,$min,$hour,$day,$mon) = localtime; $mmddhhmmss = sprintf "%02d%02d%02d%02d%02d",$mon+1,$day,$hour,$min,$sec; -Joe -- INWAP.COM is Joe Smith, Sally Smith and our cat Murdock. (The O'Hallorans and their cats moved to http://www.tyedye.org/ Nov-98.) See http://www.inwap.com/ for PDP-10, "ReBoot", "Shadow Raiders"/"War Planets"