*BSD News Article 35169


Return to BSD News archive

Xref: sserve comp.os.386bsd.questions:12765 comp.lang.perl:30199
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!spool.mu.edu!howland.reston.ans.net!math.ohio-state.edu!jussieu.fr!ensta!itesec!keltia.frmug.fr.net!sidhe.frmug.fr.net!not-for-mail
From: roberto@hsc.fr.net (Ollivier Robert)
Newsgroups: comp.os.386bsd.questions,comp.lang.perl
Subject: Re: suidperl on FreeBSD-1.1.5.1
Date: 29 Aug 1994 23:18:22 +0200
Organization: Herve Schauer Consultants, Paris, France
Lines: 59
Message-ID: <33tjau$a14@sidhe.frmug.fr.net>
References: <94Aug27.154655.3394@eeubln.IN-Berlin.DE>
Reply-To: roberto@hsc.fr.net (Ollivier Robert)
NNTP-Posting-Host: sidhe.frmug.fr.net
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit

In article <94Aug27.154655.3394@eeubln.IN-Berlin.DE>,
Nora E. Etukudo <nora@eeubln.IN-Berlin.DE> wrote:
> 
>     "Can't swap uid and euid."

The  swapping of   the  euid  and  uid   is not completely  implemented  in
1.1.5.1. And the default configuration of PERL is not correct.

> if I invoke a script with the permissions 
> 
>     -rwsr-xr-x    1 root          106 Aug 27 15:55 x.pl*
> 
> Is there any help on this?

Apply the following patch to PERL and recompile.

--- config.h.orig	Mon Mar 28 11:18:59 1994
+++ config.h	Sat Jun 25 01:15:51 1994
@@ -454,8 +454,8 @@
  *	available to change the real, effective and saved gid of the current
  *	program.
  */
-#define	HAS_SETREGID		/**/
-/*#undef	HAS_SETRESGID		/**/
+/*#define	HAS_SETREGID		/**/
+#undef	HAS_SETRESGID		/**/
 
 /* HAS_SETREUID
  *	This symbol, if defined, indicates that the setreuid routine is
@@ -466,8 +466,8 @@
  *	available to change the real, effective and saved uid of the current
  *	program.
  */
-#define	HAS_SETREUID		/**/
-/*#undef	HAS_SETRESUID		/**/
+/*#define	HAS_SETREUID		/**/
+#undef	HAS_SETRESUID		/**/
 
 /* HAS_SETRGID
  *	This symbol, if defined, indicates that the setrgid routine is available
@@ -479,7 +479,8 @@
  *	This symbol, if defined, indicates that the setruid routine is available
  *	to change the real uid of the current program.
  */
-#define	HAS_SETRUID		/**/
+/*#define	HAS_SETRUID		/**/
+#undef	HAS_SETRUID		/**/
 
 /* HAS_SHM
  *	This symbol, if defined, indicates that the entire shm*(2) library is



That should correct the problem (it does for me).

-- 
Ollivier ROBERT                                           roberto@hsc.fr.net
Hervé Schauer Consultants                 Ollivier.Robert@sidhe.frmug.fr.net
PERL / MIME / PGP / 4.4BSD            SunOS sidhe.frmug.fr.net 4.1.3 1 sparc