Re: password file locking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Luke Kenneth Casson Leighton wrote:
[]
> 
> see lib/util_file.c in the SAMBA_TNG branch (http://samba.org/cvs.html or
> http://samba.org/cgi-bin/cvsweb/samba/source/lib/util_file.c)
> 
> we have a function startpwfile_race_condition_avoid() which may be what
> you are looking for.

Classical example -- preventing simultaneous updates to the same file
and using copy+replace and lock inside that same file -- that shows
nicely how _difficult_ to implement this right way.
I wrote something like this (very close, really) some years ago when
I have trouble with corrupted mailboxes that was updated this way
(some app, I doesnt remember what for now, didn't used .dotlocks for
_mailboxes_!)...

Thanks for a pointer.

Regards,
 Michael.





[Index of Archives]     [Fedora Users]     [Kernel]     [Red Hat Install]     [Linux for the blind]     [Gimp]

  Powered by Linux