[PATCH] 32-bit uid/gid truncated to 16-bits in smbmnt

Jay Danielsen Jay.Danielsen at Sun.COM
Wed Mar 10 14:06:51 GMT 2004


smb-clients members,

	I tried submitting this patch to samba-patches at samba.org,
	but get mail error indicating that samba-patches is an
	invalid user ... How do I submit a patch suggestion to
	samba.org?

Regards,
	Jay

/*
* 32-bit UIDs/GIDs not fully supported by samba. This patch
* adds support for 32-bit values via the ascii interface to
* smbfs. - jay.danielsen at sun.com
*/
diff -urN samba-3.0.2a-orig/source/client/smbmnt.c 
samba-3.0.2a/source/client/sm
bmnt.c
--- samba-3.0.2a-orig/source/client/smbmnt.c    2004-02-12 
12:39:58.000000000 -0
500
+++ samba-3.0.2a/source/client/smbmnt.c    2004-03-09 23:18:40.000000000 
-0500
@@ -162,7 +162,8 @@

     slprintf(opts, sizeof(opts)-1,
          "version=7,uid=%d,gid=%d,file_mode=0%o,dir_mode=0%o,%s",
-         data->uid, data->gid, data->file_mode, data->dir_mode,options);
+         mount_uid, mount_gid, data->file_mode, data->dir_mode,options);
+
     if (mount(share_name, ".", "smbfs", flags, data1) == 0)
         return 0;
     return mount(share_name, ".", "smbfs", flags, data2);
@@ -225,7 +226,7 @@
                 return -1;
         }

-        data.uid = mount_uid;
+        data.uid = mount_uid;    // truncates to 16-bits here!!!
         data.gid = mount_gid;
         data.file_mode = (S_IRWXU|S_IRWXG|S_IRWXO) & mount_fmask;
         data.dir_mode  = (S_IRWXU|S_IRWXG|S_IRWXO) & mount_dmask;




More information about the smb-clients mailing list