1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-09-21 19:31:50 +02:00

52195: cached_username is already metafied when initializing LOGNAME

This commit is contained in:
Bart Schaefer 2023-10-01 13:38:25 -07:00
parent 29644f12e7
commit 0f0ba0539e
2 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,8 @@
2023-10-01 Bart Schaefer <schaefer@zsh.org>
* 52195: Src/params.c: cached_username is already metafied when
initializing LOGNAME
* 52193: Src/init.c, Src/params.c, Src/utils.c: metafy USERNAME
(mostly for Cygwin compatibilty with UTF8 encodings)

View File

@ -850,12 +850,11 @@ createparamtable(void)
setsparam("HOST", ztrdup_metafy(hostnam));
zfree(hostnam, 256);
setsparam("LOGNAME", ztrdup_metafy(
setsparam("LOGNAME",
#ifndef DISABLE_DYNAMIC_NSS
(str = getlogin()) && *str ? str :
(str = getlogin()) && *str ? ztrdup_metafy(str) :
#endif
cached_username
));
ztrdup(cached_username));
#if !defined(HAVE_PUTENV) && !defined(USE_SET_UNSET_ENV)
/* Copy the environment variables we are inheriting to dynamic *