<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gocryptfs/internal/tlog, branch v2.3.2</title>
<subtitle>Mirror of gocryptfs source code on Github</subtitle>
<id>http://nuetzlich.net/cgit/gocryptfs/atom?h=v2.3.2</id>
<link rel='self' href='http://nuetzlich.net/cgit/gocryptfs/atom?h=v2.3.2'/>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/'/>
<updated>2021-12-11T14:37:13+00:00</updated>
<entry>
<title>tlog: only enable color if both stderr and stdout are a terminal</title>
<updated>2021-12-11T14:37:13+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2021-12-11T14:37:13+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=eb42e541828336e9b19e1bc5e087a419835b0c85'/>
<id>urn:sha1:eb42e541828336e9b19e1bc5e087a419835b0c85</id>
<content type='text'>
This

    gocryptfs -init /does/not/exist 2&gt; err.log

used to write escape codes into err.log. Stop doing that.
</content>
</entry>
<entry>
<title>tlog: respect NO_COLOR</title>
<updated>2021-12-11T14:35:01+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2021-12-11T14:35:01+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=a1f01419e2e6e5d637ec7afa31c0a1d95e0ea923'/>
<id>urn:sha1:a1f01419e2e6e5d637ec7afa31c0a1d95e0ea923</id>
<content type='text'>
Fixes https://github.com/rfjakob/gocryptfs/issues/617
</content>
</entry>
<entry>
<title>tlog: switch from golang.org/x/crypto/ssh/terminal to golang.org/x/term</title>
<updated>2021-08-19T05:38:56+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2021-08-19T05:38:56+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=2a25c3a8fda1f0918fd76687561b1a9c615298b9'/>
<id>urn:sha1:2a25c3a8fda1f0918fd76687561b1a9c615298b9</id>
<content type='text'>
$ golangci-lint run

internal/tlog/log.go:13:2: SA1019: package golang.org/x/crypto/ssh/terminal is deprecated: this package moved to golang.org/x/term. (staticcheck)
	"golang.org/x/crypto/ssh/terminal"
</content>
</entry>
<entry>
<title>fsck: redirect go-fuse noise to syslog</title>
<updated>2021-05-18T16:38:23+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2021-05-18T16:38:23+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=0650a512bbf5a49031d47afac538a92e0994757a'/>
<id>urn:sha1:0650a512bbf5a49031d47afac538a92e0994757a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tlog: disable color codes when switching to syslog</title>
<updated>2018-10-17T20:34:30+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2018-10-17T20:32:48+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=1ed08c7384c25fbe6fdaa0c0e70f32adf5a49892'/>
<id>urn:sha1:1ed08c7384c25fbe6fdaa0c0e70f32adf5a49892</id>
<content type='text'>
When gocryptfs was started on a terminal and later
daemonized, the color codes stayed active in the syslog
output.

The codes are not visible in "journalctl -f", which is why
I have not noticed it yet, but they do show up in normal
syslog as the usual "#033[33m" crap.
</content>
</entry>
<entry>
<title>tlog: always trim trailing newlines</title>
<updated>2018-09-23T09:28:49+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2018-09-23T09:11:01+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=2d01d5f2d4bb1fc9c7a7bb9165edcef42d4f89c6'/>
<id>urn:sha1:2d01d5f2d4bb1fc9c7a7bb9165edcef42d4f89c6</id>
<content type='text'>
The messages we print through tlog sometimes do, sometimes do
not contain a trailing newline. The stdlib logger usually drops
trailing newlines automatically, but tlog postfixes ColorReset to
the caller's message, so the logger logic does not work when we
print colored output.

Drop the newlines on our own, and add a test.

Fixes the blank lines in fsck output:

~/go/src/github.com/rfjakob/gocryptfs/tests/fsck$ ./run_fsck.bash
Reading password from extpass program
Decrypting master key
OpenDir "": invalid entry "invalid_file_name.3": illegal base64 data at input byte 17
OpenDir "": invalid entry "invalid_file_name_2": bad message
fsck: corrupt entry in dir "": "invalid_file_name.3"
fsck: corrupt entry in dir "": "invalid_file_name_2"
OpenDir "": invalid entry "invalid_file_name____1": bad message
fsck: corrupt entry in dir "": "invalid_file_name____1"
doRead 4327225: corrupt block #0: stupidgcm: message authentication failed
fsck: error reading file "corrupt_file" (inum 4327225): 5=input/output error
cipherSize 40 &lt; overhead 50: corrupt file

doRead 4327074: corrupt header: ParseHeader: invalid version, want=2 have=22616
cipherSize 40 &lt; overhead 50: corrupt file

fsck: error reading file "corrupt_file_2" (inum 4327074): 5=input/output error
Readlink "s-P7PcQDUcVkoeMDnC3EYA": decrypting target failed: stupidgcm: message authentication failed
fsck: error reading symlink "corrupt_symlink": 5=input/output error
Readlink "iI0MtUdzELPeOAZYwYZFee169hpGgd3l2PXQBcc9sl4": decrypting target failed: illegal base64 data at input byte 0
fsck: error reading symlink "corrupt_symlink_2": 5=input/output error
OpenDir "yrwcjj2qoC4IYvhw9sbfRg": could not read gocryptfs.diriv: wanted 16 bytes, got 17
fsck: error opening dir "diriv_too_long": 5=input/output error
OpenDir "trqecbMNXdzLqzpk7fSfKw": could not read gocryptfs.diriv: wanted 16 bytes, got 3
fsck: error opening dir "diriv_too_short": 5=input/output error
cipherSize 8 &lt; header size 18: corrupt file

readFileID 4327049: incomplete file, got 8 instead of 19 bytes
fsck: corrupt file "incomplete_file_1" (inode 4327049)
readFileID 4327038: incomplete file, got 18 instead of 19 bytes
fsck: corrupt file "incomplete_file_2" (inode 4327038)
cipherSize 1 &lt; header size 18: corrupt file

readFileID 4327063: incomplete file, got 1 instead of 19 bytes
fsck: corrupt file "incomplete_file_3" (inode 4327063)
fsck: error opening dir "missing_diriv": 2=no such file or directory
ListXAttr: invalid xattr name "user.gocryptfs.0a5e7yWl0SGUGeWB0Sy2K0": bad message
fsck: corrupt xattr name on file "xattr_corrupt_name": "user.gocryptfs.0a5e7yWl0SGUGeWB0Sy2K0"
GetXAttr: stupidgcm: message authentication failed
fsck: error reading xattr "user.foo" from "xattr_corrupt_value": 5=input/output error
fsck summary: 15 corrupt files
</content>
</entry>
<entry>
<title>Only print masterkey once on -init</title>
<updated>2018-07-01T18:56:22+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2018-06-26T18:44:10+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=6d64dfe8f7acd8e9ca4a659d26318e442c2db85a'/>
<id>urn:sha1:6d64dfe8f7acd8e9ca4a659d26318e442c2db85a</id>
<content type='text'>
It is no longer printed at all when mounting a filesystem,
printing on -init can be disabled with -q.

https://github.com/rfjakob/gocryptfs/issues/76
</content>
</entry>
<entry>
<title>fsck: clean up log output</title>
<updated>2018-04-02T16:32:30+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2018-04-02T16:32:30+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=b6c8960b01f9e5366814b0dada57a0b1e6a031d9'/>
<id>urn:sha1:b6c8960b01f9e5366814b0dada57a0b1e6a031d9</id>
<content type='text'>
Make sure we get only 1 warning output per
problem.

Also, add new corruption types to broken_fs_v1.4.
</content>
</entry>
<entry>
<title>tlog: stop embedding log.Logger to prevent mistakes</title>
<updated>2018-02-28T08:02:18+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2018-02-28T08:02:18+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=b96e3ee2717531e842c492c3a6799d1d0c3e51cb'/>
<id>urn:sha1:b96e3ee2717531e842c492c3a6799d1d0c3e51cb</id>
<content type='text'>
A few places have called tlog.Warn.Print, which directly
calls into log.Logger due to embedding, losing all features
of tlog.

Stop embedding log.Logger to make sure the internal functions
cannot be called accidentially and fix (several!) instances
that did.
</content>
</entry>
<entry>
<title>Drop Go 1.4 compatability code everywhere</title>
<updated>2017-03-05T16:44:14+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2017-03-05T16:44:14+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=966308eeb7793a4a8ca578e160981e3b059b82e6'/>
<id>urn:sha1:966308eeb7793a4a8ca578e160981e3b059b82e6</id>
<content type='text'>
Yields a nice reduction in code size.
</content>
</entry>
</feed>
