Date: Sat, 08 Sep 2012 13:34:02 -0500 From: Bryan Drewery <bryan@shatow.net> To: Eitan Adler <eadler@FreeBSD.org> Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r240225 - stable/9/sys/cddl/compat/opensolaris/sys Message-ID: <504B8F9A.80809@shatow.net> In-Reply-To: <201209080241.q882foC1005948@svn.freebsd.org> References: <201209080241.q882foC1005948@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 9/7/2012 9:41 PM, Eitan Adler wrote: > Author: eadler > Date: Sat Sep 8 02:41:50 2012 > New Revision: 240225 > URL: http://svn.freebsd.org/changeset/base/240225 > > 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. > > No objections from; pjd > Approved by: cperciva (implicit) > Thanks! > Modified: > stable/9/sys/cddl/compat/opensolaris/sys/sid.h > Directory Properties: > stable/9/sys/ (props changed) > > Modified: stable/9/sys/cddl/compat/opensolaris/sys/sid.h > ============================================================================== > --- stable/9/sys/cddl/compat/opensolaris/sys/sid.h Sat Sep 8 01:26:52 2012 (r240224) > +++ stable/9/sys/cddl/compat/opensolaris/sys/sid.h Sat Sep 8 02:41:50 2012 (r240225) > @@ -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); > } > > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > -- Regards, Bryan Drewery bdrewery@freenode/EFNet
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?504B8F9A.80809>