<feed xmlns='http://www.w3.org/2005/Atom'>
<title>fscrypt.git/pam_fscrypt/run_fscrypt.go, branch v0.3.4</title>
<subtitle>Go tool for managing Linux filesystem encryption
</subtitle>
<link rel='alternate' type='text/html' href='https://git.hodgden.net/cgit.cgi/fscrypt.git/'/>
<entry>
<title>Stop using deprecated package io/ioutil</title>
<updated>2022-12-04T22:07:39+00:00</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@google.com</email>
</author>
<published>2022-12-04T21:27:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.hodgden.net/cgit.cgi/fscrypt.git/commit/?id=02875cef9010633b6689cfd1e2ceec9107b756b4'/>
<id>02875cef9010633b6689cfd1e2ceec9107b756b4</id>
<content type='text'>
Since Go 1.16 (which recently became the minimum supported Go version
for this project), the package io/ioutil is deprecated in favor of
equivalent functionality in the io and os packages.  staticcheck warns
about this.  Address all the warnings by switching to the non-deprecated
replacement functions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since Go 1.16 (which recently became the minimum supported Go version
for this project), the package io/ioutil is deprecated in favor of
equivalent functionality in the io and os packages.  staticcheck warns
about this.  Address all the warnings by switching to the non-deprecated
replacement functions.
</pre>
</div>
</content>
</entry>
<entry>
<title>pam_fscrypt: filter out irrelevant policies earlier</title>
<updated>2022-12-04T21:05:00+00:00</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@google.com</email>
</author>
<published>2022-12-03T06:13:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.hodgden.net/cgit.cgi/fscrypt.git/commit/?id=5373b314473b08f13372ab55b551738307a85fbd'/>
<id>5373b314473b08f13372ab55b551738307a85fbd</id>
<content type='text'>
If a session is opened for a user twice and the second doesn't have the
AUTHTOK data, pam_fscrypt prints an error message that says it failed to
unlock a protector because AUTHTOK data is missing.  This is misleading
because the protector and its associated policies were already unlocked
by the first session.

To avoid this, move the check for whether the policy is provisioned or
not into policiesUsingProtector().  Also do the same for CloseSession.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a session is opened for a user twice and the second doesn't have the
AUTHTOK data, pam_fscrypt prints an error message that says it failed to
unlock a protector because AUTHTOK data is missing.  This is misleading
because the protector and its associated policies were already unlocked
by the first session.

To avoid this, move the check for whether the policy is provisioned or
not into policiesUsingProtector().  Also do the same for CloseSession.
</pre>
</div>
</content>
</entry>
<entry>
<title>pam_fscrypt: ignore system users</title>
<updated>2022-02-23T20:35:04+00:00</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@google.com</email>
</author>
<published>2022-02-23T20:35:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.hodgden.net/cgit.cgi/fscrypt.git/commit/?id=97700817e737eabf45033cdb4a42fa5c6e74f877'/>
<id>97700817e737eabf45033cdb4a42fa5c6e74f877</id>
<content type='text'>
pam_fscrypt should never need to do anything for system users, so detect
them early so that we can avoid wasting any resources looking for their
login protector.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pam_fscrypt should never need to do anything for system users, so detect
them early so that we can avoid wasting any resources looking for their
login protector.
</pre>
</div>
</content>
</entry>
<entry>
<title>pam_fscrypt: log errors getting protector in policiesUsingProtector()</title>
<updated>2022-02-23T20:35:04+00:00</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@google.com</email>
</author>
<published>2022-02-23T20:35:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.hodgden.net/cgit.cgi/fscrypt.git/commit/?id=9871a39409222a80b4c4c22cbaab17bae84f1712'/>
<id>9871a39409222a80b4c4c22cbaab17bae84f1712</id>
<content type='text'>
If the error is anything other than ErrNotSetup, it might be helpful to
know what is going on.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the error is anything other than ErrNotSetup, it might be helpful to
know what is going on.
</pre>
</div>
</content>
</entry>
<entry>
<title>Strictly validate metadata file ownership by default</title>
<updated>2022-02-23T20:35:04+00:00</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@google.com</email>
</author>
<published>2022-02-23T20:35:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.hodgden.net/cgit.cgi/fscrypt.git/commit/?id=74e870b7bd1585b4b509da47e0e75db66336e576'/>
<id>74e870b7bd1585b4b509da47e0e75db66336e576</id>
<content type='text'>
The metadata validation checks introduced by the previous commits are
good, but to reduce the attack surface it would be much better to avoid
reading and parsing files owned by other users in the first place.

There are some possible use cases for users sharing fscrypt metadata
files, but I think that for the vast majority of users it is unneeded
and just opens up attack surface.  Thus, make fscrypt (and pam_fscrypt)
not process policies or protectors owned by other users by default.
Specifically,

   * If fscrypt or pam_fscrypt is running as a non-root user, only
     policies and protectors owned by the user or by root can be used.

   * If fscrypt is running as root, any policy or protector can be used.
     (This is to match user expectations -- starting a sudo session
     should gain rights, not remove rights.)

   * If pam_fscrypt is running as root, only policies and protectors
     owned by root can be used.  Note that this only applies when the
     root user themselves has an fscrypt login protector, which is rare.

Add an option 'allow_cross_user_metadata' to /etc/fscrypt.conf which
allows restoring the old behavior for anyone who really needs it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The metadata validation checks introduced by the previous commits are
good, but to reduce the attack surface it would be much better to avoid
reading and parsing files owned by other users in the first place.

There are some possible use cases for users sharing fscrypt metadata
files, but I think that for the vast majority of users it is unneeded
and just opens up attack surface.  Thus, make fscrypt (and pam_fscrypt)
not process policies or protectors owned by other users by default.
Specifically,

   * If fscrypt or pam_fscrypt is running as a non-root user, only
     policies and protectors owned by the user or by root can be used.

   * If fscrypt is running as root, any policy or protector can be used.
     (This is to match user expectations -- starting a sudo session
     should gain rights, not remove rights.)

   * If pam_fscrypt is running as root, only policies and protectors
     owned by root can be used.  Note that this only applies when the
     root user themselves has an fscrypt login protector, which is rare.

Add an option 'allow_cross_user_metadata' to /etc/fscrypt.conf which
allows restoring the old behavior for anyone who really needs it.
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd/fscrypt: add FSCRYPT_ROOT_MNT environmental variable</title>
<updated>2020-05-09T21:04:47+00:00</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@google.com</email>
</author>
<published>2020-05-09T21:04:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.hodgden.net/cgit.cgi/fscrypt.git/commit/?id=8ff53630f1cc90ae23835e9571f9096e211dce67'/>
<id>8ff53630f1cc90ae23835e9571f9096e211dce67</id>
<content type='text'>
Allow overriding the mountpoint where login protectors are stored by
setting the FSCRYPT_ROOT_MNT environmental variable.  The CLI tests need
this to avoid touching the real "/".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allow overriding the mountpoint where login protectors are stored by
setting the FSCRYPT_ROOT_MNT environmental variable.  The CLI tests need
this to avoid touching the real "/".
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix various typos and grammatical errors (#141)</title>
<updated>2019-09-09T02:46:59+00:00</updated>
<author>
<name>ebiggers</name>
<email>ebiggers@google.com</email>
</author>
<published>2019-09-09T02:46:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.hodgden.net/cgit.cgi/fscrypt.git/commit/?id=6445dad7d66fa6a1867090fcd9602c98863649f6'/>
<id>6445dad7d66fa6a1867090fcd9602c98863649f6</id>
<content type='text'>
These were found by a combination of manual review and a custom script
that checks for common errors.

Also removed an outdated sentence from the comment for setupBefore().</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These were found by a combination of manual review and a custom script
that checks for common errors.

Also removed an outdated sentence from the comment for setupBefore().</pre>
</div>
</content>
</entry>
<entry>
<title>Improve debug and error output for pam_fscrypt</title>
<updated>2018-08-23T18:00:34+00:00</updated>
<author>
<name>Joe Richey joerichey@google.com</name>
<email>joerichey@google.com</email>
</author>
<published>2018-08-22T12:28:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.hodgden.net/cgit.cgi/fscrypt.git/commit/?id=11b09739cbcb25e6602267efe3d48eb063233f5a'/>
<id>11b09739cbcb25e6602267efe3d48eb063233f5a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>vet: eliminate unnecessary shadowing</title>
<updated>2018-02-12T07:56:49+00:00</updated>
<author>
<name>Joseph Richey</name>
<email>joerichey94@gmail.com</email>
</author>
<published>2018-02-12T07:56:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.hodgden.net/cgit.cgi/fscrypt.git/commit/?id=69630f37fcebe894b15872148bd8b2496806b60c'/>
<id>69630f37fcebe894b15872148bd8b2496806b60c</id>
<content type='text'>
Running "go vet -shadow ./..." finds all places where a variable might
be incorrectly or unnecessarily shadowed. This fixes some of them.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Running "go vet -shadow ./..." finds all places where a variable might
be incorrectly or unnecessarily shadowed. This fixes some of them.
</pre>
</div>
</content>
</entry>
<entry>
<title>pam_fscrypt: PAM module no longer crashes on panic</title>
<updated>2017-09-01T07:47:34+00:00</updated>
<author>
<name>Joseph Richey</name>
<email>joerichey94@gmail.com</email>
</author>
<published>2017-09-01T07:47:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.hodgden.net/cgit.cgi/fscrypt.git/commit/?id=3432f5757293dda39b9fa936a717160cd788ab68'/>
<id>3432f5757293dda39b9fa936a717160cd788ab68</id>
<content type='text'>
Now the offending panic will just be logged and the module will fail.
This is important as to not crash the login process.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now the offending panic will just be logged and the module will fail.
This is important as to not crash the login process.
</pre>
</div>
</content>
</entry>
</feed>
