X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet_setup.c;h=c3cfb0fc49a7dd25fda4fc067b67e903db44c668;hp=c7c1250508fe8e1105bd8baadbaf8eaf74fab71c;hb=6c5f3d8b74ffea1522a727ef189a5ba65a939e07;hpb=9bde92ce97d5503ff2d31dcc6f0648902580ec14 diff --git a/src/net_setup.c b/src/net_setup.c index c7c12505..c3cfb0fc 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: net_setup.c,v 1.1.2.42 2003/08/08 22:11:54 guus Exp $ + $Id: net_setup.c,v 1.1.2.44 2003/08/28 21:05:10 guus Exp $ */ #include "system.h" @@ -182,7 +182,7 @@ bool read_rsa_private_key(void) return false; } - if(s.st_mode & ~0700) + if(s.st_mode & ~0100700) logger(LOG_WARNING, _("Warning: insecure file permissions for RSA private key file `%s'!"), fname); #endif @@ -362,7 +362,7 @@ bool setup_myself(void) myself->connection->outcipher = EVP_bf_ofb(); - myself->key = (char *) xmalloc(myself->keylength); + myself->key = xmalloc(myself->keylength); RAND_pseudo_bytes(myself->key, myself->keylength); if(!get_config_int(lookup_config(config_tree, "KeyExpire"), &keylifetime)) @@ -549,7 +549,7 @@ void close_network_connections(void) for(node = connection_tree->head; node; node = next) { next = node->next; - c = (connection_t *) node->data; + c = node->data; if(c->outgoing) free(c->outgoing->name), free(c->outgoing), c->outgoing = NULL;