LD_ISCSI fix segfault on reconnect
iscsi_reconnect calls dup2 which is intercepted in ld_iscsi. Fix this by calling the real dup2 in this case.
This commit is contained in:
committed by
Ronnie Sahlberg
parent
4de36794f2
commit
01cd2ee42b
@@ -387,6 +387,10 @@ int (*real_dup2)(int oldfd, int newfd);
|
|||||||
|
|
||||||
int dup2(int oldfd, int newfd)
|
int dup2(int oldfd, int newfd)
|
||||||
{
|
{
|
||||||
|
if (iscsi_fd_list[newfd].is_iscsi) {
|
||||||
|
return real_dup2(oldfd, newfd);
|
||||||
|
}
|
||||||
|
|
||||||
close(newfd);
|
close(newfd);
|
||||||
|
|
||||||
if (iscsi_fd_list[oldfd].is_iscsi == 1) {
|
if (iscsi_fd_list[oldfd].is_iscsi == 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user