Bug#348741: Patch to fix issue
Hi,
This issue is still present in 1:5.5p1-4
Here is a patch against that version that fixes the issue. It's not
perfect but is a start. It should really test the return value of
daemon() but there's nothing much you can do if it fails.
Index: openssh-5.5p1/mux.c
===================================================================
--- openssh-5.5p1.orig/mux.c 2010-07-12 15:45:44.901168619 +1000
+++ openssh-5.5p1/mux.c 2010-07-12 15:47:13.804570882 +1000
@@ -1514,6 +1514,10 @@
if (tty_flag)
enter_raw_mode(force_tty_flag);
+ if (fork_after_authentication_flag) {
+ fork_after_authentication_flag = 0;
+ daemon(1, 1);
+ }
/*
* Stick around until the controlee closes the client_fd.
Index: openssh-5.5p1/readconf.h
===================================================================
--- openssh-5.5p1.orig/readconf.h 2010-07-12 15:50:57.543267642 +1000
+++ openssh-5.5p1/readconf.h 2010-07-12 15:51:44.575022604 +1000
@@ -149,4 +149,6 @@
void add_local_forward(Options *, const Forward *);
void add_remote_forward(Options *, const Forward *);
+extern int fork_after_authentication_flag;
+
#endif /* READCONF_H */
--
Dr Peter Chubb peter DOT chubb AT nicta.com.au
http://www.ertos.nicta.com.au ERTOS within National ICT Australia
All things shall perish from under the sky/Music alone shall live, never to die
Reply to: