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) ...@@ -61,8 +61,8 @@ int ChfnProcess::ConverseChfn(const char *pass)
if ( line.contains( "Password: " )/*isPrompt( line, "password" )*/ ) if ( line.contains( "Password: " )/*isPrompt( line, "password" )*/ )
{ {
WaitSlave(); WaitSlave();
write(m_Fd, pass, strlen(pass)); write(fd(), pass, strlen(pass));
write(m_Fd, "\n", 1); write(fd(), "\n", 1);
} }
line = readLine(); // Let's see what the outcome was line = readLine(); // Let's see what the outcome was
......
...@@ -136,8 +136,8 @@ int PasswdProcess::ConversePasswd(const char *oldpass, const char *newpass, ...@@ -136,8 +136,8 @@ int PasswdProcess::ConversePasswd(const char *oldpass, const char *newpass,
if (isPrompt(line, "password")) if (isPrompt(line, "password"))
{ {
WaitSlave(); WaitSlave();
write(m_Fd, oldpass, strlen(oldpass)); write(fd(), oldpass, strlen(oldpass));
write(m_Fd, "\n", 1); write(fd(), "\n", 1);
state++; state++;
break; break;
} }
...@@ -180,8 +180,8 @@ int PasswdProcess::ConversePasswd(const char *oldpass, const char *newpass, ...@@ -180,8 +180,8 @@ int PasswdProcess::ConversePasswd(const char *oldpass, const char *newpass,
return 0; return 0;
} }
WaitSlave(); WaitSlave();
write(m_Fd, newpass, strlen(newpass)); write(fd(), newpass, strlen(newpass));
write(m_Fd, "\n", 1); write(fd(), "\n", 1);
state++; state++;
break; break;
...@@ -190,8 +190,8 @@ int PasswdProcess::ConversePasswd(const char *oldpass, const char *newpass, ...@@ -190,8 +190,8 @@ int PasswdProcess::ConversePasswd(const char *oldpass, const char *newpass,
if (isPrompt(line, "re")) if (isPrompt(line, "re"))
{ {
WaitSlave(); WaitSlave();
write(m_Fd, newpass, strlen(newpass)); write(fd(), newpass, strlen(newpass));
write(m_Fd, "\n", 1); write(fd(), "\n", 1);
state += 2; state += 2;
break; break;
} }
...@@ -207,8 +207,8 @@ int PasswdProcess::ConversePasswd(const char *oldpass, const char *newpass, ...@@ -207,8 +207,8 @@ int PasswdProcess::ConversePasswd(const char *oldpass, const char *newpass,
if (isPrompt(line, "re")) if (isPrompt(line, "re"))
{ {
WaitSlave(); WaitSlave();
write(m_Fd, newpass, strlen(newpass)); write(fd(), newpass, strlen(newpass));
write(m_Fd, "\n", 1); write(fd(), "\n", 1);
state++; state++;
break; 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