added my Recipes

This commit is contained in:
2024-07-11 14:16:35 +02:00
parent 38bc4f53ac
commit 09b621d929
7118 changed files with 525762 additions and 3 deletions

View File

@@ -0,0 +1,21 @@
Upstream-Status: Inappropriate [configuration]
proftpd tries to get the IP address from the hostname.
Unluckily now the hostname is not properly configured in /etc/hosts.
We can use this patch as a workaround.
Author: Dexuan Cui <dexuan.cui@intel.com>
Tue Oct 25 12:59:27 CST 2011
--- proftpd-1.3.3c.orig/sample-configurations/basic.conf
+++ proftpd-1.3.3c/sample-configurations/basic.conf
@@ -7,6 +7,9 @@
ServerType standalone
DefaultServer on
+#By default we bind to all interfaces.
+DefaultAddress 0.0.0.0
+
# Port 21 is the standard FTP port.
Port 21

View File

@@ -0,0 +1,99 @@
Upstream-Status: Inappropriate [configuration]
combined the following patches into one:
make, move-pidfile-to-var-run, move-runfile-to-var-run
move pidfile to /var/run
redefine PR_RUN_DIR as ${localstatedir}/run
Signed-off-by: Armin Kuster <akuster808@gmail.com>
diff --git a/Make.rules.in b/Make.rules.in
index a5028ac..ccd7807 100644
--- a/Make.rules.in
+++ b/Make.rules.in
@@ -30,9 +30,9 @@ INSTALL=@INSTALL@
INSTALL_STRIP=@INSTALL_STRIP@
INSTALL_USER=@install_user@
INSTALL_GROUP=@install_group@
-INSTALL_BIN=$(INSTALL) $(INSTALL_STRIP) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755
-INSTALL_SBIN=$(INSTALL) $(INSTALL_STRIP) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755
-INSTALL_MAN=$(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0644
+INSTALL_BIN=$(INSTALL) -m 0755
+INSTALL_SBIN=$(INSTALL) -m 0755
+INSTALL_MAN=$(INSTALL) -m 0644
RM=rm -f
SHELL=@CONFIG_SHELL@
diff --git a/Makefile.in b/Makefile.in
index 9434cbd..13f2e16 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -123,7 +123,6 @@ check: proftpd$(EXEEXT)
$(DESTDIR)$(localedir) $(DESTDIR)$(includedir) $(DESTDIR)$(includedir)/proftpd $(DESTDIR)$(libdir) $(DESTDIR)$(pkgconfigdir) $(DESTDIR)$(libdir)/proftpd $(DESTDIR)$(libexecdir) $(DESTDIR)$(localstatedir) $(DESTDIR)$(sysconfdir) $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir) $(DESTDIR)$(mandir) $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5 $(DESTDIR)$(mandir)/man8:
@if [ ! -d $@ ]; then \
mkdir -p $@; \
- chown $(INSTALL_USER):$(INSTALL_GROUP) $@; \
chmod 0755 $@; \
fi
@@ -133,7 +132,6 @@ install-proftpd: proftpd$(EXEEXT) $(DESTDIR)$(includedir) $(DESTDIR)$(localstate
rm -f $(DESTDIR)$(sbindir)/in.proftpd ; \
fi
ln -s $(top_builddir)/proftpd $(DESTDIR)$(sbindir)/in.proftpd
- -chown -h $(INSTALL_USER):$(INSTALL_GROUP) $(DESTDIR)$(sbindir)/in.proftpd
install-libs: $(DESTDIR)$(libdir)/proftpd
cd lib/ && $(MAKE) install
@@ -170,11 +168,11 @@ install-utils: $(DESTDIR)$(sbindir) $(DESTDIR)$(bindir)
$(INSTALL_SBIN) $(top_builddir)/ftpshut $(DESTDIR)$(sbindir)/ftpshut
$(INSTALL_BIN) $(top_builddir)/ftptop $(DESTDIR)$(bindir)/ftptop
$(INSTALL_BIN) $(top_builddir)/ftpwho $(DESTDIR)$(bindir)/ftpwho
- $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 $(top_builddir)/src/prxs $(DESTDIR)$(bindir)/prxs
+ $(INSTALL) -m 0755 $(top_builddir)/src/prxs $(DESTDIR)$(bindir)/prxs
install-conf: $(DESTDIR)$(sysconfdir)
if [ ! -f $(DESTDIR)$(sysconfdir)/proftpd.conf ] ; then \
- $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0644 \
+ $(INSTALL) -m 0644 \
$(top_srcdir)/sample-configurations/basic.conf \
$(DESTDIR)$(sysconfdir)/proftpd.conf ; \
fi
diff --git a/configure b/configure
index 0a51670..69fa130 100755
--- a/configure
+++ b/configure
@@ -25116,7 +25116,7 @@ _ACEOF
cat >>confdefs.h <<_ACEOF
-#define PR_RUN_DIR "`eval echo "${localstatedir}"`"
+#define PR_RUN_DIR "`eval echo "${localstatedir}"/run/`"
_ACEOF
@@ -25126,7 +25126,7 @@ _ACEOF
cat >>confdefs.h <<_ACEOF
-#define PR_PID_FILE_PATH "`eval echo "${localstatedir}/proftpd.pid"`"
+#define PR_PID_FILE_PATH "`eval echo "${localstatedir}/run/proftpd.pid"`"
_ACEOF
diff --git a/configure.in b/configure.in
index 50561de..93cad3f 100644
--- a/configure.in
+++ b/configure.in
@@ -4059,8 +4059,8 @@ locale_dir="`eval echo ${locale_dir}`"
AC_DEFINE_UNQUOTED(PR_LOCALE_DIR, "`eval echo "${locale_dir}"`", [Define the locale directory])
AC_DEFINE_UNQUOTED(PR_RUN_DIR, "`eval echo "${localstatedir}"`", [Define the run directory])
-AC_DEFINE_UNQUOTED(PR_CONFIG_FILE_PATH, "`eval echo "${sysconfdir}/proftpd.conf"`", [Define the configuration file path])
-AC_DEFINE_UNQUOTED(PR_PID_FILE_PATH, "`eval echo "${localstatedir}/proftpd.pid"`", [Define the PID file path])
+AC_DEFINE_UNQUOTED(PR_CONFIG_FILE_PATH, "`eval echo "${sysconfdir}/run/proftpd.conf"`", [Define the configuration file path])
+AC_DEFINE_UNQUOTED(PR_PID_FILE_PATH, "`eval echo "${localstatedir}/run/proftpd.pid"`", [Define the PID file path])
prefix="$pr_saved_prefix"
exec_prefix="$pr_saved_exec_prefix"

View File

@@ -0,0 +1,27 @@
close RequireValidShell check
Upstream-Status: Inappropriate [configuration]
close RequireValidShell check since we like to make /bin/false as shell
for ftp user
Signed-off-by: Roy Li <rongqing.li@windriver.com>
---
sample-configurations/basic.conf | 1 +
1 file changed, 1 insertion(+)
diff --git a/sample-configurations/basic.conf b/sample-configurations/basic.conf
index 314eb79..abcb284 100644
--- a/sample-configurations/basic.conf
+++ b/sample-configurations/basic.conf
@@ -53,6 +53,7 @@ AllowOverwrite on
# We want clients to be able to login with "anonymous" as well as "ftp"
UserAlias anonymous ftp
+ RequireValidShell off
# Limit the maximum number of anonymous logins
MaxClients 10
--
1.7.10.4

View File

@@ -0,0 +1,39 @@
The contrib directory now contains its own Makefile which is
used during installation. It was required to pass DESTDIR through
when it gets called from the base Makefile.
Upstream-Status: Pending
Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com>
---
Makefile.in | 2 +-
contrib/Makefile.in | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 9434cbd..8da7d1f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -163,7 +163,7 @@ install-modules: $(DESTDIR)$(libexecdir) $(DESTDIR)$(sysconfdir)
test -z "$(SHARED_MODULE_OBJS)" -a -z "$(SHARED_MODULE_DIRS)" -a -z "$(STATIC_MODULE_DIRS)" || (cd modules/ && $(MAKE) install)
install-utils: $(DESTDIR)$(sbindir) $(DESTDIR)$(bindir)
- cd contrib/ && $(MAKE) install-utils
+ cd contrib/ && $(MAKE) DESTDIR=${DESTDIR} install-utils
$(INSTALL_BIN) $(top_builddir)/ftpcount $(DESTDIR)$(bindir)/ftpcount
$(INSTALL_BIN) $(top_builddir)/ftpdctl $(DESTDIR)$(bindir)/ftpdctl
$(INSTALL_SBIN) $(top_builddir)/ftpscrub $(DESTDIR)$(sbindir)/ftpscrub
diff --git a/contrib/Makefile.in b/contrib/Makefile.in
index d1a31af..65d2abc 100644
--- a/contrib/Makefile.in
+++ b/contrib/Makefile.in
@@ -17,6 +17,6 @@ Makefile: Makefile.in ../config.status
cd ../ && ./config.status
install-utils:
- $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 $(srcdir)/ftpasswd $(DESTDIR)$(bindir)/ftpasswd
- $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 $(srcdir)/ftpmail $(DESTDIR)$(bindir)/ftpmail
- $(INSTALL) -o $(INSTALL_USER) -g $(INSTALL_GROUP) -m 0755 $(srcdir)/ftpquota $(DESTDIR)$(bindir)/ftpquota
+ $(INSTALL) -m 0755 $(srcdir)/ftpasswd $(DESTDIR)$(bindir)/ftpasswd
+ $(INSTALL) -m 0755 $(srcdir)/ftpmail $(DESTDIR)$(bindir)/ftpmail
+ $(INSTALL) -m 0755 $(srcdir)/ftpquota $(DESTDIR)$(bindir)/ftpquota

View File

@@ -0,0 +1,9 @@
# Defaults for proftpd initscript
# Master system-wide proftpd switch. The initscript
# will not run if it is not set to yes.
RUN="yes"
# Default options.
# For more exhaustive logging, try "-d 3".
OPTIONS=""

View File

@@ -0,0 +1,220 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: proftpd
# Required-Start: $remote_fs $syslog $local_fs $network
# Required-Stop: $remote_fs $syslog $local_fs $network
# Should-Start: $named
# Should-Stop: $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts ProFTPD daemon
# Description: This script runs the FTP service offered
# by the ProFTPD daemon
### END INIT INFO
# Start the proftpd FTP daemon.
PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/usr/sbin/proftpd
NAME=proftpd
# Defaults
RUN="no"
OPTIONS=""
CONFIG_FILE=/etc/proftpd.conf
PIDFILE=`grep -i '^pidfile' $CONFIG_FILE|awk '{ print $2 }'`
if [ "x$PIDFILE" = "x" ];
then
PIDFILE=/var/run/proftpd.pid
fi
# Read config (will override defaults)
[ -r /etc/default/proftpd ] && . /etc/default/proftpd
trap "" 1
trap "" 15
test -f $DAEMON || exit 0
. /etc/init.d/functions
#
# Servertype could be inetd|standalone|none.
# In all cases check against inetd and xinetd support.
#
if ! egrep -qi "^[[:space:]]*ServerType.*standalone" $CONFIG_FILE
then
if egrep -qi "server[[:space:]]*=[[:space:]]*/usr/sbin/proftpd" /etc/xinetd.conf 2>/dev/null || \
egrep -qi "server[[:space:]]*=[[:space:]]*/usr/sbin/proftpd" /etc/xinetd.d/* 2>/dev/null || \
egrep -qi "^ftp.*/usr/sbin/proftpd" /etc/inetd.conf 2>/dev/null
then
RUN="no"
INETD="yes"
else
if ! egrep -qi "^[[:space:]]*ServerType.*inetd" $CONFIG_FILE
then
RUN="yes"
INETD="no"
else
RUN="no"
INETD="no"
fi
fi
fi
# /var/run could be on a tmpfs
[ ! -d /var/run/proftpd ] && mkdir /var/run/proftpd
inetd_check()
{
if [ ! -x /usr/sbin/inetd -a ! -x /usr/sbin/xinetd ]; then
echo "Neither inetd nor xinetd appears installed: check your configuration."
fi
}
start()
{
set -e
echo -n "Starting ftp server $NAME... "
start-stop-daemon --start --quiet --pidfile "$PIDFILE" --oknodo --exec $DAEMON -- -c $CONFIG_FILE $OPTIONS
echo "done."
}
signal()
{
if [ "$1" = "stop" ]; then
SIGNAL="TERM"
echo -n "Stopping ftp server $NAME... "
else
if [ "$1" = "reload" ]; then
SIGNAL="HUP"
echo -n "Reloading ftp server $NAME... "
else
echo "ERR: wrong parameter given to signal()"
exit 1
fi
fi
if [ -f "$PIDFILE" ]; then
start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile "$PIDFILE"
if [ $? = 0 ]; then
echo "done."
return
else
SIGNAL="KILL"
start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile "$PIDFILE"
if [ $? != 0 ]; then
echo
[ $2 != 0 ] || exit 0
else
echo "done."
return
fi
fi
if [ "$SIGNAL" = "KILL" ]; then
rm -f "$PIDFILE"
fi
else
echo "done."
return
fi
}
case "$1" in
start)
if [ "x$RUN" = "xyes" ] ; then
start
else
if [ "x$INETD" = "xyes" ] ; then
echo "ProFTPD is started from inetd/xinetd."
inetd_check
else
echo "ProFTPD warning: cannot start neither in standalone nor in inetd/xinetd mode. Check your configuration."
fi
fi
;;
force-start)
if [ "x$INETD" = "xyes" ] ; then
echo "Warning: ProFTPD is started from inetd/xinetd (trying to start anyway)."
inetd_check
fi
start
;;
stop)
if [ "x$RUN" = "xyes" ] ; then
signal stop 0
else
if [ "x$INETD" = "xyes" ] ; then
echo "ProFTPD is started from inetd/xinetd."
inetd_check
else
echo "ProFTPD warning: cannot start neither in standalone nor in inetd/xinetd mode. Check your configuration."
fi
fi
;;
force-stop)
if [ "x$INETD" = "xyes" ] ; then
echo "Warning: ProFTPD is started from inetd/xinetd (trying to kill anyway)."
inetd_check
fi
signal stop 0
;;
reload)
signal reload 0
;;
force-reload|restart)
if [ "x$RUN" = "xyes" ] ; then
signal stop 1
sleep 2
start
else
if [ "x$INETD" = "xyes" ] ; then
echo "ProFTPD is started from inetd/xinetd."
inetd_check
else
echo "ProFTPD warning: cannot start neither in standalone nor in inetd/xinetd mode. Check your configuration."
fi
fi
;;
status)
if [ "x$INETD" = "xyes" ] ; then
echo "ProFTPD is started from inetd/xinetd."
inetd_check
exit 0
else
if [ -f "$PIDFILE" ]; then
pid=$(cat $PIDFILE)
else
pid="x"
fi
if [ `pidof proftpd|grep "$pid"|wc -l` -ne 0 ] ; then
echo "ProFTPD is started in standalone mode, currently running."
exit 0
else
echo "ProFTPD is started in standalone mode, currently not running."
exit 3
fi
fi
;;
check-config)
$DAEMON -t >/dev/null && echo "ProFTPD configuration OK" && exit 0
exit 1
;;
*)
echo "Usage: /etc/init.d/$NAME {start|status|force-start|stop|force-stop|reload|restart|force-reload|check-config}"
exit 1
;;
esac
exit 0

View File

@@ -0,0 +1,12 @@
[Unit]
Description=proftpd Daemon
After=network.target
[Service]
Type=forking
ExecStart=@SBINDIR@/proftpd -c @SYSCONFDIR@/proftpd.conf
StandardError=syslog
[Install]
WantedBy=default.target