summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--session.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/session.c b/session.c
index 96167548a..48cfaafbf 100644
--- a/session.c
+++ b/session.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: session.c,v 1.314 2019/02/10 11:10:57 djm Exp $ */ 1/* $OpenBSD: session.c,v 1.315 2019/02/22 03:37:11 djm Exp $ */
2/* 2/*
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved 4 * All rights reserved
@@ -233,7 +233,9 @@ auth_input_request_forwarding(struct ssh *ssh, struct passwd * pw)
233 authsock_err: 233 authsock_err:
234 free(auth_sock_name); 234 free(auth_sock_name);
235 if (auth_sock_dir != NULL) { 235 if (auth_sock_dir != NULL) {
236 temporarily_use_uid(pw);
236 rmdir(auth_sock_dir); 237 rmdir(auth_sock_dir);
238 restore_uid();
237 free(auth_sock_dir); 239 free(auth_sock_dir);
238 } 240 }
239 if (sock != -1) 241 if (sock != -1)