From: "Jonathan Rozes" <jrozes () gumbo ! tcs ! tufts ! edu>
To: tru64-unix-managers
Subject: SUMMARY: Can't get suidperl working
Date: Tue, 09 Jul 1996 14:31:44 +0000 [thread overview]
Message-ID: <96076335021324.tru64-unix-managers.marc@archive.invalid> (raw)
Hi--
The problem with suidperl is that the call to rewind() in perl.c does not
guarantee it will do anything on the underlying file descriptor. This was
causing the first 8k of any script to be ignored.
The solution is to replace the call to rewind with a call to lseek(). In
perl.c (on both 4.036 and 5.003), replace the line:
rewind(rsfp);
With this:
lseek(fileno(rsfp), (off_t)0, 0);
And recompile. Setuid scripts should now work...
Thanks to Tony Sanders and Larry Wall for the fix.
jonathan
--
+++ Jonathan Rozes, Unix Systems Administrator, Tufts University
++ jrozes@tcs.tufts.edu, http://rozes.tcs.tufts.edu/
+ Ultimately, thinking is a very inefficient method of processing
data.... [Surfing the Himalayas, 0-312-14147-5]
reply other threads:[~1996-07-09 14:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox