2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-29 13:28:10 +00:00

Adapt check_iolog_path to sessid changes

This commit is contained in:
Todd C. Miller 2011-03-14 11:30:32 -04:00
parent 8653ccc809
commit bf5f17bd63

View File

@ -49,6 +49,8 @@
struct sudo_user sudo_user; struct sudo_user sudo_user;
struct passwd *list_pw; struct passwd *list_pw;
static char sessid[7];
static void static void
usage(void) usage(void)
{ {
@ -136,7 +138,7 @@ main(int argc, char *argv[])
switch (state) { switch (state) {
case 0: case 0:
strlcpy(sudo_user.sessid, line, sizeof(sudo_user.sessid)); strlcpy(sessid, line, sizeof(sessid));
break; break;
case 1: case 1:
if (user_name != NULL) if (user_name != NULL)
@ -191,6 +193,11 @@ main(int argc, char *argv[])
exit(errors); exit(errors);
} }
void io_nextid(char *iolog_dir, char *id)
{
memcpy(id, sessid, sizeof(id));
}
void void
cleanup(int gotsig) cleanup(int gotsig)
{ {