+ } else if (g_strcasecmp(*g, "rlimits") == 0) {
+ gchar **k;
+
+ keys = g_key_file_get_keys(f, *g, NULL, NULL);
+
+ for (k = keys; *k; k++) {
+
+ v = g_key_file_get_string(f, *g, *k, NULL);
+
+ if (g_strcasecmp(*k, "rlimit-as") == 0) {
+ c->rlimit_as_set = TRUE;
+ c->rlimit_as = atoi(v);
+ } else if (g_strcasecmp(*k, "rlimit-core") == 0) {
+ c->rlimit_core_set = TRUE;
+ c->rlimit_core = atoi(v);
+ } else if (g_strcasecmp(*k, "rlimit-data") == 0) {
+ c->rlimit_data_set = TRUE;
+ c->rlimit_data = atoi(v);
+ } else if (g_strcasecmp(*k, "rlimit-fsize") == 0) {
+ c->rlimit_fsize_set = TRUE;
+ c->rlimit_fsize = atoi(v);
+ } else if (g_strcasecmp(*k, "rlimit-nofile") == 0) {
+ c->rlimit_nofile_set = TRUE;
+ c->rlimit_nofile = atoi(v);
+ } else if (g_strcasecmp(*k, "rlimit-stack") == 0) {
+ c->rlimit_stack_set = TRUE;
+ c->rlimit_stack = atoi(v);
+#ifdef RLIMIT_NPROC
+ } else if (g_strcasecmp(*k, "rlimit-nproc") == 0) {
+ c->rlimit_nproc_set = TRUE;
+ c->rlimit_nproc = atoi(v);
+#endif
+ } else {
+ fprintf(stderr, "Invalid configuration key \"%s\" in group \"%s\"\n", *k, *g);
+ goto finish;
+ }
+
+ g_free(v);
+ v = NULL;
+ }
+
+ g_strfreev(keys);
+ keys = NULL;
+