mirror of
https://github.com/samba-team/samba.git
synced 2025-07-14 12:59:07 +03:00
samba-tool: ensure prompting of passwords is in the right order
ask the creds object for the password before prompting for the new password in the user password change code, to ensure the user is asked for the old password first Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com> Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Thu Jul 28 08:35:45 CEST 2011 on sn-devel-104
This commit is contained in:
@ -209,7 +209,9 @@ class cmd_user_password(Command):
|
||||
lp = sambaopts.get_loadparm()
|
||||
creds = credopts.get_credentials(lp)
|
||||
|
||||
# FIXME: How to ensure user is authenticated before prompting for new password?
|
||||
# get old password now, to get the password prompts in the right order
|
||||
old_password = creds.get_password()
|
||||
|
||||
net = Net(creds, lp, server=credopts.ipaddress)
|
||||
|
||||
password = newpassword
|
||||
|
Reference in New Issue
Block a user