Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 252767 Details for
Bug 261730
net-ftp/vsftpd-devnet-2.1.0_p1 - vsftpd devnet fork
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for vsftpd-2.2.2+ (ext build 3)
vsftpd-devnet-2.2.2.3e-1-addons.patch (text/plain), 10.79 KB, created by
Peter
on 2010-11-01 09:27:43 UTC
(
hide
)
Description:
patch for vsftpd-2.2.2+ (ext build 3)
Filename:
MIME Type:
Creator:
Peter
Created:
2010-11-01 09:27:43 UTC
Size:
10.79 KB
patch
obsolete
>Index: sysutil.c >=================================================================== >--- sysutil.c (revision 95) >+++ sysutil.c (revision 103) >@@ -693,6 +693,18 @@ > status = ((struct vsf_sysutil_wait_retval*) p_waitret)->exit_status; > return WEXITSTATUS(status); > } >+ >+void >+vsf_sysutil_v6only(int fd) >+{ >+ int v6only = 1; >+ int retval = setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &v6only, >+ sizeof(v6only)); >+ if (retval != 0) >+ { >+ die("setsockopt: ipv6_v6only"); >+ } >+} > > void > vsf_sysutil_activate_keepalive(int fd) >Index: tunables.c >=================================================================== >--- tunables.c (revision 95) >+++ tunables.c (revision 103) >@@ -5,6 +5,7 @@ > * tunables.c > */ > >+#include "builddefs.h" > #include "tunables.h" > #include "sysutil.h" > >@@ -85,16 +86,16 @@ > int tunable_require_ssl_reuse; > int tunable_isolate; > int tunable_isolate_network; >-int tunable_convert_charset_enable; >-int tunable_local_codepage; >-int tunable_remote_codepage; >-int tunable_anon_delete_enable; >-int tunable_add_default_rule; >-int tunable_chown_by_ip; >-int tunable_tpm_allow_anon_root_access; >-int tunable_double_377; >-int tunable_anon_rxtx_rate; >-int tunable_local_rxtx_rate; >+int tunable_convert_charset_enable; >+int tunable_local_codepage; >+int tunable_remote_codepage; >+int tunable_anon_delete_enable; >+int tunable_add_default_rule; >+int tunable_chown_by_ip; >+int tunable_tpm_allow_anon_root_access; >+int tunable_double_377; >+int tunable_anon_rxtx_rate; >+int tunable_local_rxtx_rate; > int tunable_chown_group; > int tunable_anti_bruteforce; > >@@ -243,16 +244,16 @@ > tunable_require_ssl_reuse = 1; > tunable_isolate = 1; > tunable_isolate_network = 1; >- tunable_convert_charset_enable = 0; >- tunable_local_codepage = 0; >- tunable_remote_codepage = 0; >- tunable_anon_delete_enable = 1; >- tunable_add_default_rule = 0; >- tunable_chown_by_ip = 0; >- tunable_tpm_allow_anon_root_access = 0; >- tunable_double_377 = 1; >- tunable_anon_rxtx_rate = 0; >- tunable_local_rxtx_rate = 0; >+ tunable_convert_charset_enable = 0; >+ tunable_local_codepage = 0; >+ tunable_remote_codepage = 0; >+ tunable_anon_delete_enable = 1; >+ tunable_add_default_rule = 0; >+ tunable_chown_by_ip = 0; >+ tunable_tpm_allow_anon_root_access = 0; >+ tunable_double_377 = 1; >+ tunable_anon_rxtx_rate = 0; >+ tunable_local_rxtx_rate = 0; > tunable_chown_group = 0; > tunable_anti_bruteforce = 0; > >@@ -267,11 +268,11 @@ > tunable_pasv_min_port = 5001; > tunable_pasv_max_port = 0; > tunable_anon_max_rate = 0; >- tunable_anon_max_rate_rx = 0; >- tunable_anon_max_rate_tx = 0; >+ tunable_anon_max_rate_rx = 0; >+ tunable_anon_max_rate_tx = 0; > tunable_local_max_rate = 0; >- tunable_local_max_rate_rx = 0; >- tunable_local_max_rate_tx = 0; >+ tunable_local_max_rate_rx = 0; >+ tunable_local_max_rate_tx = 0; > /* IPPORT_FTP */ > tunable_listen_port = 21; > tunable_max_clients = 2000; >@@ -293,11 +294,11 @@ > install_str_setting(".message", &tunable_message_file); > install_str_setting("nobody", &tunable_nopriv_user); > install_str_setting(0, &tunable_ftpd_banner); >- install_str_setting("/etc/vsftpd/banned_emails", &tunable_banned_email_file); >- install_str_setting("/etc/vsftpd/chroot_list", &tunable_chroot_list_file); >+ install_str_setting(VSF_CONFIG_PATH VSF_CONFIG_PREFIX "banned_emails", &tunable_banned_email_file); >+ install_str_setting(VSF_CONFIG_PATH VSF_CONFIG_PREFIX "chroot_list", &tunable_chroot_list_file); > install_str_setting("ftp", &tunable_pam_service_name); > install_str_setting("ftp", &tunable_guest_username); >- install_str_setting("/etc/vsftpd/user_list", &tunable_userlist_file); >+ install_str_setting(VSF_CONFIG_PATH VSF_CONFIG_PREFIX "user_list", &tunable_userlist_file); > install_str_setting(0, &tunable_anon_root); > install_str_setting(0, &tunable_local_root); > install_str_setting(0, &tunable_banner_file); >@@ -310,7 +311,7 @@ > install_str_setting(0, &tunable_hide_file); > install_str_setting(0, &tunable_deny_file); > install_str_setting(0, &tunable_user_sub_token); >- install_str_setting("/etc/vsftpd/email_passwords", >+ install_str_setting(VSF_CONFIG_PATH VSF_CONFIG_PREFIX "email_passwords", > &tunable_email_password_file); > install_str_setting("/usr/share/ssl/certs/vsftpd.pem", > &tunable_rsa_cert_file); >@@ -321,8 +322,8 @@ > install_str_setting(0, &tunable_ca_certs_file); > install_str_setting("NONE", &tunable_local_charset); > install_str_setting("NONE", &tunable_remote_charset); >- install_str_setting("/etc/vsftpd/pasv_rules", &tunable_pasv_addr_rules); >- install_str_setting("/etc/vsftpd/users_ip", &tunable_users_access_ip); >+ install_str_setting(VSF_CONFIG_PATH VSF_CONFIG_PREFIX "pasv_rules", &tunable_pasv_addr_rules); >+ install_str_setting(VSF_CONFIG_PATH VSF_CONFIG_PREFIX "users_ip", &tunable_users_access_ip); > install_str_setting(0, &tunable_anti_bruteforce_banner); > } > >Index: sysutil.h >=================================================================== >--- sysutil.h (revision 95) >+++ sysutil.h (revision 103) >@@ -268,6 +268,7 @@ > const char* p_name); > int vsf_sysutil_inet_addr_to_int(struct vsf_sysutil_sockaddr* p_addr); > /* Option setting on sockets */ >+void vsf_sysutil_v6only(int fd); > void vsf_sysutil_activate_keepalive(int fd); > void vsf_sysutil_set_iptos_throughput(int fd); > void vsf_sysutil_activate_reuseaddr(int fd); >Index: builddefs.h >=================================================================== >--- builddefs.h (revision 95) >+++ builddefs.h (revision 103) >@@ -5,5 +5,10 @@ > #define VSF_BUILD_PAM > #undef VSF_BUILD_SSL > >+#define VSF_CONFIG_PATH "/etc/vsftpd/" >+#define VSF_CONFIG_PREFIX "" >+//#define VSF_CONFIG_PATH "/etc/" >+//#define VSF_CONFIG_PREFIX "vsftpd." >+ > #endif /* VSF_BUILDDEFS_H */ > >Index: sysdeputil.c >=================================================================== >--- sysdeputil.c (revision 95) >+++ sysdeputil.c (revision 103) >@@ -1276,7 +1276,7 @@ > static int cloneflags_work = 1; > if (cloneflags_work) > { >- int ret = syscall(__NR_clone, CLONE_NEWPID | CLONE_NEWIPC | SIGCHLD, NULL); >+ int ret = clone(NULL, NULL, CLONE_NEWPID | CLONE_NEWIPC | SIGCHLD, NULL); > if (ret != -1 || (errno != EINVAL && errno != EPERM)) > { > if (ret == 0) >@@ -1298,7 +1298,7 @@ > static int cloneflags_work = 1; > if (cloneflags_work) > { >- int ret = syscall(__NR_clone, CLONE_NEWNET | SIGCHLD, NULL); >+ int ret = clone(NULL, NULL, CLONE_NEWNET | SIGCHLD, NULL); > if (ret != -1 || (errno != EINVAL && errno != EPERM)) > { > if (ret == 0) >Index: vsftpd.conf.5 >=================================================================== >--- vsftpd.conf.5 (revision 95) >+++ vsftpd.conf.5 (revision 103) >@@ -1162,10 +1162,10 @@ > with an example. If you set > .BR user_config_dir > to be >-.BR /etc/vsftpd_user_conf >+.BR /etc/vsftpd/user_conf > and then log on as the user "chris", then vsftpd will apply the settings in > the file >-.BR /etc/vsftpd_user_conf/chris >+.BR /etc/vsftpd/user_conf/chris > for the duration of the session. The format of this file is as detailed in > this manual page! PLEASE NOTE that not all settings are effective on a > per-user basis. For example, many settings only prior to the user's session >Index: vsftpd.conf >=================================================================== >--- vsftpd.conf (revision 95) >+++ vsftpd.conf (revision 103) >@@ -1,4 +1,4 @@ >-# Example config file /etc/vsftpd.conf >+# Example config file /etc/vsftpd/vsftpd.conf > # > # The default compiled in settings are fairly paranoid. This sample file > # loosens things up a bit, to make the ftp daemon more usable. >@@ -87,7 +87,7 @@ > # useful for combatting certain DoS attacks. > #deny_email_enable=YES > # (default follows) >-#banned_email_file=/etc/vsftpd.banned_emails >+#banned_email_file=/etc/vsftpd/banned_emails > # > # You may specify an explicit list of local users to chroot() to their home > # directory. If chroot_local_user is YES, then this list becomes a list of >@@ -95,7 +95,7 @@ > #chroot_local_user=YES > #chroot_list_enable=YES > # (default follows) >-#chroot_list_file=/etc/vsftpd.chroot_list >+#chroot_list_file=/etc/vsftpd/chroot_list > # > # You may activate the "-R" option to the builtin ls. This is disabled by > # default to avoid remote users being able to cause excessive I/O on large >Index: ls.c >=================================================================== >--- ls.c (revision 95) >+++ ls.c (revision 103) >@@ -251,10 +251,10 @@ > if (str_get_char_at(p_filter_str, 0) == '/') { > if (str_get_char_at(p_filename_str, 0) != '/') { > str_getcwd (&name_remain_str); >- >+ > if (str_getlen(&name_remain_str) > 1) /* cwd != root dir */ > str_append_char (&name_remain_str, '/'); >- >+ > str_append_str (&name_remain_str, p_filename_str); > } > else >@@ -267,7 +267,7 @@ > } > } else > str_copy(&name_remain_str, p_filename_str); >- >+ > while (!str_isempty(&filter_remain_str)) > { > static struct mystr s_match_needed_str; >Index: defs.h >=================================================================== >--- defs.h (revision 95) >+++ defs.h (revision 103) >@@ -1,8 +1,10 @@ > #ifndef VSF_DEFS_H > #define VSF_DEFS_H > >-#define VSFTP_DEFAULT_CONFIG "/etc/vsftpd/vsftpd.conf" >+#include "builddefs.h" > >+#define VSFTP_DEFAULT_CONFIG VSF_CONFIG_PATH "vsftpd.conf" >+ > #define VSFTP_COMMAND_FD 0 > > #define VSFTP_PASSWORD_MAX 128 >Index: standalone.c >=================================================================== >--- standalone.c (revision 95) >+++ standalone.c (revision 103) >@@ -81,6 +81,7 @@ > else > { > listen_sock = vsf_sysutil_get_ipv6_sock(); >+ vsf_sysutil_v6only(listen_sock); > } > vsf_sysutil_activate_reuseaddr(listen_sock); > >Index: vsftpd.8 >=================================================================== >--- vsftpd.8 (revision 95) >+++ vsftpd.8 (revision 103) >@@ -33,7 +33,7 @@ > as a config file that will be loaded. Note that config files are loaded in the > strict order that they are encountered on the command line. > If no config files are specified, the default configuration file of >-.Pa /etc/vsftpd.conf >+.Pa /etc/vsftpd/vsftpd.conf > will be loaded, after all other command line options are processed. > .Pp > Supported options are: >@@ -50,9 +50,9 @@ > vsftpd -olisten=NO /etc/vsftpd/vsftpd.conf -oftpd_banner=blah > .Pp > That example overrides vsftpd's built-in default for the "listen" option to be >-NO, but then loads /etc/vsftpd.conf which may override that setting. Finally, >-the "ftpd_banner" setting is set to "blah", which overrides any default vsftpd >-setting and any identical setting that was in the config file. >+NO, but then loads /etc/vsftpd/vsftpd.conf which may override that setting. >+Finally, the "ftpd_banner" setting is set to "blah", which overrides any default >+vsftpd setting and any identical setting that was in the config file. > .Sh FILES > .Pa /etc/vsftpd/vsftpd.conf > .Sh SEE ALSO
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 261730
:
184341
|
184635
|
188241
|
188265
|
188266
|
252337
|
252339
|
252341
|
252343
|
252759
|
252761
|
252763
|
252765
| 252767 |
252769