|
|
bbbcbd |
diff -up ecryptfs-utils-87/src/pam_ecryptfs/pam_ecryptfs.c.fixgid ecryptfs-utils-87/src/pam_ecryptfs/pam_ecryptfs.c
|
|
|
bbbcbd |
--- ecryptfs-utils-87/src/pam_ecryptfs/pam_ecryptfs.c.fixgid 2011-07-19 15:58:45.337539138 +0200
|
|
|
bbbcbd |
+++ ecryptfs-utils-87/src/pam_ecryptfs/pam_ecryptfs.c 2011-07-19 16:02:09.542029724 +0200
|
|
|
bbbcbd |
@@ -217,7 +217,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_h
|
|
|
bbbcbd |
}
|
|
|
bbbcbd |
out_child:
|
|
|
bbbcbd |
free(auth_tok_sig);
|
|
|
bbbcbd |
- exit(0);
|
|
|
bbbcbd |
+ _exit(0);
|
|
|
bbbcbd |
}
|
|
|
bbbcbd |
tmp_pid = waitpid(child_pid, NULL, 0);
|
|
|
bbbcbd |
if (tmp_pid == -1)
|
|
|
bbbcbd |
@@ -309,7 +309,7 @@ static int private_dir(pam_handle_t *pam
|
|
|
bbbcbd |
pwd->pw_dir) < 0) || recorded == NULL) {
|
|
|
bbbcbd |
syslog(LOG_ERR,
|
|
|
bbbcbd |
"Error allocating memory for recorded name");
|
|
|
bbbcbd |
- return 1;
|
|
|
bbbcbd |
+ _exit(255);
|
|
|
bbbcbd |
}
|
|
|
bbbcbd |
if (stat(recorded, &s) != 0 && stat("/usr/share/ecryptfs-utils/ecryptfs-record-passphrase", &s) == 0) {
|
|
|
bbbcbd |
/* User has not recorded their passphrase */
|
|
|
bbbcbd |
@@ -322,23 +322,25 @@ static int private_dir(pam_handle_t *pam
|
|
|
bbbcbd |
/* User does not want to auto-mount */
|
|
|
bbbcbd |
syslog(LOG_INFO,
|
|
|
bbbcbd |
"Skipping automatic eCryptfs mount");
|
|
|
bbbcbd |
- return 0;
|
|
|
bbbcbd |
+ _exit(0);
|
|
|
bbbcbd |
}
|
|
|
bbbcbd |
/* run mount.ecryptfs_private as the user */
|
|
|
bbbcbd |
setresuid(pwd->pw_uid, pwd->pw_uid, pwd->pw_uid);
|
|
|
bbbcbd |
execl("/sbin/mount.ecryptfs_private",
|
|
|
bbbcbd |
"mount.ecryptfs_private", NULL);
|
|
|
bbbcbd |
+ _exit(255);
|
|
|
bbbcbd |
} else {
|
|
|
bbbcbd |
if (stat(autofile, &s) != 0) {
|
|
|
bbbcbd |
/* User does not want to auto-unmount */
|
|
|
bbbcbd |
syslog(LOG_INFO,
|
|
|
bbbcbd |
"Skipping automatic eCryptfs unmount");
|
|
|
bbbcbd |
- return 0;
|
|
|
bbbcbd |
+ _exit(0);
|
|
|
bbbcbd |
}
|
|
|
bbbcbd |
/* run umount.ecryptfs_private as the user */
|
|
|
bbbcbd |
setresuid(pwd->pw_uid, pwd->pw_uid, pwd->pw_uid);
|
|
|
bbbcbd |
execl("/sbin/umount.ecryptfs_private",
|
|
|
bbbcbd |
"umount.ecryptfs_private", NULL);
|
|
|
bbbcbd |
+ _exit(255);
|
|
|
bbbcbd |
}
|
|
|
bbbcbd |
return 1;
|
|
|
bbbcbd |
} else {
|
|
|
bbbcbd |
@@ -482,7 +484,7 @@ PAM_EXTERN int pam_sm_chauthtok(pam_hand
|
|
|
bbbcbd |
goto out_child;
|
|
|
bbbcbd |
}
|
|
|
bbbcbd |
out_child:
|
|
|
bbbcbd |
- exit(0);
|
|
|
bbbcbd |
+ _exit(0);
|
|
|
bbbcbd |
}
|
|
|
bbbcbd |
if ((tmp_pid = waitpid(child_pid, NULL, 0)) == -1)
|
|
|
bbbcbd |
syslog(LOG_WARNING,
|