* smbfs patch
@ 2004-03-04 22:20 Søren Hansen
2004-03-08 21:25 ` Stian Jordet
0 siblings, 1 reply; 4+ messages in thread
From: Søren Hansen @ 2004-03-04 22:20 UTC (permalink / raw)
To: Linux Kernel Mailing List
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: smbfs patch
2004-03-04 22:20 smbfs patch Søren Hansen
@ 2004-03-08 21:25 ` Stian Jordet
2004-03-08 21:50 ` Urban Widmark
0 siblings, 1 reply; 4+ messages in thread
From: Stian Jordet @ 2004-03-08 21:25 UTC (permalink / raw)
To: Søren Hansen; +Cc: Linux Kernel Mailing List
tor, 04.03.2004 kl. 23.20 skrev Søren Hansen:
> 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 :-) ):
I have the same problem as you have. I have not gotten around to test
your patch yet (but will later tonight), but I read in another mail from
you that you had discussed the patch with Urban Widmark. Is the any
opinions against this patch? If not, will you try to submit it to
Andrew/Linus?
Anyway, thanks for the patch :)
Best regards,
Stian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: smbfs patch
2004-03-08 21:25 ` Stian Jordet
@ 2004-03-08 21:50 ` Urban Widmark
2004-03-08 23:06 ` Stian Jordet
0 siblings, 1 reply; 4+ messages in thread
From: Urban Widmark @ 2004-03-08 21:50 UTC (permalink / raw)
To: Stian Jordet; +Cc: Søren Hansen, Linux Kernel Mailing List
On Mon, 8 Mar 2004, Stian Jordet wrote:
> tor, 04.03.2004 kl. 23.20 skrev Søren Hansen:
> > 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 :-) ):
>
> I have the same problem as you have. I have not gotten around to test
> your patch yet (but will later tonight), but I read in another mail from
> you that you had discussed the patch with Urban Widmark. Is the any
> opinions against this patch? If not, will you try to submit it to
> Andrew/Linus?
There is nothing directly wrong with the patch, but maybe there are better
solutions.
Here is my summary of our off-list discussion.
1. If you configure samba and disable the unix extensions ("UE") in
smb.conf then smbfs will behave like it does with earlier samba
servers.
2. The idea with the UE is to communicate better over smb between unix
systems and uid/gid mapping isn't done in things like nfs.
Perhaps what you really want is to disable the unix extensions on
the smbfs side?
3. If this is needed for smbfs+UE perhaps it is also useful for other
filesystems in some cases. Some non-unixlike filesystems have these
mappings already and perhaps they would be generally useable.
(see also the "UID/GID mapping system" post to this list)
Sorry for taking that thread off-list, btw. I didn't read the message too
carefully when Andrew poked me for not responding.
/Urban
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: smbfs patch
2004-03-08 21:50 ` Urban Widmark
@ 2004-03-08 23:06 ` Stian Jordet
0 siblings, 0 replies; 4+ messages in thread
From: Stian Jordet @ 2004-03-08 23:06 UTC (permalink / raw)
To: Urban Widmark; +Cc: Søren Hansen, Linux Kernel Mailing List
man, 08.03.2004 kl. 22.50 skrev Urban Widmark:
> Here is my summary of our off-list discussion.
>
> 1. If you configure samba and disable the unix extensions ("UE") in
> smb.conf then smbfs will behave like it does with earlier samba
> servers.
Uhh, I didn't know this. Sorry for my stupidity. Everything works well
without any patch now. For my use, at least :)
Thanks :)
Best regards,
Stian
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-03-08 23:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-04 22:20 smbfs patch Søren Hansen
2004-03-08 21:25 ` Stian Jordet
2004-03-08 21:50 ` Urban Widmark
2004-03-08 23:06 ` Stian Jordet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®