Re: systemd CAP_DAC_READ_SEARCH

Andreas Fett <[email protected]>
Newsgroups gmane.user-groups.linux.dresden
Message-ID <[email protected]>
Hi,

On Wed, Jun 28, 2023 at 10:02:37PM +0200, Christian Perle wrote:
> nach ein paar Bier und etwas Rumpro"bier"en hat sich folgendes
> rausgestellt:
> 
> Obwohl der Splunk-Prozess die korrekte Capability in den entsprechenden
> Sets hat, gibt es den Fehler, weil er *vor* dem eigentlich open()
> auf die Datei ein access() respektive faccessat() darauf loslaesst.
nice work... ich vermute da war neben Bier auch strace involviert :-)

> Die Capability CAP_DAC_READ_SEARCH erlaubt zwar open()/openat()
> auf eine sonst nicht lesbare Datei, aber die access()-Familie liefert
> einen Fehler. Ob das jetzt inkonsistentes Verhalten des Kernels
> ist, sei mal dahingestellt.
Ich finde dieses access()/open() Pattern im userspace ist generell
kaputt. Das ist ja eh immer anfällig für race conditions.

Grüsse
Andreas
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEJ6Jq1qpfVQ9CLff4NMc/tuPtDEAFAmScl/QACgkQNMc/tuPt
DEDLEw//XmbE/hOmeWfRF+N5S2fhAOrejkE5KyXDMu9ITHDPH019m6+3nRBZ/ynb
bST6d1JrUw1Zl5cV6C762SGdYJDPPFcshX/BbtvDFGlWncsB9rdPR1n2WVO4wkyG
fhXxRIENMNdG5BFgLZbenBjj+djBq1S4HvzTCrhJjTmEMBO29CD2o+IWfLZ2c9Wa
SShU8UcKzGp1TFjg9floRCehCdA2b/btJQK1bKJClBqzgTEKdPW62rgQO8TDqT8Q
vjTZvLcfNw4EI6x2MTBAwVbpDVZg+F0FFtzuTAkbF9D2Rku5fo7ljz+fkYkwAwp3
qPC/NMKqpIRmOqZ7TvSW7zcXCkbldFjtDOS25Sl6X3jObQnjR46Xz3IlK2vkXqtE
CQllv8eP323E1CkmdvkPwyYzxdP3nHdfo8zWQV5upTg3+N/70Co/oXW+cpgzbgNM
tWzt2xaKX84xaEzJtx0Al25/PLy2AhREJSM/VcUnDIHAsLHlH0ydMxCeW7pVVmci
1qWBe18GFXyr9lMQsB42mI+shuAruOHvO+4MPmIJwjeg9sROIGHWtoA/GICBdSIO
60KJFs6kuLjrLKV2x9PjB7CAmj2FpvFbviVAS/tgVKaUhTZv028/+2qNd5DzPaXp
WPRWKKRfdwEiYlWtOPLBRTQ/qe45oob9ED0RqUrIRwy4f9Pmq7o=
=J9wV
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.