mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-28 05:00:59 +01:00
22284: add --disable-dynamic-nss configure switch to disable use of getpw*(), getgr*(), initgroups() functions.
This commit is contained in:
parent
930c18ee44
commit
a915138852
8 changed files with 62 additions and 13 deletions
|
|
@ -628,7 +628,7 @@ init_term(void)
|
|||
void
|
||||
setupvals(void)
|
||||
{
|
||||
#ifdef HAVE_GETPWUID
|
||||
#ifdef USE_GETPWUID
|
||||
struct passwd *pswd;
|
||||
#endif
|
||||
struct timezone dummy_tz;
|
||||
|
|
@ -796,14 +796,14 @@ setupvals(void)
|
|||
cached_uid = getuid();
|
||||
|
||||
/* Get password entry and set info for `USERNAME' */
|
||||
#ifdef HAVE_GETPWUID
|
||||
#ifdef USE_GETPWUID
|
||||
if ((pswd = getpwuid(cached_uid))) {
|
||||
if (emulation == EMULATE_ZSH)
|
||||
home = metafy(pswd->pw_dir, -1, META_DUP);
|
||||
cached_username = ztrdup(pswd->pw_name);
|
||||
}
|
||||
else
|
||||
#endif /* HAVE_GETPWUID */
|
||||
#endif /* USE_GETPWUID */
|
||||
{
|
||||
if (emulation == EMULATE_ZSH)
|
||||
home = ztrdup("/");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue