Hello community,
here is the log from the commit of package yast2-ftp-server
checked in at Thu May 3 23:12:44 CEST 2007.
--------
--- yast2-ftp-server/yast2-ftp-server.changes 2007-04-19 17:31:29.000000000 +0200
+++ /mounts/work_src_done/NOARCH/yast2-ftp-server/yast2-ftp-server.changes 2007-05-03 15:58:52.603159000 +0200
@@ -1,0 +2,8 @@
+Thu May 3 15:19:45 CEST 2007 - juhliarik@suse.cz
+
+- added parsing of options from xinetd for pure-ftpd
+- correction for changes ftp directories for ftp users
+- changed UI
+- V 2.15.3
+
+-------------------------------------------------------------------
Old:
----
yast2-ftp-server-2.15.2.tar.bz2
New:
----
yast2-ftp-server-2.15.3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-ftp-server.spec ++++++
--- /var/tmp/diff_new_pack.U27910/_old 2007-05-03 23:11:31.000000000 +0200
+++ /var/tmp/diff_new_pack.U27910/_new 2007-05-03 23:11:31.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-ftp-server (Version 2.15.2)
+# spec file for package yast2-ftp-server (Version 2.15.3)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-ftp-server
-Version: 2.15.2
+Version: 2.15.3
Release: 1
License: GNU General Public License (GPL)
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-ftp-server-2.15.2.tar.bz2
+Source0: yast2-ftp-server-2.15.3.tar.bz2
prefix: /usr
Requires: yast2 yast2-inetd
BuildRequires: perl-XML-Writer update-desktop-files yast2 yast2-devtools yast2-inetd yast2-testsuite
@@ -34,7 +34,7 @@
Jozef Uhliarik
%prep
-%setup -n yast2-ftp-server-2.15.2
+%setup -n yast2-ftp-server-2.15.3
%build
%{prefix}/bin/y2tool y2autoconf
@@ -70,6 +70,11 @@
%doc %{prefix}/share/doc/packages/yast2-ftp-server
%changelog
+* Thu May 03 2007 - juhliarik@suse.cz
+- added parsing of options from xinetd for pure-ftpd
+- correction for changes ftp directories for ftp users
+- changed UI
+- V 2.15.3
* Thu Apr 19 2007 - juhliarik@suse.cz
- added ftp-server icon
- added correct name (FTP Server)
++++++ yast2-ftp-server-2.15.2.tar.bz2 -> yast2-ftp-server-2.15.3.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ftp-server-2.15.2/configure new/yast2-ftp-server-2.15.3/configure
--- old/yast2-ftp-server-2.15.2/configure 2007-04-19 17:31:07.000000000 +0200
+++ new/yast2-ftp-server-2.15.3/configure 2007-05-03 16:00:42.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.60 for yast2-ftp-server 2.15.2.
+# Generated by GNU Autoconf 2.60 for yast2-ftp-server 2.15.3.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -559,8 +559,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-ftp-server'
PACKAGE_TARNAME='yast2-ftp-server'
-PACKAGE_VERSION='2.15.2'
-PACKAGE_STRING='yast2-ftp-server 2.15.2'
+PACKAGE_VERSION='2.15.3'
+PACKAGE_STRING='yast2-ftp-server 2.15.3'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1181,7 +1181,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures yast2-ftp-server 2.15.2 to adapt to many kinds of systems.
+\`configure' configures yast2-ftp-server 2.15.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1252,7 +1252,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-ftp-server 2.15.2:";;
+ short | recursive ) echo "Configuration of yast2-ftp-server 2.15.3:";;
esac
cat <<\_ACEOF
@@ -1330,7 +1330,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-ftp-server configure 2.15.2
+yast2-ftp-server configure 2.15.3
generated by GNU Autoconf 2.60
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1344,7 +1344,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by yast2-ftp-server $as_me 2.15.2, which was
+It was created by yast2-ftp-server $as_me 2.15.3, which was
generated by GNU Autoconf 2.60. Invocation command line was
$ $0 $@
@@ -2145,7 +2145,7 @@
# Define the identity of the package.
PACKAGE='yast2-ftp-server'
- VERSION='2.15.2'
+ VERSION='2.15.3'
cat >>confdefs.h <<_ACEOF
@@ -2372,7 +2372,7 @@
-VERSION="2.15.2"
+VERSION="2.15.3"
RPMNAME="yast2-ftp-server"
MAINTAINER="Jozef Uhliarik "
@@ -3258,7 +3258,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2-ftp-server $as_me 2.15.2, which was
+This file was extended by yast2-ftp-server $as_me 2.15.3, which was
generated by GNU Autoconf 2.60. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3301,7 +3301,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-yast2-ftp-server config.status 2.15.2
+yast2-ftp-server config.status 2.15.3
configured by $0, generated by GNU Autoconf 2.60,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ftp-server-2.15.2/configure.in new/yast2-ftp-server-2.15.3/configure.in
--- old/yast2-ftp-server-2.15.2/configure.in 2007-04-19 17:31:03.000000000 +0200
+++ new/yast2-ftp-server-2.15.3/configure.in 2007-05-03 16:00:36.000000000 +0200
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.14.0 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-ftp-server, 2.15.2, http://bugs.opensuse.org/, yast2-ftp-server)
+AC_INIT(yast2-ftp-server, 2.15.3, http://bugs.opensuse.org/, yast2-ftp-server)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -17,7 +17,7 @@
AM_INIT_AUTOMAKE(tar-ustar) dnl searches for some needed programs
dnl Important YaST2 variables
-VERSION="2.15.2"
+VERSION="2.15.3"
RPMNAME="yast2-ftp-server"
MAINTAINER="Jozef Uhliarik "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ftp-server-2.15.2/src/dialogs.ycp new/yast2-ftp-server-2.15.3/src/dialogs.ycp
--- old/yast2-ftp-server-2.15.2/src/dialogs.ycp 2007-04-18 16:35:17.000000000 +0200
+++ new/yast2-ftp-server-2.15.3/src/dialogs.ycp 2007-05-02 17:02:46.000000000 +0200
@@ -22,7 +22,7 @@
include "ftp-server/helps.ycp";
include "ftp-server/wid_functions.ycp";
-include "ftp-server/uiforms.ycp";
+//include "ftp-server/uiforms.ycp";
@@ -319,7 +319,7 @@
// TRANSLATORS: part of dialog caption
result["caption"] = _("FTP General Settings");
// TRANSLATORS: tree menu item
- result["tree_item_label"] = _("General Settings");
+ result["tree_item_label"] = _("General");
result["widget_names"] = [ "DisBackButton", "GenSettings"];
return result;
@@ -342,7 +342,7 @@
// TRANSLATORS: part of dialog caption
result["caption"] = _("FTP General Settings");
// TRANSLATORS: tree menu item
- result["tree_item_label"] = _("General Settings");
+ result["tree_item_label"] = _("General");
result["widget_names"] = [ "DisBackButton", "GenSettings"];
return result;
@@ -366,7 +366,7 @@
// TRANSLATORS: part of dialog caption
result["caption"] = _("FTP Performance Settings");
// TRANSLATORS: tree menu item
- result["tree_item_label"] = _("Performance Settings");
+ result["tree_item_label"] = _("Performance");
result["widget_names"] = [ "DisBackButton", "PerforSettings"];
return result;
@@ -423,7 +423,7 @@
// TRANSLATORS: part of dialog caption
result["caption"] = _("FTP Anonymous Settings");
// TRANSLATORS: tree menu item
- result["tree_item_label"] = _("Anonymous Settings");
+ result["tree_item_label"] = _("Authentication");
result["widget_names"] = [ "DisBackButton", "AnonSettings"];
return result;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ftp-server-2.15.2/src/FtpServer.ycp new/yast2-ftp-server-2.15.3/src/FtpServer.ycp
--- old/yast2-ftp-server-2.15.2/src/FtpServer.ycp 2007-04-17 17:28:45.000000000 +0200
+++ new/yast2-ftp-server-2.15.3/src/FtpServer.ycp 2007-05-03 13:34:11.000000000 +0200
@@ -128,6 +128,15 @@
map userinfo = $[];
/**
+ * list includes xinetd server_args for pure-ftpd
+ *
+ * global lis <string> variable
+ */
+
+global list <string> pure_ftpd_xinet_conf =[];
+
+
+/**
* list of keys from map DEFAULT_CONFIG
*
* global list <string>
@@ -137,7 +146,7 @@
"UmaskAnon", "UmaskLocal", "PasMinPort", "PasMaxPort", "MaxIdleTime", "MaxClientsPerIP",
"MaxClientsNumber", "LocalMaxRate", "AnonMaxRate", "AnonAuthen", "AnonReadOnly",
"AnonCreatDirs", "Banner", "SSLEnable", "TLS", "AntiWarez", "SSL", "StartXinetd",
-"PassiveMode", "CertFile", "SSLv2", "SSLv3"];
+"PassiveMode", "CertFile", "SSLv2", "SSLv3", "VirtualUser", "FTPUser", "GuestUser"];
/**
* map of deafult values for options in UI
@@ -156,8 +165,8 @@
"PasMinPort" : "0",
"PasMaxPort" : "0",
"MaxIdleTime" : "15",
- "MaxClientsPerIP" : "10",
- "MaxClientsNumber" : "8",
+ "MaxClientsPerIP" : "3",
+ "MaxClientsNumber" : "10",
"LocalMaxRate" : "0",
"AnonMaxRate" : "0",
"AnonAuthen" : "1", // 0 => anonymous only, 1 => authenticated only, 2=> both
@@ -167,7 +176,6 @@
"SSLEnable" : "NO",
"SSLv2" : "NO", //enable/disable SSL version 2 (vsftpd only)
"SSLv3" : "NO", //enable/disable SSL version 3 (vsftpd only)
- //"SSLVersion" : "2",
"TLS" : "YES",
"AntiWarez" : "YES",
"SSL" : "1",
@@ -175,7 +183,9 @@
"StartDaemon" : "0", //0 = start manually, 1 = start via inetd, 2 = start via xinetd
"PassiveMode" : "YES",
"CertFile" : "", //cert file for SSL connections
- //"PromisMode" : "NO", enable ftp client connect via passive and active mode (vsftpd)
+ "VirtualUser" : "NO",
+ "FTPUser" : "ftp",
+ "GuestUser" : "",
];
@@ -281,8 +291,18 @@
}
//read info about anonymous user "ftp"
Users::SetGUI (false);
- if (Users::Read () == "") {
- Users::SelectUserByName ("ftp");
+ if ((Users::Read () == "") && (EDIT_SETTINGS["VirtualUser"]:nil == "NO")) {
+ if ((vsftpd_edit) && (EDIT_SETTINGS["GuestUser"]:nil != "")
+ && (EDIT_SETTINGS["FtpDirLocal"]:nil == "")) {
+ Popup::Message("if ((vsftpd_edit) && (EDIT_SETTINGS");
+ Users::SelectUserByName (EDIT_SETTINGS["GuestUser"]:nil);
+ userinfo = Users::GetCurrentUser ();
+ string guest_home_dir = (string) userinfo["homedirectory"]:nil;
+ if ((guest_home_dir != "") && (guest_home_dir != nil)
+ && (EDIT_SETTINGS["FtpDirLocal"]:nil == ""))
+ EDIT_SETTINGS["FtpDirLocal"] = guest_home_dir;
+ }
+ Users::SelectUserByName (EDIT_SETTINGS["FTPUser"]:nil);
userinfo = Users::GetCurrentUser ();
anon_homedir = (string) userinfo["homedirectory"]:nil;
anon_uid = (integer) userinfo["uidnumber"]:nil;
@@ -294,7 +314,6 @@
EDIT_SETTINGS["FtpDirAnon"] = anon_homedir;
}
}
-
//read firewall settings
boolean progress_orig = Progress::set (false);
SuSEFirewall::Read ();
@@ -429,28 +448,32 @@
if (result) {
result = WritePUREFTPDSettings();
}
- // write homedirectory for anonymous user (ftp)
- if (result) {
- if ((EDIT_SETTINGS["FtpDirAnon"]:nil != anon_homedir) &&
- (anon_homedir != "") && (anon_homedir != nil)) {
- string error = Users::EditUser($["homedirectory":EDIT_SETTINGS["FtpDirAnon"]:nil]);
- if ((error != nil) && (error != "")) {
- result= false;
- Popup::Error(error);
- }
- if (result)
- if (Users::CommitUser ()) {
- Users::SetGUI (false);
- error = Users::Write();
- if ((error != nil) && (error != "")) {
- Popup::Error(error);
- result = false;
- }
- }
- }
- }
+ // write homedirectory for anonymous user (ftp)
+ // fto user will be change only for pure-ftpd
+ // vsftpd change option anon_root
+ if ((EDIT_SETTINGS["VirtualUser"]:nil == "NO") && (!vsftpd_edit)) {
+ if (result) {
+ if ((EDIT_SETTINGS["FtpDirAnon"]:nil != anon_homedir) &&
+ (anon_homedir != "") && (anon_homedir != nil)) {
+ string error = Users::EditUser($["homedirectory":EDIT_SETTINGS["FtpDirAnon"]:nil]);
+ if ((error != nil) && (error != "")) {
+ result= false;
+ Popup::Error(error);
+ }
+ if (result)
+ if (Users::CommitUser ()) {
+ Users::SetGUI (false);
+ error = Users::Write();
+ if ((error != nil) && (error != "")) {
+ Popup::Error(error);
+ result = false;
+ }
+ } //end of if (Users::CommitUser ()) {
+ } //end of if ((EDIT_SETTINGS["FtpDirAnon"]:nil != anon_homedir) &&
+ } //end of if (result) {
+ } //end of if (EDIT_SETTINGS["VirtualUser"]:nil == "NO") {
- }
+ } // end of } else {
if (result) {
result = WriteFirewallSettings();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ftp-server-2.15.2/src/uiforms.ycp new/yast2-ftp-server-2.15.3/src/uiforms.ycp
--- old/yast2-ftp-server-2.15.2/src/uiforms.ycp 2007-04-18 15:05:28.000000000 +0200
+++ new/yast2-ftp-server-2.15.3/src/uiforms.ycp 2007-05-03 11:48:30.000000000 +0200
@@ -18,7 +18,7 @@
`HBox(`HSpacing(1), `VBox (
`Left(`TextEntry(`id("Banner"),_("&Welcome message"))),
`Left(`CheckBox(`id("ChrootEnable"), _("&Chroot Everyone"))),
- `Left(`CheckBox(`id("VerboseLogging"), _("Verbose Lo&gging"))),
+ `Left(`CheckBox(`id("VerboseLogging"), _("&Verbose Logging"))),
`Left(`HSquash( `HBox (`Left(`TextEntry(`id("UmaskAnon"), _("&Umask for Anonymous"))),
`Left(`TextEntry(`id("UmaskLocal"), _("Uma&sk for Authenticated Users"))))))
))
@@ -27,15 +27,15 @@
`Frame ( _("FTP Directories"),
`HBox(`HSpacing(1), `VBox (
`Left(`HBox(
- `TextEntry(`id("FtpDirAnon"), _("Ftp Directory f&or Anonymous Users")),
+ `TextEntry(`id("FtpDirAnon"), _("Ftp Directory for Anon&ymous Users")),
`VBox ( `Label(""),
- `PushButton ( `id ( "SelectDirAnon" ), `opt ( `hstretch ), _("Select Director&y..."))
+ `PushButton ( `id ( "SelectDirAnon" ), `opt ( `hstretch ), _("B&rowse"))
)
)),
`Left(`HBox(
`TextEntry(`id("FtpDirLocal"), _("&Ftp Directory for Authenticated Users")),
`VBox ( `Label(""),
- `PushButton ( `id ( "SelectDirLocal" ), `opt ( `hstretch ), _("Select D&irectory..."))
+ `PushButton ( `id ( "SelectDirLocal" ), `opt ( `hstretch ), _("Br&owse"))
)
))
)) // end of `HBox(`HSpacing(1)`VBox (
@@ -62,7 +62,7 @@
`Left(`HBox(
`TextEntry(`id("FtpDirAnon"), _("Ftp Directory f&or Anonymous Users")),
`VBox ( `Label(""),
- `PushButton ( `id ( "SelectDirAnon" ), `opt ( `hstretch ), _("Select Director&y..."))
+ `PushButton ( `id ( "SelectDirAnon" ), `opt ( `hstretch ), _("Bro&wse"))
)
)) // end of `Left(`HBox(
)) // end of `HBox(`HSpacing(1)`VBox (
@@ -136,7 +136,7 @@
`Left(`HBox(
`TextEntry(`id("CertFile"), _("D&SA Certificate to Use for SSL Encrypted Connections")),
`VBox ( `Label(""),
- `PushButton ( `id ( "SelectCertFile" ), `opt ( `hstretch ), _("Select F&ile..."))
+ `PushButton ( `id ( "SelectCertFile" ), `opt ( `hstretch ), _("Bro&wse"))
)
)) // end of `Left(`HBox(
))
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ftp-server-2.15.2/src/wid_functions.ycp new/yast2-ftp-server-2.15.3/src/wid_functions.ycp
--- old/yast2-ftp-server-2.15.2/src/wid_functions.ycp 2007-04-17 16:12:30.000000000 +0200
+++ new/yast2-ftp-server-2.15.3/src/wid_functions.ycp 2007-05-03 14:48:42.000000000 +0200
@@ -9,6 +9,8 @@
{
+textdomain "ftp-server";
+
import "Popup";
import "Wizard";
import "Report";
@@ -27,7 +29,7 @@
* CWMServiceStart function with no parameter returning boolean value
* that says if the service is started.
*/
-global boolean GetEnableService () {
+boolean GetEnableService () {
boolean result = false;
if (FtpServer::EDIT_SETTINGS["StartDaemon"]:nil == "1")
result = true;
@@ -41,13 +43,14 @@
* CWMServiceStart function with one boolean parameter
* returning boolean value that says if the service will be started at boot.
*/
-global void SetEnableService (boolean enable_service) {
+void SetEnableService (boolean enable_service) {
if (size(FtpServer::EDIT_SETTINGS) == 0)
FtpServer::EDIT_SETTINGS = FtpServer::DEFAULT_CONFIG;
- if (enable_service)
+ if (enable_service) {
FtpServer::EDIT_SETTINGS["StartDaemon"] = "1";
-
+ FtpServer::EDIT_SETTINGS["StartXinetd"] = "NO";
+ }
}
@@ -55,7 +58,7 @@
* CWMServiceStart function with no parameter returning boolean value
* that says if the service is started.
*/
-global boolean GetStartedViaXinetd () {
+boolean GetStartedViaXinetd () {
boolean result = false;
if (FtpServer::EDIT_SETTINGS["StartDaemon"]:nil == "2")
result = true;
@@ -69,39 +72,38 @@
* CWMServiceStart function with one boolean parameter
* returning boolean value that says if the service will be started at boot.
*/
-global void SetStartedViaXinetd (boolean enable_service) {
+void SetStartedViaXinetd (boolean enable_service) {
boolean result = true;
- if ((Service::Status("xinetd") != 0) && (FtpServer::EDIT_SETTINGS["StartXinetd"]:nil == "NO")
- && (enable_service)) {
- //Popup::Message("xinetd is not started");
- if (Mode::normal()) {
- UI::OpenDialog(
- `VBox(
- `Label("Xinetd is not started!"),
- `Label("Do you want to start it?"),
- `HBox(
- `PushButton(`id(`accept), "&Start"),
- `PushButton(`id(`cancel), "Canc&el")
- )
- ) // end of `VBox(
- ); // end of UI::OpenDialog(
- while (true) {
- any ret = UI::UserInput();
- if ( ret == `accept ) {
- //FtpServer::EDIT_SETTINGS["StartXinetd"] = "YES";
- result = true;
- break;
- } else if (ret == `cancel) {
- //FtpServer::EDIT_SETTINGS["StartXinetd"] = "NO";
- result = false;
- break;
- }
- };
- UI::CloseDialog();
- }
- } //end of if (Service::Status("xinetd") != 0)
if (enable_service) {
FtpServer::EDIT_SETTINGS["StartDaemon"] = "2";
+ if ((Service::Status("xinetd") != 0) &&
+ (FtpServer::EDIT_SETTINGS["StartXinetd"]:nil == "NO")) {
+ if (Mode::normal()) {
+ UI::OpenDialog(
+ `VBox(
+ `Label("Xinetd is not started!"),
+ `Label("Do you want to start it?"),
+ `HBox(
+ `PushButton(`id(`accept), "&Start"),
+ `PushButton(`id(`cancel), "Canc&el")
+ )
+ ) // end of `VBox(
+ ); // end of UI::OpenDialog(
+ while (true) {
+ any ret = UI::UserInput();
+ if ( ret == `accept ) {
+ //FtpServer::EDIT_SETTINGS["StartXinetd"] = "YES";
+ result = true;
+ break;
+ } else if (ret == `cancel) {
+ //FtpServer::EDIT_SETTINGS["StartXinetd"] = "NO";
+ result = false;
+ break;
+ }
+ };
+ UI::CloseDialog();
+ } // end of if (Mode::normal()) {
+ } // end of if ((Service::Status("xinetd") != 0)...
if (result)
FtpServer::EDIT_SETTINGS["StartXinetd"] = "YES";
else
@@ -119,7 +121,11 @@
void InitGenSettings(string key) {
if (!FtpServer::vsftpd_edit) {
UI::ChangeWidget(`id( "Umask" ), `ValidChars, "01234567:");
- UI::ChangeWidget(`id( "Umask" ), `Value, FtpServer::ValueUIEdit("Umask"));
+ UI::ChangeWidget(`id( "Umask" ), `Value, FtpServer::ValueUIEdit("Umask"));
+ if (FtpServer::EDIT_SETTINGS["VirtualUser"]:nil == "YES") {
+ UI::ChangeWidget(`id( "FtpDirAnon" ), `Enabled, false);
+ UI::ChangeWidget(`id ( "SelectDirAnon" ),`Enabled, false);
+ }
} else {
UI::ChangeWidget(`id( "UmaskAnon" ), `ValidChars, "01234567");
UI::ChangeWidget(`id( "UmaskLocal" ),`ValidChars, "01234567");
@@ -128,8 +134,9 @@
UI::ChangeWidget(`id( "UmaskLocal" ), `Value, FtpServer::ValueUIEdit("UmaskLocal"));
UI::ChangeWidget(`id( "FtpDirLocal" ), `Value, FtpServer::ValueUIEdit("FtpDirLocal"));
- }
- UI::ChangeWidget(`id( "FtpDirAnon" ), `Value, FtpServer::ValueUIEdit("FtpDirAnon"));
+ }
+ if (FtpServer::EDIT_SETTINGS["VirtualUser"]:nil == "NO")
+ UI::ChangeWidget(`id( "FtpDirAnon" ), `Value, FtpServer::ValueUIEdit("FtpDirAnon"));
UI::ChangeWidget(`id( "ChrootEnable" ), `Value, (FtpServer::ValueUIEdit("ChrootEnable") == "YES"));
UI::ChangeWidget(`id( "VerboseLogging" ), `Value, (FtpServer::ValueUIEdit("VerboseLogging") == "YES"));
@@ -174,39 +181,34 @@
}
}
- string AnonHomeDir = (string)UI::QueryWidget (`id("FtpDirAnon"), `Value);
- //checking correct homedir for anonymous user
- if ((AnonHomeDir != "") && (Mode::normal())) {
- if (AnonHomeDir != FtpServer::anon_homedir) {
- string error = Users::EditUser($["homedirectory":AnonHomeDir]);
- if ((error != nil) && (error != "")) {
- Popup::Error(error);
- UI::SetFocus(`id("FtpDirAnon"));
- return false;
- }
- integer uid = FtpServer::anon_uid;
- boolean failed = false;
- map ui_map = $[];
- map error_map = $[];
- do {
- error_map = Users::CheckHomeUI (uid, AnonHomeDir, ui_map);
- if (error_map != $[]) {
- if (!Popup::YesNo (error_map ["question"]:""))
- failed = true;
- else
- ui_map[ error_map["question_id"]:"" ] = 1;
- }
- } while (error_map != $[] && !failed);
- /*
- error = Users::CheckHomeUI();
- if ((error != nil) && (error != "")) {
- Popup::Error(error);
- UI::SetFocus(`id("FtpDirAnon"));
- return false;
- }*/
- }
- }
- }
+ if (FtpServer::EDIT_SETTINGS["VirtualUser"]:nil == "NO") {
+ string AnonHomeDir = (string)UI::QueryWidget (`id("FtpDirAnon"), `Value);
+ //checking correct homedir for anonymous user
+ if ((AnonHomeDir != "") && (Mode::normal())) {
+ if (AnonHomeDir != FtpServer::anon_homedir) {
+ string error = Users::EditUser($["homedirectory":AnonHomeDir]);
+ if ((error != nil) && (error != "")) {
+ Popup::Error(error);
+ UI::SetFocus(`id("FtpDirAnon"));
+ return false;
+ }
+ integer uid = FtpServer::anon_uid;
+ boolean failed = false;
+ map ui_map = $[];
+ map error_map = $[];
+ do {
+ error_map = Users::CheckHomeUI (uid, AnonHomeDir, ui_map);
+ if (error_map != $[]) {
+ if (!Popup::YesNo (error_map ["question"]:""))
+ failed = true;
+ else
+ ui_map[ error_map["question_id"]:"" ] = 1;
+ }
+ } while (error_map != $[] && !failed);
+ } //end of if (AnonHomeDir != FtpServer::anon_homedir) {
+ } //end of if ((AnonHomeDir != "") && (Mode::normal())) {
+ } //end of if (FtpServer::EDIT_SETTINGS["VirtualUser"]:nil != "NO") {
+ } //end of if (!FtpServer::vsftpd_edit) {
return true;
}
@@ -219,7 +221,8 @@
foreach(string key, ["ChrootEnable", "VerboseLogging"],{
FtpServer::WriteToEditMap(key, (((boolean) UI::QueryWidget(`id(key), `Value) == true) ? "YES":"NO"));
});
- FtpServer::WriteToEditMap("FtpDirAnon", (string) UI::QueryWidget(`id("FtpDirAnon"), `Value));
+ if (FtpServer::EDIT_SETTINGS["VirtualUser"]:nil == "NO")
+ FtpServer::WriteToEditMap("FtpDirAnon", (string) UI::QueryWidget(`id("FtpDirAnon"), `Value));
if (!FtpServer::vsftpd_edit) {
FtpServer::WriteToEditMap("Umask", (string) UI::QueryWidget(`id("Umask"), `Value));
} else {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ftp-server-2.15.2/src/write_load.ycp new/yast2-ftp-server-2.15.3/src/write_load.ycp
--- old/yast2-ftp-server-2.15.2/src/write_load.ycp 2007-04-17 16:17:05.000000000 +0200
+++ new/yast2-ftp-server-2.15.3/src/write_load.ycp 2007-05-03 14:49:38.000000000 +0200
@@ -6,12 +6,19 @@
*
* $Id: write_load.ycp 27914 2006-02-13 14:32:08Z juhliarik $
*/
+
+{
+
+textdomain "ftp-server";
+
import "Service";
import "Popup";
import "Inetd";
-boolean IdFTPXined () {
+
+
+boolean IdFTPXinetd () {
boolean old_progress = Progress::set (false);
boolean ret = Inetd::Read();
Progress::set (old_progress);
@@ -25,17 +32,166 @@
FtpServer::vsftpd_xined_id = i;
else if (regexpmatch(ids, "pure-ftpd"))
FtpServer::pureftpd_xined_id = i;
- i=i+1;
+ i=i+1;
+
} // while (size(Inetd::netd_conf) > i) {
+ if (FtpServer::pureftpd_xined_id > -1) {
+ string server_args = (string) Inetd::netd_conf[FtpServer::pureftpd_xined_id,"server_args"]:nil;
+ FtpServer::pure_ftpd_xinet_conf = splitstring(server_args, " ");
+ y2milestone("-------------PURE_SETTINGS_XINETD-------------------");
+ y2milestone("pure-ftpd configuration has been read from xinetd: %1", pure_ftpd_xinet_conf);
+ y2milestone("----------------------------------------------------");
+ }
return true;
} else
return false;
}
+boolean SettingsXinetdPure (list <string> server_args) {
+ string option = "";
+ y2milestone("---------------boolean SettingsXinetdPure (list <string> server_args)-----------------");
+ y2milestone("----------------------------------------------------");
+
+ //ChrootEnable
+ option = find(string opt, pure_ftpd_xinet_conf, ``(opt == "-A"));
+ if (option != nil)
+ FtpServer::EDIT_SETTINGS["ChrootEnable"] = (("-A" == option)? "YES": "NO");
+ else
+ FtpServer::EDIT_SETTINGS["ChrootEnable"] = "NO";
+
+ //VerboseLogging
+ option = find(string opt, pure_ftpd_xinet_conf, ``(opt == "-d"));
+ if (option != nil)
+ FtpServer::EDIT_SETTINGS["VerboseLogging"] = (("-d" == option)? "YES": "NO");
+ else
+ FtpServer::EDIT_SETTINGS["VerboseLogging"] = "NO";
+
+ //AnonReadOnly
+ option = find(string opt, pure_ftpd_xinet_conf, ``(opt == "-i"));
+ if (option != nil)
+ FtpServer::EDIT_SETTINGS["AnonReadOnly"] = (("-i" == option)? "YES": "NO");
+ else
+ FtpServer::EDIT_SETTINGS["AnonReadOnly"] = "YES";
+
+ //AnonCreatDirs
+ option = find(string opt, pure_ftpd_xinet_conf, ``(opt == "-M"));
+ if (option != nil)
+ FtpServer::EDIT_SETTINGS["AnonCreatDirs"] = (("-M" == option)? "YES": "NO");
+ else
+ FtpServer::EDIT_SETTINGS["AnonCreatDirs"] = "NO";
+
+ //AntiWarez
+ option = find(string opt, pure_ftpd_xinet_conf, ``(opt == "-s"));
+ if (option != nil)
+ FtpServer::EDIT_SETTINGS["AntiWarez"] = (("-s" == option)? "YES": "NO");
+ else
+ FtpServer::EDIT_SETTINGS["AntiWarez"] = "NO";
+ //AnonAuthen
+ string yes_no ="";
+ integer authen = 0;
+ yes_no = (((nil != find(string opt, pure_ftpd_xinet_conf, ``(opt == "-e"))))? "YES": "NO");
+ if (yes_no == "YES")
+ authen = 0;
+ else
+ authen = 1;
+ yes_no = "";
+ yes_no = (((nil != find(string opt, pure_ftpd_xinet_conf, ``(opt == "-E"))))? "YES": "NO");
+ if (yes_no == "YES")
+ authen = authen + 2;
+ if (authen == 0)
+ FtpServer::EDIT_SETTINGS["AnonAuthen"] = "0";
+ else
+ FtpServer::EDIT_SETTINGS["AnonAuthen"] = (authen == 3 ? "2":"1");
+ //numeric and string options
+
+
+ //Umask
+ option = find(string opt, pure_ftpd_xinet_conf, ``(issubstring(opt,"-U")));
+ if (option != nil)
+ option = substring(tostring(option),2);
+ FtpServer::EDIT_SETTINGS["Umask"] = ((option != nil) ? option:"");
+
+ //SSL
+
+ option = find(string opt, pure_ftpd_xinet_conf, ``(issubstring(opt,"-Y")));
+ if (option != nil)
+ option = substring(tostring(option),2);
+ FtpServer::EDIT_SETTINGS["SSL"] = ((option != nil) ? option:"1");
+
+ //AnonMaxRate
+ option = find(string opt, pure_ftpd_xinet_conf, ``(issubstring(opt,"-t")));
+ if (option != nil)
+ option = substring(tostring(option),2);
+ FtpServer::EDIT_SETTINGS["AnonMaxRate"] = ((option != nil) ? option:"0");
+
+ //LocalMaxRate
+ option = find(string opt, pure_ftpd_xinet_conf, ``(issubstring(opt,"-T")));
+ if (option != nil)
+ option = substring(tostring(option),2);
+ FtpServer::EDIT_SETTINGS["LocalMaxRate"] = ((option != nil) ? option:"0");
+
+ //MaxClientsNumber
+ option = find(string opt, pure_ftpd_xinet_conf, ``(issubstring(opt,"-c")));
+ if (option != nil)
+ option = substring(tostring(option),2);
+ FtpServer::EDIT_SETTINGS["MaxClientsNumber"] = ((option != nil) ? option:"10");
+
+ //MaxClientsPerIP
+ option = find(string opt, pure_ftpd_xinet_conf, ``(issubstring(opt,"-C")));
+ if (option != nil)
+ option = substring(tostring(option),2);
+ FtpServer::EDIT_SETTINGS["MaxClientsPerIP"] = ((option != nil) ? option:"3");
+
+ //MaxIdleTime
+ option = find(string opt, pure_ftpd_xinet_conf, ``(issubstring(opt,"-I")));
+ if (option != nil)
+ option = substring(tostring(option),2);
+ FtpServer::EDIT_SETTINGS["MaxIdleTime"] = ((option != nil) ? option:"15");
+
+ //PasMinPort and PasMaxPort
+ option = find(string opt, pure_ftpd_xinet_conf, ``(issubstring(opt,"-p")));
+ if (option != nil)
+ option = substring(tostring(option),2);
+ if (option != nil) {
+ list <string> ports = [];
+ ports = splitstring(option," ");
+ if (size(ports)==2) {
+ FtpServer::EDIT_SETTINGS["PasMinPort"] = ports[0]:"";
+ FtpServer::EDIT_SETTINGS["PasMaxPort"] = ports[1]:"";
+ } else {
+ FtpServer::EDIT_SETTINGS["PasMinPort"] = FtpServer::DEFAULT_CONFIG["PasMinPort"]:nil;
+ FtpServer::EDIT_SETTINGS["PasMaxPort"] = FtpServer::DEFAULT_CONFIG["PasMaxPort"]:nil;
+ }
+ } else {
+ FtpServer::EDIT_SETTINGS["PasMinPort"] = FtpServer::DEFAULT_CONFIG["PasMinPort"]:nil;
+ FtpServer::EDIT_SETTINGS["PasMaxPort"] = FtpServer::DEFAULT_CONFIG["PasMaxPort"]:nil;
+ }
+
+
+ //VirtualUser
+ option = find(string opt, pure_ftpd_xinet_conf, ``(issubstring(opt,"-l")));
+ if (option != nil)
+ option = substring(tostring(option),2);
+ if (option != nil) {
+ if (-1 != find(option, "puredb"))
+ FtpServer::EDIT_SETTINGS["VirtualUser"] = "YES";
+ } else {
+ FtpServer::EDIT_SETTINGS["VirtualUser"] = "NO";
+ }
+
+
+ return true;
+
+
+}
+
+
+
+
boolean InitStartViaXinetd () {
- if (IdFTPXined ()) {
+ if (IdFTPXinetd ()) {
if (FtpServer::vsftpd_edit) {
if (Inetd::netd_conf[FtpServer::vsftpd_xined_id,"enabled"]:nil == true)
FtpServer::EDIT_SETTINGS["StartDaemon"] = "2";
@@ -143,7 +299,7 @@
FtpServer::VS_SETTINGS["local_root"] = nil;
} else {
return ((haskey(FtpServer::VS_SETTINGS, "local_root") ?
- toupper(FtpServer::VS_SETTINGS["local_root"]:nil) : FtpServer::DEFAULT_CONFIG["FtpDirLocal"]:nil));
+ FtpServer::VS_SETTINGS["local_root"]:nil : FtpServer::DEFAULT_CONFIG["FtpDirLocal"]:nil));
}
} else {
if (!write)
@@ -717,7 +873,48 @@
}
break;
+ //only vsftpd
+ case("FTPUser"):
+ if (FtpServer::vsftpd_edit) {
+ if (write) {
+ return "";
+ } else {
+ return ((haskey(FtpServer::VS_SETTINGS, "ftp_username") ?
+ FtpServer::VS_SETTINGS["ftp_username"]:nil : FtpServer::DEFAULT_CONFIG["FTPUser"]:nil));
+ }
+ } else {
+ if (!write)
+ return FtpServer::DEFAULT_CONFIG["FTPUser"]:nil;
+ else
+ return "";
+ }
+ break;
+
+ //only vsftpd
+ case("GuestUser"):
+ if (FtpServer::vsftpd_edit) {
+ if (write) {
+ return "";
+ } else {
+ if ((haskey(FtpServer::VS_SETTINGS, "guest_username")) &&
+ (haskey(FtpServer::VS_SETTINGS, "guest_enable"))) {
+ yes_no = toupper(FtpServer::VS_SETTINGS["guest_enable"]:nil);
+ if (yes_no == "YES")
+ return FtpServer::VS_SETTINGS["guest_username"]:nil;
+ else
+ return FtpServer::DEFAULT_CONFIG["GuestUser"]:nil;
+ } else {
+ return FtpServer::DEFAULT_CONFIG["GuestUser"]:nil;
+ }
+ }
+ } else {
+ if (!write)
+ return FtpServer::DEFAULT_CONFIG["GuestUser"]:nil;
+ else
+ return "";
+ }
+ break;
//only pure-ftpd
case("AntiWarez"):
if (FtpServer::vsftpd_edit) {
@@ -751,6 +948,23 @@
}
break;
+ //only pure-ftpd
+ case("VirtualUser"):
+ if (FtpServer::vsftpd_edit) {
+ if (!write)
+ return FtpServer::DEFAULT_CONFIG["VirtualUser"]:nil;
+ else
+ return "";
+ } else {
+ if (!write)
+ if (haskey(FtpServer::PURE_SETTINGS, "PureDB")) {
+ return "YES";
+ } else {
+ return FtpServer::DEFAULT_CONFIG["VirtualUser"]:nil;
+ }
+ }
+ break;
+
case("StartXinetd"):
boolean result = false;
if (write) {
@@ -785,7 +999,7 @@
}
FtpServer::start_xinetd = false;
}
- FtpServer::EDIT_SETTINGS = remove(FtpServer::EDIT_SETTINGS, "StartXinetd");
+ //FtpServer::EDIT_SETTINGS = remove(FtpServer::EDIT_SETTINGS, "StartXinetd");
} else {
FtpServer::EDIT_SETTINGS["StartDaemon"] = "0";
result = InitStartViaXinetd ();
@@ -795,10 +1009,11 @@
if ((Service::Enabled("pure-ftpd")) && (!FtpServer::vsftpd_edit))
FtpServer::EDIT_SETTINGS["StartDaemon"] = "1";
}
- if (result && (FtpServer::EDIT_SETTINGS["StartDaemon"]:nil == "2"))
- return "YES";
- else
- return "NO";
+ if (result && (FtpServer::EDIT_SETTINGS["StartDaemon"]:nil == "2")) {
+ if (Service::Status("xinetd") == 0)
+ SettingsXinetdPure (FtpServer::pure_ftpd_xinet_conf);
+ }
+ return ((Service::Status("xinetd") == 0) ? "YES":"NO");
}
break;
@@ -812,4 +1027,6 @@
}
+}
+
}
\ No newline at end of file
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-ftp-server-2.15.2/VERSION new/yast2-ftp-server-2.15.3/VERSION
--- old/yast2-ftp-server-2.15.2/VERSION 2007-04-19 17:25:05.000000000 +0200
+++ new/yast2-ftp-server-2.15.3/VERSION 2007-05-03 15:22:54.000000000 +0200
@@ -1 +1 @@
-2.15.2
+2.15.3
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org