Re: SMB in 2.1.x

Roderich Schupp (rsch@ExperTeam.de)
Sun, 19 Apr 1998 21:18:11 +0200


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;

--
Neben Eden eben
Neben Amor
nie adretter
die Liebe grte!
Bier! Feten!
Gesegnete Freibetrge!
Bei Leid Retter da!
.. ein Roman eben.
Roderich Schupp          mailto:rsch@ExperTeam.de
ExperTeam GmbH           http://www.experteam.de/
Munich, Germany               linux:2.1.97

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