Blame ecryptfs-utils-87-fixconst.patch

8b5695
diff -up ecryptfs-utils-87/src/include/ecryptfs.h.fixconst ecryptfs-utils-87/src/include/ecryptfs.h
8b5695
--- ecryptfs-utils-87/src/include/ecryptfs.h.fixconst	2011-08-03 15:35:28.552079157 +0200
8b5695
+++ ecryptfs-utils-87/src/include/ecryptfs.h	2011-08-03 15:39:40.654497299 +0200
8b5695
@@ -528,8 +528,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);
8b5695
@@ -545,11 +545,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,
8b5695
@@ -573,15 +573,15 @@ int ecryptfs_read_salt_hex_from_rc(char 
8b5695
 int ecryptfs_check_sig(char *auth_tok_sig, char *sig_cache_filename,
8b5695
 		       int *flags);
8b5695
 int ecryptfs_append_sig(char *auth_tok_sig, char *sig_cache_filename);
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,
8b5695
-			     char *wrapping_salt, 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,
8b5695
+ 			     const char *wrapping_salt, const char *src);
8b5695
+int ecryptfs_wrap_passphrase(const char *filename, const char *wrapping_passphrase,
8b5695
+			     const char *wrapping_salt, 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);
8b5695
@@ -629,7 +629,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
8b5695
diff -up ecryptfs-utils-87/src/libecryptfs/key_management.c.fixconst ecryptfs-utils-87/src/libecryptfs/key_management.c
8b5695
--- ecryptfs-utils-87/src/libecryptfs/key_management.c.fixconst	2011-08-03 15:35:28.434082255 +0200
8b5695
+++ ecryptfs-utils-87/src/libecryptfs/key_management.c	2011-08-03 15:39:26.382868090 +0200
8b5695
@@ -53,7 +53,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
 
8b5695
@@ -190,8 +190,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];
8b5695
@@ -220,8 +220,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;
8b5695
@@ -264,8 +264,8 @@ out:
8b5695
 	return rc;
8b5695
 }
8b5695
 
8b5695
-int ecryptfs_wrap_passphrase(char *filename, char *wrapping_passphrase,
8b5695
-			     char *wrapping_salt, char *decrypted_passphrase)
8b5695
+int ecryptfs_wrap_passphrase(const char *filename, const char *wrapping_passphrase,
8b5695
+			     const char *wrapping_salt, char *decrypted_passphrase)
8b5695
 {
8b5695
 	char wrapping_auth_tok_sig[ECRYPTFS_SIG_SIZE_HEX + 1];
8b5695
 	char wrapping_key[ECRYPTFS_MAX_KEY_BYTES];
8b5695
@@ -410,8 +410,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
 {
8b5695
 	char wrapping_auth_tok_sig[ECRYPTFS_SIG_SIZE_HEX + 1];
8b5695
 	char wrapping_auth_tok_sig_from_file[ECRYPTFS_SIG_SIZE_HEX + 1];
8b5695
@@ -546,8 +546,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] ;
8b5695
 	uint32_t version;
8b5695
diff -up ecryptfs-utils-87/src/libecryptfs/main.c.fixconst ecryptfs-utils-87/src/libecryptfs/main.c
8b5695
--- ecryptfs-utils-87/src/libecryptfs/main.c.fixconst	2011-08-03 15:35:28.553079131 +0200
8b5695
+++ ecryptfs-utils-87/src/libecryptfs/main.c	2011-08-03 15:35:28.577078501 +0200
8b5695
@@ -93,7 +93,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;
8b5695
@@ -209,7 +209,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];
8b5695
@@ -253,7 +253,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;