summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/auth/pass_check.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/auth/pass_check.c b/source3/auth/pass_check.c
index 63918796ef..e1783bfd1e 100644
--- a/source3/auth/pass_check.c
+++ b/source3/auth/pass_check.c
@@ -634,6 +634,7 @@ NTSTATUS pass_check(const struct passwd *pass, const char *user, const char *pas
/* Also the place to keep the 'password' no matter what
crazy struct it started in... */
fstrcpy(this_crypted, pass->pw_passwd);
+ fstrcpy(this_salt, pass->pw_passwd);
#ifdef HAVE_GETSPNAM
{
@@ -645,8 +646,10 @@ NTSTATUS pass_check(const struct passwd *pass, const char *user, const char *pas
perhaps for IPC password changing requests */
spass = getspnam(pass->pw_name);
- if (spass && spass->sp_pwdp)
+ if (spass && spass->sp_pwdp) {
fstrcpy(this_crypted, spass->sp_pwdp);
+ fstrcpy(this_salt, spass->sp_pwdp);
+ }
}
#elif defined(IA_UINFO)
{
@@ -704,9 +707,6 @@ NTSTATUS pass_check(const struct passwd *pass, const char *user, const char *pas
}
#endif
- /* extract relevant info */
- fstrcpy(this_salt, pass->pw_passwd);
-
#if defined(HAVE_TRUNCATED_SALT)
/* crypt on some platforms (HPUX in particular)
won't work with more than 2 salt characters. */