]> git.proxmox.com Git - swtpm.git/commitdiff
swtpm_bios: Remove UNIXIO socket related code since not used
authorStefan Berger <stefanb@linux.vnet.ibm.com>
Tue, 12 May 2015 18:04:03 +0000 (14:04 -0400)
committerStefan Berger <stefanb@linux.vnet.ibm.com>
Tue, 12 May 2015 18:04:03 +0000 (14:04 -0400)
We do not support UNIXIO sockets for communicatin with the swtpm
yet, so remove this.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
src/swtpm_bios/tpm_bios.c

index f46f30304a20bd840bfbc832a804f79215e08d53..6d06b6e2e6f2694eec8c20d8e9bf7e08f5839350 100644 (file)
@@ -51,7 +51,6 @@ static int open_connection(void)
 {
        int fd = -1, tcp_device_port;
        char *tcp_device_hostname = NULL;
-       char *un_socket_device_path = NULL;
        char *tcp_device_port_string = NULL;
 
        if (getenv("TCSD_USE_TCP_DEVICE")) {
@@ -84,22 +83,8 @@ static int open_connection(void)
                        }
                }
 
-               if (fd < 0 && un_socket_device_path) {
-                       struct sockaddr_un addr;
-
-                       fd = socket(AF_UNIX, SOCK_STREAM, 0);
-                       if (fd >= 0) {
-                               addr.sun_family = AF_UNIX;
-                               strncpy(addr.sun_path, un_socket_device_path,
-                                       sizeof(addr.sun_path));
-                               if (connect(fd, (void *)&addr, sizeof(addr)) < 0) {
-                                       close(fd);
-                                       fd = -1;
-                               }
-                       }
-               }
                if (fd < 0) {
-                       printf("Could not connect using TCP or UNIXIO socket.\n");
+                       printf("Could not connect using TCP socket.\n");
                }
        } else {
                char *devname = getenv("TPM_DEVICE");