Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jan 1996 19:48:31 +0100
From:      lutz@muc.de (Lutz Albers)
To:        sa2c@and.or.jp
Cc:        freebsd-current@freefall.FreeBSD.org
Subject:   Re: perl on -current does not setuid
Message-ID:  <v0214041dad1fcd86e347@[193.174.4.22]>

next in thread | raw e-mail | index | archive | help
In article <199601141854.DAA24897@us.and.or.jp>, NIIMI Satoshi writes:

-But in perl4:
-
-	sa2c@us:~/tmp> cat setu-4
-	#!/usr/bin/perl
-	print "ruid = $<, euid = $>\n";
-	sa2c@us:~/tmp> ls -l setu-4
-	-rwxr-xr-x  1 root  user  48 Jan 15 03:36 setu-4*
-	sa2c@us:~/tmp> ./setu-4
-	ruid = 1000, euid = 1000
-	sa2c@us:~/tmp# chmod u+s setu-4
-	sa2c@us:~/tmp> ls -l setu-4
-	-rwsr-xr-x  1 root  user  48 Jan 15 03:36 setu-4*
-	sa2c@us:~/tmp> ./setu-4
-	ruid = 1000, euid = 1000
-			    ~~~~
-
-Perl compiled with DOSUID executes suidperl (/usr/bin/sperl4.036) if
-script is setuid or setgid.  This feature is worth for me because I
-can test a script without setuid and install it by
-"install -c -m 4511".  I must be a root only on installation.

I stumbled on this the other day to. It' caused by the undefinition of the
DOSUID define on the (normal) perl build. Setting this variable in config.h
and rebuilding perl will do the trick.

Is there any reason why SUID perl-script emulation is disabled in FreeBSD ?
You know it's NOT documented in the perl docs delivered with FB ....
It tool me w whole day to find out why my suid-scripts didn't ran as root .

ciao
  lutz


---------------------------------------------------------------------
Lutz Albers                                     |       What's good ?
Luederitzstr. 14, 81929-Muenchen, Germany       |      Life's good -
email:lutz@muc.de          ph: +49-89-93940364  | But not fair at all
http://www.muc.de/~lutz    fax:+49-89-93940365  |          (Lou Reed)

Do not take life too seriously, you will never get out of it alive.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?v0214041dad1fcd86e347>