Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ruby-shadow.gemspec → chef-ruby-shadow.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ Gem::Specification.new do |spec|
spec.files << file.chomp
end
spec.homepage = 'https://github.com/apalmblad/ruby-shadow'
spec.name = 'ruby-shadow'
spec.required_ruby_version = ['>= 1.8']
spec.name = 'chef-ruby-shadow'
spec.required_ruby_version = ['>= 3.0']
spec.summary = '*nix Shadow Password Module'
spec.version = '2.5.1'
spec.version = '3.0.0'
spec.license = "Unlicense"
end
4 changes: 2 additions & 2 deletions extconf.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- ruby -*-
# extconf.rb
#
# Modified at: <1999/8/19 06:38:55 by ttate>
# Modified at: <1999/8/19 06:38:55 by ttate>
#

require 'mkmf'
Expand All @@ -14,7 +14,7 @@
else; ''
end

implementation = case CONFIG['host_os']
implementation = case RbConfig::CONFIG['host_os']
when /linux/i; 'shadow'
when /sunos|solaris/i; 'shadow'
when /freebsd|mirbsd|netbsd|openbsd/i; 'pwd'
Expand Down
6 changes: 3 additions & 3 deletions pwd/shadow.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ static VALUE convert_pw_struct( struct passwd *entry )
{
/* Hmm. Why custom pw_change instead of sp_lstchg? */
return rb_struct_new(rb_sPasswdEntry,
rb_tainted_str_new2(entry->pw_name), /* sp_namp */
rb_tainted_str_new2(entry->pw_passwd), /* sp_pwdp, encryped password */
rb_str_new2(entry->pw_name), /* sp_namp */
rb_str_new2(entry->pw_passwd), /* sp_pwdp, encryped password */
Qnil, /* sp_lstchg, date when the password was last changed (in days since Jan 1, 1970) */
Qnil, /* sp_min, days that password must stay same */
Qnil, /* sp_max, days until password changes. */
Expand All @@ -66,7 +66,7 @@ static VALUE convert_pw_struct( struct passwd *entry )
INT2FIX(difftime(entry->pw_change, 0) / (24*60*60)), /* pw_change */
INT2FIX(difftime(entry->pw_expire, 0) / (24*60*60)), /* sp_expire */
Qnil, /* sp_flag */
rb_tainted_str_new2(entry->pw_class), /* sp_loginclass, user access class */
rb_str_new2(entry->pw_class), /* sp_loginclass, user access class */
NULL);
}

Expand Down
6 changes: 3 additions & 3 deletions shadow/shadow.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ static VALUE rb_sGroupEntry;
static VALUE rb_eFileLock;


static VALUE convert_pw_struct( struct spwd *entry )
static VALUE convert_pw_struct( struct spwd *entry )
{
return rb_struct_new(rb_sPasswdEntry,
rb_tainted_str_new2(entry->sp_namp),
rb_tainted_str_new2(entry->sp_pwdp),
rb_str_new2(entry->sp_namp),
rb_str_new2(entry->sp_pwdp),
INT2FIX(entry->sp_lstchg),
INT2FIX(entry->sp_min),
INT2FIX(entry->sp_max),
Expand Down