[Mono-dev] [PATCH] EventLog implementation

Gert Driesen gert.driesen at telenet.be
Sun Aug 13 10:35:14 EDT 2006



> -----Original Message-----
> From: mono-devel-list-bounces at lists.ximian.com [mailto:mono-devel-list-
> bounces at lists.ximian.com] On Behalf Of Atsushi Eno
> Sent: zondag 13 augustus 2006 15:32
> To: Gert Driesen
> Cc: mono-devel-list at lists.ximian.com
> Subject: Re: [Mono-dev] [PATCH] EventLog implementation
> 
> Hello Gert,
> 
> Here are my thoughts:
> 
> 	- As I mentioned at #mono, Current code end up to have
> 	  *no* implementation from the point of already-built
> 	  System.dll. There should be ways to enable local file
> 	  impl. and winapi impl. without rebuilding System.dll
> 	  Using environment variable would be mandatory. Having
> 	  configuration section would be optional goodness.

I'll look into adding this later.

> 	- You don't mention that which you are targetting exactly
> 	  when you talk about registry stuff, so I'm guessing
> 	  the worst case i.e. you are also trying to make changes
> 	  on local file based implementation with related to get
> 	  log store.

Not sure what you mean with this. Registry is indeed used for event log
registration (for both win32 event log, and log file implementations), and I
think we should keep it that way.

I don't have time to give into detail right now (its my birthdate, and I
have some people over).

> 	  I prefer having different option i.e. current environment
> 	  variable based solution, than *totally* relying on the
> 	  registry, since it would rather make debugging difficult
> 	  than reducing little coding cost.

I understand your concerns, but in this case I think its important enough to
maintain compatibility with MS.NET.

If the only thing you want to do is write to local log files, you should use
a logging framework. No ?

Event log could be considered something Windows specific, and as such I
think users expect it to behave like the MS implementation.

> 	- Other than above, I support your plan. Thanks also to
> 	  latexer, it became pretty cute.

I'm currently fixing quite some bug in the Unix Registry API (almost
complete now), and I'll await approval on that patch before I propose a
patch for the registry/event log file store changes.

Gert

> Gert Driesen wrote:
> > Hi Atsushi,
> >
> > As we discussed on #mono, I've made modifications to the UnixRegistry
> > API to create the following registry hives in /var/lib/mono/registry
> > instead of
> > <profile>/.mono/registry:
> >
> > 	- HKEY_CURRENT_CONFIG
> > 	- HKEY_CLASSES_ROOT
> > 	- HKEY_DYN_DATA
> > 	- HKEY_LOCAL_MACHINE
> > 	- HKEY_PERFORMANCE_DATA
> > 	- HKEY_USERS (not to be mistaken with HKEY_CURRENT_USER)
> >
> > By default, the owner (admin) has full control (rwx) while everony
> > else has read&execute permission.
> >
> > That allows us to share machine-level registry information between
> > different users, while preventing write access to this information by
> non-admins.
> >
> > As a result of this change, eventlog registration information is now
> > also shared between different users, and event logs can now no longer
> > be created by non-admins. This matches the behavior on MS.NET.
> >
> > The event entries created by the UnixEventLog implementation are now
> > persisted in /var/lib/mono/eventlog, and access rights on this
> > directory are rwx for everyone, while only giving file owners the
> > right to delete files (using +t special bit).
> >
> > This should anyone to write entries to an event log once it has been
> > created (by an admin).
> >
> > Does this match what we've discussed ? If so, I'll post the
> > corresponding patch to the devel-list later today (or tomorrow).
> >
> > Once you've acknowledged the basics of the patch, I'll run the
> > UnixRegistry API changes by Miguel as he's the author of the API.
> >
> > Gert
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list