projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix SGID problem
[yaffs2.git]
/
yaffs_fs.c
diff --git
a/yaffs_fs.c
b/yaffs_fs.c
index f28a6e8dac80b046dd4782627a6ca8dddc46f380..08494c8fd9739c35da973eaf8fab88af7ef98d85 100644
(file)
--- a/
yaffs_fs.c
+++ b/
yaffs_fs.c
@@
-31,7
+31,7
@@
*/
const char *yaffs_fs_c_version =
*/
const char *yaffs_fs_c_version =
- "$Id: yaffs_fs.c,v 1.4
8 2006-05-21 09:39:12
charles Exp $";
+ "$Id: yaffs_fs.c,v 1.4
9 2006-05-25 01:26:57
charles Exp $";
extern const char *yaffs_guts_c_version;
#include <linux/config.h>
extern const char *yaffs_guts_c_version;
#include <linux/config.h>
@@
-910,6
+910,9
@@
static int yaffs_mknod(struct inode *dir, struct dentry *dentry, int mode,
int error = -ENOSPC;
uid_t uid = current->fsuid;
gid_t gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current->fsgid;
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,
if (parent) {
T(YAFFS_TRACE_OS,