ubuntuusers.de

< patch -R ecryptfs_unwrap_passphrase.c

Autor:
frostschutz
Datum:
20. September 2013 20:20
Code:
 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
--- /home/andreas/Projekte/ecryptfs_unwrap_passphrase.c	2013-09-20 20:06:12.184563865 +0200
+++ /var/tmp/portage/sys-fs/ecryptfs-utils-103/work/ecryptfs-utils-103/src/utils/ecryptfs_unwrap_passphrase.c	2012-05-18 21:06:17.000000000 +0200
@@ -60,7 +60,7 @@
 		   strlen(argv[2]) == 1 && strncmp(argv[2], "-", 1) == 0) {
 		/* stdin mode */
 		file = argv[1];
-		// wrapping_passphrase = ecryptfs_get_passphrase(NULL);
+		wrapping_passphrase = ecryptfs_get_passphrase(NULL);
 	} else if (argc == 3 &&
 		   (strlen(argv[2]) != 1 || strncmp(argv[2], "-", 1) == 0)) {
 		/* argument mode */
@@ -81,13 +81,8 @@
 		from_hex(salt, ECRYPTFS_DEFAULT_SALT_HEX, ECRYPTFS_SALT_SIZE);
 	} else
 		from_hex(salt, salt_hex, ECRYPTFS_SALT_SIZE);
-
-        
-
-        while(gets(wrapping_passphrase) != NULL)
 	if ((rc = ecryptfs_unwrap_passphrase(passphrase, file,
 					     wrapping_passphrase, salt))) {
-                continue;
 		fprintf(stderr, "%s [%d]\n", ECRYPTFS_ERROR_UNWRAP, rc);
 		fprintf(stderr, "%s\n", ECRYPTFS_INFO_CHECK_LOG);
 		rc = 1;