Blob Blame History Raw
diff -up ecryptfs-utils-103/src/include/ecryptfs.h.fixconst ecryptfs-utils-103/src/include/ecryptfs.h
--- ecryptfs-utils-103/src/include/ecryptfs.h.fixconst	2013-01-28 17:24:34.165260633 +0100
+++ ecryptfs-utils-103/src/include/ecryptfs.h	2013-01-28 17:24:34.172260689 +0100
@@ -479,8 +479,8 @@ int ecryptfs_eval_decision_graph(struct
 				 struct val_node **head,
 				 struct param_node *root_node,
 				 struct ecryptfs_name_val_pair *nvp_head);
-int ecryptfs_add_passphrase_key_to_keyring(char *auth_tok_sig, char *passphrase,
-					   char *salt);
+int ecryptfs_add_passphrase_key_to_keyring(char *auth_tok_sig, const char *passphrase,
+					   const char *salt);
 int ecryptfs_add_key_module_key_to_keyring(char *auth_tok_sig,
 					   struct ecryptfs_key_mod *key_mod);
 int ecryptfs_read_salt_hex_from_rc(char *salt_hex);
@@ -494,11 +494,11 @@ int parse_packet(struct ecryptfs_ctx *ct
 		 struct ecryptfs_message **reply);
 int ecryptfs_find_key_mod(struct ecryptfs_key_mod **key_mod,
 			  struct ecryptfs_ctx *ctx, char *key_mod_alias);
-int generate_passphrase_sig(char *passphrase_sig, char *fekek, char *salt,
-			    char *passphrase);
+int generate_passphrase_sig(char *passphrase_sig, char *fekek, const char *salt,
+			    const char *passphrase);
 int
 generate_payload(struct ecryptfs_auth_tok *auth_tok, char *passphrase_sig,
-		 char *salt, char *session_key_encryption_key);
+		 const char *salt, char *session_key_encryption_key);
 int
 ecryptfs_generate_key_payload(struct ecryptfs_auth_tok *auth_tok,
 			      struct ecryptfs_key_mod *key_mod, char *sig,
@@ -515,15 +515,15 @@ int ecryptfs_read_salt_hex_from_rc(char
 int ecryptfs_check_sig(char *auth_tok_sig, char *sig_cache_filename,
 		       int *flags);
 int ecryptfs_append_sig(char *auth_tok_sig, char *sig_cache_filename);
-int ecryptfs_wrap_passphrase_file(char *dest, char *wrapping_passphrase,
- 			     char *wrapping_salt, char *src);
-int ecryptfs_wrap_passphrase(char *filename, char *wrapping_passphrase,
-			     char *wrapping_salt, char *decrypted_passphrase);
-int ecryptfs_unwrap_passphrase(char *decrypted_passphrase, char *filename,
-			       char *wrapping_passphrase, char *wrapping_salt);
+int ecryptfs_wrap_passphrase_file(const char *dest, const char *wrapping_passphrase,
+ 			     const char *wrapping_salt, const char *src);
+int ecryptfs_wrap_passphrase(const char *filename, const char *wrapping_passphrase,
+			     const char *wrapping_salt, char *decrypted_passphrase);
+int ecryptfs_unwrap_passphrase(char *decrypted_passphrase, const char *filename,
+			       const char *wrapping_passphrase, const char *wrapping_salt);
 int ecryptfs_insert_wrapped_passphrase_into_keyring(
-	char *auth_tok_sig, char *filename, char *wrapping_passphrase,
-	char *salt);
+	char *auth_tok_sig, char *filename, const char *wrapping_passphrase,
+	const char *salt);
 char *ecryptfs_get_wrapped_passphrase_filename();
 struct ecryptfs_key_mod_ops *passphrase_get_key_mod_ops(void);
 int ecryptfs_validate_keyring(void);
@@ -571,7 +571,7 @@ char *ecryptfs_get_passphrase(char *prom
 int ecryptfs_run_daemon(struct ecryptfs_messaging_ctx *mctx);
 
 #define ECRYPTFS_PRIVATE_DIR "Private"
-char *ecryptfs_fetch_private_mnt(char *pw_dir);
+char *ecryptfs_fetch_private_mnt(const char *pw_dir);
 int ecryptfs_private_is_mounted(char *dev, char *mnt, char *sig, int mounting);
 
 #endif
diff -up ecryptfs-utils-103/src/libecryptfs/key_management.c.fixconst ecryptfs-utils-103/src/libecryptfs/key_management.c
--- ecryptfs-utils-103/src/libecryptfs/key_management.c.fixconst	2013-01-28 17:24:34.129260347 +0100
+++ ecryptfs-utils-103/src/libecryptfs/key_management.c	2013-01-28 17:24:34.172260689 +0100
@@ -55,7 +55,7 @@
  */
 int ecryptfs_generate_passphrase_auth_tok(struct ecryptfs_auth_tok **auth_tok,
 					  char *auth_tok_sig, char *fekek,
-					  char *salt, char *passphrase)
+					  const char *salt, const char *passphrase)
 {
 	int rc;
 
@@ -192,8 +192,8 @@ int ecryptfs_add_blob_to_keyring(char *b
  *
  * Returns 0 on add, 1 on pre-existed, negative on failure.
  */
-int ecryptfs_add_passphrase_key_to_keyring(char *auth_tok_sig, char *passphrase,
-					   char *salt)
+int ecryptfs_add_passphrase_key_to_keyring(char *auth_tok_sig, const char *passphrase,
+					  const char *salt)
 {
 	int rc;
 	char fekek[ECRYPTFS_MAX_KEY_BYTES];
@@ -222,8 +222,8 @@ out:
 	return rc;
 }
 
-int ecryptfs_wrap_passphrase_file(char *dest, char *wrapping_passphrase,
-				  char *salt, char *src)
+int ecryptfs_wrap_passphrase_file(const char *dest, const char *wrapping_passphrase,
+				  const char *salt, const char *src)
 {
 	int rc = 0;
 	ssize_t size;
@@ -264,8 +264,8 @@ out:
 	return rc;
 }
 
-int ecryptfs_wrap_passphrase(char *filename, char *wrapping_passphrase,
-			     char *wrapping_salt, char *decrypted_passphrase)
+int ecryptfs_wrap_passphrase(const char *filename, const char *wrapping_passphrase,
+			     const char *wrapping_salt, char *decrypted_passphrase)
 {
 	char wrapping_auth_tok_sig[ECRYPTFS_SIG_SIZE_HEX + 1];
 	char wrapping_key[ECRYPTFS_MAX_KEY_BYTES];
@@ -410,8 +410,8 @@ out:
  * decryptfs_passphrase must be able to hold
  * ECRYPTFS_MAX_PASSPHRASE_BYTES + 1 bytes
  */
-int ecryptfs_unwrap_passphrase(char *decrypted_passphrase, char *filename,
-			       char *wrapping_passphrase, char *wrapping_salt)
+int ecryptfs_unwrap_passphrase(char *decrypted_passphrase, const char *filename,
+			       const char *wrapping_passphrase, const char *wrapping_salt)
 {
 	char wrapping_auth_tok_sig[ECRYPTFS_SIG_SIZE_HEX + 1];
 	char wrapping_auth_tok_sig_from_file[ECRYPTFS_SIG_SIZE_HEX + 1];
@@ -549,8 +549,8 @@ out:
  * into the user session keyring.
  */
 int ecryptfs_insert_wrapped_passphrase_into_keyring(
-	char *auth_tok_sig, char *filename, char *wrapping_passphrase,
-	char *salt)
+	char *auth_tok_sig, char *filename, const char *wrapping_passphrase,
+	const char *salt)
 {
 	char decrypted_passphrase[ECRYPTFS_MAX_PASSPHRASE_BYTES + 1] ;
 	int rc = 0;
diff -up ecryptfs-utils-103/src/libecryptfs/main.c.fixconst ecryptfs-utils-103/src/libecryptfs/main.c
--- ecryptfs-utils-103/src/libecryptfs/main.c.fixconst	2013-01-28 17:24:34.166260641 +0100
+++ ecryptfs-utils-103/src/libecryptfs/main.c	2013-01-28 17:24:34.173260697 +0100
@@ -93,7 +93,7 @@ out:
 /* Read ecryptfs private mount from file
  * Allocate and return a string
  */
-char *ecryptfs_fetch_private_mnt(char *pw_dir) {
+char *ecryptfs_fetch_private_mnt(const char *pw_dir) {
 	char *mnt_file = NULL;
 	char *mnt_default = NULL;
 	char *mnt = NULL;
@@ -209,7 +209,7 @@ int ecryptfs_private_is_mounted(char *de
  */
 int
 generate_passphrase_sig(char *passphrase_sig, char *fekek,
-			char *salt, char *passphrase)
+			const char *salt, const char *passphrase)
 {
 	char salt_and_passphrase[ECRYPTFS_MAX_PASSPHRASE_BYTES
 				 + ECRYPTFS_SALT_SIZE];
@@ -253,7 +253,7 @@ generate_passphrase_sig(char *passphrase
  */
 int
 generate_payload(struct ecryptfs_auth_tok *auth_tok, char *passphrase_sig,
-		 char *salt, char *session_key_encryption_key)
+		 const char *salt, char *session_key_encryption_key)
 {
 	int rc = 0;
 	int major, minor;