summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Bogatov <KAction@debian.org>2018-11-28 04:20:43 +0000
committerDmitry Bogatov <KAction@debian.org>2018-11-28 04:20:43 +0000
commitab58809976a4e24c33b316dd85e311caedc1c7a7 (patch)
treebf4e5e4c3ebe79e190db4cb2424a14bb8bac719e
parent480f4d0190d9eb2cc44502e49749d18658d77270 (diff)
Fix command line parsing of unixserver (Closes: #778630)
-rw-r--r--debian/changelog1
-rw-r--r--debian/patches/fix-getopt-string.patch24
-rw-r--r--debian/patches/series1
3 files changed, 26 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 2115b32..59817e7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,7 @@ ucspi-unix (1.0-1) UNRELEASED; urgency=medium
* Convert `debian/copyright' to dep-5 format
* Record build environment with `dh-buildinfo'
* Simplify rebuilding with diet libc
+ * Fix command line parsing of unixserver (Closes: #778630)
-- Dmitry Bogatov <KAction@debian.org> Wed, 28 Nov 2018 00:50:23 +0000
diff --git a/debian/patches/fix-getopt-string.patch b/debian/patches/fix-getopt-string.patch
new file mode 100644
index 0000000..07410cf
--- /dev/null
+++ b/debian/patches/fix-getopt-string.patch
@@ -0,0 +1,24 @@
+Description: Fix optstring in unixserver.c
+ Both manual page and getopt loop mention '-d' and '-D' command
+ line option, but letters 'd' and 'D' was missing from getopt
+ string, causing `unixserver' to consider `-d' and `-D' options
+ invalid.
+Author: Dmitry Bogatov <KAction@debian.org>
+Bug-Debian: 778630
+Forwarded: yes
+Last-Update: 2018-11-28
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: ucspi-unix/unixserver.c
+===================================================================
+--- ucspi-unix.orig/unixserver.c
++++ ucspi-unix/unixserver.c
+@@ -128,7 +128,7 @@ void parse_options(int argc, char* argv[
+ {
+ int opt;
+ argv0 = argv[0];
+- while((opt = getopt(argc, argv, "qQvc:u:g:Ub:B:m:o:r:Op:")) != EOF) {
++ while((opt = getopt(argc, argv, "dDqQvc:u:g:Ub:B:m:o:r:Op:")) != EOF) {
+ switch(opt) {
+ case 'q': opt_quiet = 1; opt_verbose = 0; break;
+ case 'Q': opt_quiet = 0; break;
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..5df7502
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+fix-getopt-string.patch