[Samba] [PATCH] undetected bug in smbfs kernel module ?

Daniel dev at schmaller.de
Tue Dec 13 01:31:27 GMT 2005

dear smbfs maintainers!
i sent this mail to you, since i got no answer from sending it to the "M:" entry of SMBFS.

i had problems with setting permissions on a mounted smb file system.
therefore i took a look at the smbfs code and a suspicious code part caught my eye.
IMHO the patched line can't be correct, because comparing uids to gids doesn't make any sense.
But i'm wondering that nobody has yet discovered it.

Maybe it's even dead code?

TIA for your revision,

-------------- next part --------------
--- fs/smbfs/inode.c.orig	Tue Oct 18 12:43:00 2005
+++ fs/smbfs/inode.c	Tue Oct 18 15:40:02 2005
@@ -685,7 +685,7 @@ smb_notify_change(struct dentry *dentry,
 	if ((attr->ia_valid & ATTR_UID) && (attr->ia_uid != server->mnt->uid))
 		goto out;
-	if ((attr->ia_valid & ATTR_GID) && (attr->ia_uid != server->mnt->gid))
+	if ((attr->ia_valid & ATTR_GID) && (attr->ia_gid != server->mnt->gid))
 		goto out;
 	if ((attr->ia_valid & ATTR_MODE) && (attr->ia_mode & ~mask))

More information about the samba mailing list