Your message dated Mon, 23 Jan 2017 17:49:27 +0000
with message-id <[email protected]>
and subject line Bug#827408: fixed in userv 1.2.0
has caused the Debian Bug report #827408,
regarding userv ignores errors from readdir
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
827408: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=827408
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: userv
[pseudo-header added by iwj]
Hi,
Please find a patch, attached, to address some minor compilation issues as
well as adding error checking for readdir().
Peter
diff -wur userv-1.0.3.orig/both.c userv-1.0.3-pjb/both.c
--- userv-1.0.3.orig/both.c 1999-10-10 12:39:46.000000000 +0100
+++ userv-1.0.3-pjb/both.c 2016-06-15 19:41:21.946598285 +0100
@@ -29,6 +29,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <errno.h>
#include "config.h"
diff -wur userv-1.0.3.orig/lexer.l.m4 userv-1.0.3-pjb/lexer.l.m4
--- userv-1.0.3.orig/lexer.l.m4 1999-11-07 15:39:53.000000000 +0000
+++ userv-1.0.3-pjb/lexer.l.m4 2016-06-15 20:02:52.422382569 +0100
@@ -134,11 +134,12 @@
static int dequote(char *inplace);
static void countnewlines(void);
-#define YY_NO_UNPUT
+#define YY_NO_INPUT
%}
%option noyywrap
+%option nounput
%%
diff -wur userv-1.0.3.orig/overlord.c userv-1.0.3-pjb/overlord.c
--- userv-1.0.3.orig/overlord.c 1999-05-20 00:13:54.000000000 +0100
+++ userv-1.0.3-pjb/overlord.c 2016-06-15 19:42:43.110840736 +0100
@@ -25,6 +25,7 @@
#include <errno.h>
#include <string.h>
#include <stdio.h>
+#include <stdlib.h>
#include <assert.h>
#include <fnmatch.h>
#include <sys/wait.h>
@@ -67,7 +68,7 @@
if (time(&now) == -1) { syslog(LOG_ERR,"get current time: %m"); return; }
dir= opendir(".");
if (!dir) { syslog(LOG_ERR,"open directory " VARDIR ": %m"); return; }
- while ((de= readdir(dir))) {
+ while ((errno=0, de= readdir(dir))) {
if (fnmatch(PIPEPATTERN,de->d_name,FNM_PATHNAME|FNM_PERIOD)) continue;
r= lstat(de->d_name,&stab); if (r && errno==ENOENT) continue;
if (r) { syslog(LOG_ERR,"could not stat `" VARDIR "/%s': %m",de->d_name); continue; }
@@ -76,6 +77,7 @@
if (unlink(de->d_name) && errno!=ENOENT)
syslog(LOG_ERR,"could not remove stale pipe `%s': %m",de->d_name);
}
+ if (errno) syslog(LOG_ERR,"read directory " VARDIR ": %m");
if (closedir(dir)) syslog(LOG_ERR,"close directory " VARDIR ": %m");
}
@@ -263,7 +265,8 @@
}
int main(int argc, char *const *argv) {
- int mfd, sfd, nfd, csocklen, e, r, becomedaemon;
+ int mfd, sfd, nfd, e, r, becomedaemon;
+ socklen_t csocklen;
struct sigaction sigact;
struct sockaddr_un ssockname, csockname;
pid_t child, parentpid, sid;
diff -wur userv-1.0.3.orig/parser.c userv-1.0.3-pjb/parser.c
--- userv-1.0.3.orig/parser.c 2003-11-01 01:02:14.000000000 +0000
+++ userv-1.0.3-pjb/parser.c 2016-06-15 20:01:15.346102683 +0100
@@ -995,7 +995,7 @@
return parseerrprint("unable to open directory `%s': %s",cpget,strerror(errno));
cp= xstrsave(cpget);
cpl= strlen(cp);
- while ((de= readdir(d))) {
+ while ((errno=0, de= readdir(d))) {
tel= strlen(de->d_name);
if (!tel) continue;
p= de->d_name;
@@ -1014,6 +1014,12 @@
goto x_err;
}
}
+ if (errno) {
+ parseerrprint("error reading directory `%s': %s",cp,strerror(errno));
+ closedir(d);
+ free(cp);
+ return tokv_error;
+ }
if (closedir(d)) {
parseerrprint("error closing directory `%s': %s",cp,strerror(errno));
free(cp);
--- End Message ---
--- Begin Message ---
Source: userv
Source-Version: 1.2.0
We believe that the bug you reported is fixed in the latest version of
userv, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Ian Jackson <[email protected]> (supplier of updated userv
package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Mon, 23 Jan 2017 17:17:54 +0000
Source: userv
Binary: userv
Architecture: source
Version: 1.2.0
Distribution: unstable
Urgency: medium
Maintainer: Ian Jackson <[email protected]>
Changed-By: Ian Jackson <[email protected]>
Description:
userv - `user services' - program call across trust boundaries
Closes: 686449 775852 813005 827408 837391
Changes:
userv (1.2.0) unstable; urgency=medium
.
Bugfixes:
* Support `stdin', `stdout' and `stderr' in fd ranges, as promised
by the spec. Closes:#813005.
* Support `range' operator, as promised by the spec. Closes:#686449.
Bug and analysis from Mark Wooding.
* Do not ignore errors from readdir. Closes:#827408 [Peter Benie].
* Correct docs for errors-push, which takes no filename.
Closes:#775852.
* Correct quoting of include-lookup directory. Closes:#837391.
(With new directives to somewhat ease backward-compatibility.)
.
Packaging etc.
* Honour XCFLAGS.
* Use `%option nounput' rather than #define YY_NO_UNPUT.
Patch from Peter Benie.
* Specify #define YY_NO_INPUT, which avoids an unused function warning.
Patch from Peter Benie.
* Update copyright notices.
* Upgrade licence to GPLv3+.
.
Debian packaging:
* Honour dpkg-buildflags.
* Add some newer debian/ droppings to .gitignore.
Checksums-Sha1:
ba193af9134a02e2689a1b7b4d28beda3c57dac2 1191 userv_1.2.0.dsc
f2946fa2581e322f032def6ba5518812f32f3e17 164461 userv_1.2.0.tar.gz
Checksums-Sha256:
3adb798512db846256359819c10c6a6a402691ad2a2634f356c461282d0a9b1f 1191
userv_1.2.0.dsc
f8476af41a36f35e906e5ec7984f2a3f1c5f8eec9ed452f1af60b50f2b578e52 164461
userv_1.2.0.tar.gz
Files:
09f326244b9996a176ee4aff60b2ce95 1191 admin optional userv_1.2.0.dsc
1ad11a3d0bb83abb475f144f03f1da70 164461 admin optional userv_1.2.0.tar.gz
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCAAdFiEEVZrkbC1rbTJl58uh4+M5I0i1DTkFAliGPBQACgkQ4+M5I0i1
DTmLSAf/YX+DrZ/tJGCao0VHTVHA7+EV7vlT3gmHmWRKg16hhF2ZEJyKBYH6wKdJ
BL2RsrcnCsoGMHS6UZBsjmvgpKT2tyyv8cZlrmNxMog/kBeAzoyD8GeAoNGJewQ8
RPSwJEnoWjyZw1LvtXNsI0CV6P+g5gOOgQoKpXwZF3sUuOAFvKkdlozM2778WPg4
Qvq43COm9oLQIshET3UD3pCzmMzCKk+AdRAkfDip0JvN+sSS+TrFXKwfXMOpsB6X
0T8wglQqeO3OGC74aXjl42dKE6rGp16/DmfAFc2/XoPapJit3wvzRHEXBmF29ILL
iE8VKk70YusDv6ZfNxYTPUX30y1MGQ==
=rt0+
-----END PGP SIGNATURE-----
--- End Message ---