Skip to content
Snippets Groups Projects

Recipe for perl

Merged Ian Douglas Scott requested to merge ids1024:perl into master
2 files
+ 227
0
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 183
0
diff -ru source/mg.c source-new/mg.c
--- source/mg.c 2017-06-30 14:03:22.000000000 -0700
+++ source-new/mg.c 2017-08-17 14:40:37.669507085 -0700
@@ -3034,16 +3034,16 @@
#ifdef HAS_SETRESUID
PERL_UNUSED_RESULT(setresuid(new_uid, (Uid_t)-1, (Uid_t)-1));
#else
- if (new_uid == PerlProc_geteuid()) { /* special case $< = $> */
+// if (new_uid == PerlProc_geteuid()) { /* special case $< = $> */
#ifdef PERL_DARWIN
/* workaround for Darwin's setuid peculiarity, cf [perl #24122] */
if (new_uid != 0 && PerlProc_getuid() == 0)
PERL_UNUSED_RESULT(PerlProc_setuid(0));
#endif
- PERL_UNUSED_RESULT(PerlProc_setuid(new_uid));
- } else {
+// PERL_UNUSED_RESULT(PerlProc_setuid(new_uid));
+// } else {
Perl_croak(aTHX_ "setruid() not implemented");
- }
+// }
#endif
#endif
#endif
@@ -3067,11 +3067,11 @@
#ifdef HAS_SETRESUID
PERL_UNUSED_RESULT(setresuid((Uid_t)-1, new_euid, (Uid_t)-1));
#else
- if (new_euid == PerlProc_getuid()) /* special case $> = $< */
- PERL_UNUSED_RESULT(PerlProc_setuid(new_euid));
- else {
+// if (new_euid == PerlProc_getuid()) /* special case $> = $< */
+// PERL_UNUSED_RESULT(PerlProc_setuid(new_euid));
+// else {
Perl_croak(aTHX_ "seteuid() not implemented");
- }
+// }
#endif
#endif
#endif
@@ -3095,11 +3095,11 @@
#ifdef HAS_SETRESGID
PERL_UNUSED_RESULT(setresgid(new_gid, (Gid_t)-1, (Gid_t) -1));
#else
- if (new_gid == PerlProc_getegid()) /* special case $( = $) */
- PERL_UNUSED_RESULT(PerlProc_setgid(new_gid));
- else {
+// if (new_gid == PerlProc_getegid()) /* special case $( = $) */
+// PERL_UNUSED_RESULT(PerlProc_setgid(new_gid));
+// else {
Perl_croak(aTHX_ "setrgid() not implemented");
- }
+// }
#endif
#endif
#endif
@@ -3178,11 +3178,11 @@
#ifdef HAS_SETRESGID
PERL_UNUSED_RESULT(setresgid((Gid_t)-1, new_egid, (Gid_t)-1));
#else
- if (new_egid == PerlProc_getgid()) /* special case $) = $( */
- PERL_UNUSED_RESULT(PerlProc_setgid(new_egid));
- else {
+// if (new_egid == PerlProc_getgid()) /* special case $) = $( */
+// PERL_UNUSED_RESULT(PerlProc_setgid(new_egid));
+// else {
Perl_croak(aTHX_ "setegid() not implemented");
- }
+// }
#endif
#endif
#endif
diff -ru source/perl.h source-new/perl.h
--- source/perl.h 2017-06-30 14:03:22.000000000 -0700
+++ source-new/perl.h 2017-08-17 13:14:01.806883580 -0700
@@ -1061,7 +1061,6 @@
#ifndef PERL_MICRO
#ifndef memchr
# ifndef HAS_MEMCHR
-# define memchr(s,c,n) ninstr((char*)(s), ((char*)(s)) + n, &(c), &(c) + 1)
# endif
#endif
#endif
diff -ru source/pp_hot.c source-new/pp_hot.c
--- source/pp_hot.c 2017-06-30 14:03:22.000000000 -0700
+++ source-new/pp_hot.c 2017-08-17 13:16:20.234635700 -0700
@@ -1583,11 +1583,13 @@
PL_delaymagic &= ~DM_EUID;
}
# endif /* HAS_SETEUID */
+#if 0
if (PL_delaymagic & DM_UID) {
if (PL_delaymagic_uid != PL_delaymagic_euid)
DIE(aTHX_ "No setreuid available");
PERL_UNUSED_RESULT(PerlProc_setuid(PL_delaymagic_uid));
}
+#endif
# endif /* HAS_SETREUID */
#endif /* HAS_SETRESUID */
@@ -1619,11 +1621,13 @@
PL_delaymagic &= ~DM_EGID;
}
# endif /* HAS_SETEGID */
+#if 0
if (PL_delaymagic & DM_GID) {
if (PL_delaymagic_gid != PL_delaymagic_egid)
DIE(aTHX_ "No setregid available");
PERL_UNUSED_RESULT(PerlProc_setgid(PL_delaymagic_gid));
}
+#endif
# endif /* HAS_SETREGID */
#endif /* HAS_SETRESGID */
diff -ru source/pp_sys.c source-new/pp_sys.c
--- source/pp_sys.c 2017-06-30 14:03:22.000000000 -0700
+++ source-new/pp_sys.c 2017-08-17 14:57:00.983541027 -0700
@@ -2413,7 +2413,7 @@
TAINT_PROPER(PL_op_desc[optype]);
if (optype == OP_IOCTL)
-#ifdef HAS_IOCTL
+#if 0
retval = PerlLIO_ioctl(PerlIO_fileno(IoIFP(io)), func, s);
#else
DIE(aTHX_ "ioctl is not implemented");
@@ -2705,7 +2705,7 @@
if (!IoIFP(io))
goto nuts;
- PUSHi( PerlSock_shutdown(PerlIO_fileno(IoIFP(io)), how) >= 0 );
+ PUSHi( 0 );
RETURN;
nuts:
@@ -2980,7 +2980,7 @@
sv_setuid(PUSHmortal, PL_statcache.st_uid);
sv_setgid(PUSHmortal, PL_statcache.st_gid);
-#ifdef USE_STAT_RDEV
+#if 0
mPUSHi(PL_statcache.st_rdev);
#else
PUSHs(newSVpvs_flags("", SVs_TEMP));
@@ -4186,7 +4186,7 @@
PP(pp_fork)
{
-#ifdef HAS_FORK
+#if 1
dSP; dTARGET;
Pid_t childpid;
#ifdef HAS_SIGPROCMASK
@@ -4332,7 +4332,7 @@
TAINT_PROPER("system");
}
PERL_FLUSHALL_FOR_CHILD;
-#if (defined(HAS_FORK) || defined(__amigaos4__)) && !defined(VMS) && !defined(OS2) || defined(PERL_MICRO)
+#if 1
{
#ifdef __amigaos4__
struct UserData userdata;
@@ -5582,7 +5582,7 @@
PP(pp_ggrent)
{
-#ifdef HAS_GROUP
+#if 0
dSP;
const I32 which = PL_op->op_type;
const struct group *grent;
diff -ru source/util.c source-new/util.c
--- source/util.c 2017-06-30 14:03:22.000000000 -0700
+++ source-new/util.c 2017-08-17 14:47:03.963804576 -0700
@@ -2842,7 +2842,7 @@
#endif /* HAS_FORK */
}
-#ifndef HAS_DUP2
+#if 0
int
dup2(int oldfd, int newfd)
{
Loading