projects
/
oweals
/
dinit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
114672a
)
Additional check for bad setting values for rlimit settings.
author
Davin McCall
<davmac@davmac.org>
Fri, 28 Jun 2019 10:28:05 +0000
(20:28 +1000)
committer
Davin McCall
<davmac@davmac.org>
Fri, 28 Jun 2019 10:28:05 +0000
(20:28 +1000)
src/load-service.cc
patch
|
blob
|
history
diff --git
a/src/load-service.cc
b/src/load-service.cc
index 0134acdcd285fe2f853a2e8b74747e53949b7770..c7eb422d430bf8183ba40b79b5734ab59357bc03 100644
(file)
--- a/
src/load-service.cc
+++ b/
src/load-service.cc
@@
-258,6
+258,9
@@
static void parse_rlimit(const std::string &line, const std::string &service_nam
if (*index == '-') {
rlimit.limits.rlim_max = RLIM_INFINITY;
+ if (index[1] != 0) {
+ throw service_description_exc(service_name, std::string("Bad value for ") + param_name);
+ }
}
else {
char *hard_start = index;