From owner-freebsd-current@FreeBSD.ORG Sat Mar 9 14:34:25 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C26C5E0E for ; Sat, 9 Mar 2013 14:34:25 +0000 (UTC) (envelope-from hiren.panchasara@gmail.com) Received: from mail-ee0-f43.google.com (mail-ee0-f43.google.com [74.125.83.43]) by mx1.freebsd.org (Postfix) with ESMTP id 5FCA0638 for ; Sat, 9 Mar 2013 14:34:24 +0000 (UTC) Received: by mail-ee0-f43.google.com with SMTP id c50so1549422eek.16 for ; Sat, 09 Mar 2013 06:34:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=Eh05bxg3bva2lq0ZqgB145UYgc1TubQpYWNkPkFwq/g=; b=YbLa+KHjsW8DX6hbeaNiwB4caPFvpamrqB2RqZ7buh/yF8VQlmDxfwPH6bo96+PBHc q7T4wYJuLC7OoMMcH/GZEwF3/xzQVZMikdgku0FzF5fNW/X1sVi8vvZ8i9AQ//C70ZY1 BpMmirEFO0hPLS6JbZnobw3MeaKEm1WexGUMm4hQyFa+dAiVpGHegVSjyhHYhp11MOzl rE0XNQNgT5aBYbvh9+ilHrFTuOLr4J94VaOrYtSfoAr/H+2RTRTnE4+8i6QtjmgmU5mw pf7CDzRgkYA03IZr7upRkOuYWC9W1c/utL3P3/dMN7dszcTMhYuzoFDBLCaL0zcBtv/1 g6mg== MIME-Version: 1.0 X-Received: by 10.14.219.129 with SMTP id m1mr11394511eep.16.1362839663928; Sat, 09 Mar 2013 06:34:23 -0800 (PST) Received: by 10.14.133.204 with HTTP; Sat, 9 Mar 2013 06:34:23 -0800 (PST) Received: by 10.14.133.204 with HTTP; Sat, 9 Mar 2013 06:34:23 -0800 (PST) In-Reply-To: <1362807830.29167.YahooMailClassic@web31805.mail.mud.yahoo.com> References: <1362807830.29167.YahooMailClassic@web31805.mail.mud.yahoo.com> Date: Sat, 9 Mar 2013 06:34:23 -0800 Message-ID: Subject: Re: pw is broken? From: hiren panchasara To: ktsin@acm.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Mar 2013 14:34:25 -0000 On Mar 8, 2013 9:44 PM, "KT Sin" wrote: > > pw is crashing with seg fault due to this change? > > http://svnweb.freebsd.org/base/head/lib/libutil/gr_util.c?r1=245390&r2=247919 I think the correct fix is committed with: http://svnweb.freebsd.org/changeset/base/248102 Hiren > > # gdb ./pw > GNU gdb 6.1.1 [FreeBSD] > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you are > welcome to change it and/or distribute copies of it under certain conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for details. > This GDB was configured as "amd64-marcel-freebsd"... > (gdb) run groupadd test123 -g 12345 > Starting program: /usr/src/usr.sbin/pw/pw groupadd test123 -g 12345 > > Program received signal SIGSEGV, Segmentation fault. > 0x0000000080d84a4f in stpcpy () from /lib/libc.so.7 > (gdb) bt full > #0 0x0000000080d84a4f in stpcpy () from /lib/libc.so.7 > No symbol table info available. > #1 0x0000000080a5c00a in grcopy (gr=0x612ce0, newgr=0x81409100, name=0x0, > ndx=0) at /usr/src/lib/libutil/gr_util.c:496 > dst = 0x8 > i = 1090277153 > #2 0x0000000080a5bdc6 in gr_add (gr=0x612ce0, newmember=0x0) > at /usr/src/lib/libutil/gr_util.c:451 > newgr = (struct group *) 0x81409100 > len = 0 > num_mem = 0 > #3 0x0000000080a5bd4f in gr_dup (gr=0x612ce0) > at /usr/src/lib/libutil/gr_util.c:434 > No locals. > #4 0x000000000040bad7 in gr_update (grp=0x612ce0, group=0x0) at grupd.c:78 > pfd = 0 > tfd = 4244492 > gr = (struct group *) 0x0 > old_gr = (struct group *) 0x0 > #5 0x000000000040ba8f in addgrent (grp=0x612ce0) at grupd.c:111 > No locals. > #6 0x000000000040a83d in pw_group (cnf=0x612bf0, mode=0, args=0x613e78) > at pw_group.c:258 > ---Type to continue, or q to quit--- > grp = (struct group *) 0x612ce0 > members = (char **) 0x81485d00 > rc = 0 > a_name = (struct carg *) 0x8144c0a0 > a_gid = (struct carg *) 0x8144c0c0 > arg = (struct carg *) 0x0 > grmembers = 200 > fakegroup = {gr_name = 0x7fffffffdcb9 "test123", > gr_passwd = 0x40fbc9 "*", gr_gid = 12345, gr_mem = 0x81485d00} > #7 0x00000000004037fb in main (argc=3, argv=0x7fffffffd9f0) at pw.c:230 > which = 1 > config = 0x0 > cnf = (struct userconf *) 0x612bf0 > ch = -1 > mode = 0 > opts = {{0x40e150 "V:C:qn:u:c:d:e:p:g:G:mM:k:s:oL:i:w:h:H:Db:NPy:Y", > 0x40e180 "V:C:qn:u:rY", > 0x40e18c "V:C:qn:u:c:d:e:p:g:G:mM:l:k:s:w:L:h:H:FNPY", > 0x40e1b7 "V:C:qn:u:FPa7", 0x40e1c5 "V:C:q", 0x40e1c5 "V:C:q", > 0x40e1c5 "V:C:q"}, {0x40e1cb "V:C:qn:g:h:H:M:opNPY", > 0x40e1e0 "V:C:qn:g:Y", 0x40e1eb "V:C:qn:d:g:l:h:H:FM:m:NPY", > 0x40e205 "V:C:qn:g:FPa", 0x40e1c5 "V:C:q", 0x0, 0x0}} > funcs = {0x405270 , 0x409b60 } > (gdb) > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"