From owner-svn-src-stable@FreeBSD.ORG Tue Jul 24 03:47:50 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28F56106564A; Tue, 24 Jul 2012 03:47:50 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 132728FC1C; Tue, 24 Jul 2012 03:47:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6O3lnSw083508; Tue, 24 Jul 2012 03:47:49 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6O3ln5W083506; Tue, 24 Jul 2012 03:47:49 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201207240347.q6O3ln5W083506@svn.freebsd.org> From: Eitan Adler Date: Tue, 24 Jul 2012 03:47:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238736 - stable/8/sys/cddl/compat/opensolaris/sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jul 2012 03:47:50 -0000 Author: eadler Date: Tue Jul 24 03:47:49 2012 New Revision: 238736 URL: http://svn.freebsd.org/changeset/base/238736 Log: MFC r230454: Use provided name when allocating ksid domain. It isn't really used on FreeBSD, but should fix a panic when pool is imported from another OS that is using this. Requested by: nox No objections: pjd Approved by: cperciva (implicit) Modified: stable/8/sys/cddl/compat/opensolaris/sys/sid.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) Modified: stable/8/sys/cddl/compat/opensolaris/sys/sid.h ============================================================================== --- stable/8/sys/cddl/compat/opensolaris/sys/sid.h Tue Jul 24 03:46:58 2012 (r238735) +++ stable/8/sys/cddl/compat/opensolaris/sys/sid.h Tue Jul 24 03:47:49 2012 (r238736) @@ -30,7 +30,7 @@ #define _OPENSOLARIS_SYS_SID_H_ typedef struct ksiddomain { - char kd_name[16]; /* Domain part of SID */ + char kd_name[1]; /* Domain part of SID */ } ksiddomain_t; typedef void ksid_t; @@ -39,8 +39,8 @@ ksid_lookupdomain(const char *domain) { ksiddomain_t *kd; - kd = kmem_alloc(sizeof(*kd), KM_SLEEP); - strlcpy(kd->kd_name, "FreeBSD", sizeof(kd->kd_name)); + kd = kmem_alloc(sizeof(*kd) + strlen(domain), KM_SLEEP); + strcpy(kd->kd_name, domain); return (kd); }