Bug#923551: dmarc-cat: fails when filename contains unique-id (and returns 0)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Bug#923551: dmarc-cat: fails when filename contains unique-id (and returns 0)

Daniel Kahn Gillmor-3
Package: dmarc-cat
Version: 0.9.2-1
Severity: normal

https://tools.ietf.org/html/rfc7489#section- says:

     filename = receiver "!" policy-domain "!" begin-timestamp
                "!" end-timestamp [ "!" unique-id ] "." extension

     unique-id = 1*(ALPHA / DIGIT)


0 dkg@alice:~/tmp$ ls -l 'fastmail.com!fifthhorseman.net!1551312000!1551398399!189898144.xml.gz'
-rw------- 1 dkg dkg 559 Mar  1 15:02 'fastmail.com!fifthhorseman.net!1551312000!1551398399!189898144.xml.gz'
0 dkg@alice:~/tmp$ dmarc-cat 'fastmail.com!fifthhorseman.net!1551312000!1551398399!189898144.xml.gz'
2019/03/01 15:10:02 error handling fastmail.com!fifthhorseman.net!1551312000!1551398399!189898144.xml.gz: bad filename
0 dkg@alice:~/tmp$

It seems to work fine if the unique-id part of the filename isn't

Additionally, i note that while dmarc-cat fails, the process as a
whole returns 0 (the first part of PS1 for me is $?).  This seems
problematic to me, as i'd expect a failing process to return a
non-zero error code.


-- System Information:
Debian Release: buster/sid
  APT prefers testing-debug
  APT policy: (500, 'testing-debug'), (500, 'testing'), (200, 'unstable-debug'), (200, 'unstable'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-2-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages dmarc-cat depends on:
ii  libassuan0     2.5.2-1
ii  libc6          2.28-7
ii  libgpg-error0  1.35-1
ii  libgpgme11     1.12.0-6

dmarc-cat recommends no packages.

dmarc-cat suggests no packages.

-- no debconf information