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

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:mono-devel-list-
> [EMAIL PROTECTED] On Behalf Of Atsushi Eno
> Sent: vrijdag 11 augustus 2006 5:24
> To: Gert Driesen
> Cc: 'Kornél Pál'; mono-devel-list@lists.ximian.com
> Subject: Re: [Mono-dev] [PATCH] EventLog implementation
> 
> As we talked on #mono yesterday, feel free to commit your changes that
> include my local file based implementation (as you rather wanted, than
> changing your code after my commit, dunno the reason though). However
> it is not the case if you need much more time.
> 
> Atsushi Eno
> 
> Atsushi Eno wrote:
> > Ok, then there is a gap in the premises. After I commit my changes,
> > you don't have to wait for me. I can't waste my time on only-win32
> > implementation which can be used in theory. I don't deny the value of
> > native win32 implementation, but it is totally out of my concern.
> >
> > I also don't care any structural changes you would like to make in
> > common area, as long as it just works. I even don't think existing
> > EventLogEntry.ctor() is good enough since it requires everything at
> > construction time (and I guess that it won't meet WindowsAPI
> > implementation demand).
> >
> > (now I read your next message before sending it as I'm ready to
> > commit) You don't have to spend your time to include my code.
> > And I don't use XML here and stick to current code (I hate extraneous
> > Xmlization ;-)
> >
> > Atsushi Eno
> >
> > Gert Driesen wrote:
> >>> -----Original Message-----
> >>> From: [EMAIL PROTECTED]
> >>> [mailto:mono-devel-list- [EMAIL PROTECTED] On Behalf Of
> >>> Atsushi Eno
> >>> Sent: donderdag 10 augustus 2006 19:53
> >>> To: Gert Driesen
> >>> Cc: 'Kornél Pál'; mono-devel-list@lists.ximian.com
> >>> Subject: Re: [Mono-dev] [PATCH] EventLog implementation
> >>>
> >>> Just curious, where is my local file implementation which just
> works?
> >>>
> >>> If it isn't in your patch, I'll ignore it and commit my patch so
> >>> that I don't have to waste customers' time for something
> unimplemented.
> >>>
> >>> Feel free to improve your implementation after that.
> >> I was waiting for (your) approval on this patch (which doesn't
> >> necessarily means it has to be committed), and would then look into
> >> integrating your local file implementation.
> >>
> >> Gert
> >>
> >>> Gert Driesen wrote:
> >>>> Hi Kornél and Atsushi,
> >>>>
> >>>> I've attached a working patch for the new EventLog implementation,
> >>>> along with a set of unit tests (that pass on Mono and .NET).
> >>>>
> >>>> Right now, reading of event log entries is not implemented for the
> >>>> win32 implementation (Kornél, happen to volunteer for this ?).
> >>>>
> >>>> It's probably not perfect yet, but it should give us a good start.
> >>>>
> >>>> Gert
> >>>>
> >>>>> -----Original Message-----
> >>>>> From: [EMAIL PROTECTED]
> >>>>> [mailto:mono-devel-list- [EMAIL PROTECTED] On Behalf Of
> >>>>> Kornél Pál
> >>>>> Sent: donderdag 10 augustus 2006 13:03
> >>>>> To: Gert Driesen; 'Atsushi Eno'
> >>>>> Cc: mono-devel-list@lists.ximian.com
> >>>>> Subject: Re: [Mono-dev] local file based EventLog implementation
> >>>>>
> >>>>>> It's clear to me, but we'll need to see how we distribute this
> >>>>>> file
> >>>>> (on
> >>>>>> Windows) and locate it.
> >>>>> I think the easiest solution is to put the DLL to the directory
> of
> >>>>> mscorlib.dll. This lets us use different version based on
> >>>>> framework version (altough it's not currently required but MS.NET
> >>>>> does the
> >>> same
> >>>>> so may be required in the future) and it's quite easy to locate
> >>>>> the directory of mscorlib.dll so the file can be located easily
> as well.
> >>>>>
> >>>>>> However, I haven't yet managed to read entries from the event
> log.
> >>>>> Does
> >>>>>> anyone have any info on doing this (using C#) ?
> >>>>> Using API it's quite easy:
> >>>>> http://windowssdk.msdn.microsoft.com/en-us/library/ms684096.aspx
> >>>>>
> >>>>> Of course in C# this requires some wrapper code but you should
> use
> >>>>> ReadEventLog.
> >>>>>
> >>>>> If you want to read .evt files directly it may be a bit difficult
> >>>>> because the format is barely documented.
> >>>>>
> >>>>> I don't know how much rationale it has but if we were using the
> >>>>> same .evt format on other OSes it could be fully compatible with
> Windows.
> >>>>>
> >>>>> Kornél
> >>>>>
> >>>>> _______________________________________________
> >>>>> Mono-devel-list mailing list
> >>>>> Mono-devel-list@lists.ximian.com
> >>>>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> >>> _______________________________________________
> >>> Mono-devel-list mailing list
> >>> Mono-devel-list@lists.ximian.com
> >>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> >>
> >
> > _______________________________________________
> > Mono-devel-list mailing list
> > Mono-devel-list@lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-devel-list
> >
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list

_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to