Blame ecryptfs-utils-87-syslog.patch

9471b7
diff -up ecryptfs-utils-108/src/include/ecryptfs.h.syslog ecryptfs-utils-108/src/include/ecryptfs.h
9471b7
--- ecryptfs-utils-108/src/include/ecryptfs.h.syslog	2015-08-11 14:44:02.641814020 +0200
9471b7
+++ ecryptfs-utils-108/src/include/ecryptfs.h	2015-08-11 14:44:02.643814015 +0200
cac1ea
@@ -137,7 +137,7 @@
7a13e7
 #define ECRYPTFS_TAG_67_PACKET 0x43
7a13e7
 
7a13e7
 #define ecryptfs_syslog(type, fmt, arg...) \
7a13e7
-	syslog(type, "%s: " fmt, __FUNCTION__, ## arg);
7a13e7
+	syslog(type, "ecryptfs: %s: " fmt, __FUNCTION__, ## arg);
7a13e7
 
7a13e7
 #define ECRYPTFS_MAX_NUM_CIPHERS 64
7a13e7
 #define ECRYPTFS_ECHO_ON 1
9471b7
diff -up ecryptfs-utils-108/src/pam_ecryptfs/pam_ecryptfs.c.syslog ecryptfs-utils-108/src/pam_ecryptfs/pam_ecryptfs.c
9471b7
--- ecryptfs-utils-108/src/pam_ecryptfs/pam_ecryptfs.c.syslog	2015-08-11 14:44:02.640814023 +0200
9471b7
+++ ecryptfs-utils-108/src/pam_ecryptfs/pam_ecryptfs.c	2015-08-11 14:44:02.643814015 +0200
0d13c9
@@ -93,7 +93,7 @@ static int wrap_passphrase_if_necessary(
7a13e7
 
7a13e7
 	rc = asprintf(&unwrapped_pw_filename, "/dev/shm/.ecryptfs-%s", username);
7a13e7
 	if (rc == -1) {
7731a0
-		syslog(LOG_ERR, "pam_ecryptfs: Unable to allocate memory\n");
7731a0
+		ecryptfs_syslog(LOG_ERR, "pam_ecryptfs: Unable to allocate memory\n");
7a13e7
 		return -ENOMEM;
7a13e7
 	}
7a13e7
 	/* If /dev/shm/.ecryptfs-$USER exists and owned by the user
0d13c9
@@ -105,7 +105,7 @@ static int wrap_passphrase_if_necessary(
bcbcca
 	    passphrase != NULL && *passphrase != '\0' &&
bcbcca
 	    username != NULL && *username != '\0') {
bcbcca
 		if ((rc = setuid(uid))<0 || ((rc = ecryptfs_wrap_passphrase_file(wrapped_pw_filename, passphrase, salt, unwrapped_pw_filename)) != 0)) {
7731a0
-			syslog(LOG_ERR, "pam_ecryptfs: Error wrapping cleartext password; " "rc = [%d]\n", rc);
7731a0
+			ecryptfs_syslog(LOG_ERR, "pam_ecryptfs: Error wrapping cleartext password; " "rc = [%d]\n", rc);
7a13e7
 		}
7a13e7
 		return rc;
7a13e7
 	}
0d13c9
@@ -149,7 +149,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_h
bf3487
 	struct ecryptfs_pam_data *epd;
7a13e7
 
bf3487
 	if ((epd = calloc(1, sizeof(struct ecryptfs_pam_data))) == NULL) {
7a13e7
-		syslog(LOG_ERR,"Memory allocation failed");
7a13e7
+		ecryptfs_syslog(LOG_ERR,"Memory allocation failed");
7a13e7
 		rc = -ENOMEM;
7a13e7
 		goto out;
7a13e7
 	}
0d13c9
@@ -168,7 +168,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_h
bf3487
 		} else rc = errno;
bf3487
 	}
bf3487
 	if (!epd->homedir) {
538c2f
-		syslog(LOG_ERR, "pam_ecryptfs: Error getting passwd info for user; rc = [%ld]\n", rc);
538c2f
+		ecryptfs_syslog(LOG_ERR, "pam_ecryptfs: Error getting passwd info for user; rc = [%ld]\n", rc);
7a13e7
 		goto out;
7a13e7
 	}
538c2f
 
0d13c9
@@ -176,7 +176,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_h
7a13e7
 		goto out;
7a13e7
 	private_mnt = ecryptfs_fetch_private_mnt(epd->homedir);
7a13e7
 	if (ecryptfs_private_is_mounted(NULL, private_mnt, NULL, 1)) {
7731a0
-		syslog(LOG_DEBUG, "pam_ecryptfs: %s: %s is already mounted\n", __FUNCTION__, epd->homedir);
7731a0
+		ecryptfs_syslog(LOG_DEBUG, "pam_ecryptfs: %s: %s is already mounted\n", __FUNCTION__, epd->homedir);
7a13e7
 		/* If private/home is already mounted, then we can skip
7a13e7
 		   costly loading of keys */
7731a0
 		goto out;
0d13c9
@@ -186,7 +186,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_h
0d13c9
 	else
538c2f
 		rc = pam_get_item(pamh, PAM_AUTHTOK, (const void **)&epd->passphrase);
7a13e7
 	if (rc != PAM_SUCCESS) {
7731a0
-		syslog(LOG_ERR, "pam_ecryptfs: Error retrieving passphrase; rc = [%ld]\n",
7731a0
+		ecryptfs_syslog(LOG_ERR, "pam_ecryptfs: Error retrieving passphrase; rc = [%ld]\n",
7a13e7
 		       rc);
7a13e7
 		goto out;
7a13e7
 	}
0d13c9
@@ -198,7 +198,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_h
538c2f
 		from_hex(epd->salt, salt_hex, ECRYPTFS_SALT_SIZE);
7a13e7
 	epd->unwrap = ((argc == 1) && (memcmp(argv[0], "unwrap\0", 7) == 0));
7a13e7
 	if ((rc=pam_set_data(pamh, ECRYPTFS_PAM_DATA, epd, pam_free_ecryptfsdata)) != PAM_SUCCESS) {
7a13e7
-		syslog(LOG_ERR, "Unable to store ecryptfs pam data : %s", pam_strerror(pamh, rc));
7a13e7
+		ecryptfs_syslog(LOG_ERR, "Unable to store ecryptfs pam data : %s", pam_strerror(pamh, rc));
7a13e7
 		goto out;
0e4ddb
 	}
538c2f
 
0d13c9
@@ -222,12 +222,12 @@ static struct passwd *fetch_pwd(pam_hand
7a13e7
 
7a13e7
 	rc = pam_get_user(pamh, &username, NULL);
7a13e7
 	if (rc != PAM_SUCCESS || username == NULL) {
7731a0
-		syslog(LOG_ERR, "pam_ecryptfs: Error getting passwd info for user [%s]; rc = [%ld]\n", username, rc);
7731a0
+		ecryptfs_syslog(LOG_ERR, "pam_ecryptfs: Error getting passwd info for user [%s]; rc = [%ld]\n", username, rc);
7a13e7
 		return NULL;
7a13e7
 	}
7a13e7
 	pwd = getpwnam(username);
7a13e7
 	if (pwd == NULL) {
7731a0
-		syslog(LOG_ERR, "pam_ecryptfs: Error getting passwd info for user [%s]; rc = [%ld]\n", username, rc);
7731a0
+		ecryptfs_syslog(LOG_ERR, "pam_ecryptfs: Error getting passwd info for user [%s]; rc = [%ld]\n", username, rc);
7a13e7
 		return NULL;
7a13e7
 	}
7731a0
 	return pwd;
0d13c9
@@ -258,13 +258,13 @@ static int private_dir(pam_handle_t *pam
7a13e7
 	if (
7a13e7
 	    (asprintf(&autofile, "%s/.ecryptfs/%s", pwd->pw_dir, a) < 0)
7a13e7
 	     || autofile == NULL) {
7731a0
-		syslog(LOG_ERR, "pam_ecryptfs: Error allocating memory for autofile name");
7731a0
+		ecryptfs_syslog(LOG_ERR, "pam_ecryptfs: Error allocating memory for autofile name");
7a13e7
 		return 1;
7a13e7
         }
7a13e7
         if (
7a13e7
 	    (asprintf(&sigfile, "%s/.ecryptfs/%s.sig", pwd->pw_dir,
7a13e7
 	     PRIVATE_DIR) < 0) || sigfile == NULL) {
7731a0
-		syslog(LOG_ERR, "pam_ecryptfs: Error allocating memory for sigfile name");
7731a0
+		ecryptfs_syslog(LOG_ERR, "pam_ecryptfs: Error allocating memory for sigfile name");
7a13e7
 		return 1;
7a13e7
         }
7a13e7
 	if (stat(sigfile, &s) != 0) {
0d13c9
@@ -276,7 +276,7 @@ static int private_dir(pam_handle_t *pam
7a13e7
 		goto out;
7a13e7
 	}
7a13e7
 	if ((pid = fork()) < 0) {
7731a0
-		syslog(LOG_ERR, "pam_ecryptfs: Error setting up private mount");
7731a0
+		ecryptfs_syslog(LOG_ERR, "pam_ecryptfs: Error setting up private mount");
7a13e7
 		return 1;
7a13e7
 	}
7a13e7
 	if (pid == 0) {
0d13c9
@@ -284,7 +284,7 @@ static int private_dir(pam_handle_t *pam
7a13e7
 		        if ((asprintf(&recorded,
7a13e7
 			    "%s/.ecryptfs/.wrapped-passphrase.recorded",
7a13e7
 			    pwd->pw_dir) < 0) || recorded == NULL) {
7731a0
-				syslog(LOG_ERR, "pam_ecryptfs: Error allocating memory for recorded name");
7731a0
+				ecryptfs_syslog(LOG_ERR, "pam_ecryptfs: Error allocating memory for recorded name");
7a13e7
 				_exit(255);
7a13e7
 			}
7731a0
 			if (stat(recorded, &s) != 0 && stat("/usr/share/ecryptfs-utils/ecryptfs-record-passphrase", &s) == 0) {
0d13c9
@@ -297,12 +297,12 @@ static int private_dir(pam_handle_t *pam
7a13e7
 			}
7a13e7
 			if (stat(autofile, &s) != 0) {
7a13e7
 				/* User does not want to auto-mount */
7731a0
-				syslog(LOG_DEBUG, "pam_ecryptfs: Skipping automatic eCryptfs mount");
7731a0
+				ecryptfs_syslog(LOG_DEBUG, "pam_ecryptfs: Skipping automatic eCryptfs mount");
7a13e7
 				_exit(0);
7a13e7
 			}
538c2f
 			clearenv();
538c2f
 			if (initgroups(pwd->pw_name, pwd->pw_gid) != 0) {
538c2f
-				syslog(LOG_ERR, "Unable to set user's groups : %m");
538c2f
+				ecryptfs_syslog(LOG_ERR, "Unable to set user's groups : %m");
0d13c9
 				_exit(-1);
538c2f
 			}
7731a0
 			/* run mount.ecryptfs_private as the user */
0d13c9
@@ -310,16 +310,16 @@ static int private_dir(pam_handle_t *pam
0d13c9
 				_exit(-1);
7a13e7
 			execl("/sbin/mount.ecryptfs_private",
7a13e7
 			      "mount.ecryptfs_private", NULL);
0d13c9
-			syslog(LOG_ERR, "unable to execute mount.ecryptfs_private : %m");
0d13c9
+			ecryptfs_syslog(LOG_ERR, "unable to execute mount.ecryptfs_private : %m");
7a13e7
 		} else {
7a13e7
 			if (stat(autofile, &s) != 0) {
7a13e7
 				/* User does not want to auto-unmount */
7731a0
-				syslog(LOG_DEBUG, "pam_ecryptfs: Skipping automatic eCryptfs unmount");
7731a0
+				ecryptfs_syslog(LOG_DEBUG, "pam_ecryptfs: Skipping automatic eCryptfs unmount");
7a13e7
 				_exit(0);
7a13e7
 			}
538c2f
 			clearenv();
538c2f
 			if (initgroups(pwd->pw_name, pwd->pw_gid) != 0) {
538c2f
-				syslog(LOG_ERR, "Unable to set user's groups : %m");
538c2f
+				ecryptfs_syslog(LOG_ERR, "Unable to set user's groups : %m");
0d13c9
 				_exit(-1);
538c2f
 			}
7731a0
 			/* run umount.ecryptfs_private as the user */
0d13c9
@@ -327,7 +327,7 @@ static int private_dir(pam_handle_t *pam
0d13c9
 				_exit(-1);
7a13e7
 			execl("/sbin/umount.ecryptfs_private",
9471b7
 			      "umount.ecryptfs_private", "-d", NULL);
0d13c9
-			syslog(LOG_ERR, "unable to execute umount.ecryptfs_private : %m");
0d13c9
+			ecryptfs_syslog(LOG_ERR, "unable to execute umount.ecryptfs_private : %m");
9471b7
 			_exit(1);
7a13e7
 		}
9471b7
 		_exit(1);
0d13c9
@@ -362,24 +362,24 @@ static int fill_keyring(pam_handle_t *pa
538c2f
 	
7a13e7
 	if ((rc=pam_get_data(pamh, ECRYPTFS_PAM_DATA, (const void **)&epd)) != PAM_SUCCESS)
7a13e7
 	{
7a13e7
-		syslog(LOG_ERR,"Unable to get ecryptfs pam data : %s", pam_strerror(pamh, rc));
7a13e7
+		ecryptfs_syslog(LOG_ERR,"Unable to get ecryptfs pam data : %s", pam_strerror(pamh, rc));
7a13e7
 		return -EINVAL;
0e4ddb
 	}
7a13e7
   
538c2f
 	oeuid = geteuid();
538c2f
 	oegid = getegid();
538c2f
 	if ((ngids = getgroups(sizeof(groups)/sizeof(gid_t), groups)) < 0) {
538c2f
-		syslog(LOG_ERR, "pam_ecryptfs: geteuid error");
538c2f
+		ecryptfs_syslog(LOG_ERR, "pam_ecryptfs: geteuid error");
538c2f
 		goto outnouid;
538c2f
 	}
538c2f
 
538c2f
 	if (setegid(epd->gid) < 0 || setgroups(1, &epd->gid) < 0 || seteuid(epd->uid) < 0) {
538c2f
-		syslog(LOG_ERR, "pam_ecryptfs: seteuid error");
538c2f
+		ecryptfs_syslog(LOG_ERR, "pam_ecryptfs: seteuid error");
538c2f
 		goto out;
538c2f
 	}
538c2f
 
538c2f
 	if (!auth_tok_sig) {
538c2f
-		syslog(LOG_ERR, "Out of memory\n");
538c2f
+		ecryptfs_syslog(LOG_ERR, "Out of memory\n");
538c2f
 		return -ENOMEM;
538c2f
 	}
538c2f
   
0d13c9
@@ -387,7 +387,7 @@ static int fill_keyring(pam_handle_t *pa
0d13c9
 		/* temp regain uid 0 to drop privs */
0d13c9
 		if (seteuid(oeuid) < 0)
0d13c9
 		{
0d13c9
-			syslog(LOG_ERR, "pam_ecryptfs: seteuid error");
0d13c9
+			ecryptfs_syslog(LOG_ERR, "pam_ecryptfs: seteuid error");
0d13c9
 			goto out_child;
0d13c9
 		}
0d13c9
 		/* setgroups() already called */
0d13c9
@@ -395,12 +395,12 @@ static int fill_keyring(pam_handle_t *pa
538c2f
 			goto out_child;
538c2f
 	  
7a13e7
 		if (epd->passphrase == NULL) {
7a13e7
-			syslog(LOG_ERR, "NULL passphrase; aborting\n");
7a13e7
+			ecryptfs_syslog(LOG_ERR, "NULL passphrase; aborting\n");
7a13e7
 			rc = -EINVAL;
7a13e7
 			goto out_child;
7a13e7
 		}
7a13e7
 		if ((rc = ecryptfs_validate_keyring())) {
7a13e7
-			syslog(LOG_WARNING,
7a13e7
+			ecryptfs_syslog(LOG_WARNING,
7a13e7
 			       "Cannot validate keyring integrity\n");
7a13e7
 		}
7a13e7
 		rc = 0;
0d13c9
@@ -412,18 +412,18 @@ static int fill_keyring(pam_handle_t *pa
7a13e7
 				epd->homedir,
7a13e7
 				ECRYPTFS_DEFAULT_WRAPPED_PASSPHRASE_FILENAME);
7a13e7
 			if (rc == -1) {
7a13e7
-				syslog(LOG_ERR, "Unable to allocate memory\n");
7a13e7
+				ecryptfs_syslog(LOG_ERR, "Unable to allocate memory\n");
7a13e7
 				rc = -ENOMEM;
7a13e7
 				goto out_child;
7a13e7
 			}
7a13e7
 			if (wrap_passphrase_if_necessary(epd->username, epd->uid, wrapped_pw_filename, epd->passphrase, epd->salt) == 0) {
7a13e7
-				syslog(LOG_INFO, "Passphrase file wrapped");
7a13e7
+				ecryptfs_syslog(LOG_INFO, "Passphrase file wrapped");
7a13e7
 			} else {
7a13e7
 				goto out_child;
7a13e7
 			}
0d13c9
 			if (rewrap_passphrase_if_necessary(wrapped_pw_filename, epd->passphrase, epd->salt)) {
0d13c9
 				/* Non fatal condition. Log a warning. */
0d13c9
-				syslog(LOG_WARNING, "pam_ecryptfs: Unable to rewrap passphrase file\n");
0d13c9
+				ecryptfs_syslog(LOG_WARNING, "pam_ecryptfs: Unable to rewrap passphrase file\n");
0d13c9
 			}
0d13c9
 			rc = ecryptfs_insert_wrapped_passphrase_into_keyring(
0d13c9
 				auth_tok_sig, wrapped_pw_filename, epd->passphrase,
0d13c9
@@ -437,7 +437,7 @@ static int fill_keyring(pam_handle_t *pa
7a13e7
 			goto out_child;
7a13e7
 		}
7a13e7
 		if (rc) {
7a13e7
-			syslog(LOG_ERR, "Error adding passphrase key token to "
7a13e7
+			ecryptfs_syslog(LOG_ERR, "Error adding passphrase key token to "
7a13e7
 			       "user session keyring; rc = [%d]\n", rc);
7a13e7
 			goto out_child;
7a13e7
 		}
0d13c9
@@ -447,7 +447,7 @@ out_child:
7a13e7
 	}
7a13e7
 	tmp_pid = waitpid(child_pid, NULL, 0);
7a13e7
 	if (tmp_pid == -1)
7a13e7
-		syslog(LOG_WARNING,
7a13e7
+		ecryptfs_syslog(LOG_WARNING,
7a13e7
 		       "waitpid() returned with error condition\n"); 
538c2f
 out:
bcbcca
 	rc = seteuid(oeuid);
0d13c9
@@ -506,33 +506,33 @@ PAM_EXTERN int pam_sm_chauthtok(pam_hand
7731a0
 			homedir = pwd->pw_dir;
7731a0
 		}
7731a0
 	} else {
7731a0
-		syslog(LOG_ERR, "pam_ecryptfs: Error getting passwd info for user [%s]; rc = [%d]\n", username, rc);
7731a0
+		ecryptfs_syslog(LOG_ERR, "pam_ecryptfs: Error getting passwd info for user [%s]; rc = [%d]\n", username, rc);
7731a0
 		goto out;
7731a0
 	}
538c2f
 
538c2f
 	oeuid = geteuid();
538c2f
 	oegid = getegid();
538c2f
 	if ((ngids = getgroups(sizeof(groups)/sizeof(gid_t), groups)) < 0) {
538c2f
-		syslog(LOG_ERR, "pam_ecryptfs: geteuid error");
538c2f
+		ecryptfs_syslog(LOG_ERR, "pam_ecryptfs: geteuid error");
538c2f
 		goto outnouid;
538c2f
 	}
538c2f
 
538c2f
 	if (setegid(gid) < 0 || setgroups(1, &gid) < 0 || seteuid(uid) < 0) {
538c2f
-		syslog(LOG_ERR, "pam_ecryptfs: seteuid error");
538c2f
+		ecryptfs_syslog(LOG_ERR, "pam_ecryptfs: seteuid error");
538c2f
 		goto out;
538c2f
 	}
538c2f
 
7731a0
 	if ((rc = pam_get_item(pamh, PAM_OLDAUTHTOK,
7731a0
 			       (const void **)&old_passphrase))
7731a0
 	    != PAM_SUCCESS) {
7731a0
-		syslog(LOG_ERR, "pam_ecryptfs: Error retrieving old passphrase; rc = [%d]\n", rc);
7731a0
+		ecryptfs_syslog(LOG_ERR, "pam_ecryptfs: Error retrieving old passphrase; rc = [%d]\n", rc);
7731a0
 		goto out;
7731a0
 	}
538c2f
 	/* On the first pass, do nothing except check that we have a password */
7731a0
 	if ((flags & PAM_PRELIM_CHECK)) {
7731a0
 		if (!old_passphrase)
7731a0
 		{
7731a0
-			syslog(LOG_WARNING, "pam_ecryptfs: PAM passphrase change module retrieved a NULL passphrase; nothing to do\n");
7731a0
+			ecryptfs_syslog(LOG_WARNING, "pam_ecryptfs: PAM passphrase change module retrieved a NULL passphrase; nothing to do\n");
7731a0
 			rc = PAM_AUTHTOK_RECOVER_ERR;
7731a0
 		}
538c2f
 		goto out;
0d13c9
@@ -540,13 +540,13 @@ PAM_EXTERN int pam_sm_chauthtok(pam_hand
7731a0
 	if ((rc = pam_get_item(pamh, PAM_AUTHTOK,
7731a0
 			       (const void **)&new_passphrase))
7731a0
 	    != PAM_SUCCESS) {
7731a0
-		syslog(LOG_ERR, "pam_ecryptfs: Error retrieving new passphrase; rc = [%d]\n", rc);
7731a0
+		ecryptfs_syslog(LOG_ERR, "pam_ecryptfs: Error retrieving new passphrase; rc = [%d]\n", rc);
7731a0
 		goto out;
7731a0
 	}
7731a0
 	if ((rc = asprintf(&wrapped_pw_filename, "%s/.ecryptfs/%s", homedir,
7731a0
 			   ECRYPTFS_DEFAULT_WRAPPED_PASSPHRASE_FILENAME))
7731a0
 	    == -1) {
7731a0
-		syslog(LOG_ERR, "pam_ecryptfs: Unable to allocate memory\n");
7731a0
+		ecryptfs_syslog(LOG_ERR, "pam_ecryptfs: Unable to allocate memory\n");
7731a0
 		rc = -ENOMEM;
7731a0
 		goto out;
7731a0
 	}
0d13c9
@@ -556,13 +556,13 @@ PAM_EXTERN int pam_sm_chauthtok(pam_hand
7731a0
 		from_hex(salt, salt_hex, ECRYPTFS_SALT_SIZE);
7731a0
 	}
7731a0
 	if (wrap_passphrase_if_necessary(username, uid, wrapped_pw_filename, new_passphrase, salt) == 0) {
7731a0
-		syslog(LOG_DEBUG, "pam_ecryptfs: Passphrase file wrapped");
7731a0
+		ecryptfs_syslog(LOG_DEBUG, "pam_ecryptfs: Passphrase file wrapped");
7731a0
 	} else {
7731a0
 		goto out;
7731a0
 	}
7731a0
 
7731a0
 	if (!old_passphrase || !new_passphrase || *new_passphrase == '\0') {
7731a0
-		syslog(LOG_WARNING, "pam_ecryptfs: PAM passphrase change module retrieved at least one NULL passphrase; nothing to do\n");
7731a0
+		ecryptfs_syslog(LOG_WARNING, "pam_ecryptfs: PAM passphrase change module retrieved at least one NULL passphrase; nothing to do\n");
7731a0
 		rc = PAM_AUTHTOK_RECOVER_ERR;
7731a0
 		goto out;
7731a0
 	}
0d13c9
@@ -572,7 +572,7 @@ PAM_EXTERN int pam_sm_chauthtok(pam_hand
0d13c9
 
0d13c9
 		/* temp regain uid 0 to drop privs */
0d13c9
 		if (seteuid(oeuid) < 0) {
0d13c9
-			syslog(LOG_ERR, "pam_ecryptfs: seteuid error");
0d13c9
+			ecryptfs_syslog(LOG_ERR, "pam_ecryptfs: seteuid error");
0d13c9
 			goto out_child;
0d13c9
 		}
0d13c9
 		/* setgroups() already called */
0d13c9
@@ -582,20 +582,20 @@ PAM_EXTERN int pam_sm_chauthtok(pam_hand
7731a0
 		if ((rc = ecryptfs_unwrap_passphrase(passphrase,
7731a0
 						     wrapped_pw_filename,
7731a0
 						     old_passphrase, salt))) {
7731a0
-			syslog(LOG_ERR, "pam_ecryptfs: Error attempting to unwrap passphrase; rc = [%d]\n", rc);
7731a0
+			ecryptfs_syslog(LOG_ERR, "pam_ecryptfs: Error attempting to unwrap passphrase; rc = [%d]\n", rc);
7731a0
 			goto out_child;
7731a0
 		}
7731a0
 		if ((rc = ecryptfs_wrap_passphrase(wrapped_pw_filename,
7731a0
 						   new_passphrase, salt,
7731a0
 						   passphrase))) {
7731a0
-			syslog(LOG_ERR, "pam_ecryptfs: Error attempting to wrap passphrase; rc = [%d]", rc);
7731a0
+			ecryptfs_syslog(LOG_ERR, "pam_ecryptfs: Error attempting to wrap passphrase; rc = [%d]", rc);
7731a0
 			goto out_child;
7731a0
 		}
7731a0
 out_child:
7731a0
 		_exit(0);
7731a0
 	}
7731a0
 	if ((tmp_pid = waitpid(child_pid, NULL, 0)) == -1)
7731a0
-		syslog(LOG_WARNING, "pam_ecryptfs: waitpid() returned with error condition\n");
7731a0
+		ecryptfs_syslog(LOG_WARNING, "pam_ecryptfs: waitpid() returned with error condition\n");
7731a0
 	free(wrapped_pw_filename);
7731a0
 out:
538c2f