743d938
diff -up ecryptfs-utils-87/src/include/ecryptfs.h.fixconst ecryptfs-utils-87/src/include/ecryptfs.h
743d938
--- ecryptfs-utils-87/src/include/ecryptfs.h.fixconst	2011-08-03 15:35:28.552079157 +0200
743d938
+++ ecryptfs-utils-87/src/include/ecryptfs.h	2011-08-03 15:39:40.654497299 +0200
743d938
@@ -528,8 +528,8 @@ int ecryptfs_eval_decision_graph(struct 
743d938
 				 struct val_node **head,
743d938
 				 struct param_node *root_node,
743d938
 				 struct ecryptfs_name_val_pair *nvp_head);
743d938
-int ecryptfs_add_passphrase_key_to_keyring(char *auth_tok_sig, char *passphrase,
743d938
-					   char *salt);
743d938
+int ecryptfs_add_passphrase_key_to_keyring(char *auth_tok_sig, const char *passphrase,
743d938
+					   const char *salt);
743d938
 int ecryptfs_add_key_module_key_to_keyring(char *auth_tok_sig,
743d938
 					   struct ecryptfs_key_mod *key_mod);
743d938
 int ecryptfs_read_salt_hex_from_rc(char *salt_hex);
743d938
@@ -545,11 +545,11 @@ int parse_packet(struct ecryptfs_ctx *ct
743d938
 		 struct ecryptfs_message **reply);
743d938
 int ecryptfs_find_key_mod(struct ecryptfs_key_mod **key_mod,
743d938
 			  struct ecryptfs_ctx *ctx, char *key_mod_alias);
743d938
-int generate_passphrase_sig(char *passphrase_sig, char *fekek, char *salt,
743d938
-			    char *passphrase);
743d938
+int generate_passphrase_sig(char *passphrase_sig, char *fekek, const char *salt,
743d938
+			    const char *passphrase);
743d938
 int
743d938
 generate_payload(struct ecryptfs_auth_tok *auth_tok, char *passphrase_sig,
743d938
-		 char *salt, char *session_key_encryption_key);
743d938
+		 const char *salt, char *session_key_encryption_key);
743d938
 int
743d938
 ecryptfs_generate_key_payload(struct ecryptfs_auth_tok *auth_tok,
743d938
 			      struct ecryptfs_key_mod *key_mod, char *sig,
743d938
@@ -573,15 +573,15 @@ int ecryptfs_read_salt_hex_from_rc(char 
743d938
 int ecryptfs_check_sig(char *auth_tok_sig, char *sig_cache_filename,
743d938
 		       int *flags);
743d938
 int ecryptfs_append_sig(char *auth_tok_sig, char *sig_cache_filename);
743d938
-int ecryptfs_wrap_passphrase_file(char *dest, char *wrapping_passphrase,
743d938
- 			     char *wrapping_salt, char *src);
743d938
-int ecryptfs_wrap_passphrase(char *filename, char *wrapping_passphrase,
743d938
-			     char *wrapping_salt, char *decrypted_passphrase);
743d938
-int ecryptfs_unwrap_passphrase(char *decrypted_passphrase, char *filename,
743d938
-			       char *wrapping_passphrase, char *wrapping_salt);
743d938
+int ecryptfs_wrap_passphrase_file(const char *dest, const char *wrapping_passphrase,
743d938
+ 			     const char *wrapping_salt, const char *src);
743d938
+int ecryptfs_wrap_passphrase(const char *filename, const char *wrapping_passphrase,
743d938
+			     const char *wrapping_salt, char *decrypted_passphrase);
743d938
+int ecryptfs_unwrap_passphrase(char *decrypted_passphrase, const char *filename,
743d938
+			       const char *wrapping_passphrase, const char *wrapping_salt);
743d938
 int ecryptfs_insert_wrapped_passphrase_into_keyring(
743d938
-	char *auth_tok_sig, char *filename, char *wrapping_passphrase,
743d938
-	char *salt);
743d938
+	char *auth_tok_sig, char *filename, const char *wrapping_passphrase,
743d938
+	const char *salt);
743d938
 char *ecryptfs_get_wrapped_passphrase_filename();
743d938
 struct ecryptfs_key_mod_ops *passphrase_get_key_mod_ops(void);
743d938
 int ecryptfs_validate_keyring(void);
743d938
@@ -629,7 +629,7 @@ char *ecryptfs_get_passphrase(char *prom
743d938
 int ecryptfs_run_daemon(struct ecryptfs_messaging_ctx *mctx);
743d938
 
743d938
 #define ECRYPTFS_PRIVATE_DIR "Private"
743d938
-char *ecryptfs_fetch_private_mnt(char *pw_dir);
743d938
+char *ecryptfs_fetch_private_mnt(const char *pw_dir);
743d938
 int ecryptfs_private_is_mounted(char *dev, char *mnt, char *sig, int mounting);
743d938
 
743d938
 #endif
743d938
diff -up ecryptfs-utils-87/src/libecryptfs/key_management.c.fixconst ecryptfs-utils-87/src/libecryptfs/key_management.c
743d938
--- ecryptfs-utils-87/src/libecryptfs/key_management.c.fixconst	2011-08-03 15:35:28.434082255 +0200
743d938
+++ ecryptfs-utils-87/src/libecryptfs/key_management.c	2011-08-03 15:39:26.382868090 +0200
743d938
@@ -53,7 +53,7 @@
743d938
  */
743d938
 int ecryptfs_generate_passphrase_auth_tok(struct ecryptfs_auth_tok **auth_tok,
743d938
 					  char *auth_tok_sig, char *fekek,
743d938
-					  char *salt, char *passphrase)
743d938
+					  const char *salt, const char *passphrase)
743d938
 {
743d938
 	int rc;
743d938
 
743d938
@@ -190,8 +190,8 @@ int ecryptfs_add_blob_to_keyring(char *b
743d938
  *
743d938
  * Returns 0 on add, 1 on pre-existed, negative on failure.
743d938
  */
743d938
-int ecryptfs_add_passphrase_key_to_keyring(char *auth_tok_sig, char *passphrase,
743d938
-					   char *salt)
743d938
+int ecryptfs_add_passphrase_key_to_keyring(char *auth_tok_sig, const char *passphrase,
743d938
+					  const char *salt)
743d938
 {
743d938
 	int rc;
743d938
 	char fekek[ECRYPTFS_MAX_KEY_BYTES];
743d938
@@ -220,8 +220,8 @@ out:
743d938
 	return rc;
743d938
 }
743d938
 
743d938
-int ecryptfs_wrap_passphrase_file(char *dest, char *wrapping_passphrase,
743d938
-				  char *salt, char *src)
743d938
+int ecryptfs_wrap_passphrase_file(const char *dest, const char *wrapping_passphrase,
743d938
+				  const char *salt, const char *src)
743d938
 {
743d938
 	int rc = 0;
743d938
 	ssize_t size;
743d938
@@ -264,8 +264,8 @@ out:
743d938
 	return rc;
743d938
 }
743d938
 
743d938
-int ecryptfs_wrap_passphrase(char *filename, char *wrapping_passphrase,
743d938
-			     char *wrapping_salt, char *decrypted_passphrase)
743d938
+int ecryptfs_wrap_passphrase(const char *filename, const char *wrapping_passphrase,
743d938
+			     const char *wrapping_salt, char *decrypted_passphrase)
743d938
 {
743d938
 	char wrapping_auth_tok_sig[ECRYPTFS_SIG_SIZE_HEX + 1];
743d938
 	char wrapping_key[ECRYPTFS_MAX_KEY_BYTES];
743d938
@@ -410,8 +410,8 @@ out:
743d938
  * decryptfs_passphrase must be able to hold
743d938
  * ECRYPTFS_MAX_PASSPHRASE_BYTES + 1 bytes
743d938
  */
743d938
-int ecryptfs_unwrap_passphrase(char *decrypted_passphrase, char *filename,
743d938
-			       char *wrapping_passphrase, char *wrapping_salt)
743d938
+int ecryptfs_unwrap_passphrase(char *decrypted_passphrase, const char *filename,
743d938
+			       const char *wrapping_passphrase, const char *wrapping_salt)
743d938
 {
743d938
 	char wrapping_auth_tok_sig[ECRYPTFS_SIG_SIZE_HEX + 1];
743d938
 	char wrapping_auth_tok_sig_from_file[ECRYPTFS_SIG_SIZE_HEX + 1];
743d938
@@ -546,8 +546,8 @@ out:
743d938
  * into the user session keyring.
743d938
  */
743d938
 int ecryptfs_insert_wrapped_passphrase_into_keyring(
743d938
-	char *auth_tok_sig, char *filename, char *wrapping_passphrase,
743d938
-	char *salt)
743d938
+	char *auth_tok_sig, char *filename, const char *wrapping_passphrase,
743d938
+	const char *salt)
743d938
 {
743d938
 	char decrypted_passphrase[ECRYPTFS_MAX_PASSPHRASE_BYTES + 1] ;
743d938
 	uint32_t version;
743d938
diff -up ecryptfs-utils-87/src/libecryptfs/main.c.fixconst ecryptfs-utils-87/src/libecryptfs/main.c
743d938
--- ecryptfs-utils-87/src/libecryptfs/main.c.fixconst	2011-08-03 15:35:28.553079131 +0200
743d938
+++ ecryptfs-utils-87/src/libecryptfs/main.c	2011-08-03 15:35:28.577078501 +0200
743d938
@@ -93,7 +93,7 @@ out:
743d938
 /* Read ecryptfs private mount from file
743d938
  * Allocate and return a string
743d938
  */
743d938
-char *ecryptfs_fetch_private_mnt(char *pw_dir) {
743d938
+char *ecryptfs_fetch_private_mnt(const char *pw_dir) {
743d938
 	char *mnt_file = NULL;
743d938
 	char *mnt_default = NULL;
743d938
 	char *mnt = NULL;
743d938
@@ -209,7 +209,7 @@ int ecryptfs_private_is_mounted(char *de
743d938
  */
743d938
 int
743d938
 generate_passphrase_sig(char *passphrase_sig, char *fekek,
743d938
-			char *salt, char *passphrase)
743d938
+			const char *salt, const char *passphrase)
743d938
 {
743d938
 	char salt_and_passphrase[ECRYPTFS_MAX_PASSPHRASE_BYTES
743d938
 				 + ECRYPTFS_SALT_SIZE];
743d938
@@ -253,7 +253,7 @@ generate_passphrase_sig(char *passphrase
743d938
  */
743d938
 int
743d938
 generate_payload(struct ecryptfs_auth_tok *auth_tok, char *passphrase_sig,
743d938
-		 char *salt, char *session_key_encryption_key)
743d938
+		 const char *salt, char *session_key_encryption_key)
743d938
 {
743d938
 	int rc = 0;
743d938
 	int major, minor;