29 changed files with 429 additions and 39 deletions
@ -0,0 +1,106 @@ |
|||||||
|
diff -ru3 dcron-2.3.3.orig/database.c dcron-2.3.3/database.c
|
||||||
|
--- dcron-2.3.3.orig/database.c Mon May 2 17:28:08 1994
|
||||||
|
+++ dcron-2.3.3/database.c Wed Jun 13 09:49:57 2001
|
||||||
|
@@ -179,7 +179,7 @@
|
||||||
|
if (--maxEntries == 0)
|
||||||
|
break;
|
||||||
|
|
||||||
|
- bzero(&line, sizeof(line));
|
||||||
|
+ memset(&line, 0, sizeof(line));
|
||||||
|
|
||||||
|
if (DebugOpt)
|
||||||
|
log9("User %s Entry %s\n", fileName, buf);
|
||||||
|
diff -ru3 dcron-2.3.3.orig/defs.h dcron-2.3.3/defs.h
|
||||||
|
--- dcron-2.3.3.orig/defs.h Fri Sep 5 21:44:32 1997
|
||||||
|
+++ dcron-2.3.3/defs.h Wed Jun 13 09:51:08 2001
|
||||||
|
@@ -21,12 +21,16 @@
|
||||||
|
#include <sys/wait.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <sys/resource.h>
|
||||||
|
+#include <sys/termios.h>
|
||||||
|
|
||||||
|
#define Prototype extern
|
||||||
|
#define arysize(ary) (sizeof(ary)/sizeof((ary)[0]))
|
||||||
|
|
||||||
|
#ifndef CRONTABS
|
||||||
|
#define CRONTABS "/var/spool/cron/crontabs"
|
||||||
|
+#endif
|
||||||
|
+#ifndef PIDFILE
|
||||||
|
+#define PIDFILE "/var/run/dcron.pid"
|
||||||
|
#endif
|
||||||
|
#ifndef TMPDIR
|
||||||
|
#define TMPDIR "/tmp"
|
||||||
|
diff -ru3 dcron-2.3.3.orig/main.c dcron-2.3.3/main.c
|
||||||
|
--- dcron-2.3.3.orig/main.c Mon May 2 17:28:24 1994
|
||||||
|
+++ dcron-2.3.3/main.c Wed Jun 13 09:53:09 2001
|
||||||
|
@@ -122,8 +122,14 @@
|
||||||
|
perror("fork");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
- if (pid > 0)
|
||||||
|
+ if (pid > 0) {
|
||||||
|
+ FILE *fp;
|
||||||
|
+ if ((fp = fopen(PIDFILE, "w")) != NULL) {
|
||||||
|
+ fprintf(fp, "%d\n", pid);
|
||||||
|
+ fclose(fp);
|
||||||
|
+ }
|
||||||
|
exit(0);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
diff -ru3 dcron-2.3.3.orig/subs.c dcron-2.3.3/subs.c
|
||||||
|
--- dcron-2.3.3.orig/subs.c Mon Feb 16 20:35:10 1998
|
||||||
|
+++ dcron-2.3.3/subs.c Wed Jun 13 09:49:57 2001
|
||||||
|
@@ -15,7 +15,6 @@
|
||||||
|
Prototype int ChangeUser(const char *user, short dochdir);
|
||||||
|
Prototype void vlog(int level, int fd, const char *ctl, va_list va);
|
||||||
|
Prototype int slog(char *buf, size_t sz, const char *ctl, va_list va, short useDate);
|
||||||
|
-Prototype char *strdup(const char *);
|
||||||
|
|
||||||
|
void
|
||||||
|
log9(const char *ctl, ...)
|
||||||
|
@@ -80,7 +79,7 @@
|
||||||
|
|
||||||
|
buf[0] = 0;
|
||||||
|
if (useDate)
|
||||||
|
- strftime(buf, 128, "%d-%b-%y %H:%M ", tp);
|
||||||
|
+ strftime(buf, 128, "%d-%b-%Y %H:%M ", tp);
|
||||||
|
vsnprintf(buf + strlen(buf), sz - strlen(buf), ctl, va);
|
||||||
|
return(strlen(buf));
|
||||||
|
}
|
||||||
|
@@ -98,9 +97,15 @@
|
||||||
|
log(9, "failed to get uid for %s", user);
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
- setenv("USER", pas->pw_name, 1);
|
||||||
|
- setenv("HOME", pas->pw_dir, 1);
|
||||||
|
- setenv("SHELL", "/bin/sh", 1);
|
||||||
|
+ {
|
||||||
|
+ char buf[256];
|
||||||
|
+ snprintf(buf, sizeof(buf), "USER=%s", pas->pw_name);
|
||||||
|
+ putenv(buf);
|
||||||
|
+ snprintf(buf, sizeof(buf), "HOME=%s", pas->pw_dir);
|
||||||
|
+ putenv(buf);
|
||||||
|
+ snprintf(buf, sizeof(buf), "SHELL=%s", "/bin/sh");
|
||||||
|
+ putenv(buf);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Change running state to the user in question
|
||||||
|
@@ -129,15 +134,5 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return(pas->pw_uid);
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-char *
|
||||||
|
-strdup(const char *str)
|
||||||
|
-{
|
||||||
|
- char *ptr = malloc(strlen(str) + 1);
|
||||||
|
-
|
||||||
|
- if (ptr)
|
||||||
|
- strcpy(ptr, str);
|
||||||
|
- return(ptr);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@ |
|||||||
|
--- display.c.orig Mon Jan 24 01:39:03 2000
|
||||||
|
+++ display.c Sun Mar 18 12:39:45 2001
|
||||||
|
@@ -45,7 +45,9 @@
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
+#if !defined(__FreeBSD__) && !defined(__Linux__)
|
||||||
|
#include <sys/sysmacros.h>
|
||||||
|
+#endif
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <errno.h>
|
@ -0,0 +1,14 @@ |
|||||||
|
--- src/date.c.orig Tue Aug 1 15:15:54 2000
|
||||||
|
+++ src/date.c Mon Feb 19 12:20:57 2001
|
||||||
|
@@ -193,9 +193,9 @@
|
||||||
|
return 0;
|
||||||
|
if (offset) {
|
||||||
|
if (abs (offset) > 15)
|
||||||
|
- result -= timezone + (offset / 100) * 60 * 60 + (offset % 100) * 60;
|
||||||
|
+ result -= /* timezone + */ (offset / 100) * 60 * 60 + (offset % 100) * 60;
|
||||||
|
else
|
||||||
|
- result -= timezone + offset * 60 * 60;
|
||||||
|
+ result -= /* timezone + */ offset * 60 * 60;
|
||||||
|
}
|
||||||
|
chomp (r);
|
||||||
|
if (result_str)
|
@ -0,0 +1,88 @@ |
|||||||
|
--- src/updown.c.orig Thu Jul 9 14:49:47 1998
|
||||||
|
+++ src/updown.c Sun Dec 13 18:34:51 1998
|
||||||
|
@@ -230,7 +230,7 @@
|
||||||
|
do_log(cmdline); /* jl 22.06.97 */
|
||||||
|
|
||||||
|
if (P_PFULL(g) == 'N') {
|
||||||
|
- win = wopen(10, 7, 70, 13, BSINGLE, stdattr, mfcolor, mbcolor, 1, 0, 1);
|
||||||
|
+ win = wopen(5, 5, 74, 11, BSINGLE, stdattr, mfcolor, mbcolor, 1, 0, 1);
|
||||||
|
snprintf(title, sizeof(title), _("%.30s %s - Press CTRL-C to quit"), P_PNAME(g),
|
||||||
|
what == 'U' ? _("upload") : _("download"));
|
||||||
|
wtitle(win, TMID, title);
|
||||||
|
--- src/window.c.orig Tue Aug 11 03:10:29 1998
|
||||||
|
+++ src/window.c Tue Aug 11 03:07:12 1998
|
||||||
|
@@ -104,7 +104,7 @@
|
||||||
|
|
||||||
|
int useattr = 1;
|
||||||
|
int dirflush = 1;
|
||||||
|
-extern int LINES, COLS;
|
||||||
|
+int LINES, COLS;
|
||||||
|
int usecolor = 0;
|
||||||
|
WIN *stdwin;
|
||||||
|
char *_tptr = CNULL;
|
||||||
|
--- src/windiv.c.orig Mon Mar 2 14:28:51 1998
|
||||||
|
+++ src/windiv.c Tue Aug 11 02:48:32 1998
|
||||||
|
@@ -12,6 +12,7 @@
|
||||||
|
*
|
||||||
|
* hgk+jl 02.98 File selection window
|
||||||
|
*/
|
||||||
|
+#include <sys/types.h>
|
||||||
|
#include <dirent.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include "port.h"
|
||||||
|
@@ -244,8 +245,14 @@
|
||||||
|
|
||||||
|
/* get regular files */
|
||||||
|
dirlist[nCnt].d_ino = dirent->d_ino;
|
||||||
|
- dirlist[nCnt].d_off = dirent->d_off;
|
||||||
|
dirlist[nCnt].d_reclen = dirent->d_reclen;
|
||||||
|
+#if (defined(BSD) && (BSD >= 199306))
|
||||||
|
+ dirlist[nCnt].d_type = dirent->d_type;
|
||||||
|
+ dirlist[nCnt].d_namlen = dirent->d_namlen;
|
||||||
|
+#else
|
||||||
|
+ dirlist[nCnt].d_off = dirent->d_off;
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
strcpy(dirlist[nCnt].d_name, dirent->d_name );
|
||||||
|
nMaxWidth = max(nMaxWidth, strlen(dirent->d_name));
|
||||||
|
nCnt++;
|
||||||
|
--- src/ascii-xfr.c.orig Sun Mar 8 08:10:26 1998
|
||||||
|
+++ src/ascii-xfr.c Sun Dec 13 21:55:16 1998
|
||||||
|
@@ -14,6 +14,10 @@
|
||||||
|
#include <string.h>
|
||||||
|
#include <time.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
+#if (defined(__unix__) || defined(unix)) && !defined(USG)
|
||||||
|
+#include <sys/param.h> /* get BSD definition if present */
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Externals.
|
||||||
|
--- src/sysdep1.c.orig Wed Mar 15 08:45:03 2000
|
||||||
|
+++ src/sysdep1.c Fri Nov 10 09:26:24 2000
|
||||||
|
@@ -69 +69 @@
|
||||||
|
-#if defined(TIOCM_RTS) && defined(TIOCMODG)
|
||||||
|
+#if defined(TIOCM_RTS) && defined(TIOCMGET)
|
||||||
|
@@ -72 +72 @@
|
||||||
|
- ioctl(fd, TIOCMODG, &mcs);
|
||||||
|
+ ioctl(fd, TIOCMGET, &mcs);
|
||||||
|
@@ -74 +74 @@
|
||||||
|
- ioctl(fd, TIOCMODS, &mcs);
|
||||||
|
+ ioctl(fd, TIOCMSET, &mcs);
|
||||||
|
@@ -180 +180 @@
|
||||||
|
-#ifdef TIOCMODG
|
||||||
|
+#ifdef TIOCMGET
|
||||||
|
@@ -183 +183 @@
|
||||||
|
- ioctl(fd, TIOCMODG, &mcs);
|
||||||
|
+ ioctl(fd, TIOCMGET, &mcs);
|
||||||
|
@@ -221,2 +221,2 @@
|
||||||
|
-#ifdef TIOCMODG
|
||||||
|
- ioctl(fd, TIOCMODG, &m_word);
|
||||||
|
+#ifdef TIOCMGET
|
||||||
|
+ ioctl(fd, TIOCMGET, &m_word);
|
||||||
|
@@ -243,2 +243,2 @@
|
||||||
|
-#ifdef TIOCMODS
|
||||||
|
- ioctl(fd, TIOCMODS, &m_word);
|
||||||
|
+#ifdef TIOCMSET
|
||||||
|
+ ioctl(fd, TIOCMSET, &m_word);
|
@ -0,0 +1,36 @@ |
|||||||
|
--- ftp.pl~ Fri Jun 5 11:10:27 1998
|
||||||
|
+++ ftp.pl Sat Feb 3 13:59:12 2001
|
||||||
|
@@ -270,6 +270,13 @@
|
||||||
|
$SIG{ 'PIPE' } = "ftp'ftp__sighandler";
|
||||||
|
}
|
||||||
|
|
||||||
|
+# Setup a signal handler for user interrupts.
|
||||||
|
+sub ftp'set_user_signals
|
||||||
|
+{
|
||||||
|
+ $ftp_logger = @_;
|
||||||
|
+ $SIG{ 'INT' } = "ftp'ftp__sighandler";
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
# &ftp'set_namemap( function to map outgoing name, function to map incoming )
|
||||||
|
sub ftp'set_namemap
|
||||||
|
{
|
||||||
|
@@ -581,6 +588,9 @@
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ # shut down our end of the socket
|
||||||
|
+ &close_data_socket;
|
||||||
|
+
|
||||||
|
# read the close
|
||||||
|
#
|
||||||
|
$ret = &expect($timeout,
|
||||||
|
@@ -589,9 +599,6 @@
|
||||||
|
&service_closed();
|
||||||
|
$ret = 0;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
- # shut down our end of the socket
|
||||||
|
- &close_data_socket;
|
||||||
|
|
||||||
|
if( ! $ret ){
|
||||||
|
return 0;
|
@ -0,0 +1,125 @@ |
|||||||
|
*** include/log.h.orig 2001/01/25 18:22:51 11.20
|
||||||
|
--- include/log.h 2001/02/06 05:02:28 11.21
|
||||||
|
***************
|
||||||
|
*** 198,203 ****
|
||||||
|
--- 198,204 ----
|
||||||
|
*/
|
||||||
|
typedef enum {
|
||||||
|
DB_LV_INCOMPLETE,
|
||||||
|
+ DB_LV_NONEXISTENT,
|
||||||
|
DB_LV_NORMAL,
|
||||||
|
DB_LV_OLD_READABLE,
|
||||||
|
DB_LV_OLD_UNREADABLE
|
||||||
|
*** log/log.c.orig 2001/01/25 18:22:55 11.43
|
||||||
|
--- log/log.c 2001/02/06 05:02:28 11.44
|
||||||
|
***************
|
||||||
|
*** 309,321 ****
|
||||||
|
int find_first, *valp;
|
||||||
|
logfile_validity *statusp;
|
||||||
|
{
|
||||||
|
! logfile_validity clv_status, status;
|
||||||
|
u_int32_t clv, logval;
|
||||||
|
int cnt, fcnt, ret;
|
||||||
|
const char *dir;
|
||||||
|
char **names, *p, *q, savech;
|
||||||
|
|
||||||
|
! clv_status = status = DB_LV_NORMAL;
|
||||||
|
|
||||||
|
/* Return a value of 0 as the log file number on failure. */
|
||||||
|
*valp = 0;
|
||||||
|
--- 309,321 ----
|
||||||
|
int find_first, *valp;
|
||||||
|
logfile_validity *statusp;
|
||||||
|
{
|
||||||
|
! logfile_validity logval_status, status;
|
||||||
|
u_int32_t clv, logval;
|
||||||
|
int cnt, fcnt, ret;
|
||||||
|
const char *dir;
|
||||||
|
char **names, *p, *q, savech;
|
||||||
|
|
||||||
|
! logval_status = status = DB_LV_NONEXISTENT;
|
||||||
|
|
||||||
|
/* Return a value of 0 as the log file number on failure. */
|
||||||
|
*valp = 0;
|
||||||
|
***************
|
||||||
|
*** 385,394 ****
|
||||||
|
* as a valid log file.
|
||||||
|
*/
|
||||||
|
break;
|
||||||
|
case DB_LV_NORMAL:
|
||||||
|
case DB_LV_OLD_READABLE:
|
||||||
|
logval = clv;
|
||||||
|
! clv_status = status;
|
||||||
|
break;
|
||||||
|
case DB_LV_OLD_UNREADABLE:
|
||||||
|
/*
|
||||||
|
--- 385,398 ----
|
||||||
|
* as a valid log file.
|
||||||
|
*/
|
||||||
|
break;
|
||||||
|
+ case DB_LV_NONEXISTENT:
|
||||||
|
+ /* Should never happen. */
|
||||||
|
+ DB_ASSERT(0);
|
||||||
|
+ break;
|
||||||
|
case DB_LV_NORMAL:
|
||||||
|
case DB_LV_OLD_READABLE:
|
||||||
|
logval = clv;
|
||||||
|
! logval_status = status;
|
||||||
|
break;
|
||||||
|
case DB_LV_OLD_UNREADABLE:
|
||||||
|
/*
|
||||||
|
***************
|
||||||
|
*** 410,416 ****
|
||||||
|
*/
|
||||||
|
if (!find_first) {
|
||||||
|
logval = clv;
|
||||||
|
! clv_status = status;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
--- 414,420 ----
|
||||||
|
*/
|
||||||
|
if (!find_first) {
|
||||||
|
logval = clv;
|
||||||
|
! logval_status = status;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
***************
|
||||||
|
*** 420,426 ****
|
||||||
|
|
||||||
|
err: __os_dirfree(names, fcnt);
|
||||||
|
__os_freestr(p);
|
||||||
|
! *statusp = clv_status;
|
||||||
|
|
||||||
|
return (ret);
|
||||||
|
}
|
||||||
|
--- 424,430 ----
|
||||||
|
|
||||||
|
err: __os_dirfree(names, fcnt);
|
||||||
|
__os_freestr(p);
|
||||||
|
! *statusp = logval_status;
|
||||||
|
|
||||||
|
return (ret);
|
||||||
|
}
|
||||||
|
*** log/log_rec.c.orig 2001/01/25 18:22:56 11.49
|
||||||
|
--- log/log_rec.c 2001/02/07 22:17:46
|
||||||
|
***************
|
||||||
|
*** 404,410 ****
|
||||||
|
TAILQ_INIT(&logp->dbentry[i].dblist);
|
||||||
|
else
|
||||||
|
TAILQ_REINSERT_HEAD(
|
||||||
|
! &logp->dbentry[i].dblist, dbp, links);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Initialize the new entries. */
|
||||||
|
--- 404,410 ----
|
||||||
|
TAILQ_INIT(&logp->dbentry[i].dblist);
|
||||||
|
else
|
||||||
|
TAILQ_REINSERT_HEAD(
|
||||||
|
! &logp->dbentry[i].dblist, dbtmp, links);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Initialize the new entries. */
|
||||||
|
|
||||||
|
|
Loading…
Reference in new issue