forked from pool/utempter
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
This commit is contained in:
parent
8c88f21a63
commit
22f221a8fc
30
utempter-ppc64.patch
Normal file
30
utempter-ppc64.patch
Normal file
@ -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);
|
@ -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
|
||||
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user