summaryrefslogtreecommitdiffstats
path: root/sys/cddl
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2012-01-22 10:58:17 +0000
committerpjd <pjd@FreeBSD.org>2012-01-22 10:58:17 +0000
commit95f3828ce791470db6af19143f89a9226ee976c0 (patch)
tree0883f7298498a75eca7d61fdbc87abd8568abd65 /sys/cddl
parentdcf91b59f527006825b1fe7061dbb74973314fad (diff)
downloadFreeBSD-src-95f3828ce791470db6af19143f89a9226ee976c0.zip
FreeBSD-src-95f3828ce791470db6af19143f89a9226ee976c0.tar.gz
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. MFC after: 1 week
Diffstat (limited to 'sys/cddl')
-rw-r--r--sys/cddl/compat/opensolaris/sys/sid.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/cddl/compat/opensolaris/sys/sid.h b/sys/cddl/compat/opensolaris/sys/sid.h
index d6c1b0c..cc3ca3b 100644
--- a/sys/cddl/compat/opensolaris/sys/sid.h
+++ b/sys/cddl/compat/opensolaris/sys/sid.h
@@ -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);
}
OpenPOWER on IntegriCloud