Re: Request for review: locale aliases support for libc

2000-08-29 Thread Andrey A. Chernov
On Tue, Aug 29, 2000 at 02:01:02PM +0300, Alexey Zelkin wrote: please review and comment By quick looking I found this: 1) strtok() should not be used in libraries, use strsep() instead. 2) There is security hole with LOCALE_ALIASES_PATH env. issetugid() check required. 3) The same

Re: Request for review: locale aliases support for libc

2000-08-29 Thread Andrey A. Chernov
On Tue, Aug 29, 2000 at 03:19:00PM +0400, Andrey A. Chernov wrote: By quick looking I found this: 1) strtok() should not be used in libraries, use strsep() instead. 2) There is security hole with LOCALE_ALIASES_PATH env. issetugid() check required. 3) The same functionality should be

Re: Request for review: locale aliases support for libc

2000-08-29 Thread Alexey Zelkin
hi, I have updated patchset. libc/nls part is comming soon. * Synchronize behaviours for LOCALE_ALIASES_PATH and LOCALE_PATH handling. If attempt to open customized locale.aliases (declared by env variable LOCALE_ALIASES_PATH) is failed -- don't try to use default system locale.aliases

Re: Request for review: locale aliases support for libc

2000-08-29 Thread Andrey A. Chernov
On Tue, Aug 29, 2000 at 05:26:51PM +0300, Alexey Zelkin wrote: I have updated patchset. libc/nls part is comming soon. Why you always check LC_CTYPE existance only? It may not exist but other locale parts, f.e. LC_TIME are still valid. It is not required to have LC_CTYPE for locale. You need

Re: Request for review: locale aliases support for libc

2000-08-29 Thread Alexey Zelkin
hi, On Tue, Aug 29, 2000 at 07:00:47PM +0400, Andrey A. Chernov wrote: Why you always check LC_CTYPE existance only? It may not exist but other locale parts, f.e. LC_TIME are still valid. It is not required to have LC_CTYPE for locale. I just randomly selected one of files which is exists

Re: Request for review: locale aliases support for libc

2000-08-29 Thread Konstantin Chuguev
Alexey Zelkin wrote: You need to check LC_* existence corresponding to setlocale() request made. What to check if LC_ALL request is given ? LC_ALL overrides all other LC_* variables. If it is set, there is no need to check anything else. Then you should check all other LC_*, and then

Re: Request for review: locale aliases support for libc

2000-08-29 Thread Konstantin Chuguev
Alexey Zelkin wrote: You need to check LC_* existence corresponding to setlocale() request made. What to check if LC_ALL request is given ? LC_ALL overrides all other LC_* variables. If it is set, there is no need to check anything else. Then you should check all other

Re: Request for review: locale aliases support for libc

2000-08-29 Thread Andrey A. Chernov
On Tue, Aug 29, 2000 at 06:24:49PM +0300, Alexey Zelkin wrote: You need to check LC_* existence corresponding to setlocale() request made. What to check if LC_ALL request is given ? Just repeat the same procedure as regular algorithm gives for LC_ALL processing. -- Andrey A. Chernov

Re: Request for review: locale aliases support for libc

2000-08-29 Thread Alexey Zelkin
hi, On Tue, Aug 29, 2000 at 05:19:56PM +0100, Konstantin Chuguev wrote: Perhaps you should check presence of any of the following files in a locale directory: LC_COLLATE, LC_CTYPE, LC_MESSAGES, LC_MONETARY, LC_TIME, LC_NUMERIC ? :) and proceed if any of them has been found... Sure. I do

Re: Request for review: locale aliases support for libc

2000-08-29 Thread Marcel Moolenaar
Alexey Zelkin wrote: I am trying to realize "is requested locale physicaly present on this system" or it's just an alias. Can you not revert the test: if the locale is present in the alias file, then it obviously is an alias; otherwise it should be present on the system? Just a quick

Re: Request for review: locale aliases support for libc

2000-08-29 Thread Marcel Moolenaar
Marcel Moolenaar wrote: Alexey Zelkin wrote: I am trying to realize "is requested locale physicaly present on this system" or it's just an alias. Can you not revert the test: if the locale is present in the alias file, then it obviously is an alias; otherwise it should be present on