summaryrefslogtreecommitdiff
path: root/debian/patches/super0-do-not-override-uuid-with-homehost.patch
blob: 70f0f2831e7ee0ff88d0a176dcff50bbf8ac7403 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 3713633a30349773a83bd8257cdd64b86ce32dbd Mon Sep 17 00:00:00 2001
From: Michael Tokarev <mjt@tls.msk.ru>
Date: Sat, 20 Oct 2012 15:40:02 +0400
Subject: super0: do not override uuid with homehost
Bug-Debian: http://bugs.debian.org/686703
Comment: from stable/bugfix upstream 3.2.6 version

When --uuid is specified in the command line, even for v0.90
superblock we override last portion of uuid with data from
--homehost, which is wrong (and disagrees with the manpage).
Only use homehost in super0 if no uuid is specified.

Signed-off-By: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: NeilBrown <neilb@suse.de>
---
 super0.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/super0.c b/super0.c
index 1375799..ca4c082 100644
--- a/super0.c
+++ b/super0.c
@@ -657,7 +657,7 @@ static int init_super0(struct supertype *st, mdu_array_info_t *info,
 		if (rfd >= 0)
 			close(rfd);
 	}
-	if (homehost) {
+	if (homehost && !uuid) {
 		char buf[20];
 		char *hash = sha1_buffer(homehost,
 					 strlen(homehost),
-- 
1.7.10.4