Explorar o código

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

Eric Andersen %!s(int64=23) %!d(string=hai) anos
pai
achega
810ad656d6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;
 	}
 }