summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2013-07-16 10:51:20 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-07-20 17:51:52 +0200
commitb1a3f96a8139c5ed3aac7b8a77b06ba4c0a877c7 (patch)
tree3461563e474a4fe9c5cd87627bf409d58d636a96
parent669dadfa07a5e63db8d9e572603872be88db52a3 (diff)
Fix procfs_node_chmod
Formerly only the mode_t bits cut out by S_IFMT were preserved, but this does not include S_IPTRANS. Fix this by preserving everything but the permission bits. * procfs.c (procfs_node_chmod): Fix bitmask.
-rw-r--r--procfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/procfs.c b/procfs.c
index ae5a676..aa785d3 100644
--- a/procfs.c
+++ b/procfs.c
@@ -93,7 +93,7 @@ void procfs_node_chown (struct node *np, uid_t owner)
void procfs_node_chmod (struct node *np, mode_t mode)
{
- np->nn_stat.st_mode = (np->nn_stat.st_mode & S_IFMT) | mode;
+ np->nn_stat.st_mode = (np->nn_stat.st_mode & ~ALLPERMS) | mode;
np->nn_translated = np->nn_stat.st_mode;
}