ruby-shadow
ruby-shadow copied to clipboard
extconf.rb: use Rbconfig::CONFIG instead of mkmf CONFIG
In mkmf.rb CONFIG is defined as CONFIG is defined as RbConfig::MAKEFILE_CONFIG and RbConfig::MAKEFILE_CONFIG is almost same as RbConfig::CONFIG except that RbConfig::MAKEFILE_CONFIG uses reference for other variables.
Using CONFIG in extconf.rb causes error with ruby3.2 because now CONFIG['host_os'] uses reference for target_os variable, and extconf.rb expects that this variable is all expanded. So instead, use RbConfig::CONFIG .
Closes #30
I've released a gem that includes this PR, in order to allow Ruby 3.2 users to keep using this gem's functionality.
Hello, Can a fix be made available for "getting shadow.so: undefined symbol: rb_tainted_str_new2 with ruby-shadow-ruby32-2.5.1.gem.", please? On Linux, using Ruby 3.2.2, getting shadow.so: undefined symbol: rb_tainted_str_new2 with ruby-shadow-ruby32-2.5.1.gem.
The following code in this gem uses rb_tainted_str_new2: pwd/shadow.c:59: rb_tainted_str_new2(entry->pw_name), /* sp_namp / pwd/shadow.c:60: rb_tainted_str_new2(entry->pw_passwd), / sp_pwdp, encryped password / pwd/shadow.c:69: rb_tainted_str_new2(entry->pw_class), / sp_loginclass, user access class */ shadow/shadow.c:37: rb_tainted_str_new2(entry->sp_namp), shadow/shadow.c:38: rb_tainted_str_new2(entry->sp_pwdp),
Created an issue for this: https://github.com/apalmblad/ruby-shadow/issues/34
Thanks.