Locking in rlm_detail

Alan DeKok aland at deployingradius.com
Tue Apr 28 14:01:36 CEST 2015


On Apr 28, 2015, at 7:18 AM, Nathan Ward <lists+freeradius at daork.net> wrote:

> The docs, and config parser, support an option in rlm_detail called “locking”.  
> It was my hope that this would lock the file until it was closed, rather than locking the file only while I write was taking place, but I understand now that that’s not how the feature was intended. This is really by the by.  
> 
> However, in investigating this, I found that the “locking” option doesn’t seem to have any effect in 3.0.3+. The last code that I could find that looks at the state of the option is removed in the commit I mention above.  

  Yes.

> It appears (from some quick, non-exhaustive code reading) that the new(ish) logfile API locks for all writes, so this option is no longer, well, optional?
> 
> I understand that this isn’t relevant to my particular hope for the “locking” option, but, I wanted to try and understand it nonetheless.  
> 
> If the “locking” option and documentation need to be removed, I’m happy to submit PRs for this (against both v3.0.x and v3.1.x of course), but wanted to check first. 

  The new API always locks the file.  I suppose it could be extended to allow for files to *not* be locked.  I'll take a look.  It should be a simple fix.

  Alan DeKok.




More information about the Freeradius-Users mailing list