[prev in list] [next in list] [prev in thread] [next in thread]
List: amanda-hackers
Subject: Re: please commit patch for security.c on amanda 2.4.2 branch
From: "John E. Hein" <jhein () timing ! com>
Date: 2000-09-27 20:17:07
[Download RAW message or body]
John E. Hein wrote at 08:46 -0600 on Sep 27:
...
> How about the following patch?
...
That patch didn't match the tabbing correctly.
Here it is again (with the right tabbing):
--- common-src/security.c.orig Fri Sep 10 19:14:09 1999
+++ common-src/security.c Wed Sep 27 08:14:47 2000
@@ -141,7 +141,8 @@
FILE *fError;
int saved_stderr;
int fd[2];
- amwait_t exitcode;
+ amwait_t wait_exitcode;
+ int exitcode;
pid_t pid, ruserok_pid;
#endif /* } */
@@ -345,7 +346,7 @@
close(fd[1]);
fError = fdopen(fd[0], "r");
- while((pid = wait(&exitcode)) == (pid_t)-1 && errno == EINTR) {}
+ while((pid = wait(&wait_exitcode)) == (pid_t)-1 && errno == EINTR) {}
if (pid == (pid_t)-1) {
*errstr = vstralloc("[",
"access as ", localuser, " not allowed",
@@ -363,8 +364,8 @@
number,
NULL);
exitcode = 0;
- } else if (WIFSIGNALED(exitcode)) {
- ap_snprintf(number, sizeof(number), "%d", WTERMSIG(exitcode));
+ } else if (WIFSIGNALED(wait_exitcode)) {
+ ap_snprintf(number, sizeof(number), "%d", WTERMSIG(wait_exitcode));
*errstr = vstralloc("[",
"access as ", localuser, " not allowed",
" from ", remoteuser, "@", remotehost,
@@ -372,7 +373,7 @@
NULL);
exitcode = 0;
} else {
- exitcode = WEXITSTATUS(exitcode);
+ exitcode = WEXITSTATUS(wait_exitcode);
}
if(exitcode) {
if((*errstr = agets(fError)) == NULL) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic