commit 724077aab0d8f3214809ee9318d982bdb7b8f23f
Author: Elan Ruusamäe <[email protected]>
Date:   Sun May 17 20:41:24 2015 +0300

    correctly parse /proc/stat for boottime
    
    added sudo-parse_boottime_properly.patch from Debian
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=762465
    
    Sudo uses monotonic clock since 1.8.10,
    so it may have something to do with the clock reset.
    https://bugzilla.suse.com/show_bug.cgi?id=899252
    
    Problem seems to manifest if tty tickets is disabled:
        Defaults !tty_tickets

 sudo-parse_boottime_properly.patch | 15 +++++++++++++++
 sudo.spec                          |  4 +++-
 2 files changed, 18 insertions(+), 1 deletion(-)
---
diff --git a/sudo.spec b/sudo.spec
index 197fc2f..a1247ad 100644
--- a/sudo.spec
+++ b/sudo.spec
@@ -28,7 +28,7 @@ Summary(ru.UTF-8):    Позволяет определенным пользова
 Summary(uk.UTF-8):     Дозволяє вказаним користувачам виконувати команди від 
імені root
 Name:          sudo
 Version:       1.8.13
-Release:       2
+Release:       2.1
 Epoch:         1
 License:       BSD
 Group:         Applications/System
@@ -40,6 +40,7 @@ Source3:      %{name}.logrotate
 Source4:       %{name}.tmpfiles
 Patch0:                %{name}-env.patch
 Patch1:                config.patch
+Patch2:                sudo-parse_boottime_properly.patch
 URL:           http://www.sudo.ws/sudo/
 %{?with_audit:BuildRequires:   audit-libs-devel}
 BuildRequires: autoconf >= 2.53
@@ -174,6 +175,7 @@ cp -p acinclude.m4 acinclude.m4.orig
 
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 ! [ -f m4/ax_sys_weak_alias.m4 ] # provide own copy only until it is there
 cp /usr/share/aclocal/ax_sys_weak_alias.m4 m4
diff --git a/sudo-parse_boottime_properly.patch 
b/sudo-parse_boottime_properly.patch
new file mode 100644
index 0000000..cf7495a
--- /dev/null
+++ b/sudo-parse_boottime_properly.patch
@@ -0,0 +1,15 @@
+From https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=762465
+
+Index: sudo-1.8.13/plugins/sudoers/boottime.c
+===================================================================
+--- sudo-1.8.13.orig/plugins/sudoers/boottime.c        2015-03-18 
18:05:51.000000000 +0100
++++ sudo-1.8.13/plugins/sudoers/boottime.c     2015-05-14 14:48:33.855294076 
+0200
+@@ -79,6 +79,8 @@ get_boottime(struct timespec *ts)
+     if (fp != NULL) {
+       while ((len = getline(&line, &linesize, fp)) != -1) {
+           if (strncmp(line, "btime ", 6) == 0) {
++              if (line[len - 1] == '\n')
++                  line[len - 1] = '\0';
+               long long llval = strtonum(line + 6, 1, LLONG_MAX, NULL);
+               if (llval > 0) {
+                   ts->tv_sec = (time_t)llval;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/sudo.git/commitdiff/b0753d7ed6280503980a6260a4aef62eec68a3d9

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to