smb mount version

Ronan Waide waider at waider.ie
Tue Sep 9 12:21:48 GMT 2003


Hi folks,

not sure if this is a bug or not so I'm putting it here instead of in
bugzilla: current samba, Red Hat 7.3 but also applies to Red Hat 9.

in /usr/src/linux*/include/linux/smb_mount.h, SMB_MOUNT_VERSION is
defined as 6, unless KERNEL is defined, in which case
SMB_MOUNT_VERSION is defined as 7 and SMB_MOUNT_OLDVERSION is defined
as 6. Then in the smbfs code, there is a check to see if
the version handed in by smbmnt is SMB_MOUNT_OLDVERSION, and various
things are disregarded based on this:

    if (ver == SMB_MOUNT_OLDVERSION) {
        mnt->version = oldmnt->version;

        /* FIXME: is this enough to convert uid/gid's ? */
        mnt->mounted_uid = oldmnt->mounted_uid;
        mnt->uid = oldmnt->uid;
        mnt->gid = oldmnt->gid;

        mnt->file_mode = (oldmnt->file_mode & S_IRWXUGO) | S_IFREG;
        mnt->dir_mode = (oldmnt->dir_mode & S_IRWXUGO) | S_IFDIR;

        mnt->flags = (oldmnt->file_mode >> 9);
    } else {
        if (parse_options(mnt, raw_data))
            goto out_bad_option;

        mnt->mounted_uid = current->uid;
    }

Since smbmnt builds without KERNEL defined, it's always going to hit
the top of that loop rather than the bottom. Like I said, I'm not even
sure that this is a bug or what effect it has; I just happened to
notice it while digging for something else. Comments?

Cheers,
Waider.
-- 
"We are experiencing MVS processor spin loops, the programs are running while
 holding a disabled CPU. This is causing XCF communication delays to the point
 where we are losing VTAM RTP routing, are suffering OSPF adjacency failures on
 TCP/IP dynamic routing and MIM VCF failures." - Reported via Slashdot



More information about the samba-technical mailing list