From owner-cvs-src@FreeBSD.ORG Fri Nov 4 19:37:14 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B24F616A41F; Fri, 4 Nov 2005 19:37:14 +0000 (GMT) (envelope-from rse@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 837F843D46; Fri, 4 Nov 2005 19:37:14 +0000 (GMT) (envelope-from rse@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id jA4JbEK2033851; Fri, 4 Nov 2005 19:37:14 GMT (envelope-from rse@repoman.freebsd.org) Received: (from rse@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id jA4JbEb7033850; Fri, 4 Nov 2005 19:37:14 GMT (envelope-from rse) Message-Id: <200511041937.jA4JbEb7033850@repoman.freebsd.org> From: "Ralf S. Engelschall" Date: Fri, 4 Nov 2005 19:37:14 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_6 Cc: Subject: cvs commit: src/sbin/mdmfs mdmfs.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2005 19:37:14 -0000 rse 2005-11-04 19:37:14 UTC FreeBSD src repository Modified files: (Branch: RELENG_6) sbin/mdmfs mdmfs.c Log: MFC: | Fix parsing of mdmfs(8) option "-w :" in case or | is a numeric user/group ID instead of a user/group name (as | explicitly intended to be allowed by both the manual page and the | implementation). | | Before this fix, mdmfs(8) aborted: | | | # mdmfs -s 32m -w 0:0 md /var/tmp/foo | | Assertion failed: (mip->mi_have_uid), function extract_ugid, file /usr/src/sbin/mdmfs/mdmfs.c, line 555. | | Abort trap (core dumped) | | The "mi_have_[ug]id" fields were only set in case a name lookup was | successful. Instead they also have to be set in case the string to | integer conversion was successful. | | Additionally, as a result of this fix, two assertions at the end of | the function are now always true and hence can be just be removed. It | is guarrantied that both the UID and the GID are set when the function | returns regularily, else it would have been already bailed out with | usage()/exit(3) or errx(3) before. | | Spotted by: Christoph Schug Revision Changes Path 1.23.2.1 +6 -10 src/sbin/mdmfs/mdmfs.c