File: drop-tainted-strings

package info (click to toggle)
ruby-shadow 2.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 200 kB
  • sloc: ansic: 323; ruby: 97; makefile: 4
file content (39 lines) | stat: -rw-r--r-- 1,838 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Index: ruby-shadow/pwd/shadow.c
===================================================================
--- ruby-shadow.orig/pwd/shadow.c
+++ ruby-shadow/pwd/shadow.c
@@ -56,8 +56,8 @@ static VALUE convert_pw_struct( struct p
 {
   /* 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. */
@@ -66,7 +66,7 @@ static VALUE convert_pw_struct( struct p
          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);
 }
 
Index: ruby-shadow/shadow/shadow.c
===================================================================
--- ruby-shadow.orig/shadow/shadow.c
+++ ruby-shadow/shadow/shadow.c
@@ -34,8 +34,8 @@ static VALUE rb_eFileLock;
 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),