Re: SMB in 2.1.x

Steven Ireland (stevei@earthworks.com.au)
Mon, 20 Apr 1998 10:31:14 GMT


On Sun, 19 Apr 1998 21:18:11 +0200, you wrote:

>
>
>
>
>
>stevei@earthworks.com.au said:
>> >> I was just wondering how one mounts smb shares in 2.1.x ... > >
>> Using smbmount from latest Samab package.
>> But make sure you get a binary distribution as it is difficult
>> (impossible?) to build using the latest kernels & glibc.
>
>Not quite impossible :) Copy /usr/include/linux/smb_mount.h
>into the Samba source directory and apply the following patch.
>This builds against (at least) glibc-2.0.6. Also takes care
>of the user/group and permission problems people have reported
>to the list. Note that smbmnt has to be installed setuid to root
>(`make install' doesn't do that for you).
>
>Cheers, Roderich
>
>--- 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
>--- source/smbmnt.c.orig Mon Jan 26 21:05:46 1998
>+++ source/smbmnt.c Sun Apr 12 17:03:20 1998
>@@ -27,9 +27,15 @@
> #include <sys/mount.h>
> #include <mntent.h>
>
>+#ifndef GLIBC2
> #include <linux/fs.h>
>+#endif
> #include <linux/smb.h>
>+#ifdef GLIBC2
>+#include "smb_mount.h"
>+#else
> #include <linux/smb_mount.h>
>+#endif
>
> #include <asm/unistd.h>
>
>--- source/smbumount.c.orig Mon Jan 26 21:05:46 1998
>+++ source/smbumount.c Sun Apr 12 17:03:20 1998
>@@ -28,7 +28,9 @@
> #include <mntent.h>
>
> #include <sys/ioctl.h>
>+#ifndef GLIBC2
> #include <linux/fs.h>
>+#endif
> #include <linux/smb.h>
> #include <linux/smb_mount.h>
> #include <linux/smb_fs.h>
>--- source/smbmount.c.orig Sun Apr 12 17:39:38 1998
>+++ source/smbmount.c Sun Apr 12 17:45:59 1998
>@@ -30,6 +30,11 @@
> #endif
>
> #include "includes.h"
>+#ifdef GLIBC2
>+/* avoid kernel's version of struct dirent
>+ (in linux/dirent.h, included by linux/smb_fs.h */
>+#define _LINUX_DIRENT_H
>+#endif
> #include <linux/smb_fs.h>
> static struct smb_conn_opt conn_options;

No go, but I have found the problem.

In GLIBC 2.0.7, line 223 of /usr/include/socketbits.h has the following code.

/* Get socket manipulation related informations from kernel headers. */
#ifndef _LINUX_TYPES_H
# define _LINUX_TYPES_H
#endif

This then causes problems with the _LINUX_TYPES_H definition in
/usr/include/linux/types.h, so the proper types are not defined.

Now that I've found the problem, I can compile the tools applying your patch and
changing _LINUX_TYPE_H to _TEMP_LINUX_TYPE_H in linux/types.h.

The question is how to get it fixed properly.

Steve.

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