simplified umask

This commit is contained in:
Nikos Mavrogiannopoulos
2013-03-16 22:54:05 +01:00
parent 82df00f0b0
commit c69c86cfdd
2 changed files with 2 additions and 3 deletions

View File

@@ -204,6 +204,7 @@ use-utmp = true
pid-file = /var/run/ocserv.pid
# socket file used for IPC, will be appended with .PID
# It must be accessible within the chroot environment (if any)
socket-file = /var/run/ocserv-socket
# The user the worker processes will be run as.

View File

@@ -162,7 +162,6 @@ gnutls_datum_t data, out;
uint16_t length;
struct iovec iov[2];
int sd;
int mask;
signal(SIGHUP, SIG_IGN);
signal(SIGINT, SIG_DFL);
@@ -194,14 +193,13 @@ int mask;
exit(1);
}
mask = umask(066);
umask(066);
ret = bind(sd, (struct sockaddr *)&sa, SUN_LEN(&sa));
if (ret == -1) {
e = errno;
syslog(LOG_ERR, "could not bind socket '%s': %s", socket_file, strerror(e));
exit(1);
}
umask(mask);
ret = chown(socket_file, config->uid, config->gid);
if (ret == -1) {