fd85f7ccb6d0d60bd693f4699d021caba3d4e5b2
If parse_plist_config() is called with a non-absolute path which
is defined as a path whose first character is not '/', then
CFReadStreamCreateWithFile() must determine the current working
directory in order to return a CFURLRef to an absolute path.
If getcwd() fails, then CFReadStreamCreateWithFile() returns
NULL.
Instead of unconditionally returning ENOMEM when NULL is returned,
check if the path is non-absolute and call getcwd(). If getcwd()
fails, return errno. Otherwise, return ENOMEM. This permits
ENOENT (a component of the pathname no longer exists) or EACCES
(read or search permission was denied for a component of the
pathname) to be returned as the reason.
ENOMEM is a fatal error when constructing the configuration for
krb5_init_context() whereas ENOENT and EACCES are not fatal.
Without this patch on macOS, if the cwd is in /afs and the user's
tokens have expired, then krb5_init_context() fails with ENOMEM (12).
user@MacBookAir user % ~/src/heimdal/kuser/heimtools klist
shell-init: error retrieving current directory: \
getcwd: cannot access parent directories: Permission denied
chdir: error retrieving current directory: \
getcwd: cannot access parent directories: Permission denied
heimtools: krb5_init_context failed: 12
With this change krb5_init_context() succeeds.
Heimdal
Heimdal is an implementation of:
- ASN.1/DER,
- PKIX, and
- Kerberos.
For information how to install see here.
There are man pages for most of the commands.
Bug reports and bugs are appreciated. Use GitHub issues.
For more information see the project homepage https://heimdal.software/heimdal/ or the mailing lists:
heimdal-announce@heimdal.software low-volume announcement heimdal-discuss@heimdal.software high-volume discussion
send mail to heimdal-announce-subscribe@heimdal.software and heimdal-discuss-subscribe@heimdal.software respectively to subscribe.
Build Status
Description
Languages
C
91.5%
Roff
3.2%
Shell
2.8%
Makefile
0.6%
M4
0.6%
Other
1.1%