summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/ssh/fdlim.h46
1 files changed, 0 insertions, 46 deletions
diff --git a/usr.bin/ssh/fdlim.h b/usr.bin/ssh/fdlim.h
deleted file mode 100644
index 616b6f4882f..00000000000
--- a/usr.bin/ssh/fdlim.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-
-fdlim.h
-
-Author: David Mazieres <dm@lcs.mit.edu>
- Contributed to be part of ssh.
-
-Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
- All rights reserved
-
-Created: Tue Aug 22 17:21:32 1995 ylo
-
-*/
-
-/* RCSID("$Id: fdlim.h,v 1.2 1999/09/30 05:43:33 deraadt Exp $"); */
-
-#ifndef FDLIM_H
-#define FDLIM_H
-
-static int
-fdlim_get (int hard)
-{
- struct rlimit rlfd;
-
- if (getrlimit (RLIMIT_NOFILE, &rlfd) < 0)
- return (-1);
- if ((hard ? rlfd.rlim_max : rlfd.rlim_cur) == RLIM_INFINITY)
- return 10000;
- else
- return hard ? rlfd.rlim_max : rlfd.rlim_cur;
-}
-
-static int
-fdlim_set (int lim) {
- struct rlimit rlfd;
- if (lim <= 0)
- return (-1);
- if (getrlimit (RLIMIT_NOFILE, &rlfd) < 0)
- return (-1);
- rlfd.rlim_cur = lim;
- if (setrlimit (RLIMIT_NOFILE, &rlfd) < 0)
- return (-1);
- return (0);
-}
-
-#endif /* FDLIM_H */