summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-01-14 20:25:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:06:08 -0500
commitbfc2bf8178097425cba2cdf2afe2c7a835c46057 (patch)
treeb13c1881ea4c96bfa3f63d78d964715ee4203e87
parent4dea23da0445c84596bb924f7d1a6f94476f86d6 (diff)
downloadsamba-bfc2bf8178097425cba2cdf2afe2c7a835c46057.tar.gz
samba-bfc2bf8178097425cba2cdf2afe2c7a835c46057.tar.bz2
samba-bfc2bf8178097425cba2cdf2afe2c7a835c46057.zip
r12938: Fix for #3408 (change password fails) from William Jojo <jojowil@hvcc.edu>.
Jeremy. (This used to be commit 5fc0ef80876a666c285585f8b55e1909e8f2e0bf)
-rw-r--r--source3/smbd/chgpasswd.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/smbd/chgpasswd.c b/source3/smbd/chgpasswd.c
index fed73db043..5a179dbf47 100644
--- a/source3/smbd/chgpasswd.c
+++ b/source3/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)
{