SAMBA 2.0.6 / Module open.c Enhancment needed.

John E. Malmberg wb8tyw at
Sun Feb 27 23:31:12 GMT 2000

I would like an enhancement to reply.c that it's behavior of attempting to
open all files read/write be either a parameter in smb.conf, or a compile
time option in config.h.

It's current behavior is bad on OpenVMS, and possibly other platforms, as
explained below.

    Extracted from open.c:

     * Whatever the requested flags, attempt read/write access,
     * as we don't know what flags future file opens may require.
     * If this fails, try again with the required flags.
     * Even if we open read/write when only read access was
     * requested the setting of the can_write flag in
     * the file_struct will protect us from errant
     * write requests. We never need to worry about O_APPEND
     * as this is not set anywhere in Samba.

Unfortunately, opening a file with any type of WRITE access updates it's
modification date.

And on OpenVMS it clears the backup date!

This causes problems with incremental backups, and other maintenance tools
such as "make" that rely on the file modification date.

The Windows Explorer also opens many types of files to search for an icon to
display as it runs, with this algorithm, they are all marked as modified,
even though they never really were.

Thank you,
John Malmberg
wb8tyw at

More information about the samba-technical mailing list