summaryrefslogtreecommitdiff
path: root/svr-agentfwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'svr-agentfwd.c')
-rw-r--r--svr-agentfwd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/svr-agentfwd.c b/svr-agentfwd.c
index c4958c4..f8af30e 100644
--- a/svr-agentfwd.c
+++ b/svr-agentfwd.c
@@ -141,8 +141,8 @@ void agentcleanup(struct ChanSess * chansess) {
* for themselves */
uid = getuid();
gid = getgid();
- if ((setegid(ses.authstate.pw->pw_gid)) < 0 ||
- (seteuid(ses.authstate.pw->pw_uid)) < 0) {
+ if ((setegid(svr_ses.authstate.pw->pw_gid)) < 0 ||
+ (seteuid(svr_ses.authstate.pw->pw_uid)) < 0) {
dropbear_exit("failed to set euid");
}
@@ -194,8 +194,8 @@ static int bindagent(struct ChanSess * chansess) {
/* drop to user privs to make the dir/file */
uid = getuid();
gid = getgid();
- if ((setegid(ses.authstate.pw->pw_gid)) < 0 ||
- (seteuid(ses.authstate.pw->pw_uid)) < 0) {
+ if ((setegid(svr_ses.authstate.pw->pw_gid)) < 0 ||
+ (seteuid(svr_ses.authstate.pw->pw_uid)) < 0) {
dropbear_exit("failed to set euid");
}