From owner-freebsd-bugs Sat Oct 19 16:50: 5 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AF34337B401 for ; Sat, 19 Oct 2002 16:50:03 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6930E43E7B for ; Sat, 19 Oct 2002 16:50:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g9JNo3x3086407 for ; Sat, 19 Oct 2002 16:50:03 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g9JNo3Pd086406; Sat, 19 Oct 2002 16:50:03 -0700 (PDT) Date: Sat, 19 Oct 2002 16:50:03 -0700 (PDT) Message-Id: <200210192350.g9JNo3Pd086406@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Dan Pelleg Subject: Re: bin/43582: [PATCH] passwd(1) fails on nonexistent users Reply-To: Dan Pelleg Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/43582; it has been noted by GNATS. From: Dan Pelleg To: freebsd-gnats-submit@FreeBSD.org Cc: Subject: Re: bin/43582: [PATCH] passwd(1) fails on nonexistent users Date: Sat, 19 Oct 2002 19:43:28 -0400 --CUexkwujC7 Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit Ok, I figured it out. IF you set (just) the -u flag, AND have YP and KERBEROS AND the user is not in Kerberos, then the fallback to local_passwd(uname) is reached without use_yp having been called first. This will cause local_passwd() to fail. A patch follows. --CUexkwujC7 Content-Type: application/octet-stream Content-Disposition: attachment; filename="passwd.patch" Content-Transfer-Encoding: base64 LS0tIHVzci5iaW4vcGFzc3dkL3Bhc3N3ZC5jCVNhdCBPY3QgMTkgMTk6NDI6NDUgMjAwMgor KysgdXNyLmJpbi9wYXNzd2QvcGFzc3dkLmMub3JpZwlTYXQgT2N0IDE5IDE5OjAyOjQ5IDIw MDIKQEAgLTIyMCwxMyArMjIwLDYgQEAKIAkJCWZwcmludGYoc3RkZXJyLCAicmVhbG0gJXNc biIsIHJlYWxtKTsKIAkJCWV4aXQoa3JiX3Bhc3N3ZChhcmd2WzBdLCBpZmxhZywgcmZsYWcs IHVmbGFnKSk7CiAJCX0KLSNpZmRlZiBZUAotCQkvKgotCQkgKiBBcyB3ZSBmYWxsIGJhY2sg dG8gbG9jYWxfcGFzc3dkLCB3ZSBuZWVkIHRvIG1ha2Ugc3VyZSB0aGF0Ci0JCSAqIHRoZSBs b2NhbF9wYXNzd29yZCBzdHJ1Y3QgaXMgaW5pdGlhbGl6ZWQuCi0JCSAqLwotCQl1c2VfeXAo dW5hbWUsIDAsIDApOwotI2VuZGlmCiAjZW5kaWYKIAl9CiAJZXhpdChsb2NhbF9wYXNzd2Qo dW5hbWUpKTsK --CUexkwujC7-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message