summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2010-04-28 16:56:02 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2010-04-28 16:56:02 +0000
commitacfa99e9b16f9f5523d99dd19a7bda539e3ad42d (patch)
tree23dddb7218dd01cad8f1cd77c26cdd4420117329
parentc16ba89f8d7f6598f642708f1696b6ee3edeffd5 (diff)
When restoring a disklabel do not restore the uid. Let the kernel allocate
a new uid instead. ok krw@ marco@
-rw-r--r--sbin/disklabel/disklabel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/disklabel/disklabel.c b/sbin/disklabel/disklabel.c
index 1f36757be4e..feb74595a56 100644
--- a/sbin/disklabel/disklabel.c
+++ b/sbin/disklabel/disklabel.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disklabel.c,v 1.162 2010/04/28 12:55:55 jsing Exp $ */
+/* $OpenBSD: disklabel.c,v 1.163 2010/04/28 16:56:01 jsing Exp $ */
/*
* Copyright (c) 1987, 1993
@@ -270,6 +270,7 @@ main(int argc, char *argv[])
if (!(t = fopen(argv[1], "r")))
err(4, "%s", argv[1]);
error = getasciilabel(t, lp);
+ bzero(lp->d_uid, sizeof(lp->d_uid));
if (error == 0)
error = writelabel(f, bootarea, lp);
fclose(t);