summaryrefslogtreecommitdiffstats
path: root/source/smbd/chgpasswd.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2002-08-17 15:27:10 +0000
committerJelmer Vernooij <jelmer@samba.org>2002-08-17 15:27:10 +0000
commit42615b945e2e48e53a21ea47f2e45407913a6a1e (patch)
tree9e84a17cc57368de704b7fc225bc093b6ff36840 /source/smbd/chgpasswd.c
parentd3599b446ed1c8ccd7c9e161ecfa5d52d6066c22 (diff)
downloadsamba-42615b945e2e48e53a21ea47f2e45407913a6a1e.tar.gz
samba-42615b945e2e48e53a21ea47f2e45407913a6a1e.tar.xz
samba-42615b945e2e48e53a21ea47f2e45407913a6a1e.zip
Sync 3.0 branch with head
Diffstat (limited to 'source/smbd/chgpasswd.c')
-rw-r--r--source/smbd/chgpasswd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/smbd/chgpasswd.c b/source/smbd/chgpasswd.c
index 68871deb90c..9e593b022ef 100644
--- a/source/smbd/chgpasswd.c
+++ b/source/smbd/chgpasswd.c
@@ -167,17 +167,17 @@ static int dochild(int master, const char *slavedev, const struct passwd *pass,
/* Make slave stdin/out/err of child. */
- if (dup2(slave, STDIN_FILENO) != STDIN_FILENO)
+ if (sys_dup2(slave, STDIN_FILENO) != STDIN_FILENO)
{
DEBUG(3, ("Could not re-direct stdin\n"));
return (False);
}
- if (dup2(slave, STDOUT_FILENO) != STDOUT_FILENO)
+ if (sys_dup2(slave, STDOUT_FILENO) != STDOUT_FILENO)
{
DEBUG(3, ("Could not re-direct stdout\n"));
return (False);
}
- if (dup2(slave, STDERR_FILENO) != STDERR_FILENO)
+ if (sys_dup2(slave, STDERR_FILENO) != STDERR_FILENO)
{
DEBUG(3, ("Could not re-direct stderr\n"));
return (False);
@@ -196,7 +196,9 @@ static int dochild(int master, const char *slavedev, const struct passwd *pass,
}
stermios.c_lflag &= ~(ECHO | ECHOE | ECHOK | ECHONL);
stermios.c_lflag |= ICANON;
+#ifdef ONLCR
stermios.c_oflag &= ~(ONLCR);
+#endif
if (tcsetattr(0, TCSANOW, &stermios) < 0)
{
DEBUG(3, ("could not set attributes of pty\n"));