Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Jul 2008 21:03:23 -0700 (PDT)
From:      Unga <unga888@yahoo.com>
To:        freebsd-current@freebsd.org
Subject:   [PATCH] Fix /usr/src/usr.sbin/pw/pwupd.c - pw_update() return success on failure
Message-ID:  <232537.6371.qm@web57008.mail.re3.yahoo.com>

next in thread | raw e-mail | index | archive | help
--0-2042182583-1215403403=:6371
Content-Type: text/plain; charset=us-ascii

Hi all

In the present implementation even if the pwdb() fails, pw_update() still return rc=0, therefore, subsequent functions still continue to proceed without passwd and master.passwd been updated. The attached patch fixes this issue. If this patch is acceptable, appreciate if it could be applied to both current and RELENG_7.

Kind regards
Unga


      
--0-2042182583-1215403403=:6371
Content-Type: application/octet-stream; name="pw_update-return-code-fix.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="pw_update-return-code-fix.patch"

ZGlmZiAtTmF1ciBwdy5vcmlnL3B3dXBkLmMgcHcvcHd1cGQuYwotLS0gcHcu
b3JpZy9wd3VwZC5jCTIwMDgtMDctMDcgMTA6Mjg6NTIuMDAwMDAwMDAwICsw
ODAwCisrKyBwdy9wd3VwZC5jCTIwMDgtMDctMDcgMTE6Mjc6MzcuMDAwMDAw
MDAwICswODAwCkBAIC0xMzksNyArMTM5LDcgQEAKIHN0YXRpYyBpbnQKIHB3
X3VwZGF0ZShzdHJ1Y3QgcGFzc3dkICogcHdkLCBjaGFyIGNvbnN0ICogdXNl
ciwgaW50IG1vZGUpCiB7Ci0JaW50ICAgICAgICAgICAgIHJjID0gMDsKKwlp
bnQgcmM7CiAKIAlFTkRQV0VOVCgpOwogCkBAIC0xNDgsNyArMTQ4LDggQEAK
IAkgKiBOb3RlOiAtQyBpcyBvbmx5IGF2YWlsYWJsZSBpbiBGcmVlQlNEIDIu
MiBhbmQgYWJvdmUKIAkgKi8KICNpZmRlZiBIQVZFX1BXREJfQwotCWlmIChw
d2RiKCItQyIsIChjaGFyICopTlVMTCkgPT0gMCkgewkvKiBDaGVjayBvbmx5
ICovCisJcmMgPSBwd2RiKCItQyIsIChjaGFyICopTlVMTCk7IC8qIENoZWNr
IG9ubHkgKi8KKwlpZiAocmMgPT0gMCkgewogI2Vsc2UKIAl7CQkJCS8qIE5v
IC1DICovCiAjZW5kaWYK

--0-2042182583-1215403403=:6371--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?232537.6371.qm>