diff -up ecryptfs-utils-87/src/include/ecryptfs.h.fixconst ecryptfs-utils-87/src/include/ecryptfs.h
--- ecryptfs-utils-87/src/include/ecryptfs.h.fixconst 2011-08-03 15:35:28.552079157 +0200
+++ ecryptfs-utils-87/src/include/ecryptfs.h 2011-08-03 15:39:40.654497299 +0200
@@ -528,8 +528,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);
@@ -545,11 +545,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,
@@ -573,15 +573,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);
@@ -629,7 +629,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-87/src/libecryptfs/key_management.c.fixconst ecryptfs-utils-87/src/libecryptfs/key_management.c
--- ecryptfs-utils-87/src/libecryptfs/key_management.c.fixconst 2011-08-03 15:35:28.434082255 +0200
+++ ecryptfs-utils-87/src/libecryptfs/key_management.c 2011-08-03 15:39:26.382868090 +0200
@@ -53,7 +53,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;
@@ -190,8 +190,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];
@@ -220,8 +220,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];
@@ -546,8 +546,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] ;
uint32_t version;
diff -up ecryptfs-utils-87/src/libecryptfs/main.c.fixconst ecryptfs-utils-87/src/libecryptfs/main.c
--- ecryptfs-utils-87/src/libecryptfs/main.c.fixconst 2011-08-03 15:35:28.553079131 +0200
+++ ecryptfs-utils-87/src/libecryptfs/main.c 2011-08-03 15:35:28.577078501 +0200
@@ -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;