Re: patch for 2.1.118 smbfs

Roderich Schupp (rsch@ExperTeam.de)
Fri, 28 Aug 1998 00:01:55 +0200


Bill Hawes <whawes@transmeta.com> said:
> - -- change uid_t, etc to the kernel uid_t in smb_mount.h, as has
> been suggested several times on the kernel list.

Bill, while you're at it:
smb_fs.h needs a fix for the same reasons as smb_mount.h:

--- linux/include/linux/smb_fs.h.~1~ Thu Aug 6 08:07:12 1998
+++ linux/include/linux/smb_fs.h Thu Aug 6 08:08:54 1998
@@ -15,7 +15,7 @@
/*
* ioctl commands
*/
-#define SMB_IOC_GETMOUNTUID _IOR('u', 1, uid_t)
+#define SMB_IOC_GETMOUNTUID _IOR('u', 1, __kernel_uid_t)
#define SMB_IOC_NEWCONN _IOW('u', 2, struct smb_conn_opt)

#ifdef __KERNEL__

> (The smbumount program doesn't build, but I've never needed it anyway
> -- regular umount works fine. Does anyone know a reason why it
> shouldn't just be removed from the package?)

umount only works for root, smbumount would work for the user
that originally mounted the share. The build problems for smbumount
are cured with the following patch (against samba-1.9.18p8).
But without the above patch you then would get a
"... doesn't seem to be a SMB filesystem" or such.

--- ./source/smbumount.c.orig Sat Aug 8 16:12:58 1998
+++ ./source/smbumount.c Sat Aug 8 16:14:38 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>
@@ -45,7 +47,7 @@
umount_ok(const char *mount_point)
{
int fid open(mount_point, O_RDONLY, 0);
- uid_t mount_uid;
+ __kernel_uid_t mount_uid;

if (fid -1) {
fprintf(stderr, "Could not open %s: %s\n",
@@ -92,7 +94,7 @@
if (realpath (path, canonical))
return canonical;

- pstrcpy (canonical, path);
+ strcpy (canonical, path);
return canonical;
}

--
         Franz jagt im komplett verwahrlosten Taxi quer durch Bayern.

Roderich Schupp mailto:rsch@ExperTeam.de ExperTeam GmbH http://www.experteam.de/ Munich, Germany linux:2.1.118

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html