[kleopatra] [Bug 479567] gpgtar broken pipe

Andreas Hartmann bugzilla_noreply at kde.org
Fri Oct 11 05:10:00 BST 2024


https://bugs.kde.org/show_bug.cgi?id=479567

Andreas Hartmann <andihartmann at freenet.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andihartmann at freenet.de

--- Comment #1 from Andreas Hartmann <andihartmann at freenet.de> ---
Hi,
I am experiencing the same problem here (version 3.1.28.230805 using X11) and
tracked it down. Problem is the call to gpgtar, which is generated by kleopatra
to build the tar.gpg file. It is just broken:

gpgtar --batch --status-fd 23 --gpg-args --no-tty --gpg-args --charset=utf8
--gpg-args --enable-progress-filter --gpg-args --exit-on-status-write-error
--gpg-args --display=:0 --gpg-args --ttyname=kein Terminal --gpg-args
--ttytype=xterm --encrypt --sign --gpg-args --always-trust -r .... -u ...
--output /tmp/test.tar.gpg --directory /tmp --files-from - --null
--utf8-strings

The culprit is the option --gpg-args --ttyname=kein Terminal
kein and Terminal are separated - but they must be one part. Maybe a problem of
the translation - don't know what name is used in English for the option
--ttyname.

I "fixed" it by adding an own gpgtar file, which repairs the broken call before
it is passed to gpgtar:

#!/bin/sh
tmp=`echo "$@" | sed -e "s/ --gpg-args --ttyname=kein Terminal//" -e "s/
--gpg-args --ttytype=xterm//"`
exec /usr/bin/gpgtar.bin $tmp

But there are many more problems:
- If you encrypt a tar.gpg file, the timestamps of all encrypted files are
lost. They all have the actual timestamp. An error which has been fixed some
time ago and now is there again.
- The directory structure is broken through decrypt. A given directory
structure in tar of /1/2 is decrypted to /1/1/2
- Filenames seam to be interpreted during decryption. Therefore, some filenames
can't be written to disk, because it's data garbage.

gpgtar: [?]: invalid octal number encountered - assuming 0
gpgtar: [?]: invalid octal number encountered - assuming 0
gpgtar: [?]: invalid octal number encountered - assuming 0
gpgtar: [?]: invalid octal number encountered - assuming 0
gpgtar: [?]: invalid octal number encountered - assuming 0
gpgtar: [?]: invalid octal number encountered - assuming 0
gpgtar: [?]: invalid octal number encountered - assuming 0
gpgtar: [?]: invalid octal number encountered - assuming 0
gpgtar: [?]: invalid octal number encountered - assuming 0
gpgtar: [?]: warning: name not terminated by a nul
gpgtar: [?]: invalid octal number encountered - assuming 0
gpgtar: [?]: invalid octal number encountered - assuming 0
gpgtar: [?]: header block 2 is corrupt (size=0 type=10 nrec=0)
gpgtar: error creating
'/raid/daten3/Transfer/Grafik/Sync/kleopatra-BRGyuw/Vattenfall/%PDF-1.7\n%����\n3
0 obj\n<</Length 2 0 R/Filter/FlateDecode/N 3/Range[0 1 0 1 0 1
]>>\nstream\nx���wTS�\x16': Datei oder Verzeichnis nicht gefunden
gpg: error writing to '-': Datenübergabe unterbrochen (broken pipe)
gpg: handle plaintext failed: Datenübergabe unterbrochen (broken pipe)

Filenames leading to the above error are:
Arc_S_AUSWILL12226500100000DP20025020160103sapi2pci_I2P_401708914001236_3_Q1e6-1146.pdf.pdf
Arc_S_BLANK12226500100000DP20025020160103sapi2pci_I2P_401690808701147_Q4zk-20.pdf
Arc_S_BLANK12226500100000DP20025020160103sapi2pci_I2P_401721227200945_Q1-1180.pdf.pdf
Arc_ZVFE_JS_EZE01K650011251005222DP20024620160103sapi2pci_I2P_401723144142381_Q3m-352.pdf.pdf
Arc_ZVFE_JS_VBESTK650011251005222DP20024620160103sapi2pci_I2P_401704151142473_4_Q33k-432.pdf

The encrypt path seams to be working - I couldn't see any problem there so far.
kggpg can be always used to decrypt the tar.gpg files. It doesn't show the
above described errors.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Kdepim-bugs mailing list