diff options
author | gpalmer <gpalmer@FreeBSD.org> | 1996-06-02 19:59:26 +0000 |
---|---|---|
committer | gpalmer <gpalmer@FreeBSD.org> | 1996-06-02 19:59:26 +0000 |
commit | 7ff6b86884c9d3b49ce1e9d5f8b0b6084af767cd (patch) | |
tree | 629becea18ab06af1999dd34293d46ab528ebed1 /gnu/usr.bin/perl | |
parent | 497410092f081277da6c762940f6a59b4a1d2ac7 (diff) | |
download | FreeBSD-src-7ff6b86884c9d3b49ce1e9d5f8b0b6084af767cd.zip FreeBSD-src-7ff6b86884c9d3b49ce1e9d5f8b0b6084af767cd.tar.gz |
Use setreuid instead of seteuid for permissions management
Diffstat (limited to 'gnu/usr.bin/perl')
-rw-r--r-- | gnu/usr.bin/perl/perl/config.h | 6 | ||||
-rw-r--r-- | gnu/usr.bin/perl/perl/perl.c | 11 | ||||
-rw-r--r-- | gnu/usr.bin/perl/sperl/Makefile | 2 |
3 files changed, 12 insertions, 7 deletions
diff --git a/gnu/usr.bin/perl/perl/config.h b/gnu/usr.bin/perl/perl/config.h index 4a66712..79f6a6c 100644 --- a/gnu/usr.bin/perl/perl/config.h +++ b/gnu/usr.bin/perl/perl/config.h @@ -351,14 +351,16 @@ /* HAS_SETEGID * This symbol, if defined, indicates that the setegid routine is available * to change the effective gid of the current program. + * Do not use on systems with _POSIX_SAVED_IDS support. */ -#define HAS_SETEGID /**/ +/*#undef HAS_SETEGID /**/ /* HAS_SETEUID * This symbol, if defined, indicates that the seteuid routine is available * to change the effective uid of the current program. + * Do not use on systems with _POSIX_SAVED_IDS support. */ -#define HAS_SETEUID /**/ +/*#undef HAS_SETEUID /**/ /* HAS_SETPGRP * This symbol, if defined, indicates that the setpgrp() routine is diff --git a/gnu/usr.bin/perl/perl/perl.c b/gnu/usr.bin/perl/perl/perl.c index 4d1a7ae..3d87cb4 100644 --- a/gnu/usr.bin/perl/perl/perl.c +++ b/gnu/usr.bin/perl/perl/perl.c @@ -1,4 +1,4 @@ -char rcsid[] = "$RCSfile: perl.c,v $$Revision: 1.3 $$Date: 1995/05/28 19:21:54 $\nPatch level: ###\n"; +char rcsid[] = "$RCSfile: perl.c,v $$Revision: 1.4 $$Date: 1995/05/30 05:03:10 $\nPatch level: ###\n"; /* * Copyright (c) 1991, Larry Wall * @@ -6,6 +6,9 @@ char rcsid[] = "$RCSfile: perl.c,v $$Revision: 1.3 $$Date: 1995/05/28 19:21:54 $ * License or the Artistic License, as specified in the README file. * * $Log: perl.c,v $ + * Revision 1.4 1995/05/30 05:03:10 rgrimes + * Remove trailing whitespace. + * * Revision 1.3 1995/05/28 19:21:54 ache * Fix $] variable value (version number), close PR 449 * Submitted by: Bill Fenner <fenner@parc.xerox.com> @@ -588,7 +591,7 @@ FIX YOUR KERNEL, PUT A C WRAPPER AROUND THIS SCRIPT, OR USE -u AND UNDUMP!\n"); (void)setegid(statbuf.st_gid); #else #ifdef HAS_SETREGID - (void)setregid((GIDTYPE)-1,statbuf.st_gid); + (void)setregid((GIDTYPE)gid,statbuf.st_gid); #else setgid(statbuf.st_gid); #endif @@ -602,7 +605,7 @@ FIX YOUR KERNEL, PUT A C WRAPPER AROUND THIS SCRIPT, OR USE -u AND UNDUMP!\n"); (void)seteuid(statbuf.st_uid); /* all that for this */ #else #ifdef HAS_SETREUID - (void)setreuid((UIDTYPE)-1,statbuf.st_uid); + (void)setreuid((UIDTYPE)uid,statbuf.st_uid); #else setuid(statbuf.st_uid); #endif @@ -615,7 +618,7 @@ FIX YOUR KERNEL, PUT A C WRAPPER AROUND THIS SCRIPT, OR USE -u AND UNDUMP!\n"); (void)seteuid((UIDTYPE)uid); #else #ifdef HAS_SETREUID - (void)setreuid((UIDTYPE)-1,(UIDTYPE)uid); + (void)setreuid((UIDTYPE)uid,(UIDTYPE)uid); #else setuid((UIDTYPE)uid); #endif diff --git a/gnu/usr.bin/perl/sperl/Makefile b/gnu/usr.bin/perl/sperl/Makefile index af19d47..466c767 100644 --- a/gnu/usr.bin/perl/sperl/Makefile +++ b/gnu/usr.bin/perl/sperl/Makefile @@ -24,7 +24,7 @@ MAN1= MLINKS+= perl.1 suidperl.1 BINOWN= root -BINMODE=4711 +BINMODE=4111 .include "../../Makefile.inc" .include <bsd.prog.mk> |