Remove mistakenly added patch (it is already there as pam-1.1.0-console-fixes.patch)

This commit is contained in:
Tomas Mraz 2011-08-25 16:28:06 +02:00
parent 39bef6c743
commit be34bed1eb

View File

@ -1,72 +0,0 @@
diff -up Linux-PAM-1.1.4/modules/pam_console/handlers.c.console-fixes Linux-PAM-1.1.4/modules/pam_console/handlers.c
--- Linux-PAM-1.1.4/modules/pam_console/handlers.c.console-fixes 2008-12-16 13:37:52.000000000 +0100
+++ Linux-PAM-1.1.4/modules/pam_console/handlers.c 2011-07-15 14:49:39.000000000 +0200
@@ -172,13 +172,13 @@ call_exec(struct console_handler *handle
const char *flagptr;
const char **argv;
int i = 0;
- argv = malloc(sizeof(*argv)*nparams+2);
-
+ argv = malloc(sizeof(*argv)*(nparams+2));
+
if (argv == NULL)
return;
-
+
argv[i++] = handler->executable;
-
+
for (flagptr = handler->flags; *flagptr != '\0'; flagptr += strlen(flagptr)+1) {
switch (testflag(flagptr)) {
case HF_LOGFAIL:
@@ -231,7 +231,7 @@ execute_handler(pam_handle_t *pamh, stru
}
sighandler = signal(SIGCHLD, SIG_DFL);
-
+
child = fork();
switch (child) {
case -1:
@@ -246,30 +246,32 @@ execute_handler(pam_handle_t *pamh, stru
if (!wait_exit) {
switch(fork()) {
case 0:
- exit(0);
+ if(setsid() == -1) {
+ _exit(255);
+ }
+ break;
case -1:
- exit(255);
+ _exit(255);
default:
- if(setsid() == -1) {
- exit(255);
- }
+ _exit(0);
}
}
if (set_uid) {
struct passwd *pw;
pw = getpwnam(user);
if (pw == NULL)
- exit(255);
+ _exit(255);
if (setgid(pw->pw_gid) == -1 ||
+ setgroups(0, NULL) == -1 ||
setuid(pw->pw_uid) == -1)
- exit(255);
+ _exit(255);
}
call_exec(handler, nparams, user, tty);
- exit(255);
+ _exit(255);
default:
break;
}
-
+
waitpid(child, &rv, 0);
if (sighandler != SIG_ERR)