[OpenAFS] check in c (linux) whether a directory entry is a mount point for an AFS volume

Jeffrey Altman jaltman@secure-endpoints.com
Sat, 4 Aug 2018 20:43:36 -0400


This is a cryptographically signed message in MIME format.

--------------ms000301020708000306060802
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

On 8/4/2018 8:30 PM, Ken Hornstein wrote:
>> I'm not sure that the application will have the ability to stat the
>> mount point object.  The OpenAFS cache manager will always provide the=

>> details of the target volume root directory unless the target volume
>> cannot be located or accessed.
>=20
> I can only say that this technique has worked for several decades and
> still seems to work today.
>=20
> --Ken

that would be an odd inconsistency in behavior between "fs examine" and
stat().




--------------ms000301020708000306060802
Content-Type: application/pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgEFADCABgkqhkiG9w0BBwEAAKCC
DJowggYBMIIE6aADAgECAhBAAV7gKbDFpPivxsU6EhRkMA0GCSqGSIb3DQEBCwUAMDoxCzAJ
BgNVBAYTAlVTMRIwEAYDVQQKEwlJZGVuVHJ1c3QxFzAVBgNVBAMTDlRydXN0SUQgQ0EgQTEy
MB4XDTE3MTAwMzAyNTYyMloXDTE4MTEwMzAyNTYyMlowgZUxNTAzBgNVBAsMLFZlcmlmaWVk
IEVtYWlsOiBqYWx0bWFuQHNlY3VyZS1lbmRwb2ludHMuY29tMSswKQYJKoZIhvcNAQkBFhxq
YWx0bWFuQHNlY3VyZS1lbmRwb2ludHMuY29tMS8wLQYKCZImiZPyLGQBARMfQTAxNDI3RDAw
MDAwMTVFRTAyOUIwOTIwMDAwNEE5NzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
ALpgG/C51O3zapzhIdBOsKH0PmK2nqGhbOFzCiwwqURDwbET4ILOdU3Uc155z1fkkDt6/MQJ
3969umj/0F6cuT5KdtvOQH6eikKFxNi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