* The following function was generated using the openssl utility, using
* the command : "openssl dhparam -dsaparam -C 512"
*/
+#ifndef S_SPLINT_S
DH *get_dh512()
{
static unsigned char dh512_p[]={
dh->length = 160;
return(dh);
}
+#endif /* SPLINT */
struct daemon_remote*
daemon_remote_create(struct config_file* cfg)
if(fd != -1) {
if (cfg->username && cfg->username[0])
chown(ip, cfg->uid, cfg->gid);
- chmod(ip, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
+ chmod(ip, (mode_t)(S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP));
}
} else {
hints.ai_socktype = SOCK_STREAM;
#endif
sun.sun_family = AF_LOCAL;
/* length is 92-108, 104 on FreeBSD */
- strlcpy(sun.sun_path, path, sizeof(sun.sun_path));
+ (void)strlcpy(sun.sun_path, path, sizeof(sun.sun_path));
if ((s = socket(PF_LOCAL, SOCK_STREAM, 0)) == -1) {
log_err("Cannot create local socket %s (%s)",
}
if (bind(s, (struct sockaddr *)&sun,
- sizeof(struct sockaddr_un)) == -1) {
+ (socklen_t)sizeof(struct sockaddr_un)) == -1) {
log_err("Cannot bind local socket %s (%s)",
path, strerror(errno));
return -1;
#ifdef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN
sun->sun_len = sizeof(sun);
#endif
- strlcpy(sun->sun_path, svr, sizeof(sun->sun_path));
- addrlen = sizeof(struct sockaddr_un);
+ (void)strlcpy(sun->sun_path, svr, sizeof(sun->sun_path));
+ addrlen = (socklen_t)sizeof(struct sockaddr_un);
addrfamily = AF_LOCAL;
#endif
} else {