Messages in this thread Patches in this message | | | Date | Sat, 17 Jan 1998 13:16:59 +0000 (WET) | From | Manuel@mgmux ... | Subject | Re: 2.1.79 + latest smbfs patch |
| |
On 17 Jan, Eloy A. Paris wrote: > Bill Hawes <whawes@star.net> wrote: > > : No dev_t field, but a uid_t, gid_t and mode_t fields. Would these cause > : a problem? > > Don't go any further, that's the problem: when I compiled ncpfs and > smbfs with glibc I faced this problem. uid_t, gid_t and mode_t are 2 > bytes long in libc5 and in the kernel but are 4 bytes long in libc6 > (glibc2). If the userland utilities are compiled to use this data > types the kernel will receive the wrong values because of the size > mismatch. > > To fix the problem I changed all ocurrences of uid_t, gid_t and mode_t > with __kernel_uid_t, __kernel_gid_t and __kernel_mode_t. This change > must be done in both the userland utilities _and_ in the kernel > headers (linux/ncpfs_mount.h, smbfs_mount.h, etc.) > > I know RedHat 5.0 had the ncpfs and smbfs packages broken when they > first released 5.0. I heard someone said that's fixed now. > > I would say that the kernel headers must be fixed to have __kernel_uid > et al instead of uid_t et al. What do you think? > > : If you get time, you might want to try building the samba-1.9.18p1 > : utilities with glibc, since you've already been through the process for > : the nfs utils. > > I don't think that will work since Volker doesn't have yet the patches to > make smbfs work under glibc2. I will create the necessary pacthes and > send them to him (he's waiting for them). > > E.- >
I have been able to build (2.1.79 + redhat 5.0) them doing the following.
1- cp /usr/include/linux/smb_fs.h to samba/source/smb_fs.h and apply this patch --- smb_fs.h.old Fri Jan 16 13:14:38 1998 +++ smb_fs.h Fri Jan 16 14:40:48 1998 @@ -9,7 +9,6 @@ #ifndef _LINUX_SMB_FS_H #define _LINUX_SMB_FS_H -#include <linux/dirent.h> #include <linux/smb.h> /*
2- the following diff against original sources
diff -urNa samba-1.9.18p1/source/Makefile samba-1.9.18p1-new/source/Makefile --- samba-1.9.18p1/source/Makefile Fri Jan 9 02:33:59 1998 +++ samba-1.9.18p1-new/source/Makefile Fri Jan 16 14:53:53 1998 @@ -90,8 +90,8 @@ # This is for PAM authentication. RedHat Linux uses PAM. # If you use PAM, then uncomment the following lines: -# PAM_FLAGS = -DUSE_PAM -# PAM_LIBS = -ldl -lpam +PAM_FLAGS = -DUSE_PAM +PAM_LIBS = -ldl -lpam # This is for AFS authentication. If you use AFS then set AFS_BASE # according to your system layout, and uncomment the other lines as well. @@ -193,7 +193,7 @@ # you must use the smbfs utilities from # ftp://ftp.gwdg.de/pub/linux/misc/smbfs -# MOUNT_PROGS = smbmount smbmnt smbumount +MOUNT_PROGS = smbmount smbmnt smbumount # Use this for Linux with shadow passwords - but not using PAM! # contributed by Andrew.Tridgell@anu.edu.au @@ -235,8 +235,8 @@ # Use this for Linux with glibc2 (libc6) - RedHat Linux v5.0 with PAM # contributed by John H Terpstra <jht@aquasoft.com.au> -# FLAGSM = -DLINUX -DNETGROUP -DALLOW_CHANGE_PASSWORD -DFAST_SHARE_MODES -DNO_ASMSIGNALH -DGLIBC2 -# LIBSM = -lnsl -lcrypt +FLAGSM = -DLINUX -DNETGROUP -DALLOW_CHANGE_PASSWORD -DFAST_SHARE_MODES -DNO_ASMSIGNALH -DGLIBC2 +LIBSM = -lnsl -lcrypt # This is for SUNOS5.4 and later (also known as Solaris 2.4 and later) # contributed by Andrew.Tridgell@anu.edu.au diff -urNa samba-1.9.18p1/source/smbmnt.c samba-1.9.18p1-new/source/smbmnt.c --- samba-1.9.18p1/source/smbmnt.c Mon Jan 5 22:56:29 1998 +++ samba-1.9.18p1-new/source/smbmnt.c Fri Jan 16 14:42:16 1998 @@ -27,7 +27,6 @@ #include <sys/mount.h> #include <mntent.h> -#include <linux/fs.h> #include <linux/smb.h> #include <linux/smb_mount.h> diff -urNa samba-1.9.18p1/source/smbmount.c samba-1.9.18p1-new/source/smbmount.c --- samba-1.9.18p1/source/smbmount.c Tue Jan 6 00:13:44 1998 +++ samba-1.9.18p1-new/source/smbmount.c Fri Jan 16 14:41:02 1998 @@ -24,7 +24,7 @@ #endif #include "includes.h" -#include <linux/smb_fs.h> +#include "smb_fs.h" static struct smb_conn_opt conn_options; #ifndef REGISTER diff -urNa samba-1.9.18p1/source/smbumount.c samba-1.9.18p1-new/source/smbumount.c --- samba-1.9.18p1/source/smbumount.c Mon Jan 5 22:56:29 1998 +++ samba-1.9.18p1-new/source/smbumount.c Fri Jan 16 14:42:38 1998 @@ -28,7 +28,6 @@ #include <mntent.h> #include <sys/ioctl.h> -#include <linux/fs.h> #include <linux/smb.h> #include <linux/smb_mount.h> #include <linux/smb_fs.h> -- -- Manuel J. Galan manolow@step.es
| |