TDB on OpenBSD problem.
Virginia Norling
vmn at bom.gov.AU
Mon May 7 05:09:15 GMT 2001
Jeremy,
I have tried this on a HP-UX 10.20 machine and everything looks
fine including connections.tdb. This machine does not normally
run samba but is similar to the machine where I had problems -
March 2001 patch bundle + security patches and similar hardware.
I can't test it on the first machine until after office hours but
will do so when I can and let you know.
Thanks,
Virginia
On Fri, May 04, 2001 at 01:40:13PM -0700, Jeremy Allison wrote:
> Ok - can people on OpenBSD and HPUX 10.0 please try the following patch
> to tdb.c to see if it fixes the problem.
>
> Thanks,
>
> Jeremy Allison,
> Samba Team.
>
> Index: tdb/tdb.c
> ===================================================================
> RCS file: /data/cvs/samba/source/tdb/tdb.c,v
> retrieving revision 1.53
> diff -u -r1.53 tdb.c
> --- tdb/tdb.c 2001/04/14 00:41:15 1.53
> +++ tdb/tdb.c 2001/05/04 20:35:54
> @@ -439,14 +439,14 @@
> the database up to a multiple of TDB_PAGE_SIZE */
> size = TDB_ALIGN(tdb->map_size + size*10, TDB_PAGE_SIZE) - tdb->map_size;
>
> + if (!(tdb->flags & TDB_INTERNAL) && tdb->map_ptr)
> + tdb->map_ptr = tdb_munmap(tdb->map_ptr, tdb->map_size);
> +
> /* expand the file itself */
> - if (!(tdb->flags & TDB_INTERNAL)) {
> + if (!(tdb->flags & TDB_INTERNAL)) {
> lseek(tdb->fd, tdb->map_size + size - 1, SEEK_SET);
> if (write(tdb->fd, &b, 1) != 1) goto fail;
> - }
> -
> - if (!(tdb->flags & TDB_INTERNAL) && tdb->map_ptr)
> - tdb->map_ptr = tdb_munmap(tdb->map_ptr, tdb->map_size);
> + }
>
> tdb->map_size += size;
>
> --
> --------------------------------------------------------
> Buying an operating system without source is like buying
> a self-assembly Space Shuttle with no instructions.
> --------------------------------------------------------
>
More information about the samba-technical
mailing list