Commit 31f8ac93 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

kill kdesu_pty; port rest of kdesu to kpty. untested.

svn path=/trunk/KDE/kdebase/apps/; revision=677308
parent f7257e91
......@@ -61,8 +61,8 @@ int ChfnProcess::ConverseChfn(const char *pass)
if ( line.contains( "Password: " )/*isPrompt( line, "password" )*/ )
{
WaitSlave();
write(m_Fd, pass, strlen(pass));
write(m_Fd, "\n", 1);
write(fd(), pass, strlen(pass));
write(fd(), "\n", 1);
}
line = readLine(); // Let's see what the outcome was
......
......@@ -136,8 +136,8 @@ int PasswdProcess::ConversePasswd(const char *oldpass, const char *newpass,
if (isPrompt(line, "password"))
{
WaitSlave();
write(m_Fd, oldpass, strlen(oldpass));
write(m_Fd, "\n", 1);
write(fd(), oldpass, strlen(oldpass));
write(fd(), "\n", 1);
state++;
break;
}
......@@ -180,8 +180,8 @@ int PasswdProcess::ConversePasswd(const char *oldpass, const char *newpass,
return 0;
}
WaitSlave();
write(m_Fd, newpass, strlen(newpass));
write(m_Fd, "\n", 1);
write(fd(), newpass, strlen(newpass));
write(fd(), "\n", 1);
state++;
break;
......@@ -190,8 +190,8 @@ int PasswdProcess::ConversePasswd(const char *oldpass, const char *newpass,
if (isPrompt(line, "re"))
{
WaitSlave();
write(m_Fd, newpass, strlen(newpass));
write(m_Fd, "\n", 1);
write(fd(), newpass, strlen(newpass));
write(fd(), "\n", 1);
state += 2;
break;
}
......@@ -207,8 +207,8 @@ int PasswdProcess::ConversePasswd(const char *oldpass, const char *newpass,
if (isPrompt(line, "re"))
{
WaitSlave();
write(m_Fd, newpass, strlen(newpass));
write(m_Fd, "\n", 1);
write(fd(), newpass, strlen(newpass));
write(fd(), "\n", 1);
state++;
break;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment