diff options
author | Jeremy Allison <jra@samba.org> | 2006-01-14 20:25:51 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2006-01-14 20:25:51 +0000 |
commit | dc8eeb96a03c1f02ebccec5670ef86fa7130d386 (patch) | |
tree | ded1f10b5e365683eff4c82c5830e649b8189e49 /source/smbd/chgpasswd.c | |
parent | 899deef9831b090aba832dd511a2f805d28c0f3c (diff) | |
download | samba-dc8eeb96a03c1f02ebccec5670ef86fa7130d386.tar.gz samba-dc8eeb96a03c1f02ebccec5670ef86fa7130d386.tar.xz samba-dc8eeb96a03c1f02ebccec5670ef86fa7130d386.zip |
r12938: Fix for #3408 (change password fails) from William Jojo <jojowil@hvcc.edu>.
Jeremy.
Diffstat (limited to 'source/smbd/chgpasswd.c')
-rw-r--r-- | source/smbd/chgpasswd.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/smbd/chgpasswd.c b/source/smbd/chgpasswd.c index fed73db043f..5a179dbf478 100644 --- a/source/smbd/chgpasswd.c +++ b/source/smbd/chgpasswd.c @@ -153,9 +153,13 @@ static int dochild(int master, const char *slavedev, const struct passwd *pass, DEBUG(3, ("More weirdness, could not open %s\n", slavedev)); return (False); } -#ifdef I_PUSH - ioctl(slave, I_PUSH, "ptem"); - ioctl(slave, I_PUSH, "ldterm"); +#if defined(I_PUSH) && defined(I_FIND) + if (ioctl(slave, I_FIND, "ptem") == 0) { + ioctl(slave, I_PUSH, "ptem"); + } + if (ioctl(slave, I_FIND, "ldterm") == 0) { + ioctl(slave, I_PUSH, "ldterm"); + } #elif defined(TIOCSCTTY) if (ioctl(slave, TIOCSCTTY, 0) < 0) { |