[Mono-bugs] [Bug 79161][Nor] New - Certain combinations of Mono.Posix.FilePermissions flags result in exceptions under solaris

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Aug 25 11:11:37 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 blinke at cebitec.uni-bielefeld.de.


--- shadow/79161	2006-08-25 11:11:37.000000000 -0400
+++ shadow/79161.tmp.20381	2006-08-25 11:11:37.000000000 -0400
@@ -0,0 +1,57 @@
+Bug#: 79161
+Product: Mono: Runtime
+Version: 1.1
+OS Details: Solaris 10/x86 + Solaris 10/sparc
+Status: NEW   
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: blinke at CeBiTec.Uni-Bielefeld.DE               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: Certain combinations of Mono.Posix.FilePermissions flags result in exceptions under solaris
+Description of Problem:
+Mono.Posix.FilePermission are mapped to values derived from operating
+system header files in support/map.c (int Mono_Posix_FromFilePermissions
+(unsigned int x, unsigned int *r).
+On systems that do not provide certains defines in the header files
+(ALLPERMS, ACCESSPERMS, DEFFILEMODE), certain valid combinations will
+result in a return value of -1 and errno set to EINVAL.
+Steps to reproduce the problem:
+1. Install mono + monodevelop
+2. Start monodevelop
+3. monodevelop fails to create unix domain sockets used for plugins
+How often does this happen? 
+Always reproducible
+Additional Information:
+The method StartListening in Mono.Remoting.Channels.Unix.UnixServerChannel
+uses the following code:
+listener = new UnixListener (path);
+            Mono.Unix.Native.Syscall.chmod (path,
+                                     Mono.Unix.Native.FilePermissions.S_IRUSR |
+                                     Mono.Unix.Native.FilePermissions.S_IWUSR |
+                                     Mono.Unix.Native.FilePermissions.S_IRGRP |
+                                     Mono.Unix.Native.FilePermissions.S_IWGRP |
+                                     Mono.Unix.Native.FilePermissions.S_IROTH |
+                                     Mono.Unix.Native.FilePermissions.S_IWOTH);
+The combined FilePermissions mask matches
+Mono.Unix.Native.FilePermissions.DEFFILEMODE. The mapping function in
+support/map.c recognizes the match, but due to the missing define it
+returns -1.
+Possible solution:
+Do not check for DEFFILEMODE, ACCESSPERMS and ALLPERMS at all, since the
+following checks for the single flags (S_*) should to the job. Unfortunatly
+map.c is auto generated, so a simple patch to the file won't do the job.

More information about the mono-bugs mailing list