<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gocryptfs/internal/syscallcompat, branch v2.5.4</title>
<subtitle>Mirror of gocryptfs source code on Github</subtitle>
<id>http://nuetzlich.net/cgit/gocryptfs/atom?h=v2.5.4</id>
<link rel='self' href='http://nuetzlich.net/cgit/gocryptfs/atom?h=v2.5.4'/>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/'/>
<updated>2025-04-06T09:14:03+00:00</updated>
<entry>
<title>syscallcompat: fix build contraints on thread_credentials_linux_368_arm.go</title>
<updated>2025-04-06T09:14:03+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2025-04-06T09:14:03+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=27abe23de847eff630f6768e7296cf3e6a6322b4'/>
<id>urn:sha1:27abe23de847eff630f6768e7296cf3e6a6322b4</id>
<content type='text'>
This file was only compiled for arm because
(  https://pkg.go.dev/cmd/go#hdr-Build_constraints ):

	If a file's
	name, after stripping the extension and a possible _test suffix,
	matches any of the following patterns:

	*_GOOS
	*_GOARCH
	*_GOOS_GOARCH

	(example: source_windows_amd64.go) where GOOS and GOARCH
	represent any known operating system and architecture values
	respectively, then the file is considered to have an implicit
	build constraint requiring those terms (in addition to any
	explicit constraints in the file).

Error was:

	+ GOOS=linux
	+ GOARCH=386
	+ build
	+ go build -tags without_openssl -o /dev/null
	# github.com/rfjakob/gocryptfs/v2/internal/syscallcompat
	Error: internal/syscallcompat/asuser_linux.go:41:8: undefined: Setregid
	Error: internal/syscallcompat/asuser_linux.go:47:8: undefined: Setreuid
	Error: internal/syscallcompat/thread_credentials_linux.go:29:10: undefined: setgroups
	Error: internal/syscallcompat/thread_credentials_linux.go:36:9: undefined: setgroups
	Error: internal/syscallcompat/thread_credentials_linux.go:49:9: undefined: Setregid
	Error: internal/syscallcompat/thread_credentials_linux.go:57:9: undefined: Setreuid

Rename the file to fix the problem. And add a comment about why this file exists.

Fixes https://github.com/rfjakob/gocryptfs/issues/907
</content>
</entry>
<entry>
<title>syscallcompat: use our own Setgroups/Setregid/Setreuid wrappers</title>
<updated>2025-02-26T20:38:36+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2025-02-26T20:38:36+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=6b1ba5846b17eec710a70cb6c6bf23e3f2024289'/>
<id>urn:sha1:6b1ba5846b17eec710a70cb6c6bf23e3f2024289</id>
<content type='text'>
x/sys v0.1.0 (https://github.com/golang/sys/commit/d0df966e6959f00dc1c74363e537872647352d51)
breaks our usecase. Switch to our own wrappers.

Relates-to: https://github.com/rfjakob/gocryptfs/issues/892
Relates-to: https://github.com/rfjakob/gocryptfs/issues/893
</content>
</entry>
<entry>
<title>syscallcompat: add docs for Setreuid/Setregid/Setgroups</title>
<updated>2025-02-26T20:33:06+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2025-02-26T20:32:53+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=07b1bd7ce810c83ed622885b65dbba3dab0f7fbb'/>
<id>urn:sha1:07b1bd7ce810c83ed622885b65dbba3dab0f7fbb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>syscallcompat: move getSupplementaryGroups to suser_linux.go</title>
<updated>2025-02-26T20:28:07+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2025-02-26T20:28:07+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=a540b0ea1bf5e9742773784600033bcb466e8a04'/>
<id>urn:sha1:a540b0ea1bf5e9742773784600033bcb466e8a04</id>
<content type='text'>
It's only used there, so move it.
</content>
</entry>
<entry>
<title>syscallcompat: rename thread_credentials files to include "linux"</title>
<updated>2025-02-26T20:27:29+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2025-02-26T20:21:57+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=987ced003ec2971797e8969e0cf0a37a751ebc84'/>
<id>urn:sha1:987ced003ec2971797e8969e0cf0a37a751ebc84</id>
<content type='text'>
As with the other files, include "linux" because the code only
builds on linux

renamed:    internal/syscallcompat/thread_credentials.go -&gt; internal/syscallcompat/thread_credentials_linux.go
renamed:    internal/syscallcompat/thread_credentials_368_arm.go -&gt; internal/syscallcompat/thread_credentials_linux_368_arm.go
renamed:    internal/syscallcompat/thread_credentials_other.go -&gt; internal/syscallcompat/thread_credentials_linux_other.go
</content>
</entry>
<entry>
<title>syscallcompat: add asUser for darwin and make OpenatUser and friends shared</title>
<updated>2025-02-26T20:27:29+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2025-02-26T20:12:56+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=22cd9cf174e8a93787b01f6dd7b09247f9642286'/>
<id>urn:sha1:22cd9cf174e8a93787b01f6dd7b09247f9642286</id>
<content type='text'>
</content>
</entry>
<entry>
<title>syscallcompat: move asUser to its own file</title>
<updated>2025-02-26T20:11:56+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2025-02-26T19:55:07+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=49d797effbc0888975c51ac45371d91fc59ea2dc'/>
<id>urn:sha1:49d797effbc0888975c51ac45371d91fc59ea2dc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>syscallcompat: add SetgroupsPanic,SetregidPanic,SetreuidPanic</title>
<updated>2025-02-17T20:30:49+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2025-02-17T20:30:49+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=a245def340de818910acb9e3c845e0381dc313ef'/>
<id>urn:sha1:a245def340de818910acb9e3c845e0381dc313ef</id>
<content type='text'>
Will use those later.
</content>
</entry>
<entry>
<title>syscallcompat: add thread_credentials.go &amp; friends</title>
<updated>2025-02-06T20:59:45+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2025-02-06T20:54:33+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=cd47ab015e5d4a7ecaee747796fb89b7597b4fc1'/>
<id>urn:sha1:cd47ab015e5d4a7ecaee747796fb89b7597b4fc1</id>
<content type='text'>
Private copies of per-thread Setreuid/Setegid/Setgroups.

https://github.com/rfjakob/gocryptfs/issues/893
https://github.com/rfjakob/gocryptfs/issues/892
</content>
</entry>
<entry>
<title>syscallcompat: Openat: always set O_CLOEXEC</title>
<updated>2024-05-17T20:14:55+00:00</updated>
<author>
<name>Jakob Unterwurzacher</name>
</author>
<published>2024-05-17T20:14:55+00:00</published>
<link rel='alternate' type='text/html' href='http://nuetzlich.net/cgit/gocryptfs/commit/?id=da873087dd7bcc54d96748a1f6e4e8ecf9e265e5'/>
<id>urn:sha1:da873087dd7bcc54d96748a1f6e4e8ecf9e265e5</id>
<content type='text'>
Let's not leak fds to logger.

Before:

	$ lsof -p $(pgrep logger)
	COMMAND    PID  USER   FD   TYPE             DEVICE  SIZE/OFF    NODE NAME
	logger  146410 jakob  cwd    DIR              253,0      4096       2 /
	logger  146410 jakob  rtd    DIR              253,0      4096       2 /
	logger  146410 jakob  txt    REG              253,0     41560 6293858 /usr/bin/logger
	logger  146410 jakob  mem    REG              253,0 229754784 6292695 /usr/lib/locale/locale-archive
	logger  146410 jakob  mem    REG              253,0    186480 6292031 /usr/lib64/libgcc_s-14-20240508.so.1
	logger  146410 jakob  mem    REG              253,0    787128 6294119 /usr/lib64/libzstd.so.1.5.6
	logger  146410 jakob  mem    REG              253,0    211424 6294587 /usr/lib64/liblzma.so.5.4.6
	logger  146410 jakob  mem    REG              253,0    131128 6302636 /usr/lib64/liblz4.so.1.9.4
	logger  146410 jakob  mem    REG              253,0     49184 6302330 /usr/lib64/libcap.so.2.69
	logger  146410 jakob  mem    REG              253,0   2476880 6295299 /usr/lib64/libc.so.6
	logger  146410 jakob  mem    REG              253,0    987256 6292058 /usr/lib64/libsystemd.so.0.38.0
	logger  146410 jakob  mem    REG              253,0    906256 6295295 /usr/lib64/ld-linux-x86-64.so.2
	logger  146410 jakob    0r  FIFO               0,14       0t0  607727 pipe
	logger  146410 jakob    1w   CHR                1,3       0t0       4 /dev/null
	logger  146410 jakob    2w   CHR                1,3       0t0       4 /dev/null
	logger  146410 jakob    3u  unix 0x0000000046d9c96b       0t0  607729 type=DGRAM (CONNECTED)
	logger  146410 jakob   10u   DIR               0,33        80    7758 /tmp/tmp.lbUiEw9P6W/a

After:

	$ lsof -p $(pgrep logger)
	COMMAND    PID  USER   FD   TYPE             DEVICE  SIZE/OFF    NODE NAME
	logger  147982 jakob  cwd    DIR              253,0      4096       2 /
	logger  147982 jakob  rtd    DIR              253,0      4096       2 /
	logger  147982 jakob  txt    REG              253,0     41560 6293858 /usr/bin/logger
	logger  147982 jakob  mem    REG              253,0 229754784 6292695 /usr/lib/locale/locale-archive
	logger  147982 jakob  mem    REG              253,0    186480 6292031 /usr/lib64/libgcc_s-14-20240508.so.1
	logger  147982 jakob  mem    REG              253,0    787128 6294119 /usr/lib64/libzstd.so.1.5.6
	logger  147982 jakob  mem    REG              253,0    211424 6294587 /usr/lib64/liblzma.so.5.4.6
	logger  147982 jakob  mem    REG              253,0    131128 6302636 /usr/lib64/liblz4.so.1.9.4
	logger  147982 jakob  mem    REG              253,0     49184 6302330 /usr/lib64/libcap.so.2.69
	logger  147982 jakob  mem    REG              253,0   2476880 6295299 /usr/lib64/libc.so.6
	logger  147982 jakob  mem    REG              253,0    987256 6292058 /usr/lib64/libsystemd.so.0.38.0
	logger  147982 jakob  mem    REG              253,0    906256 6295295 /usr/lib64/ld-linux-x86-64.so.2
	logger  147982 jakob    0r  FIFO               0,14       0t0  609636 pipe
	logger  147982 jakob    1w   CHR                1,3       0t0       4 /dev/null
	logger  147982 jakob    2w   CHR                1,3       0t0       4 /dev/null
	logger  147982 jakob    3u  unix 0x00000000bc46d033       0t0  610344 type=DGRAM (CONNECTED)

Fixes https://github.com/rfjakob/gocryptfs/issues/846
</content>
</entry>
</feed>
