[sheepdog] [PATCH] sheep: fix validation of config file signature
Jens Weber
jweber at tek2b.org
Sat Aug 11 20:47:03 CEST 2012
fix logic error in validation
Signed-off-by: Jens Weber <jweber at tek2b.org>
---
sheep/store.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sheep/store.c b/sheep/store.c
index 39b1781..e4bff24 100644
--- a/sheep/store.c
+++ b/sheep/store.c
@@ -487,7 +487,7 @@ static int init_config_path(const char *base_path)
close(fd);
if (ret != sizeof(version)) return 1;
- if ((version & CONFIGFILE_SIGNATURE) == CONFIGFILE_SIGNATURE)
+ if ((version & 0xffffffff00000000) == CONFIGFILE_SIGNATURE)
{
version = version & 0x00000000ffffffff;
if ((version == CONFIGFILE_VERSION) && (filesize == CONFIGFILE_SIZE)) return 0;
--
1.7.10.4
More information about the sheepdog
mailing list