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

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Aug 20 17:48:35 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 samjie at gmail.com.

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

--- shadow/79123	2006-08-20 17:48:35.000000000 -0400
+++ shadow/79123.tmp.8324	2006-08-20 17:48:35.000000000 -0400
@@ -0,0 +1,28 @@
+Bug#: 79123
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Mono.POSIX
+AssignedTo: miguel at ximian.com                            
+ReportedBy: samjie at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: UnixUserInfo.ToPasswd fails when fields are blank
+
+If you call UnixUserInfo.ToPasswd with empty field(s) (eg
+RealName/pw_gecos) the call will fail with 'Object reference not set to an
+instance of an object'. Thus code like this fails:
+
+        UnixUserInfo[] userinfo = UnixUserInfo.GetLocalUsers();
+        Passwd[] users = new Passwd[userinfo.Length];
+        for (int i = 0; i < userinfo.Length; i++)
+        {
+            users[i] = userinfo[i].ToPasswd();
+        }


More information about the mono-bugs mailing list