projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
don't clear set-gid when su creates file when not groupmember
[unix-history]
/
usr
/
src
/
sys
/
ufs
/
lfs
/
lfs_vnops.c
diff --git
a/usr/src/sys/ufs/lfs/lfs_vnops.c
b/usr/src/sys/ufs/lfs/lfs_vnops.c
index
a469a90
..
6073578
100644
(file)
--- a/
usr/src/sys/ufs/lfs/lfs_vnops.c
+++ b/
usr/src/sys/ufs/lfs/lfs_vnops.c
@@
-3,7
+3,7
@@
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)lfs_vnops.c 7.
1
(Berkeley) %G%
+ * @(#)lfs_vnops.c 7.
3
(Berkeley) %G%
*/
#include "param.h"
*/
#include "param.h"
@@
-778,6
+778,8
@@
fsync()
return;
ip = (struct inode *)fp->f_data;
ILOCK(ip);
return;
ip = (struct inode *)fp->f_data;
ILOCK(ip);
+ if (fp->f_flag&FWRITE)
+ ip->i_flag |= ICHG;
syncip(ip);
IUNLOCK(ip);
}
syncip(ip);
IUNLOCK(ip);
}
@@
-1111,7
+1113,7
@@
maknode(mode, ndp)
ip->i_nlink = 1;
ip->i_uid = u.u_uid;
ip->i_gid = pdir->i_gid;
ip->i_nlink = 1;
ip->i_uid = u.u_uid;
ip->i_gid = pdir->i_gid;
- if (ip->i_mode & ISGID && !groupmember(ip->i_gid))
+ if (ip->i_mode & ISGID && !groupmember(ip->i_gid)
&& !suser()
)
ip->i_mode &= ~ISGID;
#ifdef QUOTA
ip->i_dquot = inoquota(ip);
ip->i_mode &= ~ISGID;
#ifdef QUOTA
ip->i_dquot = inoquota(ip);