summaryrefslogtreecommitdiff
path: root/ssh.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh.c')
-rw-r--r--ssh.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/ssh.c b/ssh.c
index de1e8cc5c..dcbf68d99 100644
--- a/ssh.c
+++ b/ssh.c
@@ -40,7 +40,7 @@
40 */ 40 */
41 41
42#include "includes.h" 42#include "includes.h"
43RCSID("$OpenBSD: ssh.c,v 1.183 2002/08/29 16:02:54 stevesk Exp $"); 43RCSID("$OpenBSD: ssh.c,v 1.184 2002/08/29 19:49:42 stevesk Exp $");
44 44
45#include <openssl/evp.h> 45#include <openssl/evp.h>
46#include <openssl/err.h> 46#include <openssl/err.h>
@@ -228,6 +228,15 @@ main(int ac, char **av)
228 */ 228 */
229 original_real_uid = getuid(); 229 original_real_uid = getuid();
230 original_effective_uid = geteuid(); 230 original_effective_uid = geteuid();
231
232 /*
233 * Use uid-swapping to give up root privileges for the duration of
234 * option processing. We will re-instantiate the rights when we are
235 * ready to create the privileged port, and will permanently drop
236 * them when the port has been created (actually, when the connection
237 * has been made, as we may need to create the port several times).
238 */
239 PRIV_END;
231 240
232#ifdef HAVE_SETRLIMIT 241#ifdef HAVE_SETRLIMIT
233 /* If we are installed setuid root be careful to not drop core. */ 242 /* If we are installed setuid root be careful to not drop core. */
@@ -248,15 +257,6 @@ main(int ac, char **av)
248 pw = pwcopy(pw); 257 pw = pwcopy(pw);
249 258
250 /* 259 /*
251 * Use uid-swapping to give up root privileges for the duration of
252 * option processing. We will re-instantiate the rights when we are
253 * ready to create the privileged port, and will permanently drop
254 * them when the port has been created (actually, when the connection
255 * has been made, as we may need to create the port several times).
256 */
257 PRIV_END;
258
259 /*
260 * Set our umask to something reasonable, as some files are created 260 * Set our umask to something reasonable, as some files are created
261 * with the default umask. This will make them world-readable but 261 * with the default umask. This will make them world-readable but
262 * writable only by the owner, which is ok for all files for which we 262 * writable only by the owner, which is ok for all files for which we