mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-20 11:11:24 +00:00
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
This commit is contained in:
parent
f6e5ba31d2
commit
241b3b8122
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=230454
@ -30,7 +30,7 @@
|
|||||||
#define _OPENSOLARIS_SYS_SID_H_
|
#define _OPENSOLARIS_SYS_SID_H_
|
||||||
|
|
||||||
typedef struct ksiddomain {
|
typedef struct ksiddomain {
|
||||||
char kd_name[16]; /* Domain part of SID */
|
char kd_name[1]; /* Domain part of SID */
|
||||||
} ksiddomain_t;
|
} ksiddomain_t;
|
||||||
typedef void ksid_t;
|
typedef void ksid_t;
|
||||||
|
|
||||||
@ -39,8 +39,8 @@ ksid_lookupdomain(const char *domain)
|
|||||||
{
|
{
|
||||||
ksiddomain_t *kd;
|
ksiddomain_t *kd;
|
||||||
|
|
||||||
kd = kmem_alloc(sizeof(*kd), KM_SLEEP);
|
kd = kmem_alloc(sizeof(*kd) + strlen(domain), KM_SLEEP);
|
||||||
strlcpy(kd->kd_name, "FreeBSD", sizeof(kd->kd_name));
|
strcpy(kd->kd_name, domain);
|
||||||
return (kd);
|
return (kd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user