| @@ -1,15 +1,25 @@ | | | @@ -1,15 +1,25 @@ |
1 | $NetBSD: patch-fscd_fscd.c,v 1.1 2013/09/10 14:43:23 joerg Exp $ | | 1 | $NetBSD: patch-fscd_fscd.c,v 1.2 2017/06/30 00:25:34 kamil Exp $ |
2 | | | 2 | |
3 | --- fscd/fscd.c.orig 2012-11-12 00:12:33.000000000 +0000 | | 3 | --- fscd/fscd.c.orig 2012-11-12 00:12:33.000000000 +0000 |
4 | +++ fscd/fscd.c | | 4 | +++ fscd/fscd.c |
5 | @@ -1067,6 +1067,10 @@ handle_task(struct fscd_cfg *config, cha | | 5 | @@ -45,7 +45,9 @@ __FBSDID("$FreeBSD$"); |
| | | 6 | #include <sys/sysctl.h> |
| | | 7 | #include <sys/uio.h> |
| | | 8 | #include <sys/un.h> |
| | | 9 | +#if defined(__FreeBSD__) || defined(__DragonFly__) |
| | | 10 | #include <sys/user.h> |
| | | 11 | +#endif |
| | | 12 | #include <sys/time.h> |
| | | 13 | #include <sys/wait.h> |
| | | 14 | #include <ctype.h> |
| | | 15 | @@ -1067,6 +1069,10 @@ handle_task(struct fscd_cfg *config, cha |
6 | print_status(config, sock_fd); | | 16 | print_status(config, sock_fd); |
7 | pthread_mutex_unlock(&config->service_mtx); | | 17 | pthread_mutex_unlock(&config->service_mtx); |
8 | return 0; | | 18 | return 0; |
9 | + } else { | | 19 | + } else { |
10 | + printlog(LOG_ERR, "received invalid message from client."); | | 20 | + printlog(LOG_ERR, "received invalid message from client."); |
11 | + pthread_mutex_unlock(&config->service_mtx); | | 21 | + pthread_mutex_unlock(&config->service_mtx); |
12 | + return -1; | | 22 | + return -1; |
13 | } | | 23 | } |
14 | pthread_mutex_unlock(&config->service_mtx); | | 24 | pthread_mutex_unlock(&config->service_mtx); |
15 | | | 25 | |