Le samedi 04 novembre 2006 à 16:50 +0100, Ulrik Mikaelsson a écrit :
> I would say this is obviously a great idea, and much needed, but I
> would just like to ask, WHY "a random integer" for num, instead of the
> process id?

Well, Devhelp and other programs use similar things so I did the same...

> I might be missing something, but using process id is both guaranteed
> to be unique to each session, and a known solution to the
> requirement. 

It is unique when you keep the same trackerd all over session but it
would be very rare to see trackerd get one of its old pid after it
exited or crashed.


> Still, good idea, and the patch looks clean while just scanning it.
> Though I might recommend looking over the first line of
> sanity_check_option_values() in src/trackerd/trackerd.c. The point of
> the patch seems overall to get rid of g_get_tmp_dir(). :) 

I use g_get_tmp_dir() and try to make a temporary directory into it.

But I send a new patch a little bit cleaner.


> Cheers
> / Ulrik
> 
> On 11/4/06, Laurent Aguerreche <[EMAIL PROTECTED]> wrote: 
>         Hello,
>         
>         
>         currently trackerd makes a ".Tracker" directory in /tmp and
>         populates it 
>         with /home/laurent/cache (for instance) where cache is used by
>         SQLite3.
>         
>         The "/tmp/.Tracker" directory is owned by its creator and
>         forbids access
>         to any foreigner. I think you see what happens when an user
>         wants to run 
>         another trackerd on the same machine and at the same time...
>         
>         So I propose a patch to let trackerd use directory
>         "/tmp/Tracker-user.num" (yes, it is not ".Tracker" but
>         "Tracker", I 
>         don't like shadowed files in /tmp) where "user" is the name of
>         the
>         current logged user and "num" a random integer.
>         This patch also completely remove the directory in /tmp when
>         trackerd
>         exits. 
>         
>         
>         And I thank Nicolas Caniart who pointed me out problems with
>         trackerd
>         and /tmp.
>         
>         
>         Laurent.
>         
>         
>         
>         _______________________________________________
>         tracker-list mailing list
>         [email protected]
>         http://mail.gnome.org/mailman/listinfo/tracker-list
>         
>         
>         
> 

Attachment: fix-for-tmp-dir-2.diff.gz
Description: GNU Zip compressed data

_______________________________________________
tracker-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/tracker-list

Reply via email to