The Samba-Bugzilla – Attachment 2972 Details for
Bug 5082
Samba should use C locale for locale-invariant PAM password chats
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to always invoke password changes in C locale
chgpasswd.patch (text/plain), 1.35 KB, created by
Steve Langasek
on 2007-11-14 14:44:49 UTC
(
hide
)
Description:
patch to always invoke password changes in C locale
Filename:
MIME Type:
Creator:
Steve Langasek
Created:
2007-11-14 14:44:49 UTC
Size:
1.35 KB
patch
obsolete
>Goal: Recent versions of Linux-PAM support localization of user prompts, >so Samba must use the C locale when invoking PAM (directly or via >/usr/bin/passwd) to ensure that password chat values match the prompts in a >locale-invariant fashion. > >Authors: Mathias Gug <mathiaz@ubuntu.com>, > Steve Langasek <vorlon@debian.org> > >Upstream status: submitted in bugzilla bug #5082 > >Index: samba-3.0.26a/source/smbd/chgpasswd.c >=================================================================== >--- samba-3.0.26a.orig/source/smbd/chgpasswd.c >+++ samba-3.0.26a/source/smbd/chgpasswd.c >@@ -126,6 +126,7 @@ > struct termios stermios; > gid_t gid; > uid_t uid; >+ char *eptrs[1] = { NULL }; > > if (pass == NULL) > { >@@ -222,7 +223,7 @@ > passwordprogram)); > > /* execl() password-change application */ >- if (execl("/bin/sh", "sh", "-c", passwordprogram, NULL) < 0) >+ if (execle("/bin/sh", "sh", "-c", passwordprogram, NULL, eptrs) < 0) > { > DEBUG(3, ("Bad status returned from %s\n", passwordprogram)); > return (False); >@@ -498,6 +499,9 @@ > #ifdef WITH_PAM > if (lp_pam_password_change()) { > BOOL ret; >+#ifdef HAVE_SETLOCALE >+ char *prevlocale = setlocale(LC_MESSAGES, "C"); >+#endif > > if (as_root) > become_root(); >@@ -511,6 +515,9 @@ > if (as_root) > unbecome_root(); > >+#ifdef HAVE_SETLOCALE >+ setlocale(LC_MESSAGES, prevlocale); >+#endif > return ret; > } > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 5082
: 2972