Fix closing too many handles in pty fchown/fchmod

* fhandler_tty.cc (fhandler_pty_slave::fch_close_handles): Don't close
	handles not opened via fhandler_pty_slave::fch_open_handles.


Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2015-04-22 13:26:37 +02:00
parent 063e7da36f
commit 46077e809d
2 changed files with 5 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2015-04-22 Corinna Vinschen <corinna@vinschen.de>
* fhandler_tty.cc (fhandler_pty_slave::fch_close_handles): Don't close
handles not opened via fhandler_pty_slave::fch_open_handles.
2015-04-22 Takashi Yano <takashi.yano@nifty.ne.jp> 2015-04-22 Takashi Yano <takashi.yano@nifty.ne.jp>
* fhandler.h (class fhandler_base): Add virtual function * fhandler.h (class fhandler_base): Add virtual function

View File

@ -1140,9 +1140,6 @@ fhandler_pty_slave::fch_set_sd (security_descriptor &sd, bool chown)
void void
fhandler_pty_slave::fch_close_handles () fhandler_pty_slave::fch_close_handles ()
{ {
close_maybe (get_io_handle ());
close_maybe (get_output_handle ());
close_maybe (get_output_handle_cyg ());
close_maybe (input_available_event); close_maybe (input_available_event);
close_maybe (output_mutex); close_maybe (output_mutex);
close_maybe (input_mutex); close_maybe (input_mutex);