]> git.pld-linux.org Git - packages/ftpd-BSD.git/blame - ftpd-BSD-paths.patch
- massive attack: adding Source-md5
[packages/ftpd-BSD.git] / ftpd-BSD-paths.patch
CommitLineData
68cf7465 1diff -urN ftpd-BSD-0.3.2.orig/logutmp.c ftpd-BSD-0.3.2/logutmp.c
2--- ftpd-BSD-0.3.2.orig/logutmp.c Fri Jul 7 03:28:18 2000
3+++ ftpd-BSD-0.3.2/logutmp.c Sun Sep 10 01:58:51 2000
c5c3545d
JR
4@@ -43,6 +43,13 @@
5 #include <string.h>
6 #include <ttyent.h>
7
8+#define TRANSFORM_UTMP_FILE_NAME(file_name) \
9+ ((strcmp (file_name, _PATH_UTMP) == 0 \
10+ && access ( _PATH_UTMP "x", F_OK) == 0) ? (_PATH_UTMP "x") : \
11+ ((strcmp (file_name, _PATH_UTMP "x") == 0 \
12+ && access (_PATH_UTMP "x", F_OK) != 0) ? _PATH_UTMP : \
13+ file_name))
14+
15 typedef struct utmp UTMP;
16
17 static int fd = -1;
18@@ -73,7 +80,7 @@
19 topslot++;
20 }
21 if ((topslot < 0) || ((fd < 0) &&
22- (fd = open(_PATH_UTMP, O_RDWR|O_CREAT, 0644)) < 0))
23+ (fd = open(TRANSFORM_UTMP_FILE_NAME(_PATH_UTMP), O_RDWR|O_CREAT, 0644)) < 0))
24 return;
25
26 /*
68cf7465 27diff -urN ftpd-BSD-0.3.2.orig/logwtmp.c ftpd-BSD-0.3.2/logwtmp.c
28--- ftpd-BSD-0.3.2.orig/logwtmp.c Fri Jul 7 05:04:09 2000
29+++ ftpd-BSD-0.3.2/logwtmp.c Sun Sep 10 01:58:34 2000
c5c3545d
JR
30@@ -55,6 +55,13 @@
31 #include <netinet/in.h>
32 #include "extern.h"
33
34+#define TRANSFORM_WTMP_FILE_NAME(file_name) \
35+ ((strcmp (file_name, _PATH_WTMP) == 0 \
36+ && access ( _PATH_WTMP "x", F_OK) == 0) ? (_PATH_WTMP "x") : \
37+ ((strcmp (file_name, _PATH_WTMP "x") == 0 \
38+ && access (_PATH_WTMP "x", F_OK) != 0) ? _PATH_WTMP : \
39+ file_name))
40+
41 static int fd = -1;
42
43 /*
44@@ -69,7 +76,7 @@
45 struct utmp ut;
46 struct stat buf;
47
48- if (fd < 0 && (fd = open(_PATH_WTMP, O_WRONLY|O_APPEND, 0)) < 0)
49+ if (fd < 0 && (fd = open(TRANSFORM_WTMP_FILE_NAME(_PATH_WTMP), O_WRONLY|O_APPEND, 0)) < 0)
50 return;
51 if (fstat(fd, &buf) == 0) {
52 #ifndef ORIGINAL_SOURCE
68cf7465 53diff -urN ftpd-BSD-0.3.2.orig/pathnames.h ftpd-BSD-0.3.2/pathnames.h
54--- ftpd-BSD-0.3.2.orig/pathnames.h Sun Jan 23 15:20:36 2000
55+++ ftpd-BSD-0.3.2/pathnames.h Sun Sep 10 01:53:54 2000
c5c3545d
JR
56@@ -38,9 +38,9 @@
57
58 #include <paths.h>
59
60-#define _PATH_FTPUSERS "/etc/ftpusers"
61-#define _PATH_FTPCHROOT "/etc/ftpchroot"
62-#define _PATH_FTPWELCOME "/etc/ftpwelcome"
63+#define _PATH_FTPUSERS "/etc/ftpd/ftpusers"
64+#define _PATH_FTPCHROOT "/etc/ftpd/ftpchroot"
65+#define _PATH_FTPWELCOME "/etc/ftpd/ftpwelcome"
66 #define _PATH_FTPLOGINMESG "/etc/motd"
67 #define _PATH_FTPDSTATFILE "/var/log/ftpd"
68 #define _PATH_FTPDPID "/var/run/ftpd.pid"
This page took 0.064071 seconds and 4 git commands to generate.