diff options
Diffstat (limited to 'src/lib/ecore_ipc')
-rw-r--r-- | src/lib/ecore_ipc/ecore_ipc.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c index dfacf933bc..40a1e1e8a7 100644 --- a/src/lib/ecore_ipc/ecore_ipc.c +++ b/src/lib/ecore_ipc/ecore_ipc.c | |||
@@ -4,6 +4,7 @@ | |||
4 | 4 | ||
5 | #include <string.h> | 5 | #include <string.h> |
6 | #include <sys/types.h> | 6 | #include <sys/types.h> |
7 | #include <sys/stat.h> | ||
7 | 8 | ||
8 | #ifdef HAVE_ARPA_INET_H | 9 | #ifdef HAVE_ARPA_INET_H |
9 | # include <arpa/inet.h> | 10 | # include <arpa/inet.h> |
@@ -761,9 +762,21 @@ ecore_ipc_server_connect(Ecore_Ipc_Type type, char *name, int port, const void * | |||
761 | #ifdef EFL_NET_DIALER_UNIX_CLASS | 762 | #ifdef EFL_NET_DIALER_UNIX_CLASS |
762 | if ((type & ECORE_IPC_TYPE) == ECORE_IPC_LOCAL_USER) | 763 | if ((type & ECORE_IPC_TYPE) == ECORE_IPC_LOCAL_USER) |
763 | { | 764 | { |
765 | struct stat st; | ||
766 | |||
764 | address = ecore_con_local_path_new(EINA_FALSE, name, port); | 767 | address = ecore_con_local_path_new(EINA_FALSE, name, port); |
765 | EINA_SAFETY_ON_NULL_GOTO(address, error_dialer); | 768 | EINA_SAFETY_ON_NULL_GOTO(address, error_dialer); |
766 | 769 | ||
770 | if ((stat(address, &st) != 0) | ||
771 | #ifdef S_ISSOCK | ||
772 | || (!S_ISSOCK(st.st_mode)) | ||
773 | #endif | ||
774 | ) | ||
775 | { | ||
776 | DBG("%s is not a socket", address); | ||
777 | goto error_dialer; | ||
778 | } | ||
779 | |||
767 | svr->dialer.dialer = efl_add(EFL_NET_DIALER_UNIX_CLASS, ecore_main_loop_get()); | 780 | svr->dialer.dialer = efl_add(EFL_NET_DIALER_UNIX_CLASS, ecore_main_loop_get()); |
768 | EINA_SAFETY_ON_NULL_GOTO(svr->dialer.dialer, error_dialer); | 781 | EINA_SAFETY_ON_NULL_GOTO(svr->dialer.dialer, error_dialer); |
769 | } | 782 | } |