Blame ecryptfs-utils-87-fixconst.patch

9471b7
diff -up ecryptfs-utils-108/src/include/ecryptfs.h.fixconst ecryptfs-utils-108/src/include/ecryptfs.h
9471b7
--- ecryptfs-utils-108/src/include/ecryptfs.h.fixconst	2015-08-11 14:44:01.791816259 +0200
9471b7
+++ ecryptfs-utils-108/src/include/ecryptfs.h	2015-08-11 14:44:01.794816251 +0200
cac1ea
@@ -479,8 +479,8 @@ int ecryptfs_eval_decision_graph(struct
8b5695
 				 struct val_node **head,
8b5695
 				 struct param_node *root_node,
8b5695
 				 struct ecryptfs_name_val_pair *nvp_head);
8b5695
-int ecryptfs_add_passphrase_key_to_keyring(char *auth_tok_sig, char *passphrase,
8b5695
-					   char *salt);
8b5695
+int ecryptfs_add_passphrase_key_to_keyring(char *auth_tok_sig, const char *passphrase,
8b5695
+					   const char *salt);
8b5695
 int ecryptfs_add_key_module_key_to_keyring(char *auth_tok_sig,
8b5695
 					   struct ecryptfs_key_mod *key_mod);
8b5695
 int ecryptfs_read_salt_hex_from_rc(char *salt_hex);
cac1ea
@@ -494,11 +494,11 @@ int parse_packet(struct ecryptfs_ctx *ct
8b5695
 		 struct ecryptfs_message **reply);
8b5695
 int ecryptfs_find_key_mod(struct ecryptfs_key_mod **key_mod,
8b5695
 			  struct ecryptfs_ctx *ctx, char *key_mod_alias);
8b5695
-int generate_passphrase_sig(char *passphrase_sig, char *fekek, char *salt,
8b5695
-			    char *passphrase);
8b5695
+int generate_passphrase_sig(char *passphrase_sig, char *fekek, const char *salt,
8b5695
+			    const char *passphrase);
8b5695
 int
8b5695
 generate_payload(struct ecryptfs_auth_tok *auth_tok, char *passphrase_sig,
8b5695
-		 char *salt, char *session_key_encryption_key);
8b5695
+		 const char *salt, char *session_key_encryption_key);
8b5695
 int
8b5695
 ecryptfs_generate_key_payload(struct ecryptfs_auth_tok *auth_tok,
8b5695
 			      struct ecryptfs_key_mod *key_mod, char *sig,
0d13c9
@@ -517,15 +517,15 @@ int ecryptfs_check_sig(char *auth_tok_si
8b5695
 int ecryptfs_append_sig(char *auth_tok_sig, char *sig_cache_filename);
0d13c9
 int __ecryptfs_detect_wrapped_passphrase_file_version(const char *filename,
0d13c9
 						      uint8_t *version);
8b5695
-int ecryptfs_wrap_passphrase_file(char *dest, char *wrapping_passphrase,
8b5695
- 			     char *wrapping_salt, char *src);
8b5695
-int ecryptfs_wrap_passphrase(char *filename, char *wrapping_passphrase,
0d13c9
-			     char *unused, char *decrypted_passphrase);
8b5695
-int ecryptfs_unwrap_passphrase(char *decrypted_passphrase, char *filename,
8b5695
-			       char *wrapping_passphrase, char *wrapping_salt);
8b5695
+int ecryptfs_wrap_passphrase_file(const char *dest, const char *wrapping_passphrase,
0d13c9
+			     const char *wrapping_salt, const char *src);
8b5695
+int ecryptfs_wrap_passphrase(const char *filename, const char *wrapping_passphrase,
0d13c9
+			     const char *unused, char *decrypted_passphrase);
8b5695
+int ecryptfs_unwrap_passphrase(char *decrypted_passphrase, const char *filename,
8b5695
+			       const char *wrapping_passphrase, const char *wrapping_salt);
8b5695
 int ecryptfs_insert_wrapped_passphrase_into_keyring(
8b5695
-	char *auth_tok_sig, char *filename, char *wrapping_passphrase,
8b5695
-	char *salt);
8b5695
+	char *auth_tok_sig, char *filename, const char *wrapping_passphrase,
8b5695
+	const char *salt);
8b5695
 char *ecryptfs_get_wrapped_passphrase_filename();
8b5695
 struct ecryptfs_key_mod_ops *passphrase_get_key_mod_ops(void);
8b5695
 int ecryptfs_validate_keyring(void);
0d13c9
@@ -573,7 +573,7 @@ char *ecryptfs_get_passphrase(char *prom
8b5695
 int ecryptfs_run_daemon(struct ecryptfs_messaging_ctx *mctx);
8b5695
 
8b5695
 #define ECRYPTFS_PRIVATE_DIR "Private"
8b5695
-char *ecryptfs_fetch_private_mnt(char *pw_dir);
8b5695
+char *ecryptfs_fetch_private_mnt(const char *pw_dir);
8b5695
 int ecryptfs_private_is_mounted(char *dev, char *mnt, char *sig, int mounting);
8b5695
 
8b5695
 #endif
9471b7
diff -up ecryptfs-utils-108/src/libecryptfs/key_management.c.fixconst ecryptfs-utils-108/src/libecryptfs/key_management.c
9471b7
--- ecryptfs-utils-108/src/libecryptfs/key_management.c.fixconst	2015-08-11 14:44:01.777816296 +0200
9471b7
+++ ecryptfs-utils-108/src/libecryptfs/key_management.c	2015-08-11 14:44:01.795816249 +0200
7d5fb1
@@ -55,7 +55,7 @@
8b5695
  */
8b5695
 int ecryptfs_generate_passphrase_auth_tok(struct ecryptfs_auth_tok **auth_tok,
8b5695
 					  char *auth_tok_sig, char *fekek,
8b5695
-					  char *salt, char *passphrase)
8b5695
+					  const char *salt, const char *passphrase)
8b5695
 {
8b5695
 	int rc;
8b5695
 
0d13c9
@@ -195,8 +195,8 @@ int ecryptfs_add_blob_to_keyring(char *b
8b5695
  *
8b5695
  * Returns 0 on add, 1 on pre-existed, negative on failure.
8b5695
  */
8b5695
-int ecryptfs_add_passphrase_key_to_keyring(char *auth_tok_sig, char *passphrase,
8b5695
-					   char *salt)
8b5695
+int ecryptfs_add_passphrase_key_to_keyring(char *auth_tok_sig, const char *passphrase,
8b5695
+					  const char *salt)
8b5695
 {
8b5695
 	int rc;
8b5695
 	char fekek[ECRYPTFS_MAX_KEY_BYTES];
0d13c9
@@ -382,8 +382,8 @@ out:
8b5695
 	return rc;
8b5695
 }
8b5695
 
8b5695
-int ecryptfs_wrap_passphrase_file(char *dest, char *wrapping_passphrase,
8b5695
-				  char *salt, char *src)
8b5695
+int ecryptfs_wrap_passphrase_file(const char *dest, const char *wrapping_passphrase,
8b5695
+				  const char *salt, const char *src)
8b5695
 {
8b5695
 	int rc = 0;
8b5695
 	ssize_t size;
0d13c9
@@ -540,8 +540,8 @@ out:
0d13c9
  *
0d13c9
  * Returns 0 upon success. Negative upon error.
0d13c9
  */
8b5695
-int ecryptfs_wrap_passphrase(char *filename, char *wrapping_passphrase,
0d13c9
-			     char *unused, char *decrypted_passphrase)
8b5695
+int ecryptfs_wrap_passphrase(const char *filename, const char *wrapping_passphrase,
0d13c9
+			     const char *unused, char *decrypted_passphrase)
8b5695
 {
0d13c9
 	char wrapping_salt[ECRYPTFS_SALT_SIZE];
8b5695
 	char wrapping_auth_tok_sig[ECRYPTFS_SIG_SIZE_HEX + 1];
0d13c9
@@ -822,8 +822,8 @@ out:
8b5695
  * decryptfs_passphrase must be able to hold
8b5695
  * ECRYPTFS_MAX_PASSPHRASE_BYTES + 1 bytes
8b5695
  */
8b5695
-int ecryptfs_unwrap_passphrase(char *decrypted_passphrase, char *filename,
8b5695
-			       char *wrapping_passphrase, char *wrapping_salt)
8b5695
+int ecryptfs_unwrap_passphrase(char *decrypted_passphrase, const char *filename,
8b5695
+			       const char *wrapping_passphrase, const char *wrapping_salt)
8b5695
 {
0d13c9
 	char v2_wrapping_salt[ECRYPTFS_SALT_SIZE];
8b5695
 	char wrapping_auth_tok_sig[ECRYPTFS_SIG_SIZE_HEX + 1];
0d13c9
@@ -976,8 +976,8 @@ out:
8b5695
  * into the user session keyring.
8b5695
  */
8b5695
 int ecryptfs_insert_wrapped_passphrase_into_keyring(
8b5695
-	char *auth_tok_sig, char *filename, char *wrapping_passphrase,
8b5695
-	char *salt)
8b5695
+	char *auth_tok_sig, char *filename, const char *wrapping_passphrase,
8b5695
+	const char *salt)
8b5695
 {
8b5695
 	char decrypted_passphrase[ECRYPTFS_MAX_PASSPHRASE_BYTES + 1] ;
7d5fb1
 	int rc = 0;
9471b7
diff -up ecryptfs-utils-108/src/libecryptfs/main.c.fixconst ecryptfs-utils-108/src/libecryptfs/main.c
9471b7
--- ecryptfs-utils-108/src/libecryptfs/main.c.fixconst	2015-08-11 14:44:01.791816259 +0200
9471b7
+++ ecryptfs-utils-108/src/libecryptfs/main.c	2015-08-11 14:44:01.795816249 +0200
0d13c9
@@ -92,7 +92,7 @@ out:
8b5695
 /* Read ecryptfs private mount from file
8b5695
  * Allocate and return a string
8b5695
  */
8b5695
-char *ecryptfs_fetch_private_mnt(char *pw_dir) {
8b5695
+char *ecryptfs_fetch_private_mnt(const char *pw_dir) {
8b5695
 	char *mnt_file = NULL;
8b5695
 	char *mnt_default = NULL;
8b5695
 	char *mnt = NULL;
0d13c9
@@ -212,7 +212,7 @@ int ecryptfs_private_is_mounted(char *de
8b5695
  */
8b5695
 int
8b5695
 generate_passphrase_sig(char *passphrase_sig, char *fekek,
8b5695
-			char *salt, char *passphrase)
8b5695
+			const char *salt, const char *passphrase)
8b5695
 {
8b5695
 	char salt_and_passphrase[ECRYPTFS_MAX_PASSPHRASE_BYTES
8b5695
 				 + ECRYPTFS_SALT_SIZE];
9471b7
@@ -257,7 +257,7 @@ generate_passphrase_sig(char *passphrase
8b5695
  */
8b5695
 int
8b5695
 generate_payload(struct ecryptfs_auth_tok *auth_tok, char *passphrase_sig,
8b5695
-		 char *salt, char *session_key_encryption_key)
8b5695
+		 const char *salt, char *session_key_encryption_key)
8b5695
 {
8b5695
 	int rc = 0;
8b5695
 	int major, minor;