Re: [Mono-dev] Console programs doesn't finish
On Wed, 2005-12-14 at 08:58 -0600, Carlos Solorzano wrote: My programs that don't exit are not as simple as just running some stuff on Main, instead they use a lot of threads (all the ones I have control of background), and I use a lot of remoting with a lot of Marhsal By Ref objects with an infinite lifetime. I would think my problem lies on the use of one of those two but who knows, also sometimes my programs do exit but I can't tell what the difference was. I found such problem with Remoting too, but I don't remember if the problem happened on windows or linux neither mono or ms.net, but one of them was caused by not unregistering the remoted channels. So try to cleanly unregister all your channels and see if it exists cleanly now. Let me know if you figure out something :-) --Carlos -- Regards, Mirco 'meebey' Bauer PGP-Key: http://keyserver.noreply.org/pks/lookup?op=getsearch=0xEEF946C8 -BEGIN GEEK CODE BLOCK- Version: 3.12 GIT d s-:+ a-- C++ UL$ P L++$+++$ E- W+++$ N o? K- w++! O M- V? PS PE+ Y- PGP++ t 5+ X++ R tv+ b+ DI? D+ G++ e h! r-++ y? --END GEEK CODE BLOCK-- signature.asc Description: This is a digitally signed message part ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] [PATCH] Minor fixes for XmlElement XmlTextWriter
Hi, I've attached a patch that fixes the following minor issues in XmlElement and XmlTextWriter : - Setting XmlElement.Prefix to null should not result in ArgumentNullException on 2.0 profile - XmlTextWriter.WriteNmToken should throw ArgumentException if name is null or zero-length string - XmlTextWriter.WriteWhitespace should throw ArgumentException if name is null or zero-length string All changes are accompanied by unit tests and have been tested on Mono 1.0/2.0 profile, and MS.NET 1.1/2.0. Is it ok to commit these changes (as is) ? Gert xml.diff Description: Binary data ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] [PATCH] Patch to add Gettext support to Mono.GetOptions
Hi, I've written a patch to add gettext support to Mono.GetOptions so that the help printed will be localized. It compiles and it's a fairly simple patch, but I haven't tested it against anything. I did have a question though about how gettext will work in a library; will the app developer manually have to add strings in Mono.GetOptions (like Error, et al.)? I don't know enough about gettext, but everything that should be translated is marked properly (at least I think). -- Paul Betts [EMAIL PROTECTED] Index: Mono.GetOptions/Options.cs === --- Mono.GetOptions/Options.cs (revision 53945) +++ Mono.GetOptions/Options.cs (working copy) @@ -27,6 +27,7 @@ // using System; using System.Collections; +using Mono.Unix; namespace Mono.GetOptions { @@ -117,9 +118,9 @@ private static void DefaultErrorReporter (int number, string message) { if (number 0) -Console.WriteLine(Error {0}: {1}, number, message); +Console.WriteLine(Catalog.GetString(Error {0}: {1}), number, Catalog.GetString(message)); else -Console.WriteLine(Error: {0}, message); +Console.WriteLine(Catalog.GetString(Error: {0}), Catalog.GetString(message)); } public virtual string AdditionalBannerInfo { get { return null; } } Index: Mono.GetOptions/OptionDetails.cs === --- Mono.GetOptions/OptionDetails.cs (revision 53945) +++ Mono.GetOptions/OptionDetails.cs (working copy) @@ -31,6 +31,7 @@ using System.Collections; using System.IO; using System.Reflection; +using Mono.Unix; namespace Mono.GetOptions { @@ -284,7 +285,9 @@ private int HowManyBeforeExceedingMaxOccurs(int howMany) { if (MaxOccurs 0 (Occurs + howMany) MaxOccurs) { -System.Console.Error.WriteLine(Option + LongForm + can be used at most + MaxOccurs + times. Ignoring extras...); +string format_str = Catalog.GetPluralString(Option {0} can be used at most {1} times. Ignoring extras..., + Option {0} can be used at most {1} times. Ignoring extras..., MaxOccurs); +System.Console.Error.WriteLine(format_str, LongForm, MaxOccurs); howMany = MaxOccurs - Occurs; } Occurs += howMany; @@ -329,6 +332,8 @@ int waitingToBeProcessed = HowManyBeforeExceedingMaxOccurs(parameterValues.Length); + string converterr_str = Catalog.GetString( +The value '{0}' is not convertible to the appropriate type '{1}' for the {2} option); foreach (string parameter in parameterValues) { if (waitingToBeProcessed-- = 0) @@ -343,7 +348,7 @@ try { convertedParameter = Convert.ChangeType(parameter, ParameterType.GetElementType()); } catch (Exception ex) { - Console.WriteLine(String.Format(The value '{0}' is not convertible to the appropriate type '{1}' for the {2} option, parameter, ParameterType.GetElementType().Name, DefaultForm)); + Console.WriteLine(converterr_str,parameter,ParameterType.GetElementType().Name,DefaultForm); } Values.Add(convertedParameter); continue; @@ -353,7 +358,7 @@ try { convertedParameter = Convert.ChangeType(parameter, ParameterType); } catch (Exception ex) { - Console.WriteLine(String.Format(The value '{0}' is not convertible to the appropriate type '{1}' for the {2} option, parameter, ParameterType.Name, DefaultForm)); + Console.WriteLine(converterr_str, parameter, ParameterType.Name, DefaultForm); continue; } } Index: Mono.GetOptions/OptionList.cs === --- Mono.GetOptions/OptionList.cs (revision 53945) +++ Mono.GetOptions/OptionList.cs (working copy) @@ -32,6 +32,7 @@ using System.IO; using System.Reflection; using System.Text; +using Mono.Unix; namespace Mono.GetOptions { @@ -226,7 +227,7 @@ if (!bannerAlreadyShown) { Console.WriteLine(appTitle ++ appVersion + - + appCopyright); if (AdditionalBannerInfo != null) - Console.WriteLine(AdditionalBannerInfo); + Console.WriteLine(Catalog.GetString(AdditionalBannerInfo)); } bannerAlreadyShown = true; } @@ -234,23 +235,23 @@ private void ShowTitleLines() { ShowBanner(); - Console.WriteLine(appDescription); + Console.WriteLine(Catalog.GetString(appDescription)); Console.WriteLine(); } private void ShowAbout() { ShowTitleLines(); - Console.WriteLine(appAboutDetails); - Console.Write(Authors: ); + Console.WriteLine(Catalog.GetString(appAboutDetails)); + Console.Write(Catalog.GetString(Authors: )); Console.WriteLine(string.Join(, , appAuthors)); } private void ShowHelp(bool showSecondLevelHelp) { ShowTitleLines(); - Console.WriteLine(Usage); - Console.WriteLine(Options:); + Console.WriteLine(Catalog.GetString(Usage)); + Console.WriteLine(Catalog.GetString(Options:)); ArrayList lines = new ArrayList(list.Count); int
Re: [Mono-dev] Console programs doesn't finish
On Dec 27, 2005, at 5:00 AM, Mirco Bauer wrote: On Wed, 2005-12-14 at 08:58 -0600, Carlos Solorzano wrote: My programs that don't exit are not as simple as just running some stuff on Main, instead they use a lot of threads (all the ones I have control of background), and I use a lot of remoting with a lot of Marhsal By Ref objects with an infinite lifetime. I would think my problem lies on the use of one of those two but who knows, also sometimes my programs do exit but I can't tell what the difference was. I found such problem with Remoting too, but I don't remember if the problem happened on windows or linux neither mono or ms.net, but one of them was caused by not unregistering the remoted channels. So try to cleanly unregister all your channels and see if it exists cleanly now. I will try that. However a couple of times one of my programs that doesn't use remoting didn't exit. It does use background threads heavily and just like all of my other programs it uses the Process class heavily. --Carlos Let me know if you figure out something :-) --Carlos -- Regards, Mirco 'meebey' Bauer PGP-Key: http://keyserver.noreply.org/pks/lookup?op=getsearch=0xEEF946C8 -BEGIN GEEK CODE BLOCK- Version: 3.12 GIT d s-:+ a-- C++ UL$ P L++$+++$ E- W+++$ N o? K- w++! O M- V? PS PE+ Y- PGP++ t 5+ X++ R tv+ b+ DI? D+ G++ e h! r-++ y? --END GEEK CODE BLOCK-- ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] [PATCH] System.Xml.Serialization.XmlAttributes fixes
Hi, The attached patch fixes the following issues with System.Xml.Serialization.XmlAttributes: - If XmlIgnoreAttribute is applied, do not process any other attributes. - In 2.0 profile, XmlDefaultValue must be null by default. Both fixes are accompanied by unit tests, and have been tested on Mono 1.0/2.0 profile and MS.NET 1.1/2.0. Is it ok commit these changes ? Gert xmlser.diff Description: Binary data ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] Native compiler
Hello, Before you say anything, no I am not talking about a GCC frontend for Mono, something akin to GCJ for Java. But compilation, native compilation would be nice. It has already been commercially done: http://www.remotesoft.com/linker/ The question is, could it be done as an open-source project for mono - on all supported platforms? Regards, -- Vladimir Vlad# Lushnikov http://www.vladsharp.com - Poetry, programming: all in one day's blog ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Native compiler
Vladimir Lushnikov wrote: Hello, Before you say anything, no I am not talking about a GCC frontend for Mono, something akin to GCJ for Java. But compilation, native compilation would be nice. It has already been commercially done: http://www.remotesoft.com/linker/ The question is, could it be done as an open-source project for mono - on all supported platforms? The question is: isn't a similar feature almost there? Have a look at mkbundle (man mkbundle) and at the AOT runtime support. Robert ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] problem with mono 1.1.12.1
Hello, I have a program will use Datasets and run fine with mono 1.1.9 compiled with gmcs, but with 1.1.12.1 throw an exception System.NotImplementedException, the same app compiled with mcs not fail. This piece of code fail when run if compiled with gmcs //* gmcs -warn:4 Example10.cs -r:System.Data -r:Npgsql */ using System; using System.Data; using Npgsql; /* CREATE TABLE table2( field_int2 int2, field_timestamp timestamp, field_numeric numeric ); */ public class Example10 { public static void Main() { string strCon = Server=localhost;+ User Id=postgres;+ Password=;+ Database=tests;; NpgsqlConnection conn = new NpgsqlConnection(strCon); conn.Open(); NpgsqlDataAdapter da = new NpgsqlDataAdapter(); DataSet ds = new DataSet(); string strCommand = SELECT * FROM table2 WHERE 1=2; NpgsqlCommand selCommand = new NpgsqlCommand(strCommand,conn); selCommand.CommandType = CommandType.Text; strCommand = INSERT INTO table2 + (field_int2,field_timestamp,field_numeric) + VALUES (:a, :b, :c); NpgsqlCommand insCommand = new NpgsqlCommand(strCommand,conn); insCommand.Parameters.Add (new NpgsqlParameter(a, DbType.Int16)); insCommand.Parameters.Add (new NpgsqlParameter(b, DbType.DateTime)); insCommand.Parameters.Add (new NpgsqlParameter(c, DbType.Decimal)); insCommand.Parameters[0].Direction = insCommand.Parameters[1].Direction = insCommand.Parameters[2].Direction = ParameterDirection.Input; insCommand.Parameters[0].SourceColumn = field_int2; insCommand.Parameters[1].SourceColumn = field_timestamp; insCommand.Parameters[2].SourceColumn = field_numeric; da.SelectCommand = selCommand; da.InsertCommand = insCommand; da.Fill(ds,table2); DataTable dt = ds.Tables[table2]; DataRow dr = dt.NewRow(); dr[field_int2] = 4; dr[field_timestamp] = new DateTime(2003, 03, 03, 14, 0, 0); dr[field_numeric] = 7.3M; dt.Rows.Add(dr); da.Update(ds,table2); conn.Close(); } } Output is: Unhandled Exception: System.NotImplementedException: The requested feature is not implemented. in 0x0001d System.Data.Common.DbDataAdapter:get_SelectCommand () in 0x0001a System.Data.Common.DbDataAdapter:Fill (System.Data.DataSet dataSet, System.String srcTable) in (wrapper remoting-invoke-with-check) System.Data.Common.DbDataAdapter:Fill (System.Data.DataSet,string) in 0x0031e Example10:Main () Any ideas? Thanks. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] problem with mono 1.1.12.1
mcs uses .net 1.1 profile as default. gmcs uses .net 2.0 profile as default. It looks like to be a regression in order to stub out methods and properties to support ADO.NET 2.0.http://svn.myrealbox.com/viewcvs/trunk/mcs/class/System.Data/System.Data.Common/DbDataAdapter.cs?rev=53301view=markupPlease file a bug report at http://bugzilla.ximian.com/Joe Audettementioned this earlier in an email with a subject of "ASP.NET 2.0 databinding to a DropDwonList not implemented". He also blogged about this problem on Monologue at http://www.joeaudette.com/Default.aspx?pageid=101cartuchoGL [EMAIL PROTECTED] wrote: Hello,I have a program will use Datasets and run fine with mono 1.1.9 compiled with gmcs, but with1.1.12.1 throw an exception System.NotImplementedException, the same app compiled with mcs not fail.This piece of code fail when run if compiled with gmcs//* gmcs -warn:4 Example10.cs -r:System.Data -r:Npgsql */using System;using System.Data;using Npgsql;/*CREATE TABLE table2(field_int2 int2,field_timestamp timestamp,field_numeric numeric);*/public class Example10 {public static void Main() { string strCon ="Server=localhost;"+"User Id=postgres;"+"Password=;"+"Database=tests;";NpgsqlConnection conn = new NpgsqlConnection(strCon);conn.Open();NpgsqlDataAdapter da = new NpgsqlDataAdapter();DataSet ds = new DataSet();string strCommand = "SELECT * FROM table2 WHERE 1=2";NpgsqlCommand selCommand = new NpgsqlCommand(strCommand,conn);selCommand.CommandType = CommandType.Text;strCommand = "INSERT INTO table2 "+"(field_int2,field_timestamp,field_numeric) "+"VALUES (:a, :b, :c)";NpgsqlCommand insCommand = new NpgsqlCommand(strCommand,conn);insCommand.Parameters.Add(new NpgsqlParameter("a", DbType.Int16));insCommand.Parameters.Add(new NpgsqlParameter("b", DbType.DateTime));insCommand.Parameters.Add(new NpgsqlParameter("c", DbType.Decimal));insCommand.Parameters[0].Direction =insCommand.Parameters[1].Direction =insCommand.Parameters[2].Direction =ParameterDirection.Input;insCommand.Parameters[0].SourceColumn ="field_int2";insCommand.Parameters[1].SourceColumn ="field_timestamp";insCommand.Parameters[2].SourceColumn ="field_numeric";da.SelectCommand = selCommand;da.InsertCommand = insCommand;da.Fill(ds,"table2");DataTable dt = ds.Tables["table2"];DataRow dr = dt.NewRow();dr["field_int2"] = 4;dr["field_timestamp"] = new DateTime(2003, 03, 03, 14, 0, 0);dr["field_numeric"] = 7.3M;dt.Rows.Add(dr);da.Update(ds,"table2");conn.Close();}}Output is:Unhandled Exception: System.NotImplementedException: The requested feature is not implemented.in 0x0001d System.Data.Common.DbDataAdapter:get_SelectCommand ()in 0x0001a System.Data.Common.DbDataAdapter:Fill (System.Data.DataSet dataSet, System.String srcTable)in (wrapper remoting-invoke-with-check) System.Data.Common.DbDataAdapter:Fill (System.Data.DataSet,string)in 0x0031e Example10:Main ()Any ideas?Thanks.___Mono-devel-list mailing listMono-devel-list@lists.ximian.comhttp://lists.ximian.com/mailman/listinfo/mono-devel-list Yahoo! Photos Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] problem with mono 1.1.12.1
Daniel Morgan wrote: mcs uses .net 1.1 profile as default. gmcs uses .net 2.0 profile as default. It looks like to be a regression in order to stub out methods and properties to support ADO.NET 2.0. http://svn.myrealbox.com/viewcvs/trunk/mcs/class/System.Data/System.Data.Common/DbDataAdapter.cs?rev=53301view=markup http://svn.myrealbox.com/viewcvs/trunk/mcs/class/System.Data/System.Data.Common/DbDataAdapter.cs?rev=53301view=markup Please file a bug report at http://bugzilla.ximian.com/ Done bug # 77105 Joe Audette mentioned this earlier in an email with a subject of ASP.NET 2.0 databinding to a DropDwonList not implemented. He also blogged about this problem on Monologue at _http://www.joeaudette.com/Default.aspx?pageid=101_ */cartuchoGL [EMAIL PROTECTED]/* wrote: Hello, I have a program will use Datasets and run fine with mono 1.1.9 compiled with gmcs, but with 1.1.12.1 throw an exception System.NotImplementedException, the same app compiled with mcs not fail. This piece of code fail when run if compiled with gmcs //* gmcs -warn:4 Example10.cs -r:System.Data -r:Npgsql */ using System; using System.Data; using Npgsql; /* CREATE TABLE table2( field_int2 int2, field_timestamp timestamp, field_numeric numeric ); */ public class Example10 { public static void Main() { string strCon = Server=localhost;+ User Id=postgres;+ Password=;+ Database=tests;; NpgsqlConnection conn = new NpgsqlConnection(strCon); conn.Open(); NpgsqlDataAdapter da = new NpgsqlDataAdapter(); DataSet ds = new DataSet(); string strCommand = SELECT * FROM table2 WHERE 1=2; NpgsqlCommand selCommand = new NpgsqlCommand(strCommand,conn); selCommand.CommandType = CommandType.Text; strCommand = INSERT INTO table2 + (field_int2,field_timestamp,field_numeric) + VALUES (:a, :b, :c); NpgsqlCommand insCommand = new NpgsqlCommand(strCommand,conn); insCommand.Parameters.Add (new NpgsqlParameter(a, DbType.Int16)); insCommand.Parameters.Add (new NpgsqlParameter(b, DbType.DateTime)); insCommand.Parameters.Add (new NpgsqlParameter(c, DbType.Decimal)); insCommand.Parameters[0].Direction = insCommand.Parameters[1].Direction = insCommand.Parameters[2].Direction = ParameterDirection.Input; insCommand.Parameters[0].SourceColumn = field_int2; insCommand.Parameters[1].SourceColumn = field_timestamp; insCommand.Parameters[2].SourceColumn = field_numeric; da.SelectCommand = selCommand; da.InsertCommand = insCommand; da.Fill(ds,table2); DataTable dt = ds.Tables[table2]; DataRow dr = dt.NewRow(); dr[field_int2] = 4; dr[field_timestamp] = new DateTime(2003, 03, 03, 14, 0, 0); dr[field_numeric] = 7.3M; dt.Rows.Add(dr); da.Update(ds,table2); conn.Close(); } } Output is: Unhandled Exception: System.NotImplementedException: The requested feature is not implemented. in 0x0001d System.Data.Common.DbDataAdapter:get_SelectCommand () in 0x0001a System.Data.Common.DbDataAdapter:Fill (System.Data.DataSet dataSet, System.String srcTable) in (wrapper remoting-invoke-with-check) System.Data.Common.DbDataAdapter:Fill (System.Data.DataSet,string) in 0x0031e Example10:Main () Any ideas? Thanks. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list Yahoo! Photos Ring in the New Year with Photo Calendars http://us.rd.yahoo.com/mail_us/taglines/photos/*http://pg.photos.yahoo.com/ph//page?.file=calendar_splash.html.dir=. Add photos, events, holidays, whatever. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
RE: [Mono-dev] [PATCH] System.Xml.Serialization.XmlAttributes fixes
Update: The XmlDefaultValue change seems to cause regressions in the 2.0 profile after all. I'll verify and fix these regressions, and post an updated patch. Gert -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gert Driesen Sent: dinsdag 27 december 2005 14:33 To: [EMAIL PROTECTED] Subject: [Mono-dev] [PATCH] System.Xml.Serialization.XmlAttributes fixes Hi, The attached patch fixes the following issues with System.Xml.Serialization.XmlAttributes: - If XmlIgnoreAttribute is applied, do not process any other attributes. - In 2.0 profile, XmlDefaultValue must be null by default. Both fixes are accompanied by unit tests, and have been tested on Mono 1.0/2.0 profile and MS.NET 1.1/2.0. Is it ok commit these changes ? Gert ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] [PATCH] Bug in X509Chain?
Hi Sebastien. Sorry for the delay, but I have updated my bugg report #76279 - CERT_E_CHAINING problem for server certificate now with an updated recreation procedure. To be able to reproduce the problem You have to create the certs with openssl (on Linux). The procedure for that is well documented. BTW. I will be off my project now (for some time?) so I may not be able to answer any questions. I hope You will be able to recreate the problem anyhow. BTW 2. On the server i run Linux Fedora core 3 and my Mono version is 1.9.1. Happy New Year. Yngve Zackrisson Mobila-Kontoret / CK Management AB. On Thu, 2005-12-08 at 20:36, Yngve Zackrisson wrote: On Thu, 2005-12-08 at 14:04, Sebastien Pouliot wrote: Hello Yngve, On Thu, 2005-12-08 at 10:25 +0100, Yngve Zackrisson wrote: This problem seems similar to an issue I have reported on Bugzilla (#76279 - CERT_E_CHAINING problem for server certificate). That's very possible. Vincent problem seems to come from how it's being used and not the certificate themselves (which could explain why I couldn't replicate #76279). Could you try the patch and update the bug report with your findings ? Hello Sebastien I can try ... . As You might remember I generate my certificates with openssl. I have the procedure for certificate generation well documented now an I have 2 configuration files for each of the client and server certs. You can ether get an updated version of this (and the test programs) or I can create the certs for You - but then I need the CN for Your test client machine and Your test server machine. The test client machine should be a Win32 .NET 1.1 client and the test server machine should be a Linux Mono (1.1.9) server for my testcase to work. Regards // Yngve Zackrisson. // // Mobila-Kontoret / CK Management AB. Thanks. The request is done through HTTPS. Many certificate checks are protocol specific (e.g. SSL, HTTPS) but the chaining is, currently, identical for all purpose. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Native compiler
Hello, That doesn't work on Windows, and as much as we want to shy away from the fact, 90% of desktop users use Windows. mono --aot doesn't work either on Windows, complains about as not being there. The linker you pointed to is not a native compiler it is merely a tool that embeds your application and your runtime. mkbundle can do that just fine. You need to install as from cygwin. Miguel. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] Open discussion for mono setuid per vhost
So far I've been discussing this offlist with another Mono/.Net developer... I'm interested in open/honest feedback or code snippets which might help accomplish this.. So far there are two ways which seem reasonable so far and please pardon me if I'm missing some points.. 1) Mono wrapper Apache --- mod_mono -- mono-server-path to wrapper -- mod-mono-server The wrapper is s+ (sticky bit) and owned by root.. It then calls the mod-mono-server with setuid as the desired user.. 2) Patching mod_mono directly.. Apache --- mod_mono_patched -- mod-mono-server With the 2nd approach I'm thinking I have to compile mono with -DBIG_SECURITY_HOLE (have to love the naming convention) and start apache as root.. and then let mono setuid during the fork.. This has two big disadvantages that glare at me.. -DBIG_SECURITY_HOLE is named appropriately, but is owned by root and setting +s really any different.. Also then I have to maintain a patchset that is off mainline unless it's somehow contributed upstream.. (Is the -DBIG_SECURITY_HOLE and starting as root a must?) I'm really not seeing a maintainable way to get around the vhosts being in their own environment issue.. (Just when I thought I had it whipped something didn't seem right.) the end goal is to provide the following.. a) Each vhost being under it's own user b) If a vhost crashes it automagically restarts c) Allows apache to serve the static content (keep some of the load off XSP for things like images, css and etc...) d) Minimizing memory overhead impact if the vhost counts goes into the hundreds.. e) Not using proxy (On startup which even with -aot on everything seems to take the load average to some really high levels if you start a lot of mod-mono-servers) Any feedback is appreciated.. C. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Open discussion for mono setuid per vhost
Christopher, So far I've been discussing this offlist with another Mono/.Net developer... I'm interested in open/honest feedback or code snippets which might help accomplish this.. So far there are two ways which seem reasonable so far and please pardon me if I'm missing some points.. 1) Mono wrapper Apache --- mod_mono -- mono-server-path to wrapper -- mod-mono-server The wrapper is s+ (sticky bit) and owned by root.. It then calls the mod-mono-server with setuid as the desired user.. This is quite secure, but it probably won't work from scratch due to the unix socket used for the mono_mono - mod-mono-server communication. 2) Patching mod_mono directly.. Apache --- mod_mono_patched -- mod-mono-server With the 2nd approach I'm thinking I have to compile mono with -DBIG_SECURITY_HOLE (have to love the naming convention) and start apache as root.. and then let mono setuid during the fork.. This has two big disadvantages that glare at me.. -DBIG_SECURITY_HOLE is named appropriately, but is owned by root and setting +s really any different.. Also then I have to maintain a patchset that is off mainline unless it's somehow contributed upstream.. (Is the -DBIG_SECURITY_HOLE and starting as root a must?) Yes, it is. I'm really not seeing a maintainable way to get around the vhosts being in their own environment issue.. (Just when I thought I had it whipped something didn't seem right.) the end goal is to provide the following.. a) Each vhost being under it's own user b) If a vhost crashes it automagically restarts c) Allows apache to serve the static content (keep some of the load off XSP for things like images, css and etc...) d) Minimizing memory overhead impact if the vhost counts goes into the hundreds.. e) Not using proxy FastCGI + Apache SuEXEC might be a solution as well, at least it covers a-e. It is used for PHP by serious mass hosters. However, it requires a new fastcgi-mono-server, which has to be developed. (On startup which even with -aot on everything seems to take the load average to some really high levels if you start a lot of mod-mono-servers) Gonzalo is aware of this issue. Robert ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list