SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
23
lang/ruby/3.1/patches/patch-ext_etc_etc_c
Normal file
23
lang/ruby/3.1/patches/patch-ext_etc_etc_c
Normal file
|
@ -0,0 +1,23 @@
|
|||
Use shadow versions of password functions.
|
||||
|
||||
Index: ext/etc/etc.c
|
||||
--- ext/etc/etc.c.orig
|
||||
+++ ext/etc/etc.c
|
||||
@@ -218,7 +218,7 @@ etc_getpwuid(int argc, VALUE *argv, VALUE obj)
|
||||
else {
|
||||
uid = getuid();
|
||||
}
|
||||
- pwd = getpwuid(uid);
|
||||
+ pwd = getpwuid_shadow(uid);
|
||||
if (pwd == 0) rb_raise(rb_eArgError, "can't find user for %d", (int)uid);
|
||||
return setup_passwd(pwd);
|
||||
#else
|
||||
@@ -248,7 +248,7 @@ etc_getpwnam(VALUE obj, VALUE nam)
|
||||
struct passwd *pwd;
|
||||
const char *p = StringValueCStr(nam);
|
||||
|
||||
- pwd = getpwnam(p);
|
||||
+ pwd = getpwnam_shadow(p);
|
||||
if (pwd == 0) rb_raise(rb_eArgError, "can't find user for %"PRIsVALUE, nam);
|
||||
return setup_passwd(pwd);
|
||||
#else
|
Loading…
Add table
Add a link
Reference in a new issue