diff options
-rw-r--r-- | INSTALL | 2 | ||||
-rw-r--r-- | NEWS | 6 | ||||
-rw-r--r-- | doc/index.html | 4 | ||||
-rw-r--r-- | doc/upgrade.html | 7 | ||||
-rw-r--r-- | package/info | 2 | ||||
-rw-r--r-- | src/utmps/utmps-utmpd.c | 22 |
6 files changed, 25 insertions, 18 deletions
@@ -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: @@ -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) ; |