[SCM] Samba Shared Repository - branch v3-0-test updated -
release-3-0-28-33-g44ba475
Jeremy Allison
jra at samba.org
Sat Dec 15 01:03:40 GMT 2007
The branch, v3-0-test has been updated
via 44ba475acc854258e83d26d45dc35c69da69aed8 (commit)
from 24502927471a183c86ea3ef5d5fc4712bd32323e (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-0-test
- Log -----------------------------------------------------------------
commit 44ba475acc854258e83d26d45dc35c69da69aed8
Author: Jeremy Allison <jra at samba.org>
Date: Fri Dec 14 17:03:04 2007 -0800
Fix for bug #5082 from Mathias Gug <mathiaz at ubuntu.com>, Steve Langasek <vorlon at debian.org>.
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.
Jeremy.
-----------------------------------------------------------------------
Summary of changes:
source/smbd/chgpasswd.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/smbd/chgpasswd.c b/source/smbd/chgpasswd.c
index 7c6886b..4ec8452 100644
--- a/source/smbd/chgpasswd.c
+++ b/source/smbd/chgpasswd.c
@@ -126,6 +126,7 @@ static int dochild(int master, const char *slavedev, const struct passwd *pass,
struct termios stermios;
gid_t gid;
uid_t uid;
+ char * const eptrs[1] = { NULL };
if (pass == NULL)
{
@@ -222,7 +223,7 @@ static int dochild(int master, const char *slavedev, const struct passwd *pass,
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 @@ BOOL chgpasswd(const char *name, const struct passwd *pass,
#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,10 @@ BOOL chgpasswd(const char *name, const struct passwd *pass,
if (as_root)
unbecome_root();
+#ifdef HAVE_SETLOCALE
+ setlocale(LC_MESSAGES, prevlocale);
+#endif
+
return ret;
}
#endif
--
Samba Shared Repository
More information about the samba-cvs
mailing list