Browse Source

Richard June <rjune@bravegnuworld.com> noticed that setutent
was only opening utmp readonly. Oops.

Eric Andersen 23 years ago
parent
commit
810ad656d6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      libc/misc/utmp/utent.c

+ 1 - 1
libc/misc/utmp/utent.c

@@ -32,7 +32,7 @@ void setutent(void)
 {
 	if (ut_fd != -1)
 		close(ut_fd);
-	if ((ut_fd = open(ut_name, O_RDONLY)) < 0) {
+	if ((ut_fd = open(ut_name, O_RDWR)) < 0) {
 		ut_fd = -1;
 	}
 }