Sorry, ideally, the fix would rather be:
--- rshd.c~ 2005-11-26 13:44:17.000000000 +0000
+++ rshd.c 2008-05-07 08:27:57.000000000 +0100
@@ -220,9 +220,12 @@ int main(int argc, char **argv) {
freeaddrinfo(ai);
- if(dup2(esock, 2) == -1) {
- syslog(LOG_ERR, "dup2() failed: %m");
- return 1;
+ if (esock != 2) {
+ if(dup2(esock, 2) == -1) {
+ syslog(LOG_ERR, "dup2() failed: %m");
+ return 1;
+ }
+ close(esock);
}
}
--
Stéphane
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]