summaryrefslogtreecommitdiff
path: root/kerberosV
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2002-01-14 14:53:55 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2002-01-14 14:53:55 +0000
commitac4acecf7a6743a813c81fc53dbb940c6f1615a8 (patch)
treed18c8a4122ea5b44612736c284903a8378a05508 /kerberosV
parent495837b6dbe78b9f5edbb9b921e620d2b9ebdf13 (diff)
Use SIG_DFL to reset SIGCHLD handlers, not SIG_IGN which has a different
meaning now.
Diffstat (limited to 'kerberosV')
-rw-r--r--kerberosV/src/appl/ftp/ftpd/ftpd.c16
-rw-r--r--kerberosV/src/kadmin/kadm_conn.c2
-rw-r--r--kerberosV/src/lib/des/rnd_keys.c2
-rw-r--r--kerberosV/src/lib/kdfs/k5dfspag.c8
4 files changed, 19 insertions, 9 deletions
diff --git a/kerberosV/src/appl/ftp/ftpd/ftpd.c b/kerberosV/src/appl/ftp/ftpd/ftpd.c
index 7034a4a2bf1..4ec0751e5f5 100644
--- a/kerberosV/src/appl/ftp/ftpd/ftpd.c
+++ b/kerberosV/src/appl/ftp/ftpd/ftpd.c
@@ -38,7 +38,7 @@
#endif
#include "getarg.h"
-RCSID("$KTH: ftpd.c,v 1.153 2001/01/18 09:14:59 joda Exp $");
+RCSID("$KTH: ftpd.c,v 1.157 2001/04/19 14:41:29 joda Exp $");
static char version[] = "Version 6.00";
@@ -262,7 +262,7 @@ main(int argc, char **argv)
int optind = 0;
- set_progname (argv[0]);
+ setprogname (argv[0]);
/* detach from any tickets and tokens */
{
@@ -372,7 +372,7 @@ main(int argc, char **argv)
/* freopen(_PATH_DEVNULL, "w", stderr); */
signal(SIGPIPE, lostconn);
- signal(SIGCHLD, SIG_IGN);
+ signal(SIGCHLD, SIG_DFL);
#ifdef SIGURG
if (signal(SIGURG, myoob) == SIG_ERR)
syslog(LOG_ERR, "signal: %m");
@@ -1187,18 +1187,22 @@ do_store(char *name, char *mode, int unique)
goto done;
set_buffer_size(fileno(din), 1);
if (receive_data(din, fout) == 0) {
+ if((*closefunc)(fout) < 0)
+ perror_reply(552, name);
+ else {
if (unique)
reply(226, "Transfer complete (unique file name:%s).",
name);
else
reply(226, "Transfer complete.");
- }
+ }
+ } else
+ (*closefunc)(fout);
fclose(din);
data = -1;
pdata = -1;
done:
LOGBYTES(*mode == 'w' ? "put" : "append", name, byte_count);
- (*closefunc)(fout);
}
static FILE *
@@ -2161,7 +2165,7 @@ send_file_list(char *whichf)
char buf[MaxPathLen];
if (strpbrk(whichf, "~{[*?") != NULL) {
- int flags = GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE;
+ int flags = GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE|GLOB_LIMIT;
memset(&gl, 0, sizeof(gl));
freeglob = 1;
diff --git a/kerberosV/src/kadmin/kadm_conn.c b/kerberosV/src/kadmin/kadm_conn.c
index 8b66ce45ce4..9696dc02b60 100644
--- a/kerberosV/src/kadmin/kadm_conn.c
+++ b/kerberosV/src/kadmin/kadm_conn.c
@@ -211,7 +211,7 @@ wait_for_connection(krb5_context context,
}
}
}
- signal(SIGCHLD, SIG_IGN);
+ signal(SIGCHLD, SIG_DFL);
while(1) {
int status;
pid_t pid;
diff --git a/kerberosV/src/lib/des/rnd_keys.c b/kerberosV/src/lib/des/rnd_keys.c
index 79168b31c9e..1a83c3dbf07 100644
--- a/kerberosV/src/lib/des/rnd_keys.c
+++ b/kerberosV/src/lib/des/rnd_keys.c
@@ -286,7 +286,7 @@ des_rand_data(unsigned char *data, int size)
#ifdef HAVE_SETITIMER
setitimer(ITIMER_REAL, &tv, &otv);
#else
- ochld = signal(SIGCHLD, SIG_IGN);
+ ochld = signal(SIGCHLD, SIG_DFL);
pid = fork();
if(pid == -1){
signal(SIGCHLD, ochld != SIG_ERR ? ochld : SIG_DFL);
diff --git a/kerberosV/src/lib/kdfs/k5dfspag.c b/kerberosV/src/lib/kdfs/k5dfspag.c
index 3e48a850663..386bccfcc5b 100644
--- a/kerberosV/src/lib/kdfs/k5dfspag.c
+++ b/kerberosV/src/lib/kdfs/k5dfspag.c
@@ -21,6 +21,12 @@
* krb5_dfs_pag()
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+RCSID("$KTH: k5dfspag.c,v 1.4 2001/02/07 06:14:46 assar Exp $");
+
#include <krb5.h>
#ifdef DCE
@@ -275,7 +281,7 @@ int krb5_dfs_pag(context, flag, principal, luser)
/* Make sure that telnetd.c's SIGCHLD action don't happen right now... */
memset((char *)&newsig, 0, sizeof(newsig));
- newsig.sa_handler = SIG_IGN;
+ newsig.sa_handler = SIG_DFL;
sigaction(SIGCHLD, &newsig, &oldsig);
pid = fork();