Changes by: antona
Update of /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28331/ntfsprogs
Modified Files:
decrypt.c ntfsdecrypt.c
Log Message:
Make ntfsdecrypt compile under Linux.
Index: decrypt.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/decrypt.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- decrypt.c 16 Jul 2005 06:53:53 -0000 1.1
+++ decrypt.c 16 Jul 2005 07:00:57 -0000 1.2
@@ -29,6 +29,8 @@
#include "decrypt.h"
+#include "types.h"
+
#ifdef __CYGWIN__
//#define USE_CRYPTOAPI_RSA 1
#define _WIN32_WINNT 0x501
Index: ntfsdecrypt.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsdecrypt.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- ntfsdecrypt.c 16 Jul 2005 06:53:53 -0000 1.1
+++ ntfsdecrypt.c 16 Jul 2005 07:00:57 -0000 1.2
@@ -57,8 +57,10 @@ GEN_PRINTF (Vprintf, stderr, &opts.verbo
GEN_PRINTF (Qprintf, stderr, &opts.quiet, FALSE)
static GEN_PRINTF (Printf, stderr, NULL, FALSE)
-static const wchar_t *efs_name = L"$EFS";
-static const int efs_name_length = 4;
+static ntfschar EFS[5] = { const_cpu_to_le16('$'), const_cpu_to_le16('E'),
+ const_cpu_to_le16('F'), const_cpu_to_le16('S'),
+ const_cpu_to_le16('\0') };
+static const int EFS_name_length = 4;
/**
* version - Print version information about the program
@@ -286,7 +288,7 @@ static decrypt_key *get_fek (ntfs_inode
/* obtain the $EFS contents */
na = ntfs_attr_open (inode, AT_LOGGED_UTILITY_STREAM,
- efs_name, efs_name_length);
+ EFS, EFS_name_length);
if (!na) {
perror("Error");
return NULL;
@@ -386,7 +388,7 @@ int main (int argc, char *argv[])
if (opts.inode != -1)
inode = ntfs_inode_open (vol, opts.inode);
else
- inode = utils_pathname_to_inode (vol, NULL, opts.file);
+ inode = ntfs_pathname_to_inode (vol, NULL, opts.file);
if (!inode) {
perror("ERROR: Couldn't open inode");
|