Explorar el Código

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

Eric Andersen hace 23 años
padre
commit
810ad656d6
Se han modificado 1 ficheros con 1 adiciones y 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;
 	}
 }