diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2000-12-27 04:57:41 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2000-12-27 04:57:41 +0000 |
commit | 2c467a20f4f82000908b7c3d158e8a7960d3bad1 (patch) | |
tree | 7a41adf856303d56e5ed5788c1f1c7d394302235 /ssh-agent.c | |
parent | 3deda8b091e571f5577ae50b75b89a21caed6aee (diff) |
20001227
- (bal) Typo in configure.in: entut?ent should be endut?ent. Suggested by
Takumi Yamane <yamtak@b-session.com>
- (bal) Checks for getrlimit(), sysconf(), and setdtablesize(). Patch
by Corinna Vinschen <vinschen@redhat.com>
Diffstat (limited to 'ssh-agent.c')
-rw-r--r-- | ssh-agent.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ssh-agent.c b/ssh-agent.c index 9c0a583e8..55704e492 100644 --- a/ssh-agent.c +++ b/ssh-agent.c | |||
@@ -674,7 +674,9 @@ main(int ac, char **av) | |||
674 | fd_set readset, writeset; | 674 | fd_set readset, writeset; |
675 | int sock, c_flag = 0, k_flag = 0, s_flag = 0, ch; | 675 | int sock, c_flag = 0, k_flag = 0, s_flag = 0, ch; |
676 | struct sockaddr_un sunaddr; | 676 | struct sockaddr_un sunaddr; |
677 | #ifdef HAVE_SETRLIMIT | ||
677 | struct rlimit rlim; | 678 | struct rlimit rlim; |
679 | #endif | ||
678 | pid_t pid; | 680 | pid_t pid; |
679 | char *shell, *format, *pidstr, pidstrbuf[1 + 3 * sizeof pid]; | 681 | char *shell, *format, *pidstr, pidstrbuf[1 + 3 * sizeof pid]; |
680 | extern int optind; | 682 | extern int optind; |
@@ -805,12 +807,14 @@ main(int ac, char **av) | |||
805 | close(1); | 807 | close(1); |
806 | close(2); | 808 | close(2); |
807 | 809 | ||
810 | #ifdef HAVE_SETRLIMIT | ||
808 | /* deny core dumps, since memory contains unencrypted private keys */ | 811 | /* deny core dumps, since memory contains unencrypted private keys */ |
809 | rlim.rlim_cur = rlim.rlim_max = 0; | 812 | rlim.rlim_cur = rlim.rlim_max = 0; |
810 | if (setrlimit(RLIMIT_CORE, &rlim) < 0) { | 813 | if (setrlimit(RLIMIT_CORE, &rlim) < 0) { |
811 | perror("setrlimit rlimit_core failed"); | 814 | perror("setrlimit rlimit_core failed"); |
812 | cleanup_exit(1); | 815 | cleanup_exit(1); |
813 | } | 816 | } |
817 | #endif | ||
814 | if (setsid() == -1) { | 818 | if (setsid() == -1) { |
815 | perror("setsid"); | 819 | perror("setsid"); |
816 | cleanup_exit(1); | 820 | cleanup_exit(1); |