[packages/libutempter] Up to 1.2.1

arekm arekm at pld-linux.org
Fri Oct 6 13:03:25 CEST 2023


commit 2605779e32665709e0c4711b4b70a5505d06fc92
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Fri Oct 6 12:05:13 2023 +0200

    Up to 1.2.1

 libutempter-lastlog.patch | 43 -------------------------------------------
 libutempter.spec          | 12 +++++-------
 2 files changed, 5 insertions(+), 50 deletions(-)
---
diff --git a/libutempter.spec b/libutempter.spec
index 6164351..a20fc9d 100644
--- a/libutempter.spec
+++ b/libutempter.spec
@@ -6,14 +6,13 @@ Summary(ru.UTF-8):	Привилегированная программа для
 Summary(uk.UTF-8):	Привілейована програма для внесення змін до utmp/wtmp
 %define	utempter_compat_ver	0.5.5
 Name:		libutempter
-Version:	1.1.6
-Release:	6
+Version:	1.2.1
+Release:	1
 License:	LGPL v2.1+
 Group:		Base
-Source0:	ftp://ftp.altlinux.org/pub/people/ldv/utempter/%{name}-%{version}.tar.bz2
-# Source0-md5:	b43827806923903aba2bc7cd3a2d45b7
-Patch0:		%{name}-lastlog.patch
-Patch1:		%{name}-utmp-cleanup.patch
+Source0:	http://ftp.altlinux.org/pub/people/ldv/utempter/%{name}-%{version}.tar.gz
+# Source0-md5:	afe828ce87262d7e043770553004e162
+Patch0:		%{name}-utmp-cleanup.patch
 BuildRequires:	rpmbuild(macros) >= 1.202
 Requires(pre):	/usr/bin/getgid
 Requires(pre):	/usr/sbin/groupadd
@@ -88,7 +87,6 @@ Statyczna biblioteka utemptera
 %prep
 %setup -q
 %patch0 -p1
-%patch1 -p1
 
 %build
 %{__make} \
diff --git a/libutempter-lastlog.patch b/libutempter-lastlog.patch
deleted file mode 100644
index 12851d8..0000000
--- a/libutempter-lastlog.patch
+++ /dev/null
@@ -1,43 +0,0 @@
---- libutempter-1.1.6/utempter.c.orig	2010-11-04 18:14:53.000000000 +0100
-+++ libutempter-1.1.6/utempter.c	2012-06-23 21:51:40.962552952 +0200
-@@ -113,20 +113,27 @@
- {
- 	struct utmp ut;
- 	struct timeval tv;
-+	int fd;
-+	struct lastlog ll;
- 
- #ifdef __GLIBC__
- 	size_t offset;
- #endif
- 
- 	memset(&ut, 0, sizeof(ut));
-+	memset(&ll, 0, sizeof(ll));
- 
- 	memset(&tv, 0, sizeof(tv));
- 	(void) gettimeofday(&tv, 0);
-+	ll.ll_time = time(NULL);
- 
- 	strncpy(ut.ut_name, user, sizeof(ut.ut_name));
- 	strncpy(ut.ut_line, term, sizeof(ut.ut_line));
--	if (host)
-+	strncpy(ll.ll_line, term, sizeof(ll.ll_line));
-+	if (host) {
- 		strncpy(ut.ut_host, host, sizeof(ut.ut_host));
-+		strncpy(ll.ll_host, host, sizeof(ll.ll_host));
-+	}
- 
- #ifdef __GLIBC__
- 
-@@ -155,6 +162,11 @@
- 	endutent();
- 
- 	(void) updwtmp(_PATH_WTMP, &ut);
-+	if ((fd = open(_PATH_LASTLOG, O_RDWR)) != -1) {
-+		lseek(fd, (off_t) ((long)getuid() * sizeof(ll)), SEEK_SET);
-+		write(fd, &ll, sizeof(ll));
-+		close(fd);
-+	}
- 
- #elif defined(__FreeBSD__)
- 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libutempter.git/commitdiff/2605779e32665709e0c4711b4b70a5505d06fc92



More information about the pld-cvs-commit mailing list