1 diff -up ecryptfs-utils-85/src/key_mod/ecryptfs_key_mod_pkcs11_helper.c.werror ecryptfs-utils-85/src/key_mod/ecryptfs_key_mod_pkcs11_helper.c
2 --- ecryptfs-utils-85/src/key_mod/ecryptfs_key_mod_pkcs11_helper.c.werror 2010-12-17 18:34:04.000000000 +0100
3 +++ ecryptfs-utils-85/src/key_mod/ecryptfs_key_mod_pkcs11_helper.c 2011-02-01 11:12:14.813646937 +0100
4 @@ -86,7 +86,7 @@ static int ecryptfs_pkcs11h_deserialize(
5 pkcs11h_data->serialized_id = NULL;
8 - pkcs11h_data->serialized_id = blob + i;
9 + pkcs11h_data->serialized_id = (char *)blob + i;
10 i += serialized_id_length;
12 pkcs11h_data->certificate_blob_size = blob[i++] % 256;
13 @@ -104,12 +104,11 @@ static int ecryptfs_pkcs11h_deserialize(
14 pkcs11h_data->passphrase = NULL;
17 - pkcs11h_data->passphrase = blob + i;
18 + pkcs11h_data->passphrase = (char *)blob + i;
19 i += passphrase_length;
27 @@ -346,14 +345,14 @@ static int ecryptfs_pkcs11h_get_key_sig(
29 data[i++] = (char)(nbits >> 8);
30 data[i++] = (char)nbits;
31 - BN_bn2bin(rsa->n, &(data[i]));
32 + BN_bn2bin(rsa->n, (unsigned char *)&(data[i]));
34 data[i++] = (char)(ebits >> 8);
35 data[i++] = (char)ebits;
36 - BN_bn2bin(rsa->e, &(data[i]));
37 + BN_bn2bin(rsa->e, (unsigned char *)&(data[i]));
39 - SHA1(data, len + 3, hash);
40 - to_hex(sig, hash, ECRYPTFS_SIG_SIZE);
41 + SHA1((unsigned char *)data, len + 3, (unsigned char *)hash);
42 + to_hex((char *)sig, hash, ECRYPTFS_SIG_SIZE);
43 sig[ECRYPTFS_SIG_SIZE_HEX] = '\0';
46 @@ -411,8 +410,8 @@ static int ecryptfs_pkcs11h_encrypt(char
48 (rc = RSA_public_encrypt(
52 + (unsigned char *)from,
53 + (unsigned char *)to,
57 @@ -506,9 +505,9 @@ static int ecryptfs_pkcs11h_decrypt(char
58 (rv = pkcs11h_certificate_decryptAny (
62 + (unsigned char *)from,
65 + (unsigned char *)to,
69 @@ -534,9 +533,9 @@ static int ecryptfs_pkcs11h_decrypt(char
70 pkcs11h_certificate_decryptAny (
74 + (unsigned char *)from,
77 + (unsigned char *)tmp,
81 @@ -851,7 +850,7 @@ static int ecryptfs_pkcs11h_process_key(
85 - if ((rc = ecryptfs_pkcs11h_serialize(subgraph_key_ctx->key_mod->blob,
86 + if ((rc = ecryptfs_pkcs11h_serialize((unsigned char *)subgraph_key_ctx->key_mod->blob,
87 &subgraph_key_ctx->key_mod->blob_size,
89 syslog(LOG_ERR, "PKCS#11: Error serializing pkcs11; rc=[%d]\n", rc);
90 @@ -930,7 +929,7 @@ static int tf_pkcs11h_global_loglevel(st
99 @@ -943,7 +942,7 @@ static int tf_pkcs11h_global_pincache(st
108 @@ -1013,7 +1012,7 @@ static int tf_pkcs11h_provider_prot_auth
109 sscanf (node->val, "%x", &subgraph_provider_ctx->allow_protected_authentication);
117 @@ -1027,7 +1026,7 @@ static int tf_pkcs11h_provider_cert_priv
118 sscanf (node->val, "%x", &subgraph_provider_ctx->certificate_is_private);
126 @@ -1042,7 +1041,7 @@ static int tf_pkcs11h_provider_private_m
135 @@ -1073,7 +1072,7 @@ static int tf_pkcs11h_provider_end(struc
136 free(subgraph_provider_ctx);
144 @@ -1120,7 +1119,7 @@ static int tf_pkcs11h_key_x509file(struc
146 unsigned char *p = NULL;
151 subgraph_key_ctx = (struct pkcs11h_subgraph_key_ctx *)(*foo);
153 diff -up ecryptfs-utils-85/src/libecryptfs/ecryptfs-stat.c.werror ecryptfs-utils-85/src/libecryptfs/ecryptfs-stat.c
154 --- ecryptfs-utils-85/src/libecryptfs/ecryptfs-stat.c.werror 2010-12-17 18:34:04.000000000 +0100
155 +++ ecryptfs-utils-85/src/libecryptfs/ecryptfs-stat.c 2011-02-01 11:12:14.813646937 +0100
156 @@ -146,7 +146,7 @@ int ecryptfs_parse_stat(struct ecryptfs_
157 if (buf_size < (ECRYPTFS_FILE_SIZE_BYTES
158 + MAGIC_ECRYPTFS_MARKER_SIZE_BYTES
160 - printf("%s: Invalid metadata size; must have at least [%lu] "
161 + printf("%s: Invalid metadata size; must have at least [%zu] "
162 "bytes; there are only [%zu] bytes\n", __FUNCTION__,
163 (ECRYPTFS_FILE_SIZE_BYTES
164 + MAGIC_ECRYPTFS_MARKER_SIZE_BYTES
165 diff -up ecryptfs-utils-85/src/pam_ecryptfs/pam_ecryptfs.c.werror ecryptfs-utils-85/src/pam_ecryptfs/pam_ecryptfs.c
166 --- ecryptfs-utils-85/src/pam_ecryptfs/pam_ecryptfs.c.werror 2010-12-17 18:34:04.000000000 +0100
167 +++ ecryptfs-utils-85/src/pam_ecryptfs/pam_ecryptfs.c 2011-02-01 11:12:18.061664154 +0100
170 #define PRIVATE_DIR "Private"
172 -static void error(const char *msg)
174 - syslog(LOG_ERR, "errno = [%i]; strerror = [%m]\n", errno);
177 - syslog(LOG_ERR, "%s: Requested key not available\n", msg);
181 - syslog(LOG_ERR, "%s: Key has expired\n", msg);
185 - syslog(LOG_ERR, "%s: Key has been revoked\n", msg);
189 - syslog(LOG_ERR, "%s: Key was rejected by service\n", msg);
192 - syslog(LOG_ERR, "%s: Unknown key error\n", msg);
197 /* returns: 0 for pam automounting not set, 1 for set, <0 for error */
198 static int ecryptfs_pam_automount_set(const char *homedir)
200 @@ -87,7 +62,7 @@ out:
204 -static int wrap_passphrase_if_necessary(char *username, uid_t uid, char *wrapped_pw_filename, char *passphrase, char *salt)
205 +static int wrap_passphrase_if_necessary(const char *username, uid_t uid, char *wrapped_pw_filename, char *passphrase, char *salt)
207 char *unwrapped_pw_filename = NULL;
209 @@ -198,8 +173,6 @@ PAM_EXTERN int pam_sm_authenticate(pam_h
211 && (memcmp(argv[0], "unwrap\0", 7) == 0)) {
212 char *wrapped_pw_filename;
213 - char *unwrapped_pw_filename;
217 &wrapped_pw_filename, "%s/.ecryptfs/%s",
218 @@ -291,8 +264,6 @@ static int private_dir(pam_handle_t *pam
219 char *autoumount = "auto-umount";
225 if ((pwd = fetch_pwd(pamh)) == NULL) {
226 /* fetch_pwd() logged a message */
227 @@ -339,7 +310,7 @@ static int private_dir(pam_handle_t *pam
228 if (stat(recorded, &s) != 0 && stat("/usr/share/ecryptfs-utils/ecryptfs-record-passphrase", &s) == 0) {
229 /* User has not recorded their passphrase */
230 unlink("/var/lib/update-notifier/user.d/ecryptfs-record-passphrase");
231 - symlink("/usr/share/ecryptfs-utils/ecryptfs-record-passphrase", "/var/lib/update-notifier/user.d/ecryptfs-record-passphrase");
232 + rc=symlink("/usr/share/ecryptfs-utils/ecryptfs-record-passphrase", "/var/lib/update-notifier/user.d/ecryptfs-record-passphrase");
233 fd = open("/var/lib/update-notifier/dpkg-run-stamp", O_WRONLY|O_CREAT|O_NONBLOCK, 0666);
236 @@ -410,7 +381,7 @@ PAM_EXTERN int pam_sm_chauthtok(pam_hand
237 char *old_passphrase = NULL;
238 char *new_passphrase = NULL;
239 char *wrapped_pw_filename;
241 +// char *name = NULL;
242 char salt[ECRYPTFS_SALT_SIZE];
243 char salt_hex[ECRYPTFS_SALT_SIZE_HEX];
244 pid_t child_pid, tmp_pid;
245 @@ -424,11 +395,11 @@ PAM_EXTERN int pam_sm_chauthtok(pam_hand
248 homedir = pwd->pw_dir;
249 - name = pwd->pw_name;
250 +// name = pwd->pw_name;
253 syslog(LOG_ERR, "Error getting passwd info for user [%s]; "
254 - "rc = [%ld]\n", username, rc);
255 + "rc = [%d]\n", username, rc);
258 saved_uid = geteuid();
259 diff -up ecryptfs-utils-85/src/utils/mount.ecryptfs.c.werror ecryptfs-utils-85/src/utils/mount.ecryptfs.c
260 --- ecryptfs-utils-85/src/utils/mount.ecryptfs.c.werror 2010-12-17 18:34:04.000000000 +0100
261 +++ ecryptfs-utils-85/src/utils/mount.ecryptfs.c 2011-02-01 11:12:14.818646964 +0100
262 @@ -461,7 +461,7 @@ static int ecryptfs_do_mount(int argc, c
267 +// int num_opts = 0;
268 char *src = NULL, *targ = NULL, *opts = NULL, *new_opts = NULL, *temp;
271 @@ -472,7 +472,7 @@ static int ecryptfs_do_mount(int argc, c
272 rc = strip_userland_opts(opts);
275 - num_opts = ecryptfs_generate_mount_flags(opts, &flags);
276 + ecryptfs_generate_mount_flags(opts, &flags);
277 if (!(temp = strdup("ecryptfs_unlink_sigs"))) {
280 diff -up ecryptfs-utils-85/src/utils/test.c.werror ecryptfs-utils-85/src/utils/test.c
281 --- ecryptfs-utils-85/src/utils/test.c.werror 2010-12-17 18:34:04.000000000 +0100
282 +++ ecryptfs-utils-85/src/utils/test.c 2011-02-01 11:12:14.818646964 +0100
283 @@ -281,7 +281,7 @@ int ecryptfs_encrypt_page(int page_cache
284 struct inode *lower_inode;
285 struct ecryptfs_crypt_stat *crypt_stat;
287 - int lower_byte_offset;
288 + int lower_byte_offset = 0;
289 int orig_byte_offset = 0;
290 int num_extents_per_page;
291 #define ECRYPTFS_PAGE_STATE_UNREAD 0