chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
cac6f7c
)
socket: don't allow mixing of accepting and non-accepting sockets in the same unit
author
Lennart Poettering
<lennart@poettering.net>
Fri, 16 Jul 2010 17:41:50 +0000
(19:41 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Fri, 16 Jul 2010 17:41:50 +0000
(19:41 +0200)
src/socket.c
patch
|
blob
|
history
diff --git
a/src/socket.c
b/src/socket.c
index 4a9c939936ee843f0164988935f985cf1b1f7fe4..78fc049a95773cf7af9615ff07076711144e95b1 100644
(file)
--- a/
src/socket.c
+++ b/
src/socket.c
@@
-160,6
+160,11
@@
static int socket_verify(Socket *s) {
return -EINVAL;
}
+ if (s->accept && have_non_accept_socket(s)) {
+ log_error("%s configured for accepting sockets, but sockets are non-accepting. Refusing.", s->meta.id);
+ return -EINVAL;
+ }
+
if (s->accept && s->max_connections <= 0) {
log_error("%s's MaxConnection setting too small. Refusing.", s->meta.id);
return -EINVAL;