Blame ecryptfs-utils-75-werror.patch

Michal Hlavinka 538613
diff -up ecryptfs-utils_76.orig/src/pam_ecryptfs/pam_ecryptfs.c.werror ecryptfs-utils_76.orig/src/pam_ecryptfs/pam_ecryptfs.c
Michal Hlavinka 538613
--- ecryptfs-utils_76.orig/src/pam_ecryptfs/pam_ecryptfs.c.werror	2009-07-20 15:17:30.013884686 +0200
Michal Hlavinka 538613
+++ ecryptfs-utils_76.orig/src/pam_ecryptfs/pam_ecryptfs.c	2009-07-20 15:19:17.111071710 +0200
Michal Hlavinka 538613
@@ -42,31 +42,6 @@
Michal Hlavinka a225d8
 
Michal Hlavinka 538613
 #define PRIVATE_DIR "Private"
Michal Hlavinka a225d8
 
Michal Hlavinka 538613
-static void error(const char *msg)
Michal Hlavinka 538613
-{
Michal Hlavinka 538613
-	syslog(LOG_ERR, "errno = [%i]; strerror = [%m]\n", errno);
Michal Hlavinka 538613
-	switch (errno) {
Michal Hlavinka 538613
-	case ENOKEY:
Michal Hlavinka 538613
-		syslog(LOG_ERR, "%s: Requested key not available\n", msg);
Michal Hlavinka 538613
-		return;
Michal Hlavinka 538613
-
Michal Hlavinka 538613
-	case EKEYEXPIRED:
Michal Hlavinka 538613
-		syslog(LOG_ERR, "%s: Key has expired\n", msg);
Michal Hlavinka 538613
-		return;
Michal Hlavinka 538613
-
Michal Hlavinka 538613
-	case EKEYREVOKED:
Michal Hlavinka 538613
-		syslog(LOG_ERR, "%s: Key has been revoked\n", msg);
Michal Hlavinka 538613
-		return;
Michal Hlavinka 538613
-
Michal Hlavinka 538613
-	case EKEYREJECTED:
Michal Hlavinka 538613
-		syslog(LOG_ERR, "%s: Key was rejected by service\n", msg);
Michal Hlavinka 538613
-		return;
Michal Hlavinka 538613
-	default:
Michal Hlavinka 538613
-		syslog(LOG_ERR, "%s: Unknown key error\n", msg);
Michal Hlavinka 538613
-		return;
Michal Hlavinka 538613
-	}
Michal Hlavinka 538613
-}
Michal Hlavinka 538613
-
Michal Hlavinka 538613
 /* returns: 0 for pam automounting not set, 1 for set, <0 for error */
Michal Hlavinka 538613
 static int ecryptfs_pam_automount_set(const char *homedir)
Michal Hlavinka 538613
 {
Michal Hlavinka 538613
@@ -249,8 +224,6 @@ static int private_dir(pam_handle_t *pam
Michal Hlavinka 538613
 	char *autoumount = "auto-umount";
Michal Hlavinka 538613
 	struct stat s;
Michal Hlavinka 538613
 	pid_t pid;
Michal Hlavinka 538613
-	struct utmp *u;
Michal Hlavinka 538613
-	int count = 0;
Michal Hlavinka a225d8
 
Michal Hlavinka 538613
 	if ((pwd = fetch_pwd(pamh)) == NULL) {
Michal Hlavinka 538613
 		/* fetch_pwd() logged a message */
Michal Hlavinka 538613
@@ -297,7 +270,7 @@ static int private_dir(pam_handle_t *pam
Michal Hlavinka 538613
 			if (stat(recorded, &s) != 0 && stat("/usr/share/ecryptfs-utils/ecryptfs-record-passphrase", &s) == 0) {
Michal Hlavinka 538613
 				/* User has not recorded their passphrase */
Michal Hlavinka 538613
 				unlink("/var/lib/update-notifier/user.d/ecryptfs-record-passphrase");
Michal Hlavinka 538613
-				symlink("/usr/share/ecryptfs-utils/ecryptfs-record-passphrase", "/var/lib/update-notifier/user.d/ecryptfs-record-passphrase");
Michal Hlavinka 538613
+				rc=symlink("/usr/share/ecryptfs-utils/ecryptfs-record-passphrase", "/var/lib/update-notifier/user.d/ecryptfs-record-passphrase");
Michal Hlavinka 538613
 				fd = open("/var/lib/update-notifier/dpkg-run-stamp", O_WRONLY|O_CREAT|O_NONBLOCK, 0666);
Michal Hlavinka 538613
 				close(fd);
Michal Hlavinka 538613
 			}
Michal Hlavinka 538613
@@ -390,7 +363,7 @@ PAM_EXTERN int pam_sm_chauthtok(pam_hand
Michal Hlavinka 538613
 		}
Michal Hlavinka 538613
 	} else {
Michal Hlavinka 538613
 		syslog(LOG_ERR, "Error getting passwd info for user [%s]; "
Michal Hlavinka 538613
-		       "rc = [%ld]\n", username, rc);
Michal Hlavinka 538613
+		       "rc = [%d]\n", username, rc);
Michal Hlavinka 538613
 		goto out;
Michal Hlavinka 538613
 	}
Michal Hlavinka 538613
 	saved_uid = geteuid();