Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Jan 1996 21:27:40 +0100 (MET)
From:      Ollivier Robert <roberto@keltia.freenix.fr>
To:        sa2c@and.or.jp (NIIMI Satoshi)
Cc:        current@freebsd.org
Subject:   Re: perl on -current does not setuid
Message-ID:  <199601142027.VAA22594@keltia.freenix.fr>
In-Reply-To: <199601141854.DAA24897@us.and.or.jp> from "NIIMI Satoshi" at Jan 15, 96 03:54:42 am

next in thread | previous in thread | raw e-mail | index | archive | help
It seems that NIIMI Satoshi said:
> 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.

You're right,  our perl is compiled without  DOSUID (which is complementary
to IAMSUID). Apply to following patch (I'll put it in -CURRENT soon).

Index: Makefile
===================================================================
RCS file: /spare/FreeBSD-current/src/gnu/usr.bin/perl/perl/Makefile,v
retrieving revision 1.5
diff -u -2 -u -r1.5 Makefile
--- Makefile    1995/05/30 05:02:48     1.5
+++ Makefile    1996/01/14 20:22:49
@@ -7,5 +7,5 @@
 SRCS+= eval.c form.c hash.c malloc.c perl.c perly.c regcomp.c regexec.c
 SRCS+= stab.c str.c toke.c util.c usersub.c
-CFLAGS+= -I${.CURDIR}
+CFLAGS+= -I${.CURDIR} -DDOSUID
 LDADD= -lm
 DPADD= ${LIBM}

-- 
Ollivier ROBERT    -=- The daemon is FREE! -=-    roberto@keltia.frmug.fr.net
   FreeBSD keltia.freenix.fr 2.2-CURRENT #1: Wed Jan 10 02:23:42 MET 1996



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