artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41581cc
)
Use the first 8 bytes of GPT gh_guid as the default d_uid. gh_guid is
author
krw
<krw@openbsd.org>
Fri, 11 Nov 2022 12:14:01 +0000
(12:14 +0000)
committer
krw
<krw@openbsd.org>
Fri, 11 Nov 2022 12:14:01 +0000
(12:14 +0000)
initialized with arc4random().
sys/kern/subr_disk.c
patch
|
blob
|
history
diff --git
a/sys/kern/subr_disk.c
b/sys/kern/subr_disk.c
index
b208bc6
..
fddab8a
100644
(file)
--- a/
sys/kern/subr_disk.c
+++ b/
sys/kern/subr_disk.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: subr_disk.c,v 1.26
8 2022/11/10 16:12:05
krw Exp $ */
+/* $OpenBSD: subr_disk.c,v 1.26
9 2022/11/11 12:14:01
krw Exp $ */
/* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */
/*
@@
-688,6
+688,7
@@
spoofgpt(struct buf *bp, void (*strat)(struct buf *), const uint8_t *dosbb,
}
lp->d_magic = DISKMAGIC;
+ memcpy(lp->d_uid, (char *)&gh.gh_guid, sizeof(lp->d_uid));
*partoffp = partoff;
free(gp, M_DEVBUF, gpbytes);