summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-daemons/proftpd/files
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-10 03:20:04 +0200
committerTudor Florea <tudor.florea@enea.com>2014-10-10 03:20:04 +0200
commit1b8dfe266937a37a4c642f96ceb2347bf4c00a17 (patch)
tree0c6aab146bb3c82efd9c7846a9a4e70dcb0ec84f /meta-networking/recipes-daemons/proftpd/files
downloadmeta-openembedded-daisy-140929.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-networking/recipes-daemons/proftpd/files')
-rw-r--r--meta-networking/recipes-daemons/proftpd/files/basic.conf.patch21
-rw-r--r--meta-networking/recipes-daemons/proftpd/files/close-RequireValidShell-check.patch27
-rw-r--r--meta-networking/recipes-daemons/proftpd/files/contrib.patch42
-rw-r--r--meta-networking/recipes-daemons/proftpd/files/default9
-rw-r--r--meta-networking/recipes-daemons/proftpd/files/make.patch66
-rw-r--r--meta-networking/recipes-daemons/proftpd/files/move-pidfile-to-var-run.patch39
-rw-r--r--meta-networking/recipes-daemons/proftpd/files/move-runfile-to-var-run.patch39
-rw-r--r--meta-networking/recipes-daemons/proftpd/files/proftpd-basic.init220
8 files changed, 463 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/proftpd/files/basic.conf.patch b/meta-networking/recipes-daemons/proftpd/files/basic.conf.patch
new file mode 100644
index 0000000000..4967bed1e7
--- /dev/null
+++ b/meta-networking/recipes-daemons/proftpd/files/basic.conf.patch
@@ -0,0 +1,21 @@
1Upstream-Status: Inappropriate [configuration]
2
3proftpd tries to get the IP address from the hostname.
4Unluckily now the hostname is not properly configured in /etc/hosts.
5We can use this patch as a workaround.
6
7Author: Dexuan Cui <dexuan.cui@intel.com>
8Tue Oct 25 12:59:27 CST 2011
9
10--- proftpd-1.3.3c.orig/sample-configurations/basic.conf
11+++ proftpd-1.3.3c/sample-configurations/basic.conf
12@@ -7,6 +7,9 @@
13 ServerType standalone
14 DefaultServer on
15
16+#By default we bind to all interfaces.
17+DefaultAddress 0.0.0.0
18+
19 # Port 21 is the standard FTP port.
20 Port 21
21
diff --git a/meta-networking/recipes-daemons/proftpd/files/close-RequireValidShell-check.patch b/meta-networking/recipes-daemons/proftpd/files/close-RequireValidShell-check.patch
new file mode 100644
index 0000000000..c64535cac8
--- /dev/null
+++ b/meta-networking/recipes-daemons/proftpd/files/close-RequireValidShell-check.patch
@@ -0,0 +1,27 @@
1close RequireValidShell check
2
3Upstream-Status: Inappropriate [configuration]
4
5close RequireValidShell check since we like to make /bin/false as shell
6for ftp user
7
8Signed-off-by: Roy Li <rongqing.li@windriver.com>
9---
10 sample-configurations/basic.conf | 1 +
11 1 file changed, 1 insertion(+)
12
13diff --git a/sample-configurations/basic.conf b/sample-configurations/basic.conf
14index 314eb79..abcb284 100644
15--- a/sample-configurations/basic.conf
16+++ b/sample-configurations/basic.conf
17@@ -53,6 +53,7 @@ AllowOverwrite on
18 # We want clients to be able to login with "anonymous" as well as "ftp"
19 UserAlias anonymous ftp
20
21+ RequireValidShell off
22 # Limit the maximum number of anonymous logins
23 MaxClients 10
24
25--
261.7.10.4
27
diff --git a/meta-networking/recipes-daemons/proftpd/files/contrib.patch b/meta-networking/recipes-daemons/proftpd/files/contrib.patch
new file mode 100644
index 0000000000..7e2a8e3ce0
--- /dev/null
+++ b/meta-networking/recipes-daemons/proftpd/files/contrib.patch
@@ -0,0 +1,42 @@
1The contrib directory now contains its own Makefile which is
2used during installation. It was required to pass DESTDIR through
3when it gets called from the base Makefile.
4
5Upstream-Status: Pending
6
7Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com>
8---
9 Makefile.in | 2 +-
10 contrib/Makefile.in | 6 +++---
11 2 files changed, 4 insertions(+), 4 deletions(-)
12
13diff --git a/Makefile.in b/Makefile.in
14index 5b2e683..ee72fe1 100644
15--- a/Makefile.in
16+++ b/Makefile.in
17@@ -120,7 +120,7 @@ install-modules: $(DESTDIR)$(libexecdir) $(DESTDIR)$(sysconfdir)
18 test -z "$(SHARED_MODULE_OBJS)" -a -z "$(SHARED_MODULE_DIRS)" -a -z "$(STATIC_MODULE_DIRS)" || (cd modules/ && $(MAKE) install)
19
20 install-utils: $(DESTDIR)$(sbindir) $(DESTDIR)$(bindir)
21- cd contrib/ && $(MAKE) install-utils
22+ cd contrib/ && $(MAKE) DESTDIR=${DESTDIR} install-utils
23 $(INSTALL_BIN) ftpcount $(DESTDIR)$(bindir)/ftpcount
24 $(INSTALL_BIN) ftpdctl $(DESTDIR)$(bindir)/ftpdctl
25 $(INSTALL_SBIN) ftpscrub $(DESTDIR)$(sbindir)/ftpscrub
26diff --git a/contrib/Makefile.in b/contrib/Makefile.in
27index 5bcc038..51d248c 100644
28--- a/contrib/Makefile.in
29+++ b/contrib/Makefile.in
30@@ -18,6 +18,6 @@ Makefile: Makefile.in ../config.status
31 cd ../ && ./config.status
32
33 install-utils:
34- $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 ftpasswd $(DESTDIR)$(bindir)/ftpasswd
35- $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 ftpmail $(DESTDIR)$(bindir)/ftpmail
36- $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 ftpquota $(DESTDIR)$(bindir)/ftpquota
37+ $(INSTALL) -m 0755 ftpasswd $(DESTDIR)$(bindir)/ftpasswd
38+ $(INSTALL) -m 0755 ftpmail $(DESTDIR)$(bindir)/ftpmail
39+ $(INSTALL) -m 0755 ftpquota $(DESTDIR)$(bindir)/ftpquota
40--
411.7.9.5
42
diff --git a/meta-networking/recipes-daemons/proftpd/files/default b/meta-networking/recipes-daemons/proftpd/files/default
new file mode 100644
index 0000000000..b31f36ce25
--- /dev/null
+++ b/meta-networking/recipes-daemons/proftpd/files/default
@@ -0,0 +1,9 @@
1# Defaults for proftpd initscript
2
3# Master system-wide proftpd switch. The initscript
4# will not run if it is not set to yes.
5RUN="yes"
6
7# Default options.
8# For more exhaustive logging, try "-d 3".
9OPTIONS=""
diff --git a/meta-networking/recipes-daemons/proftpd/files/make.patch b/meta-networking/recipes-daemons/proftpd/files/make.patch
new file mode 100644
index 0000000000..c5ff0136da
--- /dev/null
+++ b/meta-networking/recipes-daemons/proftpd/files/make.patch
@@ -0,0 +1,66 @@
1Upstream-Status: Inappropriate [configuration]
2
3Index: proftpd-1.3.2/Makefile.in
4===================================================================
5--- proftpd-1.3.2.orig/Makefile.in
6+++ proftpd-1.3.2/Makefile.in
7@@ -76,7 +76,6 @@ check: proftpd$(EXEEXT)
8 $(DESTDIR)$(localedir) $(DESTDIR)$(includedir) $(DESTDIR)$(includedir)/proftpd $(DESTDIR)$(libdir) $(DESTDIR)$(pkgconfigdir) $(DESTDIR)$(libdir)/proftpd $(DESTDIR)$(libexecdir) $(DESTDIR)$(localstatedir) $(DESTDIR)$(sysconfdir) $(DESTDIR)$(rundir) $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir) $(DESTDIR)$(mandir) $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5 $(DESTDIR)$(mandir)/man8:
9 @if [ ! -d $@ ]; then \
10 mkdir -p $@; \
11- chown $(INSTALL_USER):$(INSTALL_GROUP) $@; \
12 chmod 0755 $@; \
13 fi
14
15@@ -86,7 +85,6 @@ install-proftpd: proftpd $(DESTDIR)$(inc
16 rm -f $(DESTDIR)$(sbindir)/in.proftpd ; \
17 fi
18 ln -s proftpd $(DESTDIR)$(sbindir)/in.proftpd
19- -chown -h $(INSTALL_USER):$(INSTALL_GROUP) $(DESTDIR)$(sbindir)/in.proftpd
20
21 install-libs: $(DESTDIR)$(libdir)/proftpd
22 cd lib/ && $(MAKE) install
23@@ -121,11 +119,11 @@ install-utils: $(DESTDIR)$(sbindir) $(DE
24 $(INSTALL_SBIN) ftpshut $(DESTDIR)$(sbindir)/ftpshut
25 $(INSTALL_BIN) ftptop $(DESTDIR)$(bindir)/ftptop
26 $(INSTALL_BIN) ftpwho $(DESTDIR)$(bindir)/ftpwho
27- $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 src/prxs $(DESTDIR)$(bindir)/prxs
28+ $(INSTALL) -m 0755 src/prxs $(DESTDIR)$(bindir)/prxs
29
30 install-conf: $(DESTDIR)$(sysconfdir)
31 if [ ! -f $(DESTDIR)$(sysconfdir)/proftpd.conf ] ; then \
32- $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0644 \
33+ $(INSTALL) -m 0644 \
34 $(top_srcdir)/sample-configurations/basic.conf \
35 $(DESTDIR)$(sysconfdir)/proftpd.conf ; \
36 fi
37Index: proftpd-1.3.2/Make.rules.in
38===================================================================
39--- proftpd-1.3.2.orig/Make.rules.in
40+++ proftpd-1.3.2/Make.rules.in
41@@ -29,9 +29,9 @@ UTILS_LIBS=@UTILS_LIBS@ @LIBS@
42 INSTALL=@INSTALL@
43 INSTALL_USER=@install_user@
44 INSTALL_GROUP=@install_group@
45-INSTALL_BIN=$(INSTALL) @INSTALL_STRIP@ -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755
46-INSTALL_SBIN=$(INSTALL) @INSTALL_STRIP@ -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755
47-INSTALL_MAN=$(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0644
48+INSTALL_BIN=$(INSTALL) -m 0755
49+INSTALL_SBIN=$(INSTALL) -m 0755
50+INSTALL_MAN=$(INSTALL) -m 0644
51
52 RM=rm -f
53 SHELL=/bin/sh
54Index: proftpd-1.3.2/lib/libcap/Makefile
55===================================================================
56--- proftpd-1.3.2.orig/lib/libcap/Makefile
57+++ proftpd-1.3.2/lib/libcap/Makefile
58@@ -26,7 +26,7 @@ OBJS=$(addsuffix .o, $(FILES))
59 all: $(LIBNAME)
60
61 _makenames: _makenames.c cap_names.sed
62- $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
63+ $(BUILD_CC) $(CFLAGS) $(LDFLAGS) $< -o $@
64
65 cap_names.h: _makenames
66 ./_makenames > cap_names.h
diff --git a/meta-networking/recipes-daemons/proftpd/files/move-pidfile-to-var-run.patch b/meta-networking/recipes-daemons/proftpd/files/move-pidfile-to-var-run.patch
new file mode 100644
index 0000000000..953bbddef0
--- /dev/null
+++ b/meta-networking/recipes-daemons/proftpd/files/move-pidfile-to-var-run.patch
@@ -0,0 +1,39 @@
1move pidfile to /var/run
2
3Upstream-Status: Inappropriate [configuration]
4
5Signed-off-by: Roy Li <rongqing.li@windriver.com>
6---
7 configure | 2 +-
8 configure.in | 2 +-
9 2 files changed, 2 insertions(+), 2 deletions(-)
10
11diff --git a/configure b/configure
12index e6268f5..ebed38e 100755
13--- a/configure
14+++ b/configure
15@@ -33587,7 +33587,7 @@ cat >>confdefs.h <<_ACEOF
16 _ACEOF
17
18 cat >>confdefs.h <<_ACEOF
19-#define PR_PID_FILE_PATH "`eval echo "${localstatedir}/proftpd.pid"`"
20+#define PR_PID_FILE_PATH "`eval echo "${localstatedir}/run/proftpd.pid"`"
21 _ACEOF
22
23
24diff --git a/configure.in b/configure.in
25index df9186a..e2ae868 100644
26--- a/configure.in
27+++ b/configure.in
28@@ -2790,7 +2790,7 @@ AC_DEFINE_UNQUOTED(PR_LOCALE_DIR, "`eval echo "${locale_dir}"`")
29
30 AC_DEFINE_UNQUOTED(PR_RUN_DIR, "`eval echo "${localstatedir}"`")
31 AC_DEFINE_UNQUOTED(PR_CONFIG_FILE_PATH, "`eval echo "${sysconfdir}/proftpd.conf"`")
32-AC_DEFINE_UNQUOTED(PR_PID_FILE_PATH, "`eval echo "${localstatedir}/proftpd.pid"`")
33+AC_DEFINE_UNQUOTED(PR_PID_FILE_PATH, "`eval echo "${localstatedir}/run/proftpd.pid"`")
34
35 prefix="$pr_saved_prefix"
36 exec_prefix="$pr_saved_exec_prefix"
37--
381.7.10.4
39
diff --git a/meta-networking/recipes-daemons/proftpd/files/move-runfile-to-var-run.patch b/meta-networking/recipes-daemons/proftpd/files/move-runfile-to-var-run.patch
new file mode 100644
index 0000000000..1561ed80e3
--- /dev/null
+++ b/meta-networking/recipes-daemons/proftpd/files/move-runfile-to-var-run.patch
@@ -0,0 +1,39 @@
1redefine PR_RUN_DIR as ${localstatedir}/run
2
3Upstream-Status: Inappropriate [configuration]
4
5Signed-off-by: Roy Li <rongqing.li@windriver.com>
6---
7 configure | 2 +-
8 configure.in | 2 +-
9 2 files changed, 2 insertions(+), 2 deletions(-)
10
11diff --git a/configure b/configure
12index ebed38e..445d5bc 100755
13--- a/configure
14+++ b/configure
15@@ -33579,7 +33579,7 @@ _ACEOF
16
17
18 cat >>confdefs.h <<_ACEOF
19-#define PR_RUN_DIR "`eval echo "${localstatedir}"`"
20+#define PR_RUN_DIR "`eval echo "${localstatedir}"/run/`"
21 _ACEOF
22
23 cat >>confdefs.h <<_ACEOF
24diff --git a/configure.in b/configure.in
25index c17929c..df9186a 100644
26--- a/configure.in
27+++ b/configure.in
28@@ -2788,7 +2788,7 @@ locale_dir="`eval echo ${localedir}`"
29 locale_dir="`eval echo ${locale_dir}`"
30 AC_DEFINE_UNQUOTED(PR_LOCALE_DIR, "`eval echo "${locale_dir}"`")
31
32-AC_DEFINE_UNQUOTED(PR_RUN_DIR, "`eval echo "${localstatedir}"`")
33+AC_DEFINE_UNQUOTED(PR_RUN_DIR, "`eval echo "${localstatedir}/run"`")
34 AC_DEFINE_UNQUOTED(PR_CONFIG_FILE_PATH, "`eval echo "${sysconfdir}/proftpd.conf"`")
35 AC_DEFINE_UNQUOTED(PR_PID_FILE_PATH, "`eval echo "${localstatedir}/run/proftpd.pid"`")
36
37--
381.7.10.4
39
diff --git a/meta-networking/recipes-daemons/proftpd/files/proftpd-basic.init b/meta-networking/recipes-daemons/proftpd/files/proftpd-basic.init
new file mode 100644
index 0000000000..01c998c924
--- /dev/null
+++ b/meta-networking/recipes-daemons/proftpd/files/proftpd-basic.init
@@ -0,0 +1,220 @@
1#!/bin/sh
2
3### BEGIN INIT INFO
4# Provides: proftpd
5# Required-Start: $remote_fs $syslog $local_fs $network
6# Required-Stop: $remote_fs $syslog $local_fs $network
7# Should-Start: $named
8# Should-Stop: $named
9# Default-Start: 2 3 4 5
10# Default-Stop: 0 1 6
11# Short-Description: Starts ProFTPD daemon
12# Description: This script runs the FTP service offered
13# by the ProFTPD daemon
14### END INIT INFO
15
16# Start the proftpd FTP daemon.
17
18PATH=/bin:/usr/bin:/sbin:/usr/sbin
19DAEMON=/usr/sbin/proftpd
20NAME=proftpd
21
22# Defaults
23RUN="no"
24OPTIONS=""
25CONFIG_FILE=/etc/proftpd.conf
26
27PIDFILE=`grep -i '^pidfile' $CONFIG_FILE|awk '{ print $2 }'`
28if [ "x$PIDFILE" = "x" ];
29then
30 PIDFILE=/var/run/proftpd.pid
31fi
32
33# Read config (will override defaults)
34[ -r /etc/default/proftpd ] && . /etc/default/proftpd
35
36trap "" 1
37trap "" 15
38
39test -f $DAEMON || exit 0
40
41. /etc/init.d/functions
42
43#
44# Servertype could be inetd|standalone|none.
45# In all cases check against inetd and xinetd support.
46#
47if ! egrep -qi "^[[:space:]]*ServerType.*standalone" $CONFIG_FILE
48then
49 if egrep -qi "server[[:space:]]*=[[:space:]]*/usr/sbin/proftpd" /etc/xinetd.conf 2>/dev/null || \
50 egrep -qi "server[[:space:]]*=[[:space:]]*/usr/sbin/proftpd" /etc/xinetd.d/* 2>/dev/null || \
51 egrep -qi "^ftp.*/usr/sbin/proftpd" /etc/inetd.conf 2>/dev/null
52 then
53 RUN="no"
54 INETD="yes"
55 else
56 if ! egrep -qi "^[[:space:]]*ServerType.*inetd" $CONFIG_FILE
57 then
58 RUN="yes"
59 INETD="no"
60 else
61 RUN="no"
62 INETD="no"
63 fi
64 fi
65fi
66
67# /var/run could be on a tmpfs
68
69[ ! -d /var/run/proftpd ] && mkdir /var/run/proftpd
70
71inetd_check()
72{
73 if [ ! -x /usr/sbin/inetd -a ! -x /usr/sbin/xinetd ]; then
74 echo "Neither inetd nor xinetd appears installed: check your configuration."
75 fi
76}
77
78start()
79{
80 set -e
81 echo -n "Starting ftp server $NAME... "
82 start-stop-daemon --start --quiet --pidfile "$PIDFILE" --oknodo --exec $DAEMON -- -c $CONFIG_FILE $OPTIONS
83 echo "done."
84}
85
86signal()
87{
88
89 if [ "$1" = "stop" ]; then
90 SIGNAL="TERM"
91 echo -n "Stopping ftp server $NAME... "
92 else
93 if [ "$1" = "reload" ]; then
94 SIGNAL="HUP"
95 echo -n "Reloading ftp server $NAME... "
96 else
97 echo "ERR: wrong parameter given to signal()"
98 exit 1
99 fi
100 fi
101 if [ -f "$PIDFILE" ]; then
102 start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile "$PIDFILE"
103 if [ $? = 0 ]; then
104 echo "done."
105 return
106 else
107 SIGNAL="KILL"
108 start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile "$PIDFILE"
109 if [ $? != 0 ]; then
110 echo
111 [ $2 != 0 ] || exit 0
112 else
113 echo "done."
114 return
115 fi
116 fi
117 if [ "$SIGNAL" = "KILL" ]; then
118 rm -f "$PIDFILE"
119 fi
120 else
121 echo "done."
122 return
123 fi
124}
125
126case "$1" in
127 start)
128 if [ "x$RUN" = "xyes" ] ; then
129 start
130 else
131 if [ "x$INETD" = "xyes" ] ; then
132 echo "ProFTPD is started from inetd/xinetd."
133 inetd_check
134 else
135 echo "ProFTPD warning: cannot start neither in standalone nor in inetd/xinetd mode. Check your configuration."
136 fi
137 fi
138 ;;
139
140 force-start)
141 if [ "x$INETD" = "xyes" ] ; then
142 echo "Warning: ProFTPD is started from inetd/xinetd (trying to start anyway)."
143 inetd_check
144 fi
145 start
146 ;;
147
148 stop)
149 if [ "x$RUN" = "xyes" ] ; then
150 signal stop 0
151 else
152 if [ "x$INETD" = "xyes" ] ; then
153 echo "ProFTPD is started from inetd/xinetd."
154 inetd_check
155 else
156 echo "ProFTPD warning: cannot start neither in standalone nor in inetd/xinetd mode. Check your configuration."
157 fi
158 fi
159 ;;
160
161 force-stop)
162 if [ "x$INETD" = "xyes" ] ; then
163 echo "Warning: ProFTPD is started from inetd/xinetd (trying to kill anyway)."
164 inetd_check
165 fi
166 signal stop 0
167 ;;
168
169 reload)
170 signal reload 0
171 ;;
172
173 force-reload|restart)
174 if [ "x$RUN" = "xyes" ] ; then
175 signal stop 1
176 sleep 2
177 start
178 else
179 if [ "x$INETD" = "xyes" ] ; then
180 echo "ProFTPD is started from inetd/xinetd."
181 inetd_check
182 else
183 echo "ProFTPD warning: cannot start neither in standalone nor in inetd/xinetd mode. Check your configuration."
184 fi
185 fi
186 ;;
187
188 status)
189 if [ "x$INETD" = "xyes" ] ; then
190 echo "ProFTPD is started from inetd/xinetd."
191 inetd_check
192 exit 0
193 else
194 if [ -f "$PIDFILE" ]; then
195 pid=$(cat $PIDFILE)
196 else
197 pid="x"
198 fi
199 if [ `pidof proftpd|grep "$pid"|wc -l` -ne 0 ] ; then
200 echo "ProFTPD is started in standalone mode, currently running."
201 exit 0
202 else
203 echo "ProFTPD is started in standalone mode, currently not running."
204 exit 3
205 fi
206 fi
207 ;;
208
209 check-config)
210 $DAEMON -t >/dev/null && echo "ProFTPD configuration OK" && exit 0
211 exit 1
212 ;;
213
214 *)
215 echo "Usage: /etc/init.d/$NAME {start|status|force-start|stop|force-stop|reload|restart|force-reload|check-config}"
216 exit 1
217 ;;
218esac
219
220exit 0