version 1.16, 1999/09/30 05:11:29 |
version 1.17, 1999/09/30 05:43:33 |
|
|
/* If we are installed setuid root be careful to not drop core. */ |
/* If we are installed setuid root be careful to not drop core. */ |
if (original_real_uid != original_effective_uid) |
if (original_real_uid != original_effective_uid) |
{ |
{ |
#ifdef HAVE_SETRLIMIT |
|
struct rlimit rlim; |
struct rlimit rlim; |
rlim.rlim_cur = rlim.rlim_max = 0; |
rlim.rlim_cur = rlim.rlim_max = 0; |
if (setrlimit(RLIMIT_CORE, &rlim) < 0) |
if (setrlimit(RLIMIT_CORE, &rlim) < 0) |
fatal("setrlimit failed: %.100s", strerror(errno)); |
fatal("setrlimit failed: %.100s", strerror(errno)); |
#else |
|
fatal("ssh is installed setuid root.\n"); |
|
#endif |
|
} |
} |
|
|
/* Use uid-swapping to give up root privileges for the duration of option |
/* Use uid-swapping to give up root privileges for the duration of option |