svn commit: r240225 - stable/9/sys/cddl/compat/opensolaris/sys

Martin Matuska mm at FreeBSD.org
Sat Sep 8 19:21:42 UTC 2012


This commit is missing the PR number (kern/171380) and should be MFCed
together with r230454.
I was planning to MFC these two tomorrow.

On 8.9.2012 4:41, 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)
>
> 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);
>  }
>  


-- 
Martin Matuska
FreeBSD committer
http://blog.vx.sk



More information about the svn-src-all mailing list