On Thu, Jan 09, 2003 at 05:12:15PM +1100, Martin Pool wrote:
> I found a data-corruption bug in ccache a few weeks ago relating to
> incorrect handling of wait() status codes, so I thought I would do a
> quick check for similar things in Samba.

Part of this (the smbd/chgpasswd.c patch) is incorrect I think.

You have changed the line :

if (WIFEXITED(wstat) == 0) {
        ...
        return False;
}

to

if (WIFEXITED(wstat)) {
        ...
        return False;
}

The man page states :

       WIFEXITED(status)
              is non-zero if the child exited normally.

This particular clause is meant to catch an error condition
(not a normal exit). I agree it's not good code and could be cleaned
up but this change reverses the return code on password change
success.

Jermy.

Reply via email to