lkml.org 
[lkml]   [2004]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subjectsmbfs patch
From
Date
I noticed that smbfs no longer respects the "uid" and "gid" mount
options passed to it by mount.(I think it stopped when the server was
upgraded to Samba 3.0. Not sure though, since my client was upgraded to
Linux 2.6.3 at around the same time). I've made this small patch that
fixes it (bear with me, this is my first patch to the kernel :-) ):

======== Start patch ========
--- kernel-source-2.6.3.orig/fs/smbfs/proc.c 2004-02-19
08:55:44.000000000 +0 000
+++ kernel-source-2.6.3/fs/smbfs/proc.c 2004-03-04
13:56:04.000000000 +0 000
@@ -1834,7 +1834,13 @@
static void
smb_finish_dirent(struct smb_sb_info *server, struct smb_fattr *fattr)
{
- if (fattr->f_unix)
+
+ if (server->mnt->uid)
+ fattr->f_uid = server->mnt->uid;
+ if (server->mnt->gid)
+ fattr->f_gid = server->mnt->gid;
+
+ if (fattr->f_unix)
return;

fattr->f_mode = server->mnt->file_mode;
======= End patch ========

--
Søren Hansen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:1.185 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site