public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] fs/smbfs/proc.c: fix data corruption in smb_proc_setattr_unix()
@ 2005-12-18 20:06 Adrian Bunk
  0 siblings, 0 replies; only message in thread
From: Adrian Bunk @ 2005-12-18 20:06 UTC (permalink / raw)
  To: urban; +Cc: samba, linux-kernel, macro, marcelo.tosatti

From: Maciej W. Rozycki <macro@linux-mips.org>


This patch fixes a data corruption in smb_proc_setattr_unix() 
(smb_filetype_from_mode() returns an u32, and there are only four bytes 
reserved for it in data.

Signed-off-by: Adrian Bunk <bunk@stusta.de>


--- linux-2.6.14-rc3-git3/fs/smbfs/proc.c	2005-10-04 19:24:37.000000000 +1000
+++ .6877.trivial/fs/smbfs/proc.c	2005-10-04 19:29:50.000000000 +1000
@@ -3113,7 +3113,7 @@ smb_proc_setattr_unix(struct dentry *d, 
 	LSET(data, 32, SMB_TIME_NO_CHANGE);
 	LSET(data, 40, SMB_UID_NO_CHANGE);
 	LSET(data, 48, SMB_GID_NO_CHANGE);
-	LSET(data, 56, smb_filetype_from_mode(attr->ia_mode));
+	DSET(data, 56, smb_filetype_from_mode(attr->ia_mode));
 	LSET(data, 60, major);
 	LSET(data, 68, minor);
 	LSET(data, 76, 0);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-12-18 20:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-18 20:06 [patch] fs/smbfs/proc.c: fix data corruption in smb_proc_setattr_unix() Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox