[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Dazuko-help] TAF API
From: |
John Ogness |
Subject: |
Re: [Dazuko-help] TAF API |
Date: |
Wed, 16 Apr 2008 08:49:50 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (berkeley-unix) |
On 2008-04-15, Thomas Alex <address@hidden> wrote:
> I have some problems with the TAF API.
>
> I have two little test programs:
> The first one based on example_mt.c registers at DaZuKo for the
> events DAZUKO_ON_OPEN and DAZUKO_TRUST_REQUEST. Getting the
> DAZUKO_ON_OPEN event it will call the second program.
>
> The second program requests trusted access using
> dazukoRegisterTrusted("myGroup","myToken",DAZUKO_TRUST_CHILDREN).
>
> As documented in README.trusted, registering trusted successfully
> and using the flag DAZUKO_TRUST_CHILDREN the second program should
> not generate any event (except DAZUKO_TRUST_REQUEST).
>
> But in my case, when the first program get a DAZUKO_ON_OPEN event,
> it calls the second program which registers trusted successfully and
> then generates another process which will open a file. At this point
> a new DAZUKO_ON_OPEN event is generated which should not be.
The order seems to be a bit mixed up here. Your second program should
register as trusted _before_ your first program starts processing OPEN
events. The registration process generates an event of its own, so
this must be done without any other pending events.
The intended order is:
1. first program starts, sets access mask to allow registered requests
2. second program starts, requests trusted access (and is successful
because the first program grants trusted access)
--- now everything is ready ---
3. first program sets access mask (and include paths) to detect file
access events
4. when events arrive, they are passed to the second program for
processing (the second program (and optionally its children) will
not generate file access events)
Typically the first and second program will communicate using pipes,
sockets, or shared memory.
John Ogness
--
Dazuko Maintainer