← Commit list

006416e8f

Denys Vlasenko
Denys Vlasenko
2011-01-22
FAILED Duration: 65s

Subject

getty: more correct check for O_RDWR

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

loginutils/getty.c+1 -1
@@ -268,7 +268,7 @@ static void open_tty(const char *tty)
* Standard input should already be connected to an open port. Make
* sure it is open for read/write.
*/
- if ((fcntl(0, F_GETFL) & O_RDWR) != O_RDWR)
+ if ((fcntl(0, F_GETFL) & (O_RDWR|O_RDONLY|O_WRONLY)) != O_RDWR)
bb_error_msg_and_die("stdin is not open for read/write");
}
}