Blame ecryptfs-utils-87-fixconst.patch

7d5fb1
diff -up ecryptfs-utils-100/src/include/ecryptfs.h.fixconst ecryptfs-utils-100/src/include/ecryptfs.h
7d5fb1
--- ecryptfs-utils-100/src/include/ecryptfs.h.fixconst	2012-08-03 10:48:37.774342929 +0200
7d5fb1
+++ ecryptfs-utils-100/src/include/ecryptfs.h	2012-08-03 10:48:37.781342982 +0200
7d5fb1
@@ -487,8 +487,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);
7d5fb1
@@ -502,11 +502,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,
7d5fb1
@@ -530,15 +530,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);
7d5fb1
@@ -586,7 +586,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
7d5fb1
diff -up ecryptfs-utils-100/src/libecryptfs/key_management.c.fixconst ecryptfs-utils-100/src/libecryptfs/key_management.c
7d5fb1
--- ecryptfs-utils-100/src/libecryptfs/key_management.c.fixconst	2012-08-03 10:48:37.737342651 +0200
7d5fb1
+++ ecryptfs-utils-100/src/libecryptfs/key_management.c	2012-08-03 10:49:29.412732323 +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
 
7d5fb1
@@ -192,8 +192,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];
7d5fb1
@@ -222,8 +222,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];
7d5fb1
@@ -549,8 +549,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;
7d5fb1
diff -up ecryptfs-utils-100/src/libecryptfs/main.c.fixconst ecryptfs-utils-100/src/libecryptfs/main.c
7d5fb1
--- ecryptfs-utils-100/src/libecryptfs/main.c.fixconst	2012-08-03 10:48:37.775342936 +0200
7d5fb1
+++ ecryptfs-utils-100/src/libecryptfs/main.c	2012-08-03 10:48:37.783342997 +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;