Hello Charles -
On Fri, 21 Jul 2000, Charles Sprickman wrote:
> On Thu, 20 Jul 2000, Hugh Irvine wrote:
>
> > There must be a race condition between the modification time on the file
> > changing and the actual contents of the file being available. I think I might
> > add a line to your script to "touch" the file after the processing is
> > completed. This will ensure that the modification time changes after the file
> > has been written. Alternatively you could write the new file with a different
> > name, and rename it once processing is finished.
>
> How do you check that the file is new? Is the mod time checked every x
> seconds? What about locking? I was considering just holding a lock on
> the file until I've finished writing it... Would that also accomplish the
> same thing?
>
Radiator checks the file modification time whenever it looks for a user in an
AuthBy UNIX clause. If the file has changed since the last time it was cached,
it is re-read. I don't think a lock is the right answer, otherwise Radiator
will simply hang waiting for the file. Again, I think you would be better to
prepare the new file with a different name, then when it is ready rename it.
hth
Hugh
--
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, Interbiller, TACACS+, PAM, external, etc, etc.
Available on Unix, Linux, FreeBSD, Windows 95/98/2000, NT, MacOS X.
===
Archive at http://www.starport.net/~radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.