Forward-port fix from KDE_2_2_BRANCH

svn path=/trunk/kdeutils/kdepasswd/; revision=119237
This commit is contained in:
Bernhard Rosenkraenzer 2001-10-24 09:02:45 +00:00
parent 4d35cc53e3
commit 34b3f46d24
2 changed files with 4 additions and 2 deletions

View file

@ -50,6 +50,7 @@ PasswdProcess::PasswdProcess(QCString user)
}
m_User = user;
}
m_ThisUser = pw->pw_name;
}
@ -77,7 +78,8 @@ int PasswdProcess::exec(const char *oldpass, const char *newpass,
putenv("LANG=C");
QCStringList args;
args += m_User;
if (m_User != m_ThisUser)
args += m_User;
int ret = PtyProcess::exec("passwd", args);
if (ret < 0)
{

View file

@ -35,7 +35,7 @@ private:
int ConversePasswd(const char *oldpass, const char *newpass,
int check);
QCString m_User, m_Error;
QCString m_User, m_ThisUser, m_Error;
};