smbmount patch, second attempt

Urban Widmark urban at
Sat Jul 15 12:14:32 GMT 2000

Second try, I haven't seen this appear but I do get other emails from
samba-technical. 46h should be enough, I can only assume the list
processor goblins ate it :)

Trying again without the patch, you can get it here if you are interested.


---------- Forwarded message ----------
Date: Thu, 13 Jul 2000 16:12:46 +0200 (CEST)
From: Urban Widmark <urban at>
To: samba-technical at
Cc: Michael H. Warfield <mhw at>
Subject: smbmount maintainer/responsible/guilty/patch-reader wanted


As you probably don't know (I sure haven't told almost anyone yet :)
Tridge has handed over maintaining smbfs to me. Yes, I know smbfs and
smbmount are "ugly ducklings" in the samba world ... this still seemed
like the best place to find someone responsible for smbmount.

One of the problems I would like to fix is the dependency between the
kernel sources (includes) and smbmount. This is a major problem when
trying to add something to smbfs that needs some form of user input.

smbmount includes these two (smbumount & smbmnt has the same problem)
	#include <asm/types.h>
	#include <linux/smb_fs.h>
and expects some of the structs in there to match it's knowledge of the
world. The same for some ioctl definitions.

The problem can be illustrated like this:

smbfs changes smb_mount_data to accept some new flags (say nfs-style intr
& soft). Increases the version number on the struct but also accepts the
previous version using default values to avoid breaking old mounts.

smbmount in cvs is changed to use these new options. Someone tries to
compile cvs smbmount with an old kernel source tree, and fails because the
struct has missing fields.

If smbmount is not changed and compiled vs new sources the problem is that
smbmount sends a version 7 struct with only the version 6 fields
initialized (it would be fine if it set the version to 6, but it grabs the
kernel define which now says 7 ...). smbfs can't know this and will fail.

The same problem happens when adding an ioctl, new smbmount with old
kernel includes -> compile error.

Attached is an example patch to show how to get away from this by copying 
some defines to the smbmount sources.

It should NOT be applied to anything, it is intended as a basis for
discussion. The smbumount change is an example and probably broken. There
is also no point in doing that until you can mount using a 32bit uid (and
guess what, that requires changing the smb_mount_data struct or adding an
ugly ioctl).

Cc to Michael since I know he knows smbmount, but I don't know if he is
on this list.


More information about the samba-technical mailing list