Bug #197
closedsvc.startd may not pick up locale correctly
0%
Description
While investigating on #168, we came across svc.startd code which also has potential issues with setting the locale.
local field in the struct startd_state might not default to "C" set if environment variables do not have valid information. The issue that we found in svcs is also present in startd and this can be a problem based on how startd uses st_locale field in the struct startd_state.
<snip>
628 if (st->st_locale != NULL)
629 free(st->st_locale);
630
631 if ((st->st_locale = getenv("LC_ALL")) NULL)
632 if ((st->st_locale = getenv("LC_MESSAGES")) NULL)
633 st->st_locale = getenv("LANG");
634
635 if (!st->st_log_locale_known && stat(FS_LOCALE_DIR, &sb) == 0) {
636 (void) setlocale(LC_ALL, "");
637 st->st_locale = setlocale(LC_MESSAGES, "");
638 if (st->st_locale)
639 st->st_log_locale_known = 1;
640
641 (void) textdomain(TEXT_DOMAIN);
642 }
<snip>
Needs to fix this..
Updated by Albert Lee over 12 years ago
- Category set to cmd - userland programs
- Status changed from New to Resolved
Resolved in 13339:287b9c4687e8.