mirror of
https://github.com/openbsd/ports.git
synced 2026-06-18 07:24:23 +02:00
getpwnam -> getpwnam_shadow
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.10 2015/10/09 07:06:35 jasper Exp $
|
||||
# $OpenBSD: Makefile,v 1.11 2015/11/19 15:01:47 jasper Exp $
|
||||
|
||||
COMMENT = module to access shadow passwords
|
||||
|
||||
DISTNAME = ruby-shadow-2.5.0
|
||||
PKGNAME = ${DISTNAME:S/ruby-//}
|
||||
REVISION = 0
|
||||
CATEGORIES = sysutils
|
||||
|
||||
MAINTAINER = Jasper Lievisse Adriaanse <jasper@openbsd.org>
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
$OpenBSD: patch-pwd_shadow_c,v 1.6 2015/11/19 15:01:47 jasper Exp $
|
||||
--- pwd/shadow.c.orig Thu Nov 19 15:51:37 2015
|
||||
+++ pwd/shadow.c Thu Nov 19 15:56:27 2015
|
||||
@@ -92,7 +92,11 @@ rb_shadow_getspnam(VALUE self, VALUE name)
|
||||
|
||||
if( TYPE(name) != T_STRING )
|
||||
rb_raise(rb_eException,"argument must be a string.");
|
||||
+#ifdef __OpenBSD__
|
||||
+ entry = getpwnam_shadow(StringValuePtr(name));
|
||||
+#else
|
||||
entry = getpwnam(StringValuePtr(name));
|
||||
+#endif
|
||||
|
||||
if( entry == NULL )
|
||||
return Qnil;
|
||||
Reference in New Issue
Block a user