Skip to content

Commit

Permalink
Merge pull request #2 from donald/0.4
Browse files Browse the repository at this point in the history
0.4
  • Loading branch information
donald authored May 18, 2021
2 parents cfd7ba9 + 56205e5 commit 378566b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions get_shadow_line.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ static int get_shadow_line(char *user, char **line) {
SSL_CTX_set_verify(ssl_ctx, SSL_VERIFY_PEER, NULL);
if (SSL_CTX_load_verify_locations(ssl_ctx, "/etc/mxshadow.cert.pem", NULL) == 0) { psslerror("SSL_CTX_load_verify_locations"); return -1; }

int sock = socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK, 0);
if (sock == 0) { COMMON_LOG(LOG_ERR, "socket: %m"); return -1; }
int sock _cleanup_(free_fd) = socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK, 0);
if (sock == -1) { COMMON_LOG(LOG_ERR, "socket: %m"); return -1; }

status = connect_with_timeout(sock, (struct sockaddr *)&sockaddr, sizeof(sockaddr), TIMEOUT);
if (status == -1) { COMMON_LOG(LOG_ERR, "connect: %m"); return -1; }
Expand Down

0 comments on commit 378566b

Please sign in to comment.