]> git.pld-linux.org Git - packages/util-linux.git/blob - util-linux-login-lastlog.patch
Up to 2.37.3; fixes CVE-2021-3996, CVE-2021-3995. As of kernel 5.14 raw.h is no longe...
[packages/util-linux.git] / util-linux-login-lastlog.patch
1 diff -urNp -x '*.orig' util-linux-2.36.2.org/login-utils/login.c util-linux-2.36.2/login-utils/login.c
2 --- util-linux-2.36.2.org/login-utils/login.c   2021-02-12 12:32:01.748988728 +0100
3 +++ util-linux-2.36.2/login-utils/login.c       2021-02-28 14:21:48.563576067 +0100
4 @@ -586,7 +586,7 @@ static void log_lastlog(struct login_con
5         sa.sa_handler = SIG_IGN;
6         sigaction(SIGXFSZ, &sa, &oldsa_xfsz);
7  
8 -       fd = open(_PATH_LASTLOG, O_RDWR, 0);
9 +       fd = open(_PATH_LASTLOG, O_RDWR|O_CREAT, 0);
10         if (fd < 0)
11                 goto done;
12         offset = cxt->pwd->pw_uid * sizeof(ll);
This page took 0.022121 seconds and 3 git commands to generate.