diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-ftp/proftpd/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-ftp/proftpd/files')
-rw-r--r-- | net-ftp/proftpd/files/proftpd-1.3.6-use-trace.patch | 18 | ||||
-rw-r--r-- | net-ftp/proftpd/files/proftpd-1.3.6_rc4-diskuse-refresh-api.patch | 17 | ||||
-rw-r--r-- | net-ftp/proftpd/files/proftpd-1.3.6_rc4-gss-refresh-api.patch | 60 | ||||
-rw-r--r-- | net-ftp/proftpd/files/proftpd-1.3.6_rc4-msg-refresh-api.patch | 29 | ||||
-rw-r--r-- | net-ftp/proftpd/files/proftpd-1.3.6_rc4-open-tests.patch | 24 | ||||
-rw-r--r-- | net-ftp/proftpd/files/proftpd-1.3.6_rc4-vroot-refresh-api.patch | 23 | ||||
-rw-r--r-- | net-ftp/proftpd/files/proftpd-tmpfiles.d.conf | 1 | ||||
-rw-r--r-- | net-ftp/proftpd/files/proftpd.conf.sample | 53 | ||||
-rw-r--r-- | net-ftp/proftpd/files/proftpd.initd | 51 | ||||
-rw-r--r-- | net-ftp/proftpd/files/proftpd.service | 12 | ||||
-rw-r--r-- | net-ftp/proftpd/files/proftpd.xinetd | 15 |
11 files changed, 303 insertions, 0 deletions
diff --git a/net-ftp/proftpd/files/proftpd-1.3.6-use-trace.patch b/net-ftp/proftpd/files/proftpd-1.3.6-use-trace.patch new file mode 100644 index 000000000000..c7d918425636 --- /dev/null +++ b/net-ftp/proftpd/files/proftpd-1.3.6-use-trace.patch @@ -0,0 +1,18 @@ +Make --disable-trace a build-time failure instead of link-time one. + +Reported-by: Toralf Förster +Bug: https://bugs.gentoo.org/624570 +diff --git a/include/trace.h b/include/trace.h +index f05dd0e..398e939 100644 +--- a/include/trace.h ++++ b/include/trace.h +@@ -29,2 +29,4 @@ + ++#ifdef PR_USE_TRACE ++ + #define PR_TRACE_DEFAULT_CHANNEL "DEFAULT" +@@ -64,2 +66,4 @@ int pr_trace_vmsg(const char *, int, const char *, va_list); + ++#endif /* PR_USE_TRACE */ ++ + #endif /* PR_TRACE_H */ diff --git a/net-ftp/proftpd/files/proftpd-1.3.6_rc4-diskuse-refresh-api.patch b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-diskuse-refresh-api.patch new file mode 100644 index 000000000000..34f1d95ebee0 --- /dev/null +++ b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-diskuse-refresh-api.patch @@ -0,0 +1,17 @@ +diff --git a/mod_diskuse.c b/mod_diskuse.c +index 0e0a0d0..7eb5edf 100644 +--- a/mod_diskuse.c ++++ b/mod_diskuse.c +@@ -53,6 +53,12 @@ + + #define MOD_DISKUSE_VERSION "mod_diskuse/0.9" + ++#define pr_parse_expression pr_expr_create ++#define pr_class_or_expression pr_expr_eval_class_or ++#define pr_group_and_expression pr_expr_eval_group_and ++#define pr_group_or_expression pr_expr_eval_group_or ++#define pr_user_or_expression pr_expr_eval_user_or ++ + static unsigned char have_max_diskuse = FALSE; + static double min_diskfree = 0.0; + static double current_diskfree = 0.0; diff --git a/net-ftp/proftpd/files/proftpd-1.3.6_rc4-gss-refresh-api.patch b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-gss-refresh-api.patch new file mode 100644 index 000000000000..43cc659e47dc --- /dev/null +++ b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-gss-refresh-api.patch @@ -0,0 +1,60 @@ +diff --git a/mod_auth_gss.c.in b/mod_auth_gss.c.in +index 6228b4d..3569ebb 100644 +--- a/mod_auth_gss.c.in ++++ b/mod_auth_gss.c.in +@@ -38,6 +38,10 @@ + */ + + #include "mod_gss.h" ++ ++#define DECLINED PR_DECLINED ++#define ERROR_INT PR_ERROR_INT ++ + extern unsigned char gss_engine; + extern unsigned long gss_flags; + extern int gss_logfd; +diff --git a/mod_gss.c.in b/mod_gss.c.in +index 9d2d4c8..83a4019 100644 +--- a/mod_gss.c.in ++++ b/mod_gss.c.in +@@ -57,6 +57,13 @@ + + #include "mod_gss.h" + ++#define LOG_SYMLINK PR_LOG_SYMLINK ++#define LOG_WRITEABLE_DIR PR_LOG_WRITABLE_DIR ++#define HANDLED PR_HANDLED ++#define ERROR PR_ERROR ++#define DECLINED PR_DECLINED ++#define ERROR_INT PR_ERROR_INT ++ + module gss_module; + + /* Module variables maybe used externaly */ +@@ -1395,7 +1402,7 @@ MODRET gss_auth(cmd_rec *cmd) { + + /* Convert the parameter to upper case */ + for (i = 0; i < strlen(cmd->argv[1]); i++) +- (cmd->argv[1])[i] = toupper((cmd->argv[1])[i]); ++ ((char*)cmd->argv[1])[i] = toupper(((char*)cmd->argv[1])[i]); + + if (!strcmp(cmd->argv[1], "GSSAPI")) { + pr_response_send(R_334, "Using authentication type %s; ADAT must follow", cmd->argv[1]); +@@ -2014,7 +2021,7 @@ MODRET gss_prot(cmd_rec *cmd) { + + /* Convert the parameter to upper case */ + for (i = 0; i < strlen(cmd->argv[1]); i++) +- (cmd->argv[1])[i] = toupper((cmd->argv[1])[i]); ++ ((char*)cmd->argv[1])[i] = toupper(((char*)cmd->argv[1])[i]); + + /* Only PROT S , PROT C or PROT P is valid with respect to GSS. */ + if (!strcmp(cmd->argv[1], "C")) { +@@ -2098,7 +2105,7 @@ MODRET set_gsskeytab(cmd_rec *cmd) { + if (!file_exists(cmd->argv[1])) + CONF_ERROR(cmd, "file does not exist"); + +- if (*cmd->argv[1] != '/') ++ if (((char*)(*cmd->argv))[1] != '/') + CONF_ERROR(cmd, "parameter must be an absolute path"); + + add_config_param_str(cmd->argv[0], 1, cmd->argv[1]); diff --git a/net-ftp/proftpd/files/proftpd-1.3.6_rc4-msg-refresh-api.patch b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-msg-refresh-api.patch new file mode 100644 index 000000000000..2e90be254cb6 --- /dev/null +++ b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-msg-refresh-api.patch @@ -0,0 +1,29 @@ +diff --git a/mod_msg.c b/mod_msg.c +index 70bce69..4ce6bd7 100644 +--- a/mod_msg.c ++++ b/mod_msg.c +@@ -52,10 +52,14 @@ extern pid_t mpid; + + module msg_module; + +-#ifndef USE_CTRLS ++#ifndef PR_USE_CTRLS + # error "mod_msg requires Controls support (--enable-ctrls)" + #endif /* USE_CTRLS */ + ++#define pr_scoreboard_read_entry pr_scoreboard_entry_read ++#define DECLINED PR_DECLINED ++#define HANDLED PR_HANDLED ++ + static ctrls_acttab_t msg_acttab[]; + + static int msg_engine = FALSE; +@@ -709,7 +713,7 @@ static int msg_handle_msg(pr_ctrls_t *ctrl, int reqargc, char **reqargv) { + if (msg_send_msg(score->sce_pid, msgstr) < 0) { + msg_errno = errno; + (void) pr_log_writefile(msg_logfd, MOD_MSG_VERSION, +- "error sending message to all (pid %u): %s", reqargv[1], ++ "error sending message to all (pid %u): %s", + score->sce_pid, strerror(errno)); + + } else diff --git a/net-ftp/proftpd/files/proftpd-1.3.6_rc4-open-tests.patch b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-open-tests.patch new file mode 100644 index 000000000000..f65a2cc3fbb4 --- /dev/null +++ b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-open-tests.patch @@ -0,0 +1,24 @@ +gcc-6.3 + glibc-2.25 now can detect 2-argument open that is supposed to created new files. +diff --git a/tests/api/fsio.c b/tests/api/fsio.c +index 2041f43..18d173b 100644 +--- a/tests/api/fsio.c ++++ b/tests/api/fsio.c +@@ -1058,3 +1058,3 @@ START_TEST (fsio_sys_access_file_test) { + /* Make the file to check; we want it to have perms 664.*/ +- fd = open(fsio_test_path, O_CREAT|O_EXCL|O_WRONLY); ++ fd = open(fsio_test_path, O_CREAT|O_EXCL|O_WRONLY, S_IRUSR | S_IWUSR); + fail_if(fd < 0, "Unable to create file '%s': %s", fsio_test_path, +diff --git a/tests/api/scoreboard.c b/tests/api/scoreboard.c +index f0ffdbc..f26d833 100644 +--- a/tests/api/scoreboard.c ++++ b/tests/api/scoreboard.c +@@ -267,3 +267,3 @@ START_TEST (scoreboard_lock_test) { + +- fd = open(test_file2, O_CREAT|O_EXCL|O_RDWR); ++ fd = open(test_file2, O_CREAT|O_EXCL|O_RDWR, S_IRUSR | S_IWUSR); + fail_unless(fd >= 0, "Failed to open '%s': %s", test_file2, strerror(errno)); +@@ -911,3 +911,3 @@ START_TEST (scoreboard_entry_lock_test) { + +- fd = open(test_file2, O_CREAT|O_EXCL|O_RDWR); ++ fd = open(test_file2, O_CREAT|O_EXCL|O_RDWR, S_IRUSR | S_IWUSR); + fail_unless(fd >= 0, "Failed to open '%s': %s", test_file2, strerror(errno)); diff --git a/net-ftp/proftpd/files/proftpd-1.3.6_rc4-vroot-refresh-api.patch b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-vroot-refresh-api.patch new file mode 100644 index 000000000000..59b96ce90027 --- /dev/null +++ b/net-ftp/proftpd/files/proftpd-1.3.6_rc4-vroot-refresh-api.patch @@ -0,0 +1,23 @@ +diff --git a/mod_vroot.c b/mod_vroot.c +index b0ce59a..db0df35 100644 +--- a/mod_vroot.c ++++ b/mod_vroot.c +@@ -1515,7 +1515,7 @@ MODRET set_vrootserverroot(cmd_rec *cmd) { + */ + + pathlen = strlen(cmd->argv[1]); +- if (cmd->argv[1][pathlen - 1] != '/') { ++ if (((char*)cmd->argv[1])[pathlen - 1] != '/') { + c->argv[0] = pstrcat(c->pool, cmd->argv[1], "/", NULL); + + } else { +@@ -1648,7 +1648,9 @@ MODRET vroot_pre_pass(cmd_rec *cmd) { + fs->rename = vroot_rename; + fs->unlink = vroot_unlink; + fs->open = vroot_open; ++#if ! PROFTPD_VERSION_NUMBER >= 0x0001030604 + fs->creat = vroot_creat; ++#endif /* before ProFTPD 1.3.6_rc4 */ + fs->link = vroot_link; + fs->readlink = vroot_readlink; + fs->symlink = vroot_symlink; diff --git a/net-ftp/proftpd/files/proftpd-tmpfiles.d.conf b/net-ftp/proftpd/files/proftpd-tmpfiles.d.conf new file mode 100644 index 000000000000..26ad04256b43 --- /dev/null +++ b/net-ftp/proftpd/files/proftpd-tmpfiles.d.conf @@ -0,0 +1 @@ +d /var/run/proftpd 0755 root root diff --git a/net-ftp/proftpd/files/proftpd.conf.sample b/net-ftp/proftpd/files/proftpd.conf.sample new file mode 100644 index 000000000000..7bbfa03f0bc1 --- /dev/null +++ b/net-ftp/proftpd/files/proftpd.conf.sample @@ -0,0 +1,53 @@ +# This is a sample ProFTPD configuration file for Gentoo Linux (rename +# it to 'proftpd.conf' for actual use). It establishes a single server +# and a single anonymous login. + +ServerName "ProFTPD Default Server" +ServerType standalone +DefaultServer on +RequireValidShell off +AuthPAM off +AuthPAMConfig ftp + +# Listen on the standard FTP port 21. +Port 21 + +# New directories and files should not be group or world writable. +Umask 022 + +# To prevent DoS attacks set the maximum number of child processes +# to 30. If you need to allow more than 30 concurrent connections +# at once simply increase this value. +MaxInstances 30 + +# The server will run under ftp/ftp. +User ftp +Group ftp + +# Every FTP sessions is "jailed" into the user's home directory. +DefaultRoot ~ + +# Generally files are overwritable. +AllowOverwrite on + +# Disallow the use of the SITE CHMOD command. +<Limit SITE_CHMOD> + DenyAll +</Limit> + +# A basic anonymous FTP account without an upload directory. +<Anonymous ~ftp> + User ftp + Group ftp + + # Clients can login with the username "anonymous" and "ftp". + UserAlias anonymous ftp + + # Limit the maximum number of parallel anonymous logins to 10. + MaxClients 10 + + # Prohibit the WRITE command for the anonymous users. + <Limit WRITE> + DenyAll + </Limit> +</Anonymous> diff --git a/net-ftp/proftpd/files/proftpd.initd b/net-ftp/proftpd/files/proftpd.initd new file mode 100644 index 000000000000..a7ab650e1105 --- /dev/null +++ b/net-ftp/proftpd/files/proftpd.initd @@ -0,0 +1,51 @@ +#!/sbin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" + +depend() { + need net + use logger dns mysql postgresql antivirus +} + +check_configuration() { + if [ ! -e /etc/proftpd/proftpd.conf ] ; then + eerror "To execute the ProFTPD server you need a /etc/proftpd/proftpd.conf configuration" + eerror "file. In /etc/proftpd you can find a sample configuration." + return 1 + fi + /usr/sbin/proftpd -t &>/dev/null + if [ $? -ne 0 ] ; then + eerror "The ProFTPD configuration file /etc/proftpd/proftpd.conf is invalid! You have to" + eerror "fix your configuration in order to run the ProFTPD server. For more information" + eerror "you may execute the ProFTPD configuration check '/usr/sbin/proftpd -t'." + return 2 + fi +} + +start() { + checkpath -d /var/run/proftpd + [ "${RC_CMD}" = "restart" ] || check_configuration || return 1 + ebegin "Starting ProFTPD" + start-stop-daemon --start --quiet \ + --exec /usr/sbin/proftpd \ + --pidfile /var/run/proftpd/proftpd.pid + eend $? +} + +stop() { + [ "${RC_CMD}" != "restart" ] || check_configuration || return 1 + ebegin "Stopping ProFTPD" + start-stop-daemon --stop --quiet --retry 20 \ + --pidfile /var/run/proftpd/proftpd.pid + eend $? +} + +reload() { + check_configuration || return 1 + ebegin "Reloading ProFTPD" + start-stop-daemon --quiet --signal HUP \ + --pidfile /var/run/proftpd/proftpd.pid + eend $? +} diff --git a/net-ftp/proftpd/files/proftpd.service b/net-ftp/proftpd/files/proftpd.service new file mode 100644 index 000000000000..904c90f25714 --- /dev/null +++ b/net-ftp/proftpd/files/proftpd.service @@ -0,0 +1,12 @@ +[Unit] +Description=ProFTPd FTP daemon + +[Service] +Type=simple +ExecStart=/usr/sbin/proftpd --nodaemon +StandardOutput=syslog +StandardError=syslog +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/net-ftp/proftpd/files/proftpd.xinetd b/net-ftp/proftpd/files/proftpd.xinetd new file mode 100644 index 000000000000..ad75aefddb6c --- /dev/null +++ b/net-ftp/proftpd/files/proftpd.xinetd @@ -0,0 +1,15 @@ +# +# ProFTPd FTP daemon - http://www.proftpd.org +# +service ftp +{ + flags = REUSE + socket_type = stream + instances = 30 + wait = no + user = root + server = /usr/sbin/proftpd + log_on_success = HOST PID + log_on_failure = HOST + disable = yes +} |