Skip to content

Commit e37b63d

Browse files
Merge pull request #1 from chef/tp/3.2-and-up
Incorporate unmerged PRs from upstream
2 parents f135b3f + 555e063 commit e37b63d

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ Gem::Specification.new do |spec|
1616
spec.files << file.chomp
1717
end
1818
spec.homepage = 'https://github.com/apalmblad/ruby-shadow'
19-
spec.name = 'ruby-shadow'
20-
spec.required_ruby_version = ['>= 1.8']
19+
spec.name = 'chef-ruby-shadow'
20+
spec.required_ruby_version = ['>= 3.0']
2121
spec.summary = '*nix Shadow Password Module'
22-
spec.version = '2.5.1'
22+
spec.version = '3.0.0'
2323
spec.license = "Unlicense"
2424
end

extconf.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- ruby -*-
22
# extconf.rb
33
#
4-
# Modified at: <1999/8/19 06:38:55 by ttate>
4+
# Modified at: <1999/8/19 06:38:55 by ttate>
55
#
66

77
require 'mkmf'
@@ -14,7 +14,7 @@
1414
else; ''
1515
end
1616

17-
implementation = case CONFIG['host_os']
17+
implementation = case RbConfig::CONFIG['host_os']
1818
when /linux/i; 'shadow'
1919
when /sunos|solaris/i; 'shadow'
2020
when /freebsd|mirbsd|netbsd|openbsd/i; 'pwd'

pwd/shadow.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ static VALUE convert_pw_struct( struct passwd *entry )
5656
{
5757
/* Hmm. Why custom pw_change instead of sp_lstchg? */
5858
return rb_struct_new(rb_sPasswdEntry,
59-
rb_tainted_str_new2(entry->pw_name), /* sp_namp */
60-
rb_tainted_str_new2(entry->pw_passwd), /* sp_pwdp, encryped password */
59+
rb_str_new2(entry->pw_name), /* sp_namp */
60+
rb_str_new2(entry->pw_passwd), /* sp_pwdp, encryped password */
6161
Qnil, /* sp_lstchg, date when the password was last changed (in days since Jan 1, 1970) */
6262
Qnil, /* sp_min, days that password must stay same */
6363
Qnil, /* sp_max, days until password changes. */
@@ -66,7 +66,7 @@ static VALUE convert_pw_struct( struct passwd *entry )
6666
INT2FIX(difftime(entry->pw_change, 0) / (24*60*60)), /* pw_change */
6767
INT2FIX(difftime(entry->pw_expire, 0) / (24*60*60)), /* sp_expire */
6868
Qnil, /* sp_flag */
69-
rb_tainted_str_new2(entry->pw_class), /* sp_loginclass, user access class */
69+
rb_str_new2(entry->pw_class), /* sp_loginclass, user access class */
7070
NULL);
7171
}
7272

shadow/shadow.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ static VALUE rb_sGroupEntry;
3131
static VALUE rb_eFileLock;
3232

3333

34-
static VALUE convert_pw_struct( struct spwd *entry )
34+
static VALUE convert_pw_struct( struct spwd *entry )
3535
{
3636
return rb_struct_new(rb_sPasswdEntry,
37-
rb_tainted_str_new2(entry->sp_namp),
38-
rb_tainted_str_new2(entry->sp_pwdp),
37+
rb_str_new2(entry->sp_namp),
38+
rb_str_new2(entry->sp_pwdp),
3939
INT2FIX(entry->sp_lstchg),
4040
INT2FIX(entry->sp_min),
4141
INT2FIX(entry->sp_max),

0 commit comments

Comments
 (0)