From 22f221a8fc2fe8b31831736a68591c04b4f3932bd79102832d4e8d87bba369a0 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Thu, 3 Jun 2010 12:47:12 +0000 Subject: [PATCH] Accepting request 41035 from Base:System Copy from Base:System/utempter based on submit request 41035 from user coolo OBS-URL: https://build.opensuse.org/request/show/41035 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/utempter?expand=0&rev=8 --- utempter-ppc64.patch | 30 ++++++++++++++++++++++++++++++ utempter.changes | 5 +++++ utempter.spec | 10 ++++++---- 3 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 utempter-ppc64.patch diff --git a/utempter-ppc64.patch b/utempter-ppc64.patch new file mode 100644 index 0000000..db8da4b --- /dev/null +++ b/utempter-ppc64.patch @@ -0,0 +1,30 @@ +--- utempter-0.5.5/utempter.c ++++ utempter-0.5.5/utempter.c +@@ -89,6 +89,7 @@ int main(int argc, const char ** argv) { + int i; + struct stat sb; + char * id; ++ struct timeval tv; + + if (argc < 3) usage(); + +@@ -116,6 +117,9 @@ int main(int argc, const char ** argv) { + host = NULL; + } + ++ memset(&tv, 0, sizeof(tv)); ++ (void) gettimeofday(&tv, 0); ++ + memset(&utx, 0, sizeof(utx)); + if (add) + utx.ut_type = USER_PROCESS; +@@ -152,7 +156,8 @@ int main(int argc, const char ** argv) { + + strncpy(utx.ut_id, id, sizeof(utx.ut_id)); + +- gettimeofday(&utx.ut_tv, NULL); ++ utx.ut_tv.tv_sec = tv.tv_sec; ++ utx.ut_tv.tv_usec = tv.tv_usec; + + pututxline(&utx); + updwtmpx(_PATH_WTMP, &utx); diff --git a/utempter.changes b/utempter.changes index 0e4f06f..a877cec 100644 --- a/utempter.changes +++ b/utempter.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 10 15:52:56 CEST 2010 - meissner@suse.de + +- handle ppc64 utmp entries with 32bit timeval correctly. bnc#602489 + ------------------------------------------------------------------- Wed Dec 16 00:17:51 CET 2009 - jengelh@medozas.de diff --git a/utempter.spec b/utempter.spec index 25e9a7d..97ec48f 100644 --- a/utempter.spec +++ b/utempter.spec @@ -1,7 +1,7 @@ # # spec file for package utempter (Version 0.5.5) # -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -21,7 +21,7 @@ Name: utempter %define utmpGroup tty Version: 0.5.5 -Release: 142 +Release: 143 Summary: A privileged helper for utmp and wtmp updates License: MIT Group: Productivity/Security @@ -33,8 +33,9 @@ Obsoletes: utempter-64bit BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: utempter-%{version}.tar.gz Source2: baselibs.conf -Patch: utempter.eal3.diff +Patch0: utempter.eal3.diff Patch1: utempter-0.5.5-pie.diff +Patch2: utempter-ppc64.patch %description Utempter is a utility that allows non-privileged applications such as @@ -49,8 +50,9 @@ Authors: %prep %setup -q -%patch -p1 +%patch0 -p1 %patch1 +%patch2 -p1 %build make %{?jobs:-j%jobs} RPM_OPT_FLAGS="$RPM_OPT_FLAGS"