[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Internalization, prompts and passwords

On Thu, 30 Sep 1999, Jani Jaakkola wrote:

> > Obviously, the cleanest way to accomplish what you're looking for would be
> > to internationalize/localize the individual PAM modules, but this would
> > require more effort on the part of module writers (or at least coordination
> > between module writers and those interested in internationalizing them).  I
> > would personally recommend the use of gettext for this.  

> It would probably be a big effort; But I think it's worth it.

So do I, even if my native language /is/ English. ;)

> > One thing to keep in mind is that typically, users have the luxury of
> > setting their locale in their shell environment when they log in.  For the
> > types of services we're talking about here, applications would need to know
> > the locale before login, sometimes even before the user has been identified.
> > This of course means that we'd be establishing a global locale for the
> > system.

> I am mostly talking about authenticating application spesific locale; in
> my application there would be button with texts "English", "Finnish"
> and "Klingon" where the user could select one. So the locale needs not to
> be written down by the system administrator.

That is certainly one way to do it, yes. :)  Looking at the big picture, I
think a policy is still needed for those applications which don't (can't)
give the user an opportunity to select their locale.

> > Was this a hypothetical question, or is this a problem in your nicegetty
> > application?  I would think getty would be flexible enough to get this
> > information as needed.

> I already got around it in nicegetty by using strcmp(question,"Password: ")==0,
> which currently seems to work. However, I would like to have something
> more general (and not so very ugly) like:  
> if (question_type(question)==PROMPT_PASSWORD) answer(password);
> which would work also after someone decides to change password prompt.

Well, to make it more flexible you could use strstr() (where supported), and
have something like: strstr(question, "Password")... Of course, this is more
costly, is still case-sensitive, and could get you into trouble if the
module is, for instance, asking you for a *new* password...

-Steve Langasek
postmodern programmer

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []