tdb_check fails with tdb read-only open.

Rusty Russell rusty at rustcorp.com.au
Wed Jul 28 17:26:57 MDT 2010


On Wed, 28 Jul 2010 09:04:33 pm tridge at samba.org wrote:
> Hi Jeremy,
> 
>  > -	if (tdb_lockall(tdb) == -1)
>  > +	if (tdb->read_only) {
>  > +		ret = tdb_lockall_read(tdb);
>  > +	} else {
>  > +		ret = tdb_lockall(tdb);
>  > +	}
> 
> If tdb_check() doesn't need write access, then why not always use
> tdb_lockall_read(), regardless of tdb->read_only ?

Yes, definitely.

Pushed your patch, thanks!
Rusty.


More information about the samba-technical mailing list