Store the session ID in the tty ticket file too. A tty may only

be in one session at a time so if the session ID doesn't match we
ignore the ticket.
This commit is contained in:
Todd C. Miller
2013-02-08 10:43:14 -05:00
parent af0bb55283
commit 2e08777f25
4 changed files with 9 additions and 2 deletions

View File

@@ -270,6 +270,10 @@ sudoers_policy_deserialize_info(void *v, char **runas_user, char **runas_group)
sudo_user.cols = atoi(*cur + sizeof("cols=") - 1);
continue;
}
if (MATCHES(*cur, "sid=")) {
sudo_user.sid = atoi(*cur + sizeof("sid=") - 1);
continue;
}
}
if (user_cwd == NULL)
user_cwd = "unknown";