summaryrefslogtreecommitdiffhomepage
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 5127158..6946d1d 100644
--- a/svr-agentfwd.c
+++ b/svr-agentfwd.c
@@ -150,8 +150,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(ses.authstate.pw_gid)) < 0 ||
+ (seteuid(ses.authstate.pw_uid)) < 0) {
dropbear_exit("failed to set euid");
}
@@ -213,8 +213,8 @@ static int bindagent(int fd, 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(ses.authstate.pw_gid)) < 0 ||
+ (seteuid(ses.authstate.pw_uid)) < 0) {
dropbear_exit("failed to set euid");
}