On Mon, 20 May 2002, Esh, Andrew wrote: > But it gets assigned to data.uid in client/smbmnt.c, main(228): > data.uid = mount_uid;
This is where the info is lost. smbmnt needs to be changed not to use the smb_mount_data struct as a storage for anything, it should only be used inside do_mount iff it is on a 2.2 system. > ... data_uid is defined like this in /usr/include/linux/smb_mount.h: > > struct smb_mount_data { > int version; > __kernel_uid_t mounted_uid; /* Who may umount() this filesystem? */ > __kernel_uid_t uid; > __kernel_gid_t gid; This struct can't change because it will break old smbmounts. But it is also no longer used to pass the information to smbfs on recent systems (see do_mount) so that's ok. It is possible to play with the version field and define a new struct, but there is no reason for being different from most other filesystems by sending this in a binary format in the first place. Unfortunately smbfs uses a similar struct to keep the data so that needs fixing too. In the kernel source tree edit "struct smb_mount_data_kernel" in include/linux/smb_mount.h and change: __kernel_uid_t -> uid_t __kernel_gid_t -> gid_t __kernel_mode_t -> mode_t Done. > uh oh. Looks like a Linux smbfs problem. Did someone forget to update it for > 32-bit IDs? Someone added ioctls for returning 32bit uids but probably didn't test if the whole chain worked, with the interface to samba and the code in the samba tree. It's getting kind of late over here. I'll post patches tomorrow if no one else does it first. /Urban