Project

General

Profile

Actions

Bug #197

closed

svc.startd may not pick up locale correctly

Added by Vineeth Pillai about 13 years ago. Updated over 12 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
2010-09-13
Due date:
% Done:

0%

Estimated time:
Difficulty:
Tags:
Gerrit CR:
External Bug:

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..

Actions #1

Updated by sham pavman over 12 years ago

  • Assignee set to sham pavman
Actions #2

Updated by Albert Lee over 12 years ago

  • Category set to cmd - userland programs
  • Status changed from New to Resolved

Resolved in 13339:287b9c4687e8.

Actions

Also available in: Atom PDF