Re: testing pear part one
| From: | Martin Jansen | Date: | Sat, 01 Jun 2002 16:18:58 +0000 |
| Subject: | Re: testing pear part one | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-6698@lists.php.net to get a copy of this message | ||
On Sat, 1 Jun 2002 16:00:50 +0200, robert janeczek wrote:
>file: i downloaded latest file/passwd.php from cvs [Passwd.php,v 1.10
>2002/04/17 14:41:37] and there are some serious problems:
>Auth_Container_File::Auth_Container_File() constructs new file_passwd object
>with lock set to 0 (no lock file is created), then 'locked' variable is set
>from code, but it doesn`t work as it seems to - someone surely wanted to
>crate lock file, but only by setting variable he gets nothing except file
>access errors. line 65 should be changed to '$this->pwfile->lock();' - this
>CREATES file and locks it. constructors end lines changed to this:
> $this->pwfile->lock();//primary locking
> $this->pwfile->close();//this saves file and UNLOCKS!
> $this->pwfile->lock();//this lock is needed to operate properly on data
>(adding users etc)
>my point is that Auth/Container/file.php has many more places like this
>where lock isn`t being made where it is needed. code reanalyzing is needed -
>for now it doesn`r seem to work without changes in code, i fixed some
>methods by myself - i can commit them, i just wanted to know if someone has
>an explanation on this locking mess :)
It looks like Mika invested a lot of work into the file container.
Maybe he can have a look at this?
- Martin
--
Martin Jansen, <mail@martin-jansen.de>
http://www.martin-jansen.de/