Skip to contentSkip to conversation

PATCH to fix smbfs on sparc64

DISCUSSION Applied Nicolas Boullis 2 participants 3 messages Oct 30, 2004 – Nov 9, 2004

lore
Share & tools
lore
#0 lore raw

Hi,

On sparc64, smbumount fails when called by a non-privileged user because the SMB_IOC_GETMOUNTUID ioctl is broken. The attached patch solves this and declares the new SMB_IOC_GETMOUNTUID as compatible with 32-bit userspace. I guss the second part of the patch should be handled by this list. How about the first part? Should I send it to the linux-kernel mailing-list? Or to the smbfs maintainer directly?

Thanks,

Nicolas Boullis

#1 lore raw

Hmmm....

As usual, I stupidly forgot to attach the promised patch. Here it is (if I don't forget again).

Sorry for the extraneous noise,

Nicolas

arch/sparc64/kernel/ioctl32.c +1 -0
diff -ruN linux-2.4.27/arch/sparc64/kernel/ioctl32.c linux-2.4.27-smbfs/arch/sparc64/kernel/ioctl32.c
@@ -4928,6 +4928,7 @@
 COMPATIBLE_IOCTL(RAW_GETBIND)
 /* SMB ioctls which do not need any translations */
 COMPATIBLE_IOCTL(SMB_IOC_NEWCONN)
+COMPATIBLE_IOCTL(SMB_IOC_GETMOUNTUID32)
 /* NCP ioctls which do not need any translations */
 COMPATIBLE_IOCTL(NCP_IOC_CONN_LOGGED_IN)
 COMPATIBLE_IOCTL(NCP_IOC_SIGN_INIT)
fs/smbfs/ioctl.c +1 -1
diff -ruN linux-2.4.27/fs/smbfs/ioctl.c linux-2.4.27-smbfs/fs/smbfs/ioctl.c
@@ -32,7 +32,7 @@
 	switch (cmd) {
 	case SMB_IOC_GETMOUNTUID:
 		result = put_user(NEW_TO_OLD_UID(server->mnt->mounted_uid),
-				  (uid16_t *) arg);
+				  (__kernel_old_uid_t *) arg);
 		break;
 	case SMB_IOC_GETMOUNTUID32:
 		result = put_user(server->mnt->mounted_uid, (uid_t *) arg);
#2 lore raw
In reply to Nicolas Boullis
Quoted 2 lines · On Sun, 31 Oct 2004 01:28:51 +0200 Nicolas Boullis <[email protected]> wrote:

As usual, I stupidly forgot to attach the promised patch. Here it is (if I don't forget again).

I've applied the sparc64 part to my tree, thanks.

You should push the fs/smbfs/ioctl.c bit to the upstream smbfs maintainer which appears to be listed as:

SMB FILESYSTEM
P: Urban Widmark
M: [email protected]
W: http://samba.org/
L: [email protected]
S: Maintained