[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gdbm gdbm_open bug

From: Jens Laas
Subject: gdbm gdbm_open bug
Date: Thu, 6 Jun 2002 12:58:18 +0200 (CEST)

gdbm_open as GDBM_WRITER will create the db if not existing.
This should only happen in GDBM_WRCREAT.

( I am using Linux 2.4 and glibc 2.2.5 and gdbm-1.8.0 )

file gdbmopen.c

  /* Open the file. */
  need_trunc = FALSE;
  switch (flags & GDBM_OPENMASK)

does not have a special case for GDBM_WRITER.
The default case is used which does:
        dbf->desc = open (dbf->name, O_RDWR|O_CREAT, mode);
Jens Låås

    'This mail automatically becomes portable when carried.'
    Jens Låås                              Email: address@hidden
    Department of Computer Services, SLU   Phone: +46 18 67 35 15
    Vindbrovägen 1
    P.O. Box 7079
    S-750 07 Uppsala

reply via email to

[Prev in Thread] Current Thread [Next in Thread]