Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac OS X and setruid, etc. #10191

Closed
p5pRT opened this issue Feb 21, 2010 · 5 comments
Closed

Mac OS X and setruid, etc. #10191

p5pRT opened this issue Feb 21, 2010 · 5 comments

Comments

@p5pRT
Copy link

@p5pRT p5pRT commented Feb 21, 2010

Migrated from rt.perl.org#72990 (status was 'resolved')

Searchable as RT72990$

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Feb 21, 2010

From @cpansprout

hints/darwin.sh pretends that setruid and similar functions do not
exist, as they were buggy in earlier versions of Mac OS X. Leopard and
Snow Leopard (I don’t know about Tiger) are fine. The attached patch
re-enables those on recent versions.

Use of uninitialized value $category in concatenation (.) or string
at /usr/local/bin/perlbug5.11.5 line 645.
Use of uninitialized value $severity in concatenation (.) or string
at /usr/local/bin/perlbug5.11.5 line 645.


Flags​:
  category=install
  severity=low


Site configuration information for perl 5.11.5​:

Configured by sprout at Sat Feb 20 23​:31​:20 PST 2010.

Summary of my perl5 (revision 5 version 11 subversion 5 patch
v5.11.4-143-gb3289bd) configuration​:
  Snapshot of​: b3289bd
  Platform​:
  osname=darwin, osvers=10.0.0, archname=darwin-2level
  uname='darwin pint.local 10.0.0 darwin kernel version 10.0.0​: fri
jul 31 22​:47​:34 pdt 2009; root​:xnu-1456.1.25~1release_i386 i386 '
  config_args='-de -Dusedevel'
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=undef, usemultiplicity=undef
  useperlio=define, d_sfio=undef, uselargefiles=define,
usesocks=undef
  use64bitint=undef, use64bitall=undef, uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='cc', ccflags ='-fno-common -DPERL_DARWIN -no-cpp-precomp -fno-
strict-aliasing -pipe -fstack-protector -I/usr/local/include',
  optimize='-O3',
  cppflags='-no-cpp-precomp -fno-common -DPERL_DARWIN -no-cpp-
precomp -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/
include'
  ccversion='', gccversion='4.2.1 (Apple Inc. build 5646)',
gccosandvers=''
  intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
  ivtype='long', ivsize=4, nvtype='double', nvsize=8,
Off_t='off_t', lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -fstack-
protector -L/usr/local/lib'
  libpth=/usr/local/lib /usr/lib
  libs=-ldbm -ldl -lm -lutil -lc
  perllibs=-ldl -lm -lutil -lc
  libc=/usr/lib/libc.dylib, so=dylib, useshrplib=false,
libperl=libperl.a
  gnulibc_version=''
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
  cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/
usr/local/lib -fstack-protector'

Locally applied patches​:


@​INC for perl 5.11.5​:
  /usr/local/lib/perl5/site_perl/5.11.5/darwin-2level
  /usr/local/lib/perl5/site_perl/5.11.5
  /usr/local/lib/perl5/5.11.5/darwin-2level
  /usr/local/lib/perl5/5.11.5
  /usr/local/lib/perl5/site_perl
  .


Environment for perl 5.11.5​:
  DYLD_LIBRARY_PATH (unset)
  HOME=/Users/sprout
  LANG=en_US.UTF-8
  LANGUAGE (unset)
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  PATH=/usr/bin​:/bin​:/usr/sbin​:/sbin​:/usr/local/bin​:/usr/X11/bin​:/
usr/local/bin
  PERL_BADLANG (unset)
  SHELL=/bin/bash

Loading

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Feb 21, 2010

From @cpansprout

Inline Patch
--- blead/hints/darwin.sh	2009-11-19 08:51:38.000000000 -0800
+++ blead-darwin-hints/hints/darwin.sh	2010-02-15 21:00:55.000000000 -0800
@@ -13,11 +13,16 @@ perl_version=`awk '/define[ 	]+PERL_VERS
 perl_subversion=`awk '/define[ 	]+PERL_SUBVERSION/ {print $3}' $src/patchlevel.h`
 version="${perl_revision}.${perl_version}.${perl_subversion}"
 
-# Pretend that Darwin doesn't know about those system calls [perl #24122]
-d_setregid='undef'
-d_setreuid='undef'
-d_setrgid='undef'
-d_setruid='undef'
+# Pretend that Darwin doesn't know about those system calls in Tiger
+# (10.4/darwin 8) and earlier [perl #24122]
+case "$osvers" in
+[1-8].*)
+    d_setregid='undef'
+    d_setreuid='undef'
+    d_setrgid='undef'
+    d_setruid='undef'
+    ;;
+esac
 
 # This was previously used in all but causes three cases
 # (no -Ddprefix=, -Dprefix=/usr, -Dprefix=/some/thing/else)

Loading

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Sep 27, 2010

@cpansprout - Status changed from 'new' to 'resolved'

Loading

@p5pRT p5pRT closed this Sep 27, 2010
@p5pRT
Copy link
Author

@p5pRT p5pRT commented Sep 27, 2010

From @cpansprout

On Sun Feb 21 13​:18​:10 2010, sprout wrote​:

hints/darwin.sh pretends that setruid and similar functions do not
exist, as they were buggy in earlier versions of Mac OS X. Leopard and
Snow Leopard (I don’t know about Tiger) are fine. The attached patch
re-enables those on recent versions.

Applied as 04ec184.

Loading

@p5pRT
Copy link
Author

@p5pRT p5pRT commented Sep 27, 2010

From [Unknown Contact. See original ticket]

On Sun Feb 21 13​:18​:10 2010, sprout wrote​:

hints/darwin.sh pretends that setruid and similar functions do not
exist, as they were buggy in earlier versions of Mac OS X. Leopard and
Snow Leopard (I don’t know about Tiger) are fine. The attached patch
re-enables those on recent versions.

Applied as 04ec184.

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant