From owner-svn-src-all@freebsd.org Wed Aug 5 20:32:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 734989B4073; Wed, 5 Aug 2015 20:32:08 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63B361865; Wed, 5 Aug 2015 20:32:08 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t75KW8rb024988; Wed, 5 Aug 2015 20:32:08 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t75KW8T9024987; Wed, 5 Aug 2015 20:32:08 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201508052032.t75KW8T9024987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 5 Aug 2015 20:32:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r286340 - stable/10/usr.sbin/pw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Aug 2015 20:32:08 -0000 Author: bapt Date: Wed Aug 5 20:32:07 2015 New Revision: 286340 URL: https://svnweb.freebsd.org/changeset/base/286340 Log: Fix segfault were modifying the uid of a user Do a direct commit as the code on head has changed a lot and does not fail in that case PR: 202111 Reported by: gondim@bsdinfo.com.br Modified: stable/10/usr.sbin/pw/pw_user.c Modified: stable/10/usr.sbin/pw/pw_user.c ============================================================================== --- stable/10/usr.sbin/pw/pw_user.c Wed Aug 5 19:56:23 2015 (r286339) +++ stable/10/usr.sbin/pw/pw_user.c Wed Aug 5 20:32:07 2015 (r286340) @@ -388,7 +388,7 @@ pw_user(int mode, char *name, long id, s edited = 1; } - if (id > 0 && isdigit((unsigned char)*arg->val)) { + if (id > 0) { pwd->pw_uid = (uid_t)id; edited = 1; if (pwd->pw_uid != 0 && strcmp(pwd->pw_name, "root") == 0)