From b1a3f96a8139c5ed3aac7b8a77b06ba4c0a877c7 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Tue, 16 Jul 2013 10:51:20 +0200 Subject: 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. --- procfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3