Conversation
|
Hey! undefined has not signed the Canonical CLA which is required to get this contribution merged on this project.
Please head over to https://ubuntu.com/legal/contributors to read more about it. |
|
What problem is this PR solving? Should the PAM conversation not inherit the system locale? |
|
Wow, I applied this patch and it really solved the problem of lightdm not showing the PAM messages in the correct locale. Canonical should merge this ... |
Pam modules not inherit system locale. Pam application should set it explicitly. Actually applications don't use system locale on startup. If you don't call
System and parent's process locale don't matter cat > main.c << EOF
#include <stdio.h>
#include <libintl.h>
#include <locale.h>
#include <stdlib.h>
int main() {
printf("%s\n", dgettext("Linux-PAM", "Password: "));
setlocale(LC_ALL, "");
printf("%s\n", dgettext("Linux-PAM", "Password: "));
system("./main2");
}
EOF
cat > main2.c << EOF
#include <stdio.h>
#include <libintl.h>
#include <locale.h>
int main() {
printf("%s\n", dgettext("Linux-PAM", "Password: "));
}
EOF
gcc main.c -o main
gcc main2.c -o main2
LANG=ru_RU.UTF-8 ./mainMy output is: So, this change really helps. I think PR's author abandoned it. If you have no time to support it, I could |
pam message with error language env.