[Mono-bugs] [Bug 79123][Nor] Changed - UnixUserInfo.ToPasswd fails when fields are blank

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Aug 21 21:05:42 EDT 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by jonpryor at vt.edu.

http://bugzilla.ximian.com/show_bug.cgi?id=79123

--- shadow/79123	2006-08-21 13:31:36.000000000 -0400
+++ shadow/79123.tmp.24573	2006-08-21 21:05:42.000000000 -0400
@@ -1,12 +1,12 @@
 Bug#: 79123
 Product: Mono: Class Libraries
 Version: unspecified
 OS: unknown
 OS Details: 
-Status: REOPENED   
+Status: NEEDINFO   
 Resolution: 
 Severity: Unknown
 Priority: Normal
 Component: Mono.POSIX
 AssignedTo: miguel at ximian.com                            
 ReportedBy: samjie at gmail.com               
@@ -67,6 +67,38 @@
 For the time being I've just stuffed the password file with 'x's but
 that's not going to help me at deployment time.
 
 Where is this code at by the way, I tried to hunt it down last night
 but to no avail.
 
+
+------- Additional Comments From jonpryor at vt.edu  2006-08-21 21:05 -------
+I'm still unable to reproduce this even after modifying my own
+/etc/passwd and re-running the program.
+
+What platform are you on?
+
+It's possible that it's your C library, and getpwent(3) or
+getpwent_r() are acting "wonky."  You might try the following C
+program, and see if it misbehaves in the same way as UnixUserInfo:
+
+  /* C version of #79123 */
+  #include <sys/types.h>
+  #include <pwd.h>
+
+  #include <stdio.h>
+
+  int
+  main ()
+  {
+    struct passwd *ent;
+
+    setpwent ();
+    while ((ent = getpwent ()) != NULL) {
+      printf ("(passwd %s '%s' %u %u '%s' '%s' '%s')\n",
+        ent->pw_name, ent->pw_passwd, ent->pw_uid, 
+        ent->pw_gid, ent->pw_gecos, ent->pw_dir, 
+        ent->pw_shell);
+    }
+    endpwent ();
+  }
+


More information about the mono-bugs mailing list