Reset all limits that aren't configured.
authorDaniel Hokka Zakrisson <daniel@hozac.com>
Sat, 4 Nov 2006 19:36:06 +0000 (19:36 +0000)
committerDaniel Hokka Zakrisson <daniel@hozac.com>
Sat, 4 Nov 2006 19:36:06 +0000 (19:36 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2370 94cd875c-1c1d-0410-91d2-eb244daf1a30

src/exec-ulimit.c

index a487963..7219a9e 100644 (file)
@@ -177,6 +177,10 @@ int main(int argc, char *argv[])
       Egetrlimit(LIMITS[i].code, &limit);
       if (readSingleLimit(&limit, LIMITS[i].fname))
        Esetrlimit(LIMITS[i].code, &limit);
+      else {
+       limit.rlim_cur = limit.rlim_max = RLIM_INFINITY;
+       Esetrlimit(LIMITS[i].code, &limit);
+      }
     }
     Efchdir(cur_fd);
   }