YaST Commits
Threads by month
- ----- 2025 -----
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
May 2007
- 17 participants
- 190 discussions
[yast-commit] r38218 - in /trunk/samba-client: VERSION package/yast2-samba-client.changes src/SambaNmbLookup.pm src/dialogs.ycp src/helps.ycp src/routines.ycp
by jsuchome@svn.opensuse.org 31 May '07
by jsuchome@svn.opensuse.org 31 May '07
31 May '07
Author: jsuchome
Date: Thu May 31 10:32:55 2007
New Revision: 38218
URL: http://svn.opensuse.org/viewcvs/yast?rev=38218&view=rev
Log:
- added help text for DHCP support (F120090)
- removed Browse button (#240045)
- 2.15.7
Modified:
trunk/samba-client/VERSION
trunk/samba-client/package/yast2-samba-client.changes
trunk/samba-client/src/SambaNmbLookup.pm
trunk/samba-client/src/dialogs.ycp
trunk/samba-client/src/helps.ycp
trunk/samba-client/src/routines.ycp
Modified: trunk/samba-client/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/samba-client/VERSION?rev=38218&r…
==============================================================================
--- trunk/samba-client/VERSION (original)
+++ trunk/samba-client/VERSION Thu May 31 10:32:55 2007
@@ -1 +1 @@
-2.15.6
+2.15.7
Modified: trunk/samba-client/package/yast2-samba-client.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/samba-client/package/yast2-samba…
==============================================================================
--- trunk/samba-client/package/yast2-samba-client.changes (original)
+++ trunk/samba-client/package/yast2-samba-client.changes Thu May 31 10:32:55 2007
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Wed May 30 09:27:44 CEST 2007 - jsuchome(a)suse.cz
+
+- added help text for DHCP support (F120090)
+- removed Browse button (#240045)
+- 2.15.7
+
+-------------------------------------------------------------------
Thu May 17 13:44:22 CEST 2007 - jsuchome(a)suse.cz
- fix deleting shares from smb.conf (#264834)
Modified: trunk/samba-client/src/SambaNmbLookup.pm
URL: http://svn.opensuse.org/viewcvs/yast/trunk/samba-client/src/SambaNmbLookup.…
==============================================================================
--- trunk/samba-client/src/SambaNmbLookup.pm (original)
+++ trunk/samba-client/src/SambaNmbLookup.pm Thu May 31 10:32:55 2007
@@ -207,29 +207,4 @@
return FALSE;
}
-# Return a list of workgroups and domains already existing in the lan.
-# @return list<string> of found workgroups/domains
-BEGIN{$TYPEINFO{GetAvailableNeighbours}=["function",["list", "string"], "string"]}
-sub GetAvailableNeighbours {
- my ($self, $domain_suffix) = @_;
- $domain_suffix = "" unless $domain_suffix;
-
- checkNmbstatus();
-
- # TODO: inform user about problems
- return [ map {$_ . ($self->IsDomain($_)?$domain_suffix:"")} sort keys %Nmbstatus_output ];
-}
-
-# Return a list of domains already existing in the lan.
-# @return list<string> of found workgroups/domains
-BEGIN{$TYPEINFO{GetAvailableDomains}=["function",["list", "string"]]}
-sub GetAvailableDomains {
- my ($self) = @_;
-
- checkNmbstatus();
-
- # TODO: inform user about problems
- return [ grep {$self->IsDomain($_)} sort keys %Nmbstatus_output ];
-}
-
8;
Modified: trunk/samba-client/src/dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/samba-client/src/dialogs.ycp?rev…
==============================================================================
--- trunk/samba-client/src/dialogs.ycp (original)
+++ trunk/samba-client/src/dialogs.ycp Thu May 31 10:32:55 2007
@@ -45,7 +45,9 @@
boolean dhcp_support = Samba::GetDHCP ();
// help text, do not translate 'winbind uid', 'winbind gid'
- string help_text = _("Specify the range for Samba user and group IDs (<tt>winbind uid</tt> and <tt>winbind gid</tt> values).");
+ string help_text = _("<p>Specify the <b>range</b> for Samba user and group IDs (<tt>winbind uid</tt> and <tt>winbind gid</tt> values).</p>")
+
+ + DHCPSupportHelp ();
UI::OpenDialog (`opt (`decorated), `HBox (
`HWeight (1, `RichText (`id (`help), help_text)),
@@ -213,12 +215,7 @@
`TextEntry(`id(`workgroup), (Stage::cont() ?
_("&Domain") :
// translators: text entry label
- _("&Domain or Workgroup")), Samba::GetWorkgroupOrRealm()),
- `VBox (
- `Label(""),
- // translators: push button label
- `PushButton(`id(`browse), _("Br&owse..."))
- )
+ _("&Domain or Workgroup")), Samba::GetWorkgroupOrRealm())
),
status_term,
winbind_term,
@@ -267,9 +264,6 @@
Wizard::HideBackButton();
check_domain_membership (Samba::GetWorkgroupOrRealm());
}
- if (Mode::config ()) {
- UI::ChangeWidget (`id(`browse), `Enabled, false);
- }
any ret = nil;
while(true) {
@@ -436,15 +430,6 @@
"));
}
break;
- } else if (ret == `browse) {
-
- string new_workgroup = BrowseNeighbours( Stage::cont() );
- if( new_workgroup != nil && new_workgroup != "" ) {
- // fill in the new workgroup name
- UI::ChangeWidget( `id(`workgroup), `Value, new_workgroup );
- check_domain_membership (new_workgroup);
- }
- continue;
} else if (ret == `back ) {
break;
}
Modified: trunk/samba-client/src/helps.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/samba-client/src/helps.ycp?rev=3…
==============================================================================
--- trunk/samba-client/src/helps.ycp (original)
+++ trunk/samba-client/src/helps.ycp Thu May 31 10:32:55 2007
@@ -42,9 +42,7 @@
"MembershipDialog_nocont" : _("<p><b><big>Selecting Windows Domain Membership</big></b></p>")
/* translators: Samba workgroup dialog help 1/3 */
+ _("<p>A Linux client can be a member of a workgroup, NT domain, or Active Directory domain.
-Here, specify the name of the membership. <b>Browse</b>
-presents the list of all workgroups and domains found in the
-network.</p>
+Here, specify the name of the membership.</p>
") +
/* Samba role dialog help 2/3 */
@@ -60,8 +58,7 @@
/* translators: Samba membership dialog help title (installation) */
"MembershipDialog_cont" : _("<p><b><big>Selecting Windows Domain Membership</big></b></p>")
/* translators: Samba membership dialog help 1/2 (installation) */
-+ _("<p>Specify the name of the NT or Active Directory domain. <b>Browse</b>
-presents the list of all domains found in the network.</p>
++ _("<p>Specify the name of the NT or Active Directory domain.</p>
")
/* translators: Samba membership dialog help 2/2 (installation) */
+ _("<p>When you press <b>Next</b>, the system verifies the domain and
Modified: trunk/samba-client/src/routines.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/samba-client/src/routines.ycp?re…
==============================================================================
--- trunk/samba-client/src/routines.ycp (original)
+++ trunk/samba-client/src/routines.ycp Thu May 31 10:32:55 2007
@@ -168,57 +168,8 @@
if (!res) {
return `nojoin;
}
-
return JoinDomain(workgroup);
}
-
-
-/**
- * Show a selection popup to select a workgroup from the ones existing on LAN.
- *
- * @return string chosen workgroup or nil if cancelled
- */
-define string BrowseNeighbours(boolean domains_only) ``{
- list<string> groups = nil;
-
- UI::OpenDialog (
- // popup window
- `Label (_("Looking for available workgroups and domains...")));
-
- UI::BusyCursor ();
-
- if (domains_only) {
- groups = SambaNmbLookup::GetAvailableDomains();
- } else {
- groups = SambaNmbLookup::GetAvailableNeighbours(_(" (Domain)"));
- }
-
- UI::CloseDialog ();
- if( groups == nil ) return nil;
- groups = filter (string group, groups, ``(size (group) > 0));
-
- // let the user choose a workgroup
- UI::OpenDialog( `VBox(
- `HSpacing (36),
- // translators: selection box label
- `SelectionBox(`id(`selection), (domains_only ? _("&Existing Domains") : _("&Existing Neighbours")), groups),
- `HBox(
- `PushButton( `id(`ok), Label::OKButton() ),
- `PushButton( `id(`cancel), Label::CancelButton() )
- )
- ) );
-
- any ret = UI::UserInput();
- string sel = (string) UI::QueryWidget( `id(`selection), `CurrentItem );
- // textentry constant (automatically added to some kind of values)
- if ( sel != nil && issubstring (sel, _(" (Domain)") ) )
- {
- integer pos = search (sel, _(" (Domain)") );
- sel = (pos == nil) ? sel : substring (sel, 0, pos);
- }
- UI::CloseDialog();
- return ret == `ok ? sel : nil;
-}
/**
@@ -281,6 +232,15 @@
}
/**
+ * return the help text for DHCP support
+ */
+define string DHCPSupportHelp () {
+
+ // help text ("Retrieve WINS server via DHCP" is a checkbox label)
+ return _("<p>Check <b>Retrieve WINS server via DHCP</b> to use a WINS server provided by DHCP.</p>");
+}
+
+/**
* return the term with shares settings
* @param settings map with parameters to show in term
*/
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r38217 - /trunk/ncurses/src/NCPackageSelectorPlugin.h
by gs@svn.opensuse.org 31 May '07
by gs@svn.opensuse.org 31 May '07
31 May '07
Author: gs
Date: Thu May 31 10:29:03 2007
New Revision: 38217
URL: http://svn.opensuse.org/viewcvs/yast?rev=38217&view=rev
Log:
comment corrected
Modified:
trunk/ncurses/src/NCPackageSelectorPlugin.h
Modified: trunk/ncurses/src/NCPackageSelectorPlugin.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/src/NCPackageSelectorPlu…
==============================================================================
--- trunk/ncurses/src/NCPackageSelectorPlugin.h (original)
+++ trunk/ncurses/src/NCPackageSelectorPlugin.h Thu May 31 10:29:03 2007
@@ -35,7 +35,7 @@
public:
/**
- * Constructor: Load the plugin library for the Qt package selector.
+ * Constructor: Load the plugin library for the NCurses package selector.
**/
NCPackageSelectorPlugin();
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
31 May '07
Author: gs
Date: Thu May 31 10:27:28 2007
New Revision: 38216
URL: http://svn.opensuse.org/viewcvs/yast?rev=38216&view=rev
Log:
remove $(wildcard *.h)
Modified:
trunk/ncurses/src/pkg/Makefile.am
Modified: trunk/ncurses/src/pkg/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/src/pkg/Makefile.am?rev=…
==============================================================================
--- trunk/ncurses/src/pkg/Makefile.am (original)
+++ trunk/ncurses/src/pkg/Makefile.am Thu May 31 10:27:28 2007
@@ -17,7 +17,7 @@
-L$(libdir) -lyui \
${ZYPP_LIBS}
-noinst_HEADERS = $(wildcard *.h) \
+noinst_HEADERS = \
NCPackageSelector.h \
NCPkgSelMapper.h \
NCPkgStatusStrategy.h \
@@ -31,7 +31,7 @@
NCPkgNames.h \
NCZypp.h
-libpy2ncurses_pkg_la_SOURCES = \
+libpy2ncurses_pkg_la_SOURCES = \
NCPackageSelector.cc \
NCPkgSelMapper.cc \
NCPkgStatusStrategy.cc \
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r38215 - /trunk/mail/package/yast2-mail.changes
by varkoly@svn.opensuse.org 30 May '07
by varkoly@svn.opensuse.org 30 May '07
30 May '07
Author: varkoly
Date: Wed May 30 21:11:54 2007
New Revision: 38215
URL: http://svn.opensuse.org/viewcvs/yast?rev=38215&view=rev
Log:
new build
Modified:
trunk/mail/package/yast2-mail.changes
Modified: trunk/mail/package/yast2-mail.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/mail/package/yast2-mail.changes?…
==============================================================================
--- trunk/mail/package/yast2-mail.changes (original)
+++ trunk/mail/package/yast2-mail.changes Wed May 30 21:11:54 2007
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Wed May 30 21:00:17 CEST 2007 - varkoly(a)suse.de
+
+- move sysconfig.mail from aaa_base
+- include first version of the wizard to decide wich kind of
+ mail configuration will be done
+
+-------------------------------------------------------------------
Fri May 25 13:30:04 CEST 2007 - jsrain(a)suse.cz
- removed outdated translations from .desktop-files (#271209)
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r38214 - in /trunk/mail: agents/Makefile.am agents/sysconfig.mail src/sysconfig.mail yast2-mail.spec.in
by varkoly@svn.opensuse.org 30 May '07
by varkoly@svn.opensuse.org 30 May '07
30 May '07
Author: varkoly
Date: Wed May 30 20:57:59 2007
New Revision: 38214
URL: http://svn.opensuse.org/viewcvs/yast?rev=38214&view=rev
Log:
include the sysconfig file from aaa_base
Added:
trunk/mail/agents/sysconfig.mail
Removed:
trunk/mail/src/sysconfig.mail
Modified:
trunk/mail/agents/Makefile.am
trunk/mail/yast2-mail.spec.in
Modified: trunk/mail/agents/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/trunk/mail/agents/Makefile.am?rev=3821…
==============================================================================
--- trunk/mail/agents/Makefile.am (original)
+++ trunk/mail/agents/Makefile.am Wed May 30 20:57:59 2007
@@ -37,6 +37,7 @@
mail_cyrusconf.scr \
cfg_fetchmail.scr
+fillup_DATA = sysconfig.mail
# ag_fetchmailrc is tested in testsuite dir
TESTS = test-mailtable
@@ -49,4 +50,4 @@
test-mailtable-4.in test-mailtable-4.out \
test-mailtable-18487.in test-mailtable-18487.out
-EXTRA_DIST = $(agent_SCRIPTS) $(scrconf_DATA) $(TESTS) $(testdata)
+EXTRA_DIST = $(agent_SCRIPTS) $(scrconf_DATA) $(TESTS) $(testdata) $(fillup_DATA)
Added: trunk/mail/agents/sysconfig.mail
URL: http://svn.opensuse.org/viewcvs/yast/trunk/mail/agents/sysconfig.mail?rev=3…
==============================================================================
--- trunk/mail/agents/sysconfig.mail (added)
+++ trunk/mail/agents/sysconfig.mail Wed May 30 20:57:59 2007
@@ -0,0 +1,49 @@
+## Path: Network/Mail/General
+## Description:
+## Type: string
+## Default: ""
+## Config: postfix
+## ServiceReload: sendmail,postfix
+#
+# From:-Line in email and News postings
+# (otherwise the FQDN is used)
+#
+FROM_HEADER=""
+
+## Path: Network/Mail/General
+## Description: Basic general MTA configuration
+## Type: yesno
+## Default: yes
+## Config: postfix,sendmail
+#
+# If you don't want to let SuSEconfig generate your
+# configuration file, set this to no
+#
+MAIL_CREATE_CONFIG="yes"
+
+## Type: yesno
+## Default: no
+## Config: postfix
+#
+# Set this to "yes" if mail from remote should be accepted
+# this is necessary for any mail server.
+# If set to "no" or empty then only mail from localhost
+# will be accepted.
+#
+SMTPD_LISTEN_REMOTE="yes"
+
+## Type: yesno
+## Default: no
+#
+# Set this to "yes" if the yast2 mail module must not
+# start with the with the vizard for asking the
+# configuration type of the mail server.
+#
+MAIL_SKIP_ASK="no"
+
+## Type: string(standard,advanced,undef)
+## Default: undef
+#
+# This variable contains the type of the mail server configuration.
+#
+MAIL_CONF_TYPE="undef"
Modified: trunk/mail/yast2-mail.spec.in
URL: http://svn.opensuse.org/viewcvs/yast/trunk/mail/yast2-mail.spec.in?rev=3821…
==============================================================================
--- trunk/mail/yast2-mail.spec.in (original)
+++ trunk/mail/yast2-mail.spec.in Wed May 30 20:57:59 2007
@@ -3,6 +3,9 @@
@HEADER@
BuildRequires: perl-XML-Writer update-desktop-files yast2 yast2-devtools yast2-testsuite
BuildRequires: yast2-perl-bindings yast2-ldap-server yast2-users yast2-network
+
+PreReq: %fillup_prereq
+
# new firewall interface
Requires: yast2 >= 2.11.11
Requires: yast2-users
@@ -45,6 +48,9 @@
@CLEAN@
+%post
+%{fillup_only -n mail}
+
%files
%defattr(-,root,root)
%dir @yncludedir@/mail
@@ -55,6 +61,7 @@
@moduledir@/Mail.ybc
@moduledir@/MailServer.ybc
@moduledir@/MailServer.ycp
+@moduledir@/MailServerLDAP.pm
@moduledir@/Mail.ycp
%dir @moduledir@/YaPI
@moduledir@/YaPI/Mail*
@@ -105,6 +112,8 @@
@agentdir@/ag_fetchmailrc
@agentdir@/ag_mailtable
+@fillupdir@/sysconfig.mail
+
%files plugins
%defattr(-,root,root)
%dir @moduledir@
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r38213 - in /trunk/mail: permissions/ src/ src/YaPI/ users-plugin/
by varkoly@svn.opensuse.org 30 May '07
by varkoly@svn.opensuse.org 30 May '07
30 May '07
Author: varkoly
Date: Wed May 30 20:07:53 2007
New Revision: 38213
URL: http://svn.opensuse.org/viewcvs/yast?rev=38213&view=rev
Log:
introducing the start wizard to choose the configuration type
Added:
trunk/mail/src/MailServerLDAP.pm
trunk/mail/src/mail-advanced.ycp
trunk/mail/src/mail-server_ldap-setup.ycp
trunk/mail/src/mail-standard.ycp
trunk/mail/src/sysconfig.mail
Modified:
trunk/mail/permissions/Makefile.in
trunk/mail/src/MailServer.ycp
trunk/mail/src/Makefile.am
trunk/mail/src/YaPI/MailServer.pm
trunk/mail/src/mail-server_dialogs.ycp
trunk/mail/src/mail-server_wizards.ycp
trunk/mail/src/mail.ycp
trunk/mail/users-plugin/Makefile.in
Modified: trunk/mail/permissions/Makefile.in
URL: http://svn.opensuse.org/viewcvs/yast/trunk/mail/permissions/Makefile.in?rev…
==============================================================================
--- trunk/mail/permissions/Makefile.in (original)
+++ trunk/mail/permissions/Makefile.in Wed May 30 20:07:53 2007
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -19,15 +19,11 @@
# Makefile.am.common -*- Makefile -*-
# Generated file, do not edit!
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -71,15 +67,12 @@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-CREATE_PKGCONFIG_FALSE = @CREATE_PKGCONFIG_FALSE@
-CREATE_PKGCONFIG_NOARCH_FALSE = @CREATE_PKGCONFIG_NOARCH_FALSE@
-CREATE_PKGCONFIG_NOARCH_TRUE = @CREATE_PKGCONFIG_NOARCH_TRUE@
-CREATE_PKGCONFIG_TRUE = @CREATE_PKGCONFIG_TRUE@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -90,6 +83,7 @@
LTLIBOBJS = @LTLIBOBJS@
MAINTAINER = @MAINTAINER@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
MYEXPECT = @MYEXPECT@
MYRUNTEST = @MYRUNTEST@
PACKAGE = @PACKAGE@
@@ -111,10 +105,14 @@
STYLESHEET_YDOC = @STYLESHEET_YDOC@
VERSION = @VERSION@
XGETTEXT = @XGETTEXT@
+Y2DEVTOOLS_PREFIX = @Y2DEVTOOLS_PREFIX@
YCPC = @YCPC@
YCPDOC = @YCPDOC@
YCPMAKEDEP = @YCPMAKEDEP@
-ac_ct_STRIP = @ac_ct_STRIP@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
agentdir = @agentdir@
am__leading_dot = @am__leading_dot@
am__tar = @am__tar@
@@ -125,10 +123,13 @@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
clientdir = @clientdir@
datadir = @datadir@
+datarootdir = @datarootdir@
desktopdir = @desktopdir@
docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
execcompdir = @execcompdir@
fillupdir = @fillupdir@
@@ -137,6 +138,7 @@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
imagedir = @imagedir@
includedir = @includedir@
infodir = @infodir@
@@ -149,16 +151,19 @@
mkdir_p = @mkdir_p@
moduledir = @moduledir@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
pkgconfigdatadir = @pkgconfigdatadir@
pkgconfigdir = @pkgconfigdir@
plugindir = @plugindir@
potdir = @potdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
schemadir = @schemadir@
scrconfdir = @scrconfdir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
@@ -166,6 +171,8 @@
target_os = @target_os@
target_vendor = @target_vendor@
themedir = @themedir@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
yast2dir = @yast2dir@
ybindir = @ybindir@
ydatadir = @ydatadir@
@@ -186,6 +193,7 @@
# where ycpchook contains a symlink to "."
# Otherwise "." keeps being newer than .dep and we loop.
NEWDEP = ${top_builddir}/.dep.new
+CHECK_SYNTAX = true
all: all-am
.SUFFIXES:
@@ -218,10 +226,9 @@
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-uninstall-info-am:
install-modulebinDATA: $(modulebin_DATA)
@$(NORMAL_INSTALL)
- test -z "$(modulebindir)" || $(mkdir_p) "$(DESTDIR)$(modulebindir)"
+ test -z "$(modulebindir)" || $(MKDIR_P) "$(DESTDIR)$(modulebindir)"
@list='$(modulebin_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
@@ -238,7 +245,7 @@
done
install-permissionsDATA: $(permissions_DATA)
@$(NORMAL_INSTALL)
- test -z "$(permissionsdir)" || $(mkdir_p) "$(DESTDIR)$(permissionsdir)"
+ test -z "$(permissionsdir)" || $(MKDIR_P) "$(DESTDIR)$(permissionsdir)"
@list='$(permissions_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
@@ -261,23 +268,21 @@
distdir: $(DISTFILES)
- $(mkdir_p) $(distdir)/..
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@@ -296,7 +301,7 @@
all-am: Makefile $(DATA)
installdirs:
for dir in "$(DESTDIR)$(modulebindir)" "$(DESTDIR)$(permissionsdir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -344,12 +349,20 @@
install-data-am: install-modulebinDATA install-permissionsDATA
+install-dvi: install-dvi-am
+
install-exec-am:
+install-html: install-html-am
+
install-info: install-info-am
install-man:
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -368,18 +381,20 @@
ps-am:
-uninstall-am: uninstall-info-am uninstall-modulebinDATA \
- uninstall-permissionsDATA
+uninstall-am: uninstall-modulebinDATA uninstall-permissionsDATA
+
+.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic dist-hook \
distclean distclean-generic distdir dvi dvi-am html html-am \
info info-am install install-am install-data install-data-am \
- install-exec install-exec-am install-info install-info-am \
- install-man install-modulebinDATA install-permissionsDATA \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \
- uninstall-info-am uninstall-modulebinDATA \
+ install-dvi install-dvi-am install-exec install-exec-am \
+ install-html install-html-am install-info install-info-am \
+ install-man install-modulebinDATA install-pdf install-pdf-am \
+ install-permissionsDATA install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-am uninstall-modulebinDATA \
uninstall-permissionsDATA
@@ -396,9 +411,19 @@
rm ${NEWDEP}
dist-hook: check-syntax
-
check-syntax: $(client_DATA) $(ycpchook)
- if test "$(client_DATA)"; then $(bindir)/ycpc -qE -M. -I. $(YCPCFLAGS) $(filter %.ycp,$^) || exit 1; fi
+ @if test "$(client_DATA)"; then \
+ if $(CHECK_SYNTAX); then \
+ TO_CHECK="$(filter %.ycp,$^)"; \
+ echo "Checking syntax of $${TO_CHECK}"; \
+ if ! $(YCPC) -qE -M. -I. $(YCPCFLAGS) $${TO_CHECK}; then \
+ echo "Failed. Disable by 'make ... CHECK_SYNTAX=false' at your own risk"; \
+ exit 1; \
+ fi; \
+ else \
+ echo "Syntax check disabled"; \
+ fi; \
+ fi
-include .dep
# Tell versions [3.59,3.63) of GNU make to not export all variables.
Modified: trunk/mail/src/MailServer.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/MailServer.ycp?rev=3821…
==============================================================================
--- trunk/mail/src/MailServer.ycp (original)
+++ trunk/mail/src/MailServer.ycp Wed May 30 20:07:53 2007
@@ -366,9 +366,6 @@
return false;
}
}
- if( SCR::Read(.target.size, "/var/adm/yast2-mail-server-used") < 0) {
- YaPI::MailServer::ResetMailServer(MailServer::AdminPassword,MailServer::LDAPDefaults);
- }
NetworkDevices::Read();
map<string,map> TMP = NetworkDevices::Export("modem");
Added: trunk/mail/src/MailServerLDAP.pm
URL: http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/MailServerLDAP.pm?rev=3…
==============================================================================
--- trunk/mail/src/MailServerLDAP.pm (added)
+++ trunk/mail/src/MailServerLDAP.pm Wed May 30 20:07:53 2007
@@ -0,0 +1,97 @@
+=head1 NAME
+
+MailServerLDAP
+
+=head1 PREFACE
+
+This package is a part of the YaST2 mail modul.
+
+=head1 SYNOPSIS
+
+use MailServerLDAP
+
+
+=head1 DESCRIPTION
+
+B<MailServerLDAP> provides a function ConfigureLDAPServer that makes the local
+LDAP server able to store the tables of the mail server.
+
+=over 2
+
+=cut
+
+package MailServerLDAP;
+
+use strict;
+
+use YaST::YCP;
+
+textdomain("MailServer");
+
+our %TYPEINFO;
+
+YaST::YCP::Import ("Ldap");
+YaST::YCP::Import ("YaPI::LdapServer");
+
+
+sub ConfigureLDAPServer()
+{
+ # don't configure if using eDirectory server
+ Ldap->CheckNDS ();
+ if (! Ldap->nds())
+ {
+ # Now we configure the LDAP-Server to be able store the mail server configuration
+ my $schemas = YaPI::LdapServer->ReadSchemaIncludeList();
+ my $SCHEMA = join "",@{$schemas};
+ if( $SCHEMA !~ /dnszone.schema/ )
+ {
+ push @{$schemas},'/etc/openldap/schema/dnszone.schema';
+ }
+ if( $SCHEMA !~ /suse-mailserver.schema/ )
+ {
+ push @{$schemas},'/etc/openldap/schema/suse-mailserver.schema';
+ YaPI::LdapServer->WriteSchemaIncludeList($schemas);
+ my $indices = YaPI::LdapServer->ReadIndex($ldapMap->{ldap_domain});
+ my $SuSEMailClient = 0;
+ my $SuSEMailDomainMasquerading = 0;
+ my $suseTLSPerSitePeer= 0;
+ foreach my $index (@{$indices})
+ {
+ if( $index->{attr} eq "SuSEMailClient,SUSEMailAcceptAddress,zoneName")
+ {
+ $SuSEMailClient = 1;
+ }
+ if( $index->{attr} eq "SuSEMailDomainMasquerading,relativeDomainName,suseMailDomainType")
+ {
+ $SuSEMailDomainMasquerading = 1;
+ }
+ if( $index->{attr} eq "suseTLSPerSitePeer,SuSEMailTransportDestination")
+ {
+ $suseTLSPerSitePeer = 1;
+ }
+ }
+ if(!$SuSEMailClient)
+ {
+ YaPI::LdapServer->AddIndex($ldapMap->{ldap_domain},
+ { "attr" => "SuSEMailClient,SUSEMailAcceptAddress,zoneName",
+ "param" => "eq" }
+ );
+ }
+ if(!$SuSEMailDomainMasquerading)
+ {
+ YaPI::LdapServer->AddIndex($ldapMap->{ldap_domain},
+ { "attr" => "SuSEMailDomainMasquerading,relativeDomainName,suseMailDomainType",
+ "param" => "eq" }
+ );
+ }
+ if(!$SuSEMailClient)
+ {
+ YaPI::LdapServer->AddIndex($ldapMap->{ldap_domain},
+ { "attr" => "suseTLSPerSitePeer,SuSEMailTransportDestination",
+ "param" => "eq" }
+ );
+ }
+ YaPI::LdapServer->RecreateIndex($ldapMap->{ldap_domain});
+ }
+ }
+}
Modified: trunk/mail/src/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/Makefile.am?rev=38213&r…
==============================================================================
--- trunk/mail/src/Makefile.am (original)
+++ trunk/mail/src/Makefile.am Wed May 30 20:07:53 2007
@@ -12,8 +12,8 @@
client_DATA = \
mail.ycp \
mail_auto.ycp \
- \
- mail-server.ycp \
+ mail-standard.ycp \
+ mail-advanced.ycp \
mail-server_auto.ycp \
mail-server_proposal.ycp
@@ -34,7 +34,8 @@
module_DATA = \
Mail.ycp \
- MailServer.ycp
+ MailServer.ycp \
+ MailServerLDAP.pm
ldapschema_DATA = suse-mailserver.schema
Modified: trunk/mail/src/YaPI/MailServer.pm
URL: http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/YaPI/MailServer.pm?rev=…
==============================================================================
--- trunk/mail/src/YaPI/MailServer.pm (original)
+++ trunk/mail/src/YaPI/MailServer.pm Wed May 30 20:07:53 2007
@@ -43,13 +43,12 @@
our @CAPABILITIES = (
'SLES10'
);
-our $VERSION="1.1.0";
+our $VERSION="2.2.0";
YaST::YCP::Import ("SCR");
YaST::YCP::Import ("Service");
YaST::YCP::Import ("Ldap");
YaST::YCP::Import ("NetworkDevices");
-YaST::YCP::Import ("YaPI::LdapServer");
##
#
@@ -2184,7 +2183,7 @@
The LDAP Base for the DNS Configuration
The LDAP Base for the MAIL Configuration
The LDAP Template for the MAIL Configuration
-If the last two does not exist this will be created.
+If the last there does not exist this will be created.
The result is an hash of following structur:
@@ -2575,65 +2574,6 @@
SCR->Write(".sysconfig.mail.MAIL_CREATE_CONFIG","no");
SCR->Write(".sysconfig.mail",undef);
- # don't configure if using eDirectory server
- Ldap->CheckNDS ();
- if (! Ldap->nds())
- {
- # Now we configure the LDAP-Server to be able store the mail server configuration
- my $schemas = YaPI::LdapServer->ReadSchemaIncludeList();
- my $SCHEMA = join "",@{$schemas};
- if( $SCHEMA !~ /dnszone.schema/ )
- {
- push @{$schemas},'/etc/openldap/schema/dnszone.schema';
- }
- if( $SCHEMA !~ /suse-mailserver.schema/ )
- {
- push @{$schemas},'/etc/openldap/schema/suse-mailserver.schema';
- YaPI::LdapServer->WriteSchemaIncludeList($schemas);
- my $indices = YaPI::LdapServer->ReadIndex($ldapMap->{ldap_domain});
- my $SuSEMailClient = 0;
- my $SuSEMailDomainMasquerading = 0;
- my $suseTLSPerSitePeer= 0;
- foreach my $index (@{$indices})
- {
- if( $index->{attr} eq "SuSEMailClient,SUSEMailAcceptAddress,zoneName")
- {
- $SuSEMailClient = 1;
- }
- if( $index->{attr} eq "SuSEMailDomainMasquerading,relativeDomainName,suseMailDomainType")
- {
- $SuSEMailDomainMasquerading = 1;
- }
- if( $index->{attr} eq "suseTLSPerSitePeer,SuSEMailTransportDestination")
- {
- $suseTLSPerSitePeer = 1;
- }
- }
- if(!$SuSEMailClient)
- {
- YaPI::LdapServer->AddIndex($ldapMap->{ldap_domain},
- { "attr" => "SuSEMailClient,SUSEMailAcceptAddress,zoneName",
- "param" => "eq" }
- );
- }
- if(!$SuSEMailDomainMasquerading)
- {
- YaPI::LdapServer->AddIndex($ldapMap->{ldap_domain},
- { "attr" => "SuSEMailDomainMasquerading,relativeDomainName,suseMailDomainType",
- "param" => "eq" }
- );
- }
- if(!$SuSEMailClient)
- {
- YaPI::LdapServer->AddIndex($ldapMap->{ldap_domain},
- { "attr" => "suseTLSPerSitePeer,SuSEMailTransportDestination",
- "param" => "eq" }
- );
- }
- YaPI::LdapServer->RecreateIndex($ldapMap->{ldap_domain});
- }
- }
-
#Put user postfix into the group mail
system($check_postfix);
Added: trunk/mail/src/mail-advanced.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/mail-advanced.ycp?rev=3…
==============================================================================
--- trunk/mail/src/mail-advanced.ycp (added)
+++ trunk/mail/src/mail-advanced.ycp Wed May 30 20:07:53 2007
@@ -0,0 +1,106 @@
+/**
+ * File: clients/mail-server.ycp
+ * Package: Configuration of mail-server
+ * Summary: Main file
+ * Authors: Peter Varkoly <varkoly(a)suse.de>
+ *
+ * $Id: mail-server.ycp 19955 2004-10-26 12:28:16Z varkoly $
+ *
+ * Main file for mail-server configuration. Uses all other files.
+ */
+
+{
+
+/***
+ * <h3>Configuration of mail-server</h3>
+ */
+
+textdomain "MailServer";
+
+/* The main () */
+y2milestone ("----------------------------------------");
+y2milestone ("MailServer module started");
+
+import "Progress";
+import "Report";
+import "Summary";
+import "Popup";
+import "Label";
+
+import "CommandLine";
+include "mail/mail-server_wizards.ycp";
+
+map cmdline_description = $[
+ "id" : "mail-server",
+ /* Command line help text for the mail-server module */
+ "help" : _("Configuration of mail server"),
+ "guihandler" : MailServerSequence,
+ "initialize" : MailServer::Read,
+ "finish" : MailServer::Write,
+ "actions" : $[
+ "setup" : $[
+ "handler" : MailServerSequence,
+ "help" : _("Advanced Mail Server setup with LDAP backend"),
+ ],
+ ],
+ "options" : $[
+ // FIXME TODO: fill the option descriptions here
+ ],
+ "mapping" : $[
+ // FIXME TODO: fill the mappings of actions and options here
+ ]
+];
+
+/* analyze command line */
+boolean propose = false;
+boolean setup = false;
+list args = WFM::Args();
+if(size(args) > 0) {
+ if(is(WFM::Args(0), path) && WFM::Args(0) == .propose) {
+ y2milestone("Using PROPOSE mode");
+ propose = true;
+ }
+ if(contains(args,"setup")) {
+ y2milestone("Using setup mode");
+ setup = true;
+ }
+}
+
+/*
+ after merging yast2-mail and yast2-mail-server we have to be
+ carefull not to corrupt the configuration of the other modul
+*/
+if( !setup && SCR::Read (.sysconfig.mail.MAIL_CREATE_CONFIG)== "yes" )
+{
+ if(
+ ! Popup::AnyQuestionRichText(
+ Label::WarningMsg(),
+ _("You have configured your MTA without LDAP support.<br>") +
+ _("This modul will configure your MTA with LDAP support.<br>") +
+ _("This will corrupt your actuall configuration."),
+ 80, 10,
+ Label::ContinueButton(),
+ Label::CancelButton(),
+ `focus_no
+ )
+ )
+ {
+ return nil;
+ }
+}
+
+/* main ui function */
+any ret = nil;
+
+if(propose) ret = MailServerAutoSequence();
+else ret = CommandLine::Run(cmdline_description);
+y2debug("ret=%1", ret);
+
+/* Finish */
+y2milestone("MailServer module finished");
+y2milestone("----------------------------------------");
+
+return ret;
+
+/* EOF */
+}
Modified: trunk/mail/src/mail-server_dialogs.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/mail-server_dialogs.ycp…
==============================================================================
--- trunk/mail/src/mail-server_dialogs.ycp (original)
+++ trunk/mail/src/mail-server_dialogs.ycp Wed May 30 20:07:53 2007
@@ -18,7 +18,6 @@
import "Service";
import "Users";
import "YaPI::MailServer";
-import "YaPI::LdapServer";
include "mail/helps.ycp";
@@ -29,11 +28,24 @@
*/
define any AuthorizingDialog () {
- string ERROR = "";
+ string ERROR = _("You must configure LDAP to use the mail server.");
Ldap::Read();
map LDAPSettings = Ldap::Export();
- if(LDAPSettings["base_config_dn"]:"" == "" ) {
- ERROR = _("You must configure LDAP to use the mail server.");
+ if(LDAPSettings["ldap_server"]:"" == "" )
+ {
+ ERROR = ERROR + "\n" + _("Now we will start the LDAP-Server setup vizard.");
+ if(Popup::YesNo(ERROR))
+ {
+ return `ldapsetup;
+ }
+ else
+ {
+ return `abort;
+ }
+ Ldap::Read();
+ }
+ if(LDAPSettings["base_config_dn"]:"" == "" )
+ {
ERROR = ERROR + "\n";
}
Ldap::LDAPInit();
@@ -70,46 +82,7 @@
MailServer::CertExist = true;
}
-
- string caption = _("Mail Server Administrator Authorization");
- term contents = `HBox(
- `HStretch(),
- `Password(`id(`password), _("&Enter the Password for LDAP Server:"), ""),
- `HStretch()
- );
-
- Wizard::SetContentsButtons(caption, contents, HELPS["AuthorizingDialog"]:"",
- Label::BackButton(), Label::NextButton());
- Wizard::SetDesktopIcon("mailserver");
- UI::WizardCommand(`SetBackButtonLabel( "" ) );
- UI::SetFocus (`id (`password));
-
- any ret = nil;
- while(true) {
-
- ret = UI::UserInput();
-
- MailServer::AdminPassword = (string) UI::QueryWidget(`id(`password), `Value);
-
- /* abort? */
- if(ret == `abort || ret == `cancel) {
- if(ReallyAbort()) break;
- else continue;
- } else if(ret == `next) {
- MailServer::LDAPDefaults = (map<string,any>) YaPI::MailServer::ReadLDAPDefaults(
- MailServer::AdminPassword);
- if (MailServer::LDAPDefaults == nil) {
- Popup::Error(_("Unable to Authorize the Administrator User"));
- continue;
- }
- return ret;
- } else {
- y2error("unexpected retcode: %1", ret);
- continue;
- }
- }
-
- return ret;
+ return Ldap::LDAPAskAndBind(false);
}
Added: trunk/mail/src/mail-server_ldap-setup.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/mail-server_ldap-setup.…
==============================================================================
--- trunk/mail/src/mail-server_ldap-setup.ycp (added)
+++ trunk/mail/src/mail-server_ldap-setup.ycp Wed May 30 20:07:53 2007
@@ -0,0 +1,38 @@
+/**
+ * File:
+ * clients/mail-server-ldap-setup.ycp
+ *
+ * Package:
+ * Configuration of mail
+ *
+ * Summary:
+ * Setup of a LDAP server to be able store the mail server datas
+ *
+ * Authors:
+ * Peter Varkoly <varkoly(a)novell.com>
+ *
+ * $Id: mail.ycp 37642 2007-04-20 19:06:52Z varkoly $
+ *
+ *
+ */
+
+{
+textdomain "mail";
+import "Ldap";
+import "MailServerLDAP";
+import "YaPI::MailServer";
+
+ string ERROR = "";
+
+ y2milestone("--- mail-server-ldap-setup: Detgecting if we are LDAP-Client ---");
+ Ldap::Read();
+ map LDAPSettings = Ldap::Export();
+ if(LDAPSettings["base_config_dn"]:"" == "" )
+ {
+ y2milestone("--- mail-server-ldap-setup: We are not LDAP Client ---");
+ }
+ y2milestone("--- mail-server-ldap-setup: We are LDAP Client ---");
+ Ldap::LDAPInit();
+ Ldap::LDAPAskAndBind(false);
+ YaPI::MailServer::ResetMailServer();
+}
Modified: trunk/mail/src/mail-server_wizards.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/mail-server_wizards.ycp…
==============================================================================
--- trunk/mail/src/mail-server_wizards.ycp (original)
+++ trunk/mail/src/mail-server_wizards.ycp Wed May 30 20:07:53 2007
@@ -19,6 +19,31 @@
/**
+ * Workflow of the LDAP Server/Client setup
+ * @return sequence result
+ */
+any LdapSetupSequence() {
+
+ /* FIXME: adapt to your needs */
+ map aliases = $[
+ "complex" : ``( ComplexDialog() )
+ ];
+
+ /* FIXME: adapt to your needs */
+ map sequence = $[
+ "ws_start" : "complex",
+ "complex" : $[
+ `abort : `abort,
+ `next : `next
+ ]
+ ];
+
+ any ret = Sequencer::Run(aliases, sequence);
+
+ return ret;
+}
+
+/**
* Main workflow of the mail-server configuration
* @return sequence result
*/
@@ -50,10 +75,11 @@
any MailServerSequence() {
map aliases = $[
- "read" : [ ``( ReadDialog() ), true ],
- "auth" : [ ``( AuthorizingDialog() ), true ],
- "main" : ``( MainSequence() ),
- "write" : [ ``( WriteDialog() ), true ]
+ "read" : [ ``( ReadDialog() ), true ],
+ "auth" : [ ``( AuthorizingDialog() ), true ],
+ "main" : ``( MainSequence() ),
+ "ldapsetup" : ``( LdapSetupSequence() ),
+ "write" : [ ``( WriteDialog() ), true ]
];
map sequence = $[
Added: trunk/mail/src/mail-standard.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/mail-standard.ycp?rev=3…
==============================================================================
--- trunk/mail/src/mail-standard.ycp (added)
+++ trunk/mail/src/mail-standard.ycp Wed May 30 20:07:53 2007
@@ -0,0 +1,110 @@
+/**
+ * File:
+ * clients/mail.ycp
+ *
+ * Package:
+ * Configuration of mail
+ *
+ * Summary:
+ * Main file
+ *
+ * Authors:
+ * Martin Vidner <mvidner(a)suse.cz>
+ * Peter Varkoly <varkoly(a)novell.com>
+ *
+ * $Id: mail.ycp 37642 2007-04-20 19:06:52Z varkoly $
+ *
+ * Main file for mail configuration. Uses all other files.
+ *
+ */
+
+/**
+ * @param flag "<b>permanent</b>", "<b>dialup</b>", or "<b>screenshots</b>"<br>
+ * <dl>
+ * <dt>permanent<dd>preselects permanent connnection
+ * <dt>dialup<dd>preselects dial-up connnection
+ * <dt>screenshots
+ * <dd>uses faked data (see Mail::Fake), enables running the module
+ * as non-root. (Uses Mode::screen_shot().)
+ * </dl>
+ */
+{
+ /***
+ * <h3>Configuration of the mail</h3>
+ */
+
+ textdomain "mail";
+
+ import "CommandLine";
+ import "Mail";
+ import "RichText";
+ include "mail/ui.ycp";
+
+ /* The main () */
+ y2milestone ("Mail standard module started");
+ y2milestone ("----------------------------------------");
+
+ /* parse arguments */
+ list args = WFM::Args ();
+ string first_arg = args[0]:"";
+ if (first_arg == "permanent")
+ {
+ preselect_connection_type = `permanent;
+ }
+ else if (first_arg == "dialup")
+ {
+ preselect_connection_type = `dialup;
+ }
+
+ /**
+ * CLI action handler.
+ * Print summary in command line
+ * @param options command options
+ * @return false so that Write is not called in non-interactive mode
+ */
+ define boolean MailSummaryHandler (map options) {
+
+ CommandLine::Print (RichText::Rich2Plain (Mail::Summary ()));
+ return false;
+ }
+
+ /**
+ * CLI initializer.
+ * @return whether successful
+ */
+ define boolean MailRead () {
+
+ block<boolean> callback = ``{
+ return false;
+ };
+ return Mail::Read (callback);
+ }
+
+
+ map cmdline_description = $[
+ "id" : "mail",
+ /* Command line help text for the mail module */
+ "help" : _("Configuration of mail"),
+ "guihandler" : MailSequence,
+ "initialize" : MailRead,
+ "finish" : Mail::Write,
+ "actions" : $[
+ "summary" : $[
+ "handler" : MailSummaryHandler,
+ // command line action help
+ "help" : _("Mail configuration summary"),
+ ],
+ ],
+ "mappings" : $[
+ "summary" : [],
+ ]
+ ];
+ /* main ui function */
+ any ret = (preselect_connection_type == nil) ?
+ CommandLine::Run (cmdline_description) : MailSequence ();
+ y2debug ("ret == %1", ret);
+
+ /* Finish */
+ y2milestone ("Mail standard module finished");
+ return ret;
+}
Modified: trunk/mail/src/mail.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/mail.ycp?rev=38213&r1=3…
==============================================================================
--- trunk/mail/src/mail.ycp (original)
+++ trunk/mail/src/mail.ycp Wed May 30 20:07:53 2007
@@ -10,6 +10,7 @@
*
* Authors:
* Martin Vidner <mvidner(a)suse.cz>
+ * Peter Varkoly <varkoly(a)novell.com>
*
* $Id$
*
@@ -34,102 +35,167 @@
textdomain "mail";
- import "CommandLine";
- import "Mail";
- import "RichText";
+ import "Wizard";
import "Popup";
import "Label";
- include "mail/ui.ycp";
/* The main () */
y2milestone ("Mail module started");
y2milestone ("----------------------------------------");
- /* parse arguments */
- list args = WFM::Args ();
- string first_arg = args[0]:"";
- if (first_arg == "permanent")
+ /* The maske to select the type of the configuration */
+define string StartDialogHelp () ``{
+ return
+ // Translators: start dialog help, part 1 of 4
+ _("<P><B>Email Server Configuration</B><BR>") +
+ // Translators: start dialog help, part 2 of 4
+ _("<P>This module will configure and start Postfix and if necessary the Cyrus IMAP Server.</P>")+
+ // Translators: start dialog help, part 3 of 4
+ _("<P>Be aware:\nMost home users can use the build-in
+features of their email application to send and
+get email. They do not need this module.</P>")+
+ // Translators: start dialog help, part 4 of 4
+ _("<P>You will need Postfix only if you want to store
+the email on your local system, or in some other special cases.</P>");
+}
+
+define string StartDialog (string type) ``{
+
+ y2milestone ("Mail configuration type %1", type);
+
+ Wizard::SetScreenShotName ("mail-0-start");
+ string caption = _("Email Server Configuration");
+ term tskip_ask = `Left(`CheckBox(`id(`skip_ask), _("Skip this page in the future")));
+ string status = _("Mail Server is not configured.
+Select configuration type according your personal needs");
+ if( type == "standard" )
{
- preselect_connection_type = `permanent;
+ status = _("The running Mail Server configuration is based on type âStandardâ.
+It's possible to change to âAdvancedâ, but this will overwrite all existing settings.");
}
- else if (first_arg == "dialup")
+ else if( type == "advanced" )
{
- preselect_connection_type = `dialup;
+ status = _("The running Mail Server configuration is based on type âAdvancedâ.
+It's possible to change to âStandardâ, but this will overwrite all existing settings.");
}
-
- /**
- * CLI action handler.
- * Print summary in command line
- * @param options command options
- * @return false so that Write is not called in non-interactive mode
- */
- define boolean MailSummaryHandler (map options) {
-
- CommandLine::Print (RichText::Rich2Plain (Mail::Summary ()));
- return false;
+ if( type != "standard" && type != "advanced" )
+ {
+ tskip_ask = `VSpacing(1);
+ }
+ term contents =
+ `Frame(
+ "",
+ `VBox(
+ `Left(`Label(status)),
+ `RadioButtonGroup( `id( `conf_type ),
+ `VBox(
+ `VSpacing(1),
+ `Left(`RadioButton(`id("standard"),_("Standard"), type == "standard" )),
+ `VSpacing(1),
+ `Left(`RadioButton(`id("advanced"),_("Advanced"), type == "advanced" )),
+ `VSpacing(1)
+ )
+ ),
+ tskip_ask,
+ `VSpacing(1)
+ )
+ );
+ Wizard::CreateDialog();
+ Wizard::SetContentsButtons (caption, contents, StartDialogHelp (), Label::BackButton (), Label::NextButton ());
+
+ any ret = nil;
+ string sret = nil;
+ while (true)
+ {
+ ret = UI::UserInput ();
+ if (ret == `cancel)
+ {
+ ret = `abort;
+ }
+
+ if (ret == `back || (ret == `abort ))
+ {
+ break;
+ }
+
+ if (ret == `next )
+ {
+ if( (boolean) UI::QueryWidget (`id (`skip_ask), `Value) )
+ {
+ SCR::Write (.sysconfig.mail.SKIP_ASK, "yes");
+ }
+ else
+ {
+ SCR::Write (.sysconfig.mail.SKIP_ASK, "no");
+ }
+ sret = (string) UI::QueryWidget (`id (`conf_type), `CurrentButton);
+ if( sret == nil )
+ {
+ Popup::Error(_("You have to select a configuration type"));
+ continue;
+ }
+ SCR::Write (.sysconfig.mail.CONFIG_TYPE, sret);
+ y2milestone ("Mail configuration type %1", sret);
+ break;
+ }
}
+ UI::CloseDialog();
+ return sret;
- /**
- * CLI initializer.
- * @return whether successful
- */
- define boolean MailRead () {
+}
+
+ /* parse arguments */
+ list args = WFM::Args ();
- block<boolean> callback = ``{
- return false;
- };
- return Mail::Read (callback);
- }
-
- map cmdline_description = $[
- "id" : "mail",
- /* Command line help text for the mail module */
- "help" : _("Configuration of mail"),
- "guihandler" : MailSequence,
- "initialize" : MailRead,
- "finish" : Mail::Write,
- "actions" : $[
- "summary" : $[
- "handler" : MailSummaryHandler,
- // command line action help
- "help" : _("Mail configuration summary"),
- ],
- ],
- "mappings" : $[
- "summary" : [],
- ]
- ];
-
- /*
- after merging yast2-mail and yast2-mail-server we have to be
- carefull not to corrupt the configuration of the other modul
- */
+ /* we collect some informations from the system */
+ any ret = nil;
+ string skip_ask = "no";
+ string conf_type = "undef";
+ skip_ask = (string) SCR::Read (.sysconfig.mail.SKIP_ASK);
+ conf_type = (string) SCR::Read (.sysconfig.mail.CONFIG_TYPE);
+ boolean first_start = false;
map local_recipient_maps = (map) SCR::Read (.mail.ldaptable, "local_recipient_maps");
-y2milestone("local_recipient_maps: %1",local_recipient_maps);
- if( local_recipient_maps != nil )
+
+ if( conf_type != "advanced" && conf_type != "standard" )
+ { // First start of mail modul or update from < 10.3
+ y2milestone ("Warum bin i here Mail configuration type %1", conf_type);
+ if( local_recipient_maps != nil )
+ { // Postfix configured using LDAP
+ conf_type = "advanced";
+ }
+ else
+ {
+ conf_type = "standard";
+ }
+ first_start = true;
+ }
+ if( skip_ask == "no" || skip_ask == nil )
{
- if(
- ! Popup::AnyQuestionRichText(
- Label::WarningMsg(),
- _("You have configured your MTA with LDAP support.<br>") +
- _("This modul will configure your MTA without LDAP support.<br>") +
- _("This will corrupt your actuall configuration."),
- 80, 10,
- Label::ContinueButton(),
- Label::CancelButton(),
- `focus_no
- )
- )
- {
- return nil;
- }
- }
-
- /* main ui function */
- any ret = (preselect_connection_type == nil) ?
- CommandLine::Run (cmdline_description) : MailSequence ();
+ string old_conf = conf_type;
+ conf_type = StartDialog(conf_type);
+ if( conf_type == nil )
+ {
+ y2milestone("no mail server configuration type");
+ return ret;
+ }
+ if( old_conf != conf_type )
+ {
+ first_start = true;
+ }
+ }
- y2debug ("ret == %1", ret);
+ if( conf_type == "advanced" )
+ {
+ if( first_start )
+ {
+ args[size(args)] = "setup";
+ }
+ ret = WFM::CallFunction("mail-advanced",args);
+ }
+ else
+ {
+ ret = WFM::CallFunction("mail-standard",args);
+ }
/* Finish */
y2milestone ("Mail module finished");
Added: trunk/mail/src/sysconfig.mail
URL: http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/sysconfig.mail?rev=3821…
==============================================================================
--- trunk/mail/src/sysconfig.mail (added)
+++ trunk/mail/src/sysconfig.mail Wed May 30 20:07:53 2007
@@ -0,0 +1,49 @@
+## Path: Network/Mail/General
+## Description:
+## Type: string
+## Default: ""
+## Config: postfix
+## ServiceReload: sendmail,postfix
+#
+# From:-Line in email and News postings
+# (otherwise the FQDN is used)
+#
+FROM_HEADER=""
+
+## Path: Network/Mail/General
+## Description: Basic general MTA configuration
+## Type: yesno
+## Default: yes
+## Config: postfix,sendmail
+#
+# If you don't want to let SuSEconfig generate your
+# configuration file, set this to no
+#
+MAIL_CREATE_CONFIG="yes"
+
+## Type: yesno
+## Default: no
+## Config: postfix
+#
+# Set this to "yes" if mail from remote should be accepted
+# this is necessary for any mail server.
+# If set to "no" or empty then only mail from localhost
+# will be accepted.
+#
+SMTPD_LISTEN_REMOTE="yes"
+
+## Type: yesno
+## Default: no
+#
+# Set this to "yes" if the yast2 mail module must not
+# start with the with the vizard for asking the
+# configuration type of the mail server.
+#
+MAIL_SKIP_ASK="no"
+
+## Type: string(standard,advanced,undef)
+## Default: undef
+#
+# This variable contains the type of the mail server configuration.
+#
+MAIL_CONF_TYPE="undef"
Modified: trunk/mail/users-plugin/Makefile.in
URL: http://svn.opensuse.org/viewcvs/yast/trunk/mail/users-plugin/Makefile.in?re…
==============================================================================
--- trunk/mail/users-plugin/Makefile.in (original)
+++ trunk/mail/users-plugin/Makefile.in Wed May 30 20:07:53 2007
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -19,15 +19,11 @@
# Makefile.am.common -*- Makefile -*-
# Generated file, do not edit!
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -72,15 +68,12 @@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-CREATE_PKGCONFIG_FALSE = @CREATE_PKGCONFIG_FALSE@
-CREATE_PKGCONFIG_NOARCH_FALSE = @CREATE_PKGCONFIG_NOARCH_FALSE@
-CREATE_PKGCONFIG_NOARCH_TRUE = @CREATE_PKGCONFIG_NOARCH_TRUE@
-CREATE_PKGCONFIG_TRUE = @CREATE_PKGCONFIG_TRUE@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -91,6 +84,7 @@
LTLIBOBJS = @LTLIBOBJS@
MAINTAINER = @MAINTAINER@
MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
MYEXPECT = @MYEXPECT@
MYRUNTEST = @MYRUNTEST@
PACKAGE = @PACKAGE@
@@ -112,10 +106,14 @@
STYLESHEET_YDOC = @STYLESHEET_YDOC@
VERSION = @VERSION@
XGETTEXT = @XGETTEXT@
+Y2DEVTOOLS_PREFIX = @Y2DEVTOOLS_PREFIX@
YCPC = @YCPC@
YCPDOC = @YCPDOC@
YCPMAKEDEP = @YCPMAKEDEP@
-ac_ct_STRIP = @ac_ct_STRIP@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
agentdir = @agentdir@
am__leading_dot = @am__leading_dot@
am__tar = @am__tar@
@@ -126,10 +124,13 @@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
clientdir = @clientdir@
datadir = @datadir@
+datarootdir = @datarootdir@
desktopdir = @desktopdir@
docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
execcompdir = @execcompdir@
fillupdir = @fillupdir@
@@ -138,6 +139,7 @@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
imagedir = @imagedir@
includedir = @includedir@
infodir = @infodir@
@@ -150,16 +152,19 @@
mkdir_p = @mkdir_p@
moduledir = @moduledir@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
pkgconfigdatadir = @pkgconfigdatadir@
pkgconfigdir = @pkgconfigdir@
plugindir = @plugindir@
potdir = @potdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
schemadir = @schemadir@
scrconfdir = @scrconfdir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
@@ -167,6 +172,8 @@
target_os = @target_os@
target_vendor = @target_vendor@
themedir = @themedir@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
yast2dir = @yast2dir@
ybindir = @ybindir@
ydatadir = @ydatadir@
@@ -192,6 +199,7 @@
# where ycpchook contains a symlink to "."
# Otherwise "." keeps being newer than .dep and we loop.
NEWDEP = ${top_builddir}/.dep.new
+CHECK_SYNTAX = true
all: all-am
.SUFFIXES:
@@ -224,10 +232,9 @@
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-uninstall-info-am:
install-clientDATA: $(client_DATA)
@$(NORMAL_INSTALL)
- test -z "$(clientdir)" || $(mkdir_p) "$(DESTDIR)$(clientdir)"
+ test -z "$(clientdir)" || $(MKDIR_P) "$(DESTDIR)$(clientdir)"
@list='$(client_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
@@ -244,7 +251,7 @@
done
install-moduleDATA: $(module_DATA)
@$(NORMAL_INSTALL)
- test -z "$(moduledir)" || $(mkdir_p) "$(DESTDIR)$(moduledir)"
+ test -z "$(moduledir)" || $(MKDIR_P) "$(DESTDIR)$(moduledir)"
@list='$(module_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
@@ -261,7 +268,7 @@
done
install-modulebinDATA: $(modulebin_DATA)
@$(NORMAL_INSTALL)
- test -z "$(modulebindir)" || $(mkdir_p) "$(DESTDIR)$(modulebindir)"
+ test -z "$(modulebindir)" || $(MKDIR_P) "$(DESTDIR)$(modulebindir)"
@list='$(modulebin_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
@@ -284,23 +291,21 @@
distdir: $(DISTFILES)
- $(mkdir_p) $(distdir)/..
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@@ -319,7 +324,7 @@
all-am: Makefile $(DATA)
installdirs:
for dir in "$(DESTDIR)$(clientdir)" "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(modulebindir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -368,12 +373,20 @@
install-data-am: install-clientDATA install-moduleDATA \
install-modulebinDATA
+install-dvi: install-dvi-am
+
install-exec-am:
+install-html: install-html-am
+
install-info: install-info-am
install-man:
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -392,19 +405,23 @@
ps-am:
-uninstall-am: uninstall-clientDATA uninstall-info-am \
- uninstall-moduleDATA uninstall-modulebinDATA
+uninstall-am: uninstall-clientDATA uninstall-moduleDATA \
+ uninstall-modulebinDATA
+
+.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic dist-hook \
distclean distclean-generic distdir dvi dvi-am html html-am \
info info-am install install-am install-clientDATA \
- install-data install-data-am install-exec install-exec-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-moduleDATA \
- install-modulebinDATA install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
- pdf-am ps ps-am uninstall uninstall-am uninstall-clientDATA \
- uninstall-info-am uninstall-moduleDATA uninstall-modulebinDATA
+ install-modulebinDATA install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
+ uninstall-am uninstall-clientDATA uninstall-moduleDATA \
+ uninstall-modulebinDATA
# suffix mapping: info '(make)Static Usage'
@@ -420,9 +437,19 @@
rm ${NEWDEP}
dist-hook: check-syntax
-
check-syntax: $(client_DATA) $(ycpchook)
- if test "$(client_DATA)"; then $(bindir)/ycpc -qE -M. -I. $(YCPCFLAGS) $(filter %.ycp,$^) || exit 1; fi
+ @if test "$(client_DATA)"; then \
+ if $(CHECK_SYNTAX); then \
+ TO_CHECK="$(filter %.ycp,$^)"; \
+ echo "Checking syntax of $${TO_CHECK}"; \
+ if ! $(YCPC) -qE -M. -I. $(YCPCFLAGS) $${TO_CHECK}; then \
+ echo "Failed. Disable by 'make ... CHECK_SYNTAX=false' at your own risk"; \
+ exit 1; \
+ fi; \
+ else \
+ echo "Syntax check disabled"; \
+ fi; \
+ fi
-include .dep
# Tell versions [3.59,3.63) of GNU make to not export all variables.
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
30 May '07
Author: juhliarik
Date: Wed May 30 18:38:19 2007
New Revision: 38212
URL: http://svn.opensuse.org/viewcvs/yast?rev=38212&view=rev
Log:
Created tag stable-2_15_5 for ftp-server
Added:
tags/stable-2_15_5/ftp-server/
- copied from r38211, trunk/ftp-server/
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r38211 - in /trunk/ftp-server: VERSION package/yast2-ftp-server.changes
by juhliarik@svn.opensuse.org 30 May '07
by juhliarik@svn.opensuse.org 30 May '07
30 May '07
Author: juhliarik
Date: Wed May 30 18:37:52 2007
New Revision: 38211
URL: http://svn.opensuse.org/viewcvs/yast?rev=38211&view=rev
Log:
added patch for uploading anonymous users via vsftpd
Modified:
trunk/ftp-server/VERSION
trunk/ftp-server/package/yast2-ftp-server.changes
Modified: trunk/ftp-server/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ftp-server/VERSION?rev=38211&r1=…
==============================================================================
--- trunk/ftp-server/VERSION (original)
+++ trunk/ftp-server/VERSION Wed May 30 18:37:52 2007
@@ -1 +1 @@
-2.15.4
+2.15.5
Modified: trunk/ftp-server/package/yast2-ftp-server.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ftp-server/package/yast2-ftp-ser…
==============================================================================
--- trunk/ftp-server/package/yast2-ftp-server.changes (original)
+++ trunk/ftp-server/package/yast2-ftp-server.changes Wed May 30 18:37:52 2007
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Wed May 30 17:31:06 CEST 2007 - juhliarik(a)suse.cz
+
+- added patch for uploading anonymous users via vsftpd
+- added creation "upload" subdirectory with writing permission
+- V 2.15.5
+
+-------------------------------------------------------------------
Thu May 10 13:51:53 CEST 2007 - juhliarik(a)suse.cz
- added corrections for starting daemon via "when booting"
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r38210 - /branches/tmp/sh/mod-ui/core/libyui/src/
by sh-sh-sh@svn.opensuse.org 30 May '07
by sh-sh-sh@svn.opensuse.org 30 May '07
30 May '07
Author: sh-sh-sh
Date: Wed May 30 18:25:05 2007
New Revision: 38210
URL: http://svn.opensuse.org/viewcvs/yast?rev=38210&view=rev
Log:
Property handling
Added:
branches/tmp/sh/mod-ui/core/libyui/src/YProperty.cc
Modified:
branches/tmp/sh/mod-ui/core/libyui/src/Makefile.am
branches/tmp/sh/mod-ui/core/libyui/src/YCheckBox.h
branches/tmp/sh/mod-ui/core/libyui/src/YProperty.h
branches/tmp/sh/mod-ui/core/libyui/src/YRadioButton.cc
branches/tmp/sh/mod-ui/core/libyui/src/YRadioButton.h
branches/tmp/sh/mod-ui/core/libyui/src/YUIException.cc
branches/tmp/sh/mod-ui/core/libyui/src/YUIException.h
branches/tmp/sh/mod-ui/core/libyui/src/YWidget.cc
branches/tmp/sh/mod-ui/core/libyui/src/YWidget.h
branches/tmp/sh/mod-ui/core/libyui/src/YWidgetFactory.h
Modified: branches/tmp/sh/mod-ui/core/libyui/src/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src…
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/Makefile.am (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/Makefile.am Wed May 30 18:25:05 2007
@@ -19,6 +19,7 @@
YUI_util.cc \
YUIPlugin.cc \
YUIException.cc \
+ YProperty.cc \
\
YAlignment.cc \
YBarGraph.cc \
@@ -80,6 +81,7 @@
YUIPlugin.h \
YPackageSelectorPlugin.h \
YUIException.h \
+ YProperty.h \
ImplPtr.h \
\
YAlignment.h \
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YCheckBox.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src…
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YCheckBox.h (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YCheckBox.h Wed May 30 18:25:05 2007
@@ -43,6 +43,28 @@
*/
virtual char *widgetClass() { return "YCheckBox"; }
+#if 0
+ /**
+ * Set a property.
+ * Reimplemented from YWidget.
+ *
+ * This method may throw exceptions, for example
+ * - if there is no property with that name
+ * - if the expected type and the type mismatch
+ * - if the value is out of range
+ **/
+ virtual void setProperty( const YProperty & prop );
+
+ /**
+ * Get a property.
+ * Reimplemented from YWidget.
+ *
+ * This method may throw exceptions, for example
+ * - if there is no property with that name
+ **/
+ virtual YProperty getProperty( const std::string & propertyName );
+#endif
+
/**
* Implements the ui command changeWidget.
*/
Added: branches/tmp/sh/mod-ui/core/libyui/src/YProperty.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src…
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YProperty.cc (added)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YProperty.cc Wed May 30 18:25:05 2007
@@ -0,0 +1,120 @@
+/*---------------------------------------------------------------------\
+| |
+| __ __ ____ _____ ____ |
+| \ \ / /_ _/ ___|_ _|___ \ |
+| \ V / _` \___ \ | | __) | |
+| | | (_| |___) || | / __/ |
+| |_|\__,_|____/ |_| |_____| |
+| |
+| core system |
+| |
+| (c) SuSE Linux Products GmbH |
+\----------------------------------------------------------------------/
+
+ File: YProperty.cc
+
+ Author: Stefan Hundhammer <sh(a)suse.de>
+
+/-*/
+
+#include "YProperty.h"
+
+
+
+#if 0
+using namespace YUI;
+#endif
+
+
+std::string
+YProperty::typeAsStr( YPropertyType type )
+{
+ switch ( type )
+ {
+ case YUnknownPropertyType: return "<Unknown>";
+ case YOtherProperty: return "<Other>";
+ case YStringProperty: return "String";
+ case YBoolProperty: return "Bool";
+ case YIntegerProperty: return "Integer";
+
+ // Intentionally omitting default branch
+ // so the compiler catches unhandled enum values
+ }
+
+ return "<Undefined property type>";
+}
+
+
+
+YPropertySet::YPropertySet()
+{
+ // NOP
+}
+
+
+YPropertySet::SearchResult
+YPropertySet::lookup( const std::string & propertyName ) const
+{
+ for ( std::vector<YProperty>::const_iterator it = _properties.begin();
+ it != _properties.end();
+ ++it )
+ {
+ if ( it->name() == propertyName )
+ return Found;
+ }
+
+ return NotFound;
+}
+
+
+YPropertySet::SearchResult
+YPropertySet::lookup( const std::string & propertyName, YPropertyType type ) const
+{
+ for ( std::vector<YProperty>::const_iterator it = _properties.begin();
+ it != _properties.end();
+ ++it )
+ {
+ if ( it->name() == propertyName )
+ {
+ if ( it->type() == type )
+ return Found;
+ else
+ return TypeMismatch;
+ }
+ }
+
+ return NotFound;
+}
+
+
+void
+YPropertySet::add( const YProperty & prop )
+{
+ _properties.push_back( prop );
+}
+
+
+void
+YPropertySet::add( const YPropertySet & otherSet )
+{
+ for ( YPropertySet::const_iterator it = otherSet.propertiesBegin();
+ it != otherSet.propertiesEnd();
+ ++it )
+ {
+ add( *it );
+ }
+}
+
+
+YPropertySet::const_iterator
+YPropertySet::propertiesBegin() const
+{
+ return _properties.begin();
+}
+
+YPropertySet::const_iterator
+YPropertySet::propertiesEnd() const
+{
+ return _properties.end();
+}
+
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YProperty.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src…
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YProperty.h (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YProperty.h Wed May 30 18:25:05 2007
@@ -21,123 +21,202 @@
#define YProperty_h
#include <string>
+#include <vector>
+#if 0
namespace YUI
{
+#endif
+
+ enum YPropertyType
+ {
+ YUnknownPropertyType = 0,
+ YOtherProperty, // requires futher checking
+ YStringProperty, // const std::string &
+ YBoolProperty, // bool
+ YIntegerProperty // YCP Integer == C++ long long
+
+ };
+
+ typedef long long YInteger;
+
/**
- * Base class for all property classes. Necessary to store different
- * template instances in the same container class.
+ * Description class for widget properties
**/
- class YPropertyBase
+ class YProperty
{
- protected:
+ public:
/**
* Constructor: Create a property with the specified name.
**/
- YPropertyBase( const std::string & name )
+ YProperty( const std::string & name, YPropertyType type )
: _name( name )
+ , _type( type )
{}
- virtual ~YPropertyBase() {}
-
- public:
/**
* Returns the name of this property.
**/
std::string name() const { return _name; }
+ /**
+ * Returns the type of this property.
+ **/
+ YPropertyType type() const { return _type; }
+
+ /**
+ * Returns the type of this property as string.
+ **/
+ std::string typeAsStr() const { return YProperty::typeAsStr( _type ); }
+
+ /**
+ * Returns a string description of a property type.
+ **/
+ static std::string typeAsStr( YPropertyType type );
+
private:
- std::string _name;
+ std::string _name;
+ YPropertyType _type;
};
/**
- * Template class for properties of different types for classes of type
- * Widget_T.
+ * Transport class for the value of simple properties.
+ *
+ * More complex properties (lists of items, tree descriptions, ...) have to
+ * be handled specifically someplace else, but most properties are of
+ * simple types and can be treated in similar ways.
**/
- template<class Widget_T, class Value_T> class YProperty:
- public YPropertyBase
+ class YPropertyValue
{
public:
/**
- * Constructor: Create a property with the specified name.
- * The value of this property will be retrieved with the specified
- * 'getMethod' and set with the specified 'setMethod'.
- *
- * Example:
- *
- * class MyWidget: public YWidget
- * {
- * private:
- * std::string _label;
- *
- * public:
- * ...
- * std::string label() const { return _label; }
- * void setLabel( std::string newLabel ) { _label = newLabel; }
- * };
- *
- * YProperty<MyWidget, std::string> labelProp( "Label",
- * &(MyWidget::label),
- * &(MyWidget::setLabel) );
- * MyWidget w = new MyWidget(...);
- * std::string myLabel = labelProp.get( w, "Label" );
- **/
- YProperty( const std::string & name,
- Value_T (Widget_T::*getMethod)(),
- void (Widget_T::*setMethod)( Value_T ) )
- : YPropertyBase( name )
- , _getMethod( getMethod )
- , _setMethodByValue( setMethod )
- , _setMethodByConstRef( 0 )
- {}
+ * Constructor for string properties.
+ **/
+ YPropertyValue( const std::string & str ):
+ _type( YStringProperty ), _stringVal( str ) {}
/**
- * Constructor with a setMethod that accepts a const ref rather than
- * the value directly.
+ * Constructor for bool properties.
**/
- YProperty( const std::string & name,
- Value_T (Widget_T::*getMethod)(),
- void (Widget_T::*setMethod)( const Value_T & ) )
- : YPropertyBase( name )
- , _getMethod( getMethod )
- , _setMethodByValue( 0 )
- , _setMethodByConstRef( setMethod )
- {}
+ YPropertyValue( bool b ):
+ _type( YBoolProperty ), _boolVal( b ) {}
/**
- * Destructor.
+ * Constructor for numerical (YCP integer) properties.
**/
- virtual ~YProperty() {}
+ YPropertyValue( YInteger num ):
+ _type( YIntegerProperty ), _integerVal( num ) {}
/**
- * Retrieve the current value of this property from 'widget'.
+ * Returns the type of this property value.
+ * Use this to determine which xyVal() method to use.
**/
- Value_T get( Widget_T * widget ) const
- {
- return (widget->*_getMethod)();
- }
+ YPropertyType type() const { return _type; }
/**
- * Set this property in 'widget'.
+ * Returns the type of this property value as string.
**/
- void set( Widget_T * widget, Value_T newValue )
- {
- if ( _setMethodByValue )
- (widget->*_setMethodByValue)( newValue );
- else
- (widget->*_setMethodByConstRef)( newValue );
- }
+ std::string typeAsStr() const { return YProperty::typeAsStr( _type ); }
+
+ /**
+ * Methods to get the value of this property.
+ * Check with type() which one to use.
+ **/
+ std::string stringVal() const { return _stringVal; }
+ bool boolVal() const { return _boolVal; }
+ YInteger integerVal() const { return _integerVal; }
private:
- Value_T (Widget_T::*_getMethod)();
- void (Widget_T::*_setMethodByValue)( Value_T );
- void (Widget_T::*_setMethodByConstRef)( const Value_T & );
+
+ YPropertyType _type;
+ std::string _stringVal;
+ bool _boolVal;
+ YInteger _integerVal;
};
+ /**
+ * A set of properties to check names and types against.
+ **/
+ class YPropertySet
+ {
+ public:
+ /**
+ * Constructor.
+ **/
+ YPropertySet();
+
+ enum SearchResult
+ {
+ NotFound = 0, // = 0 for use like: if ( ! propSet.lookup( "Label" ) ) ...
+ Found,
+ TypeMismatch // Found, but wrong type
+ };
+
+ /**
+ * Look up a property with 'propertyName' in this property set.
+ **/
+ SearchResult lookup( const std::string & propertyName ) const;
+
+ /**
+ * Look up a property with 'propertyName' in this property set.
+ * If it contains a property with that name, check also the expected
+ * type against 'type'.
+ **/
+ SearchResult lookup( const std::string & propertyName, YPropertyType type ) const;
+
+ /**
+ * Same as above, overloaded for convenience.
+ **/
+ SearchResult lookup( const YProperty & prop ) const
+ { return lookup( prop.name(), prop.type() ); }
+
+ /**
+ * Returns 'true' if this property set does not contain anything.
+ **/
+ bool isEmpty() const { return _properties.empty(); }
+
+ /**
+ * Add a property to this property set.
+ **/
+ void add( const YProperty & prop );
+
+ /**
+ * Adds all properties of another property set.
+ *
+ * If that other set contains duplicates (properties that are already
+ * in this set), those others will never be found with lookup().
+ **/
+ void add( const YPropertySet & otherSet );
+
+ typedef std::vector<YProperty>::const_iterator const_iterator;
+
+ /**
+ * Returns an iterator that points to the first property in this set.
+ **/
+ const_iterator propertiesBegin() const;
+
+ /**
+ * Returns an iterator that points after the last property in this set.
+ **/
+ const_iterator propertiesEnd() const;
+
+ private:
+
+ /**
+ * This class uses a simple std::vector as a container to hold the
+ * properties: Normally, the number of properties for each widget is so
+ * small (2..5) that using any more sophisticated container like
+ * std::set etc. would not pay off. More likely, it would add overhead.
+ **/
+ std::vector<YProperty> _properties;
+ };
+
+#if 0
} // namespace YUI
+#endif
#endif // YProperty_h
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YRadioButton.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src…
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YRadioButton.cc (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YRadioButton.cc Wed May 30 18:25:05 2007
@@ -35,13 +35,13 @@
struct YRadioButtonPrivate
{
- YCPString label;
+ std::string label;
YRadioButtonGroup * radioButtonGroup;
/**
* Constructor
**/
- YRadioButtonPrivate( YCPString label )
+ YRadioButtonPrivate( std::string label )
: label( label )
, radioButtonGroup( 0 )
{};
@@ -51,7 +51,7 @@
YRadioButton::YRadioButton( const YWidgetOpt & opt,
const YCPString & label )
: YWidget( opt )
- , priv( new YRadioButtonPrivate( label ) )
+ , priv( new YRadioButtonPrivate( label->value() ) )
{
YUI_CHECK_NEW( priv );
}
@@ -64,18 +64,64 @@
}
-void YRadioButton::setLabel( const YCPString & newLabel )
+void YRadioButton::setLabel( const std::string & newLabel )
{
priv->label = newLabel;
}
-YCPString YRadioButton::label() const
+std::string YRadioButton::label() const
{
return priv->label;
}
+const YPropertySet &
+YRadioButton::propertySet()
+{
+ static YPropertySet propSet;
+
+ if ( propSet.isEmpty() )
+ {
+ propSet.add( YProperty( YUIProperty_Value, YBoolProperty ) );
+ propSet.add( YProperty( YUIProperty_Label, YStringProperty ) );
+ propSet.add( YWidget::propertySet() );
+ }
+
+ return propSet;
+}
+
+
+void
+YRadioButton::setProperty( const std::string & propertyName, const YPropertyValue & val )
+{
+ YPropertySet::SearchResult result = propertySet().lookup( propertyName, val.type() );
+
+ if ( result == YPropertySet::Found )
+ {
+ if ( propertyName == YUIProperty_Value ) setValue( val.boolVal() );
+ else if ( propertyName == YUIProperty_Label ) setLabel( val.stringVal() );
+ else
+ YWidget::setProperty( propertyName, val );
+ }
+}
+
+
+YPropertyValue
+YRadioButton::getProperty( const std::string & propertyName )
+{
+ YPropertySet::SearchResult result = propertySet().lookup( propertyName );
+
+ if ( result == YPropertySet::Found )
+ {
+ if ( propertyName == YUIProperty_Value ) return YPropertyValue( value() );
+ if ( propertyName == YUIProperty_Label ) return YPropertyValue( label() );
+ else
+ return YWidget::getProperty( propertyName );
+ }
+}
+
+
YCPValue YRadioButton::changeWidget( const YCPSymbol & property, const YCPValue & newvalue )
{
string s = property->symbol();
@@ -104,7 +150,7 @@
{
if ( newvalue->isString() )
{
- setLabel( newvalue->asString() );
+ setLabel( newvalue->asString()->value() );
return YCPBoolean( true );
}
else
@@ -123,7 +169,7 @@
{
string s = property->symbol();
if ( s == YUIProperty_Value ) return YCPBoolean( value() );
- else if ( s == YUIProperty_Label ) return label();
+ else if ( s == YUIProperty_Label ) return YCPString( label() );
else return YWidget::queryWidget( property );
}
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YRadioButton.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src…
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YRadioButton.h (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YRadioButton.h Wed May 30 18:25:05 2007
@@ -68,15 +68,43 @@
virtual char *widgetClass() { return "YRadioButton"; }
/**
+ * Set a property.
+ * Reimplemented from YWidget.
+ *
+ * This method may throw exceptions, for example
+ * - if there is no property with that name
+ * - if the expected type and the type mismatch
+ * - if the value is out of range
+ **/
+ virtual void setProperty( const std::string & propertyName,
+ const YPropertyValue & val );
+
+ /**
+ * Get a property.
+ * Reimplemented from YWidget.
+ *
+ * This method may throw exceptions, for example
+ * - if there is no property with that name
+ **/
+ virtual YPropertyValue getProperty( const std::string & propertyName );
+
+ /**
+ * Return this class's property set.
+ * This also initializes the property upon the first call.
+ * Reimplemented from YWidget.
+ **/
+ virtual const YPropertySet & propertySet();
+
+ /**
* Returns the user-visible label (the text on the RadioButton).
**/
- YCPString label() const;
+ std::string label() const;
/**
* Change the label. Overload this, but call
* YRadioButton::setLabel at the end of your own function.
*/
- virtual void setLabel( const YCPString & label );
+ virtual void setLabel( const std::string & label );
/**
* Implements the ui command changeWidget.
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YUIException.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src…
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YUIException.cc (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YUIException.cc Wed May 30 18:25:05 2007
@@ -26,6 +26,7 @@
#define y2log_component "ui"
#include <ycp/y2log.h>
#include "YUIException.h"
+#include "YWidget.h"
using std::string;
@@ -42,7 +43,7 @@
sprintf( formatted_number, "%u", _line );
str += formatted_number;
-
+
return str;
}
@@ -130,3 +131,41 @@
// INT << where_r << " " << prefix_r << " " << excpt_r << endl;
}
+
+ostream &
+YUIUnknownPropertyException::dumpOn( ostream & str ) const
+{
+ if ( widget() )
+ {
+ return str << widget()->widgetClass()
+ << " has no property named \""
+ << property().name()
+ << "\""
+ << endl;
+ }
+ else
+ {
+ return str << "Unknown property name \""
+ << property().name()
+ << "\""
+ << endl;
+ }
+}
+
+
+ostream &
+YUIPropertyTypeMismatchException::dumpOn( ostream & str ) const
+{
+ const char * widgetClass = widget() ?
+ widget()->widgetClass() :
+ "<Unknown Widget Type>";
+
+ return str << "Property type mismatch: "
+ << widgetClass
+ << "::" << property().name()
+ << "is type "
+ << property().typeAsStr()
+ << ", not "
+ << value().typeAsStr()
+ << endl;
+}
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YUIException.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src…
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YUIException.h (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YUIException.h Wed May 30 18:25:05 2007
@@ -27,9 +27,13 @@
#include <iosfwd>
#include <stdexcept>
+#include "YProperty.h"
+
using std::string;
using std::ostream;
+class YWidget;
+
//
// Macros for application use
@@ -325,22 +329,117 @@
class YUIOutOfMemoryException: public YUIException
{
public:
- /**
- * Constructor.
- **/
YUIOutOfMemoryException()
: YUIException( "Out of memory" )
{}
- /**
- * Destructor.
- **/
virtual ~YUIOutOfMemoryException() throw()
{}
}; // class YUIOutOfMemoryException
+/**
+ * Abstract base class for widget property exceptions.
+ **/
+class YUIPropertyException: public YUIException
+{
+protected:
+ YUIPropertyException( const YProperty & prop,
+ YWidget * widget = 0 )
+ : YUIException()
+ , _property( prop )
+ , _widget( widget )
+ {}
+
+ virtual ~YUIPropertyException() throw()
+ {}
+
+public:
+ /**
+ * Returns the property that caused this exception.
+ **/
+ YProperty property() const { return _property; }
+
+ /**
+ * Returns the associated widget or 0 if there was none.
+ **/
+ YWidget * widget() const { return _widget; }
+
+protected:
+
+ /**
+ * Write proper error message with all relevant data.
+ * Reimplemented from YUIException.
+ **/
+ virtual ostream & dumpOn( ostream & str ) const = 0;
+
+private:
+ YProperty _property;
+ YWidget * _widget;
+};
+
+
+/**
+ * Exception class for "unknown property name":
+ * The application tried to set (or query) a property that doesn't exist.
+ **/
+class YUIUnknownPropertyException: public YUIPropertyException
+{
+public:
+ YUIUnknownPropertyException( const std::string & propertyName, YWidget * widget )
+ : YUIPropertyException( YProperty( propertyName, YUnknownPropertyType ), widget )
+ {}
+
+ virtual ~YUIUnknownPropertyException() throw()
+ {}
+
+protected:
+
+ /**
+ * Write proper error message with all relevant data.
+ * Reimplemented from YUIException.
+ **/
+ virtual ostream & dumpOn( ostream & str ) const;
+};
+
+
+/**
+ * Exception class for "property type mismatch":
+ * The application tried to set a property with a wrong type.
+ **/
+class YUIPropertyTypeMismatchException: public YUIPropertyException
+{
+public:
+
+ YUIPropertyTypeMismatchException( const YProperty & property,
+ const YPropertyValue & value,
+ YWidget * widget )
+ : YUIPropertyException( property, widget )
+ , _val( value )
+ {}
+
+ virtual ~YUIPropertyTypeMismatchException() throw()
+ {}
+
+ /**
+ * Return the property value (and type) the application tried to set.
+ **/
+ YPropertyValue value() const { return _val; }
+
+protected:
+
+ /**
+ * Write proper error message with all relevant data.
+ * Reimplemented from YUIException.
+ **/
+ virtual ostream & dumpOn( ostream & str ) const;
+
+private:
+ YPropertyValue _val;
+};
+
+
//
// Helper templates
//
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YWidget.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src…
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YWidget.cc (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YWidget.cc Wed May 30 18:25:05 2007
@@ -152,6 +152,64 @@
}
+const YPropertySet &
+YWidget::propertySet()
+{
+ static YPropertySet propSet;
+
+ if ( propSet.isEmpty() )
+ {
+ propSet.add( YProperty( YUIProperty_Enabled, YBoolProperty ) );
+ propSet.add( YProperty( YUIProperty_Notify, YBoolProperty ) );
+ propSet.add( YProperty( YUIProperty_WindowID, YIntegerProperty) );
+ propSet.add( YProperty( YUIProperty_WidgetClass, YStringProperty ) );
+ propSet.add( YProperty( YUIProperty_DebugLabel, YStringProperty ) );
+ propSet.add( YProperty( YUIProperty_DialogDebugLabel, YStringProperty ) );
+ }
+
+ return propSet;
+}
+
+
+void
+YWidget::setProperty( const std::string & propertyName, const YPropertyValue & val )
+{
+ YPropertySet::SearchResult result = propertySet().lookup( propertyName, val.type() );
+
+ if ( result == YPropertySet::Found )
+ {
+ if ( propertyName == YUIProperty_Enabled ) setEnabling( val.boolVal() );
+ else if ( propertyName == YUIProperty_Notify ) setNotify ( val.boolVal() );
+ else
+ {
+ if ( propertyName == YUIProperty_WidgetClass ||
+ propertyName == YUIProperty_DebugLabel ||
+ propertyName == YUIProperty_DialogDebugLabel )
+ {
+ y2error( "Property \"%s\" is read-only", propertyName.c_str() );
+ }
+ }
+ }
+}
+
+
+YPropertyValue
+YWidget::getProperty( const std::string & propertyName )
+{
+ YPropertySet::SearchResult result = propertySet().lookup( propertyName );
+
+ if ( result == YPropertySet::Found )
+ {
+ if ( propertyName == YUIProperty_Enabled ) return YPropertyValue( getEnabling() );
+ if ( propertyName == YUIProperty_Notify ) return YPropertyValue( getNotify() );
+ if ( propertyName == YUIProperty_WidgetClass ) return YPropertyValue( widgetClass() );
+ if ( propertyName == YUIProperty_DebugLabel ) return YPropertyValue( debugLabel() );
+ if ( propertyName == YUIProperty_DialogDebugLabel ) return YPropertyValue( yDialog()->debugLabel() );
+ }
+}
+
+
+
YCPValue YWidget::changeWidget( const YCPSymbol & property, const YCPValue & newvalue )
{
string symbol = property->symbol();
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YWidget.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src…
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YWidget.h (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YWidget.h Wed May 30 18:25:05 2007
@@ -23,6 +23,7 @@
#include <string>
#include <list>
#include <ycp/YCPValue.h>
+#include "YProperty.h"
#include "YWidgetOpt.h"
#include "YUISymbols.h"
@@ -41,7 +42,6 @@
typedef std::list<YWidget *>::iterator YWidgetListIterator;
typedef std::list<YWidget *>::const_iterator YWidgetListConstIterator;
-
/**
* @short Abstract base class of all ui widgets
*/
@@ -78,11 +78,66 @@
virtual std::string debugLabel();
/**
+ * Return this class's property set.
+ * This also initializes the property upon the first call.
+ *
+ * Derived classes should reimplement this.
+ *
+ * Remember to add the base class's property set to your own
+ * in reimplemented versions, e.g.:
+ *
+ * const YPropertySet &
+ * myWidgetClass::propertySet()
+ * {
+ * static YPropertySet propSet;
+ *
+ * if ( propSet.isEmpty() )
+ * {
+ * // Add properties for the derived class
+ * propSet.add( YProperty( YUIProperty_Value, YStringProperty ) );
+ * propSet.add( YProperty( YUIProperty_Label, YStringProperty ) );
+ *
+ * // Add base class properties
+ * propSet.add( YWidget::propertySet() );
+ * }
+ *
+ * return propSet;
+ * }
+ *
+ * Otherwise the base class's properties will not be available in the
+ * derived class. It is also important that the base class's properties
+ * are added after those of the derived class so the derived class's
+ * properties have priority over those of the base class.
+ **/
+ virtual const YPropertySet & propertySet();
+
+ /**
+ * Set a property. Derived classes need to implement this.
+ *
+ * This method may throw exceptions, for example
+ * - if there is no property with that name
+ * - if the expected type and the type mismatch
+ * - if the value is out of range
+ **/
+ virtual void setProperty( const std::string & propertyName,
+ const YPropertyValue & val );
+ // FIXME: = 0
+
+ /**
+ * Get a property. Derived classes need to implement this.
+ *
+ * This method may throw exceptions, for example
+ * - if there is no property with that name
+ **/
+ virtual YPropertyValue getProperty( const std::string & propertyName );
+ // FIXME: = 0
+
+ /**
* Checks whether or not this object is valid. This is to enable
* dangling pointer error checking ( i.e. this object is already
* deallocated, but a pointer to it is still in use ).
*/
- bool isValid() const { return magic == YWIDGET_MAGIC; }
+ bool isValid() const { return magic == YWIDGET_MAGIC; }
/**
* Return the widget serial number (the internal widget ID).
@@ -451,6 +506,10 @@
long windowID;
+private:
+ static YPropertySet _propertySet;
+
+
public:
/**
* Helper class that calls startMultipleChanges() in its constructor
@@ -461,7 +520,7 @@
{
public:
OptimizeChanges( YWidget & w ) : yw(w) { yw.startMultipleChanges(); }
- ~OptimizeChanges() { yw.doneMultipleChanges(); }
+ ~OptimizeChanges() { yw.doneMultipleChanges(); }
private:
OptimizeChanges( const OptimizeChanges & ); // no copy
void operator=( const OptimizeChanges & ); // no assign
Modified: branches/tmp/sh/mod-ui/core/libyui/src/YWidgetFactory.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/core/libyui/src…
==============================================================================
--- branches/tmp/sh/mod-ui/core/libyui/src/YWidgetFactory.h (original)
+++ branches/tmp/sh/mod-ui/core/libyui/src/YWidgetFactory.h Wed May 30 18:25:05 2007
@@ -26,30 +26,7 @@
{
typedef double YLayoutSize_t;
-#if 0
- struct YItem
- {
- std::string label;
- std::string id;
- bool isSelected;
-
- YItem( std::string labelText )
- : label( labelText )
- , id( labelText )
- , isSelected( false )
- {}
-
- YItem( std::string labelText, std::string idText, bool sel = false )
- : label( labelText )
- , id( idText )
- , isSelected( sel )
- {}
- }; // struct YItem
-
- typedef std::list<YItem> YItemList;
-#endif
-
-
+
class YWidgetFactory
{
public:
@@ -78,7 +55,7 @@
YInputField * createInputField ( YWidget * parent, std::string label );
YCheckBox * createCheckBox ( YWidget * parent, std::string label, bool isChecked = false );
YRadioButton * createRadioButton ( YWidget * parent, std::string label, bool isChecked = false );
- YComboBox * createComboBox ( YWidget * parent, std::string label, bool editable = false );
+ YComboBox * createComboBox ( YWidget * parent, std::string label, bool editable = false );
YSelectionBox * createSelectionBox ( YWidget * parent, std::string label );
YTree * createTree ( YWidget * parent, std::string label );
YTable * createTable ( YWidget * parent );
@@ -203,6 +180,30 @@
}; // class YWidgetFactory
+#if 0
+ struct YItem
+ {
+ std::string label;
+ std::string id;
+ bool isSelected;
+
+ YItem( std::string labelText )
+ : label( labelText )
+ , id( labelText )
+ , isSelected( false )
+ {}
+
+ YItem( std::string labelText, std::string idText, bool sel = false )
+ : label( labelText )
+ , id( idText )
+ , isSelected( sel )
+ {}
+ }; // struct YItem
+
+ typedef std::list<YItem> YItemList;
+#endif
+
+
} // namespace YUI
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
[yast-commit] r38209 - in /trunk/ftp-server: config/ftp-server.rnc src/FtpServer.ycp src/helps.ycp src/uiforms.ycp src/wid_functions.ycp src/write_load.ycp
by juhliarik@svn.opensuse.org 30 May '07
by juhliarik@svn.opensuse.org 30 May '07
30 May '07
Author: juhliarik
Date: Wed May 30 17:24:48 2007
New Revision: 38209
URL: http://svn.opensuse.org/viewcvs/yast?rev=38209&view=rev
Log:
add patch for uploading anonymous user in vsftpd (create upload dir)
Modified:
trunk/ftp-server/config/ftp-server.rnc
trunk/ftp-server/src/FtpServer.ycp
trunk/ftp-server/src/helps.ycp
trunk/ftp-server/src/uiforms.ycp
trunk/ftp-server/src/wid_functions.ycp
trunk/ftp-server/src/write_load.ycp
Modified: trunk/ftp-server/config/ftp-server.rnc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ftp-server/config/ftp-server.rnc…
==============================================================================
--- trunk/ftp-server/config/ftp-server.rnc (original)
+++ trunk/ftp-server/config/ftp-server.rnc Wed May 30 17:24:48 2007
@@ -23,7 +23,6 @@
element AnonCreatDirs { text }? &
element Banner { text }? &
element SSLEnable { text }? &
- element SSLVersion { text }? &
element TLS { text }? &
element AntiWarez { text }? &
element SSL { text }? &
Modified: trunk/ftp-server/src/FtpServer.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ftp-server/src/FtpServer.ycp?rev…
==============================================================================
--- trunk/ftp-server/src/FtpServer.ycp (original)
+++ trunk/ftp-server/src/FtpServer.ycp Wed May 30 17:24:48 2007
@@ -96,6 +96,24 @@
global boolean start_xinetd = false;
/**
+ * variable signifies if it is create upload dir
+ * only for vsftpd and anonymous connections with allowed upload
+ *
+ * global boolean variable
+ */
+
+global boolean create_upload_dir = false;
+
+/**
+ * variable signifies if upload dir has good permissions
+ * only for vsftpd and anonymous connections with allowed upload
+ *
+ * global boolean variable
+ */
+
+global boolean upload_good_permission = false;
+
+/**
* variable signifies home dir for anonymous user
*
* global string variable
@@ -252,6 +270,48 @@
return true;
}
+
+/**
+ * Read vsftpd configuration
+ * existing upload file and permissions
+ *
+ * @return boolean successfull
+ */
+
+
+boolean ReadVSFTPDUpload () {
+ boolean result = false;
+ string command = "";
+ if (anon_homedir !="")
+ command = "ls -l "+anon_homedir+ " | grep upload";
+ if (command != "") {
+ map options = (map)SCR::Execute (.target.bash_output, command);
+ y2milestone("[ftp-server] (ReadVSFTPDUpload) command for existing upload dir: %1 output: %2",command, options);
+ if (options["exit"]:nil == 0)
+ result = true;
+ else
+ result = false;
+ if (result) {
+ //Popup::Message("Work ReadVSFTPDUpload");
+ create_upload_dir = true;
+ string permissions = substring (tostring(options["stdout"]:nil),0,10);
+ string w = filterchars (permissions, "w");
+ string r = filterchars (permissions, "r");
+ if ((size(w) <3) || (size(r) <3)) {
+ upload_good_permission = false;
+ //Popup::Message("good permissions");
+ } else {
+ upload_good_permission = true;
+ //Popup::Message("wrong permissions");
+ }
+ }
+ }
+ return result;
+}
+
+
+
+
/**
* Remap current pure -FtpServer configuration
* to temporary structure
@@ -295,7 +355,7 @@
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");
+ //Popup::Message("if ((vsftpd_edit) && (EDIT_SETTINGS");
Users::SelectUserByName (EDIT_SETTINGS["GuestUser"]:nil);
userinfo = Users::GetCurrentUser ();
string guest_home_dir = (string) userinfo["homedirectory"]:nil;
@@ -319,9 +379,10 @@
boolean progress_orig = Progress::set (false);
SuSEFirewall::Read ();
Progress::set (progress_orig);
-
-
-
+ //read existing upload directory for vsftpd
+ if (vsftpd_edit) {
+ result = ReadVSFTPDUpload ();
+ }
return result;
}
@@ -505,7 +566,49 @@
return result;
}
+/**
+ * Ask for creation upload directory
+ * It is necessary if user want to allow uploading for anonymous
+ * @return boolean result of function (true/false)
+ */
+boolean WriteUpload () {
+ boolean result = true;
+ string command ="";
+ integer authentication = tointeger(EDIT_SETTINGS["AnonAuthen"]:nil);
+ if ((vsftpd_edit) && (authentication == 0) && (create_upload_dir) && (upload_good_permission)) {
+ boolean write_enable = ((EDIT_SETTINGS["EnableUpload"]:nil == "YES") ? true:false);
+ boolean anon_upload = ((EDIT_SETTINGS["AnonReadOnly"]:nil == "NO") ? true:false);
+ boolean anon_create_dirs = ((EDIT_SETTINGS["AnonCreatDirs"]:nil == "YES") ? true:false);
+ if ((write_enable) && ((anon_upload) || (anon_create_dirs)))
+ command = "dir=`ls ";
+ command = command + anon_homedir;
+ command = command + " | grep upload`; if [ -z $dir ]; then mkdir ";
+ command = command + anon_homedir +"upload; chown ";
+
+ if (EDIT_SETTINGS["GuestUser"]:nil !="")
+ command = command + EDIT_SETTINGS["GuestUser"]:nil +":"+EDIT_SETTINGS["GuestUser"]:nil;
+ else if (EDIT_SETTINGS["FTPUser"]:nil !="")
+ command = command + EDIT_SETTINGS["FTPUser"]:nil +":"+EDIT_SETTINGS["FTPUser"]:nil;
+ command = command + " " + anon_homedir +"upload; chmod 766 ";
+ command = command + anon_homedir +"upload; else chmod 766 " + anon_homedir +"upload; fi";
+/*
+"dir=`ls /srv/ftp/ | grep upload`; if [ -z $dir ]; then echo $dir; mkdir /srv/ftp/upload;
+ chown ftp:ftp /srv/ftp/upload/; chmod 755 /srv/ftp/upload; else chmod 766 /srv/ftp/upload/; fi"
+*/
+ y2milestone("[ftp-server] (WriteUpload) bash command for creating upload dir : %1", command);
+ map options = (map)SCR::Execute (.target.bash_output, command);
+ if (options["exit"]:nil == 0)
+ result = true;
+ else
+ result = false;
+ //Popup::Message(command);
+
+ } else {
+ result = true;
+ }
+ return result;
+}
/**
* read value from PURE_EDIT_SETTINGS
*
@@ -667,7 +770,7 @@
/* FtpServer read dialog caption */
string caption = _("Saving FTP Configuration");
- integer steps = 2;
+ integer steps = 3;
// We do not set help text here, because it was set outside
Progress::New(caption, " ",
@@ -697,6 +800,13 @@
if (!WriteXinetd ()) Report::Error (_("Cannot write settings for xinetd!"));
sleep(sl);
+ if (PollAbort()) return false;
+ Progress::NextStage ();
+ // write settings for starting daemon
+ if (!WriteUpload ()) Report::Error (_("Cannot create upload direcotry for anonymous connections!"));
+ sleep(sl);
+
+
if(PollAbort()) return false;
/* Progress finished */
Progress::NextStage();
@@ -858,7 +968,6 @@
* @return table items
*/
global list Overview() {
- // TODO FIXME: your code here...
return [];
}
Modified: trunk/ftp-server/src/helps.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ftp-server/src/helps.ycp?rev=382…
==============================================================================
--- trunk/ftp-server/src/helps.ycp (original)
+++ trunk/ftp-server/src/helps.ycp Wed May 30 17:24:48 2007
@@ -146,14 +146,26 @@
/* anonymous settings anonymous can't upload dialog help 5/6 */
_("<p><b>Anonymous Can Upload</b><br>
-If enabled anonymous users will be permitted to upload.</p>
+If enabled anonymous users will be permitted to upload.
+<i>vsftpd only: </i>If you want that anonymous users can upload you
+need existing directory with allowed writing in home directory after login.</p>
")+
/* anonymous settings anonymous can create dirs dialog help 6/6 */
_("<p><b>Anonymous Can Create Dirs</b><br>
-If enabled anonymous users can create directories.</p>
+If enabled anonymous users can create directories.
+<i>vsftpd only: </i>If you want that anonymous users can create directories you
+need existing directory with allowed writing in home directory after login.</p>
+")+
+
+/* anonymous settings anonymous can create dirs dialog help 6/6 */
+_("<p><b>Enable Upload <i>(vsftpd only)</i></b><br>
+If enable ftp users can upload. Anonymous users need to allow
+ \"Anonymous Can Upload\" for enabling upload.</p>
"),
+
+
/* expert settings dialog help 1/6 */
"vsftpd_settings" : _("<p><b><big>Expert Settings</b><br>
Expert settings - security and firewall settings.</p>
Modified: trunk/ftp-server/src/uiforms.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ftp-server/src/uiforms.ycp?rev=3…
==============================================================================
--- trunk/ftp-server/src/uiforms.ycp (original)
+++ trunk/ftp-server/src/uiforms.ycp Wed May 30 17:24:48 2007
@@ -116,8 +116,8 @@
`HBox(`HSpacing(1),`VBox (
`Left(`CheckBox (`id("EnableUpload"), `opt(`notify), _("&Enable Upload"))),
`HBox(`HSpacing(2),`VBox(
- `Left(`CheckBox (`id("AnonReadOnly"), _("Anon&ymous Can Upload"))),
- `Left(`CheckBox (`id("AnonCreatDirs"), _("Anonymou&s Can Create Directories")))
+ `Left(`CheckBox (`id("AnonReadOnly"), `opt(`notify), _("Anon&ymous Can Upload"))),
+ `Left(`CheckBox (`id("AnonCreatDirs"),`opt(`notify), _("Anonymou&s Can Create Directories")))
))
))
), //end of `Frame ( _("Anonymous Settings")
Modified: trunk/ftp-server/src/wid_functions.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ftp-server/src/wid_functions.ycp…
==============================================================================
--- trunk/ftp-server/src/wid_functions.ycp (original)
+++ trunk/ftp-server/src/wid_functions.ycp Wed May 30 17:24:48 2007
@@ -25,6 +25,15 @@
include "ftp-server/uiforms.ycp";
+
+/**
+ * variable signifies repeat asking about upload file
+ * only for vsftpd
+ *
+ * internal boolean variable
+ */
+boolean ask_again = true;
+
/**
* CWMServiceStart function with no parameter returning boolean value
* that says if the service is started.
@@ -342,6 +351,7 @@
FtpServer::WriteToEditMap("AnonReadOnly", (((boolean) UI::QueryWidget(`id("AnonReadOnly"), `Value) == true) ? "NO":"YES"));
if (FtpServer::vsftpd_edit)
FtpServer::WriteToEditMap("EnableUpload", (((boolean) UI::QueryWidget(`id("EnableUpload"), `Value) == true) ? "YES":"NO"));
+
}
/**
@@ -352,8 +362,12 @@
symbol HandleAnonSettings(string key, map event) {
if (FtpServer::vsftpd_edit) {
any button = event["ID"]:nil;
- if (button == "EnableUpload") {
- boolean check_upload = (boolean) UI::QueryWidget(`id("EnableUpload"), `Value);
+ boolean anon_upload = false;
+ boolean anon_create_dirs = false;
+ string yesno_comment ="";
+ string yesno_question ="";
+ boolean check_upload = (boolean) UI::QueryWidget(`id("EnableUpload"), `Value);
+ if (button == "EnableUpload") {
if (check_upload) {
UI::ChangeWidget(`id("AnonReadOnly"), `Enabled, true);
UI::ChangeWidget(`id( "AnonCreatDirs" ),`Enabled, true);
@@ -362,6 +376,44 @@
UI::ChangeWidget(`id( "AnonCreatDirs" ),`Enabled, false);
}
} // end of if (button == "EnableUpload") {
+
+ anon_upload = (boolean) UI::QueryWidget(`id("AnonReadOnly"), `Value);
+ anon_create_dirs = (boolean) UI::QueryWidget(`id("AnonCreatDirs"), `Value);
+
+ if (((button == "AnonReadOnly") || (anon_upload) && (check_upload)) && (ask_again)) {
+ if (!FtpServer::create_upload_dir) {
+ yesno_question ="Do you want to create directory\n" + FtpServer::anon_homedir +"upload with allowed writing?";
+ yesno_comment = "If you want that \"anonymous\" users can upload\n you need to create directory with allowed writing.\n\n";
+ yesno_comment = yesno_comment + FtpServer::anon_homedir + " is a home directory after login of \"anonymous\" users.";
+ FtpServer::create_upload_dir = Popup::YesNoHeadline(yesno_question, yesno_comment);
+ ask_again = FtpServer::create_upload_dir;
+ FtpServer::upload_good_permission = true;
+ } else if (!FtpServer::upload_good_permission) {
+ yesno_question ="Do you want to change permission\nfor" + FtpServer::anon_homedir +"upload (allow writing)?";
+ yesno_comment = "If you want that \"anonymous\" users can upload\n you need directory with allowed writing.\n\n";
+ yesno_comment = yesno_comment + FtpServer::anon_homedir + " is a home directory after login of \"anonymous\" users.";
+ FtpServer::upload_good_permission = Popup::YesNoHeadline(yesno_question, yesno_comment);
+ ask_again = FtpServer::upload_good_permission;
+ }
+
+ }
+
+ if (((button == "AnonCreatDirs") || (anon_create_dirs) && (check_upload)) && (ask_again)) {
+ if (!FtpServer::create_upload_dir) {
+ yesno_question ="Do you want to create directory\n" + FtpServer::anon_homedir +"upload with allowed writing?";
+ yesno_comment = "If you want that \"anonymous\" users can create directories\n you need to create directory with allowed writing.\n\n";
+ yesno_comment = yesno_comment + FtpServer::anon_homedir + " is a home directory after login of \"anonymous\" users.";
+ FtpServer::create_upload_dir = Popup::YesNoHeadline(yesno_question, yesno_comment);
+ ask_again = FtpServer::create_upload_dir;
+ FtpServer::upload_good_permission = true;
+ } else if (!FtpServer::upload_good_permission) {
+ yesno_question ="Do you want to change permission\nfor" + FtpServer::anon_homedir +"upload (allow writing)?";
+ yesno_comment = "If you want that \"anonymous\" users can create directories\n you need directory with allowed writing.\n\n";
+ yesno_comment = yesno_comment + FtpServer::anon_homedir + " is a home directory after login of \"anonymous\" users.";
+ FtpServer::upload_good_permission = Popup::YesNoHeadline(yesno_question, yesno_comment);
+ ask_again = FtpServer::upload_good_permission;
+ }
+ }
} // end of if (FtpServer::vsftpd_edit) {
}
Modified: trunk/ftp-server/src/write_load.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ftp-server/src/write_load.ycp?re…
==============================================================================
--- trunk/ftp-server/src/write_load.ycp (original)
+++ trunk/ftp-server/src/write_load.ycp Wed May 30 17:24:48 2007
@@ -705,10 +705,8 @@
yes_no = FtpServer::EDIT_SETTINGS["AnonReadOnly"]:nil;
if (yes_no == "YES") {
FtpServer::VS_SETTINGS["anon_upload_enable"] = "NO";
- FtpServer::VS_SETTINGS["write_enable"] = "NO";
} else {
FtpServer::VS_SETTINGS["anon_upload_enable"] = "YES";
- FtpServer::VS_SETTINGS["write_enable"] = "YES";
}
} else {
if (haskey(FtpServer::VS_SETTINGS, "anon_upload_enable")) {
@@ -731,15 +729,11 @@
case("AnonCreatDirs"):
if (vsftpd_edit) {
if (write) {
- FtpServer::VS_SETTINGS["anon_mkdir_write_enable"] = FtpServer::EDIT_SETTINGS["AnonCreatDirs"]:nil;
- if (FtpServer::EDIT_SETTINGS["AnonCreatDirs"]:nil == "YES")
- FtpServer::VS_SETTINGS["write_enable"] = "YES";
+ FtpServer::VS_SETTINGS["anon_mkdir_write_enable"] = FtpServer::EDIT_SETTINGS["AnonCreatDirs"]:nil;
} else {
return ((haskey(FtpServer::VS_SETTINGS, "anon_mkdir_write_enable") ?
toupper(FtpServer::VS_SETTINGS["anon_mkdir_write_enable"]:nil) : FtpServer::DEFAULT_CONFIG["AnonCreatDirs"]:nil));
}
-
-
} else {
if (write)
FtpServer::PURE_SETTINGS["AnonymousCanCreateDirs"] = FtpServer::EDIT_SETTINGS["AnonCreatDirs"]:nil;
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0