changeset 139:f9d57534a6bd

Fix SGID problem
author charles
date Thu, 25 May 2006 02:26:57 +0100
parents c467501bb58c
children f782da282db8
files yaffs_fs.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/yaffs_fs.c
+++ b/yaffs_fs.c
@@ -910,6 +910,9 @@ static int yaffs_mknod(struct inode *dir
 	int error = -ENOSPC;
 	uid_t uid = current->fsuid;
 	gid_t gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current->fsgid;
+	
+	if((dir->i_mode & S_ISGID) && S_ISDIR(mode))
+		mode |= S_ISGID;
 
 	if (parent) {
 		T(YAFFS_TRACE_OS,