aboutsummaryrefslogtreecommitdiff
path: root/miscutils/wall.c
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils/wall.c')
-rw-r--r--miscutils/wall.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/miscutils/wall.c b/miscutils/wall.c
index c74f4f27b..bb709ee39 100644
--- a/miscutils/wall.c
+++ b/miscutils/wall.c
@@ -41,11 +41,7 @@ int wall_main(int argc UNUSED_PARAM, char **argv)
41 /* The applet is setuid. 41 /* The applet is setuid.
42 * Access to the file must be under user's uid/gid. 42 * Access to the file must be under user's uid/gid.
43 */ 43 */
44 setfsuid(getuid()); 44 fd = xopen_as_uid_gid(argv[1], O_RDONLY, getuid(), getgid());
45 setfsgid(getgid());
46 fd = xopen(argv[1], O_RDONLY);
47 setfsuid(geteuid());
48 setfsgid(getegid());
49 } 45 }
50 msg = xmalloc_read(fd, NULL); 46 msg = xmalloc_read(fd, NULL);
51 if (ENABLE_FEATURE_CLEAN_UP && argv[1]) 47 if (ENABLE_FEATURE_CLEAN_UP && argv[1])