| 351 |
|
/* Don't do logging here, since we don't have log() initialised */ |
| 352 |
|
if ((fb = fopen(filename, "r"))) |
| 353 |
|
{ |
| 354 |
< |
if (fgets(buff, 20, fb) == NULL) |
| 354 |
> |
if (!fgets(buff, 20, fb)) |
| 355 |
|
{ |
| 356 |
|
/* log(L_ERROR, "Error reading from pid file %s (%s)", filename, |
| 357 |
|
* strerror(errno)); |
| 420 |
|
SSL_load_error_strings(); |
| 421 |
|
SSLeay_add_ssl_algorithms(); |
| 422 |
|
|
| 423 |
< |
if ((ConfigServerInfo.server_ctx = SSL_CTX_new(SSLv23_server_method())) == NULL) |
| 423 |
> |
if (!(ConfigServerInfo.server_ctx = SSL_CTX_new(SSLv23_server_method()))) |
| 424 |
|
{ |
| 425 |
|
const char *s = ERR_lib_error_string(ERR_get_error()); |
| 426 |
|
|
| 449 |
|
SSL_CTX_set_options(ConfigServerInfo.server_ctx, SSL_OP_SINGLE_ECDH_USE); |
| 450 |
|
#endif |
| 451 |
|
|
| 452 |
< |
if ((ConfigServerInfo.client_ctx = SSL_CTX_new(SSLv23_client_method())) == NULL) |
| 452 |
> |
if (!(ConfigServerInfo.client_ctx = SSL_CTX_new(SSLv23_client_method()))) |
| 453 |
|
{ |
| 454 |
|
const char *s = ERR_lib_error_string(ERR_get_error()); |
| 455 |
|
|
| 470 |
|
main(int argc, char *argv[]) |
| 471 |
|
{ |
| 472 |
|
/* Check to see if the user is running us as root, which is a nono */ |
| 473 |
< |
if (geteuid() == 0) |
| 473 |
> |
if (!geteuid()) |
| 474 |
|
{ |
| 475 |
|
fprintf(stderr, "ERROR: This server won't run as root/superuser\n"); |
| 476 |
|
return -1; |