summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2018-07-21 17:00:24 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2018-07-21 17:00:24 +0000
commitbd20906402bc1a41e60deab956218a799e4cb8aa (patch)
tree475027da7796559bf33a672f687bd6b503146050
parentf9bb48be0295195c97bad86fe2dbe4ce8a9ea009 (diff)
downloadutmps-bd20906402bc1a41e60deab956218a799e4cb8aa.tar.xz
Adapt to skalibs-2.7.0.0
-rw-r--r--INSTALL2
-rw-r--r--NEWS6
-rw-r--r--doc/index.html4
-rw-r--r--doc/upgrade.html7
-rw-r--r--package/info2
-rw-r--r--src/utmps/utmps-utmpd.c22
6 files changed, 25 insertions, 18 deletions
diff --git a/INSTALL b/INSTALL
index 0033850..6ec9f85 100644
--- a/INSTALL
+++ b/INSTALL
@@ -6,7 +6,7 @@ Build Instructions
- A POSIX-compliant C development environment
- GNU make version 3.81 or later
- - skalibs version 2.6.4.0 or later: http://skarnet.org/software/skalibs/
+ - skalibs version 2.7.0.0 or later: http://skarnet.org/software/skalibs/
This software will run on any operating system that implements
POSIX.1-2008, available at:
diff --git a/NEWS b/NEWS
index 844ed94..1d56fe8 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,11 @@
Changelog for utmps.
+In 0.0.1.3
+----------
+
+ - Adaptation to skalibs-2.7.0.0.
+
+
In 0.0.1.2
----------
diff --git a/doc/index.html b/doc/index.html
index 7232960..d0c0ab4 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -56,7 +56,7 @@ running utmp functions are just clients to this daemon.
<li> A POSIX-compliant system with a standard C development environment </li>
<li> GNU make, version 3.81 or later </li>
<li> <a href="//skarnet.org/software/skalibs/">skalibs</a> version
-2.6.4.0 or later. It's a build-time requirement. It's also a run-time
+2.7.0.0 or later. It's a build-time requirement. It's also a run-time
requirement if you link against the shared version of the skalibs
library. </li>
<li> <a href="//skarnet.org/software/s6/">s6</a> version
@@ -76,7 +76,7 @@ suitable replacement for
<h3> Download </h3>
<ul>
- <li> The current released version of utmps is <a href="utmps-0.0.1.2.tar.gz">0.0.1.2</a>. </li>
+ <li> The current released version of utmps is <a href="utmps-0.0.1.3.tar.gz">0.0.1.3</a>. </li>
<li> Alternatively, you can checkout a copy of the
<a href="//git.skarnet.org/cgi-bin/cgit.cgi/utmps/">utmps
git repository</a>:
diff --git a/doc/upgrade.html b/doc/upgrade.html
index fa4cdaa..e61ac32 100644
--- a/doc/upgrade.html
+++ b/doc/upgrade.html
@@ -18,6 +18,13 @@
<h1> What has changed in utmps </h1>
+<h2> in 0.0.1.3 </h2>
+
+<ul>
+ <li> <a href="//skarnet.org/software/skalibs/">skalibs</a>
+dependency bumped to 2.7.0.0. </li>
+</ul>
+
<h2> in 0.0.1.2 </h2>
<ul>
diff --git a/package/info b/package/info
index be44d05..3c772e7 100644
--- a/package/info
+++ b/package/info
@@ -1,4 +1,4 @@
package=utmps
-version=0.0.1.2
+version=0.0.1.3
category=admin
package_macro_name=UTMPS
diff --git a/src/utmps/utmps-utmpd.c b/src/utmps/utmps-utmpd.c
index d8183ae..cde2ea0 100644
--- a/src/utmps/utmps-utmpd.c
+++ b/src/utmps/utmps-utmpd.c
@@ -53,9 +53,7 @@ static void maybe_open (void)
umask(m) ;
if (fd < 0)
{
- int e = errno ;
- answer(e) ;
- errno = e ;
+ answer(errno) ;
strerr_diefu1sys(111, "open utmp file") ;
}
}
@@ -64,18 +62,16 @@ static void maybe_open (void)
static int read_utmp_entry (char *s)
{
ssize_t r ;
- int e ;
- if (lock_sh(fd) < 0) { e = errno ; goto err ; }
+ if (lock_sh(fd) < 0) goto err ;
r = read(fd, s, sizeof(struct utmpx)) ;
lock_unx(fd) ;
- if (r < 0) { e = errno ; goto err ; }
+ if (r < 0) goto err ;
if (!r) return 0 ;
- if (r < sizeof(struct utmpx)) { e = EPIPE ; goto err ; }
- return 1 ;
+ if (r == sizeof(struct utmpx)) return 1 ;
+ errno = EPIPE ;
err:
- unlink("utmp") ;
- answer(e) ;
- errno = e ;
+ unlink_void("utmp") ;
+ answer(errno) ;
strerr_diefu1sys(111, "read utmp file") ;
}
@@ -172,9 +168,7 @@ static void do_putline (uid_t uid)
if (lock_ex(fd) < 0) { answer(errno) ; return ; }
if (allwrite(fd, buf, sizeof(struct utmpx)) < sizeof(struct utmpx))
{
- int e = errno ;
- answer(e) ;
- errno = e ;
+ answer(errno) ;
strerr_diefu1sys(111, "write to utmp") ;
}
fsync(fd) ;