veracrypt / VeraCrypt

Disk encryption with strong security based on TrueCrypt
https://www.veracrypt.fr
Other
6.71k stars 936 forks source link

vnconfig option "-c" does not exist on OpenBSD #968

Open nochnaccount opened 2 years ago

nochnaccount commented 2 years ago

Hello,

Running veracrypt on OpenBSD-current via:

$ veracrypt -t -k "" --pim=0 --protect-hidden=no /home/media/vc /mnt/veracrypt1

gives the following error:

Enter password for /home/media/vc:
Error: vnconfig: unknown option -- c
usage: vnconfig [-v] [-k | -K rounds [-S saltfile]] [-t disktype]
[vnd_dev] image
       vnconfig -l [vnd_dev]
              vnconfig -u [-v] vnd_dev

That '-c' may have sneaked in from FreeBSD's 4.xx vnconfig as far as I can tell.

$ head Core/Unix/OpenBSD/CoreOpenBSD.cpp 

/* $OpenBSD$ */
/*
 Based on FreeBSD/CoreFreeBSD.cpp

 Derived from source code of TrueCrypt 7.1a, which is
 Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
 by the TrueCrypt License 3.0.

 Modifications and additions to the original source code (contained in this file)
 and all other portions of this file are Copyright (c) 2013-2017 IDRIX

The following patch makes it work again here on OpenBSD.

--- Core/Unix/OpenBSD/CoreOpenBSD.cpp.dist  Tue Aug 30 11:32:39 2022
+++ Core/Unix/OpenBSD/CoreOpenBSD.cpp   Tue Aug 30 11:34:49 2022
@@ -69,7 +69,7 @@
        if (freeVnd == -1)
            throw "couldn't find free vnd";

-       args.push_back ("-c");
+       // args.push_back ("-c");

        stringstream freePath;
        freePath << "vnd" << freeVnd;

This is on OpenBSD 7.2-current amd64 and veracrypt-1.25.9.

idrassi commented 1 year ago

Thank you for reporting this issue. PR https://github.com/veracrypt/VeraCrypt/pull/1002 which fixes this issue has been merged into master.