I have setuid-perl installed and run chmod ugo+xs <script>. The file is owned by a user with uid 15001 When I run this script from a different user account (with uid 1020) with Ubuntu 8.04 I get:#!/usr/bin/perl -w use strict; print "Perl version: $]\n"; print "UIDs real $< \t effective $>\n"; ($>, $<) = ($<, $>); # swap real uid and effective uid print "UIDs real $< \t effective $>\n"; ($>, $<) = ($<, $>); # swap real uid and effective uid print "UIDs real $< \t effective $>\n"; ($>, $<) = ($<, $>); # swap real uid and effective uid print "UIDs real $< \t effective $>\n";
All hunky dory and just what I want: the uid and euid swap quite nicely. However when I run this from a new Ubuntu with perl 5.10 I get:Perl version: 5.008008 UIDs real 1020 effective 15001 UIDs real 15001 effective 1020 UIDs real 1020 effective 15001 UIDs real 15001 effective 1020
Not what I want :( Once the ids have been set to one value it becomes impossible to get the other value back. Does anyone know what is going on here - or know of a workaround? I've googled every combination of terms I can think of, but not found any suggestions. Thanks, I.Perl version: 5.010000 UIDs real 1020 effective 15001 UIDs real 1020 effective 1020 UIDs real 1020 effective 1020 UIDs real 1020 effective 1020
In reply to setuid script won't behave in 5.10, but did in 5.8 by isidore
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |