Re: More on smbfs - I got it working...

Roderich Schupp (rsch@ExperTeam.de)
Sat, 23 May 1998 21:01:27 +0200


Hi David,
does your fix work with glibc2? (Since you mentioned Red Hat
I guess that means yes, just double checking).
Anyway, I think there is a problem with linux/smb_mount.h.
You probably avoided it by including asm/types.h before
linux/smb_mount.h when compiling smbmnt.c. The problem is:
struct smb_mount_data is used to communicate information
between user space and the kernel. Hence it should use
the kernel versions of uid_t, mode_t and the like
(for glibc2 these are different). I'd rather suggest the
following change to linux/smb_mount.h:

--- source/smb_mount.h.orig Sun Apr 19 16:24:57 1998
+++ source/smb_mount.h Sun Apr 19 15:30:55 1998
@@ -15,12 +15,12 @@

struct smb_mount_data {
int version;
- uid_t mounted_uid; /* Who may umount() this filesystem? */
+ __kernel_uid_t mounted_uid; /* Who may umount() this
filesystem? */

- uid_t uid;
- gid_t gid;
- mode_t file_mode;
- mode_t dir_mode;
+ __kernel_uid_t uid;
+ __kernel_uid_t gid;
+ __kernel_mode_t file_mode;
+ __kernel_mode_t dir_mode;
};

#endif

Cheers, Roderich

--
       Vinny: Is it possible, the two utes...
       Judge: Eh, the two what? Uh, uh, what was that word?
       Vinny: Uh, what word?
       Judge: Two what?
       Vinny: What?
       Judge: Uh, did you say 'Utes'?
       Vinny: Yeah, two utes.
       Judge: What is a ute?
       Vinny: Oh, excuse me, your honor. Two YOUTHS.
Roderich Schupp                 mailto:rsch@ExperTeam.de
ExperTeam GmbH                  http://www.experteam.de/
Munich, Germany                 linux:2.1.103

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu