Allow loading additional configuration files per user or per group.

The directives currently allowed are: ipv4/6_dns and route.
This commit is contained in:
Nikos Mavrogiannopoulos
2013-10-28 11:43:05 +01:00
parent 99e7978f99
commit 00554b2f28
18 changed files with 555 additions and 60 deletions
+22
View File
@@ -42,3 +42,25 @@ const uint8_t * p = buf;
return len;
}
ssize_t force_read(int sockfd, void *buf, size_t len)
{
int left = len;
int ret;
uint8_t * p = buf;
while(left > 0) {
ret = read(sockfd, p, left);
if (ret == -1) {
if (errno != EAGAIN && errno != EINTR)
return ret;
}
if (ret > 0) {
left -= ret;
p += ret;
}
}
return len;
}