Hello community,
here is the log from the commit of package webyast-activedirectory-ws for openSUSE:Factory
checked in at Fri Jan 14 11:59:54 CET 2011.
--------
New Changes file:
--- /dev/null 2010-08-26 16:28:41.000000000 +0200
+++ /mounts/work_src_done/STABLE/webyast-activedirectory-ws/webyast-activedirectory-ws.changes 2010-08-31 09:09:54.000000000 +0200
@@ -0,0 +1,66 @@
+-------------------------------------------------------------------
+Tue Aug 31 07:05:53 UTC 2010 - schubi@novell.com
+
+- resubmit due URL changes
+- 0.2.6
+
+-------------------------------------------------------------------
+Mon Aug 23 12:43:06 UTC 2010 - jreidinger@novell.com
+
+- add url to spec file (bnc#625537)
+- 0.2.5
+
+-------------------------------------------------------------------
+Fri Aug 6 11:36:17 CEST 2010 - jsuchome@suse.cz
+
+- added support for leaving AD domain
+- 0.2.4
+
+-------------------------------------------------------------------
+Fri Jul 23 15:25:07 CEST 2010 - jsuchome@suse.cz
+
+- added REST API documentation
+- 0.2.3
+
+-------------------------------------------------------------------
+Thu Jul 22 10:39:32 CEST 2010 - jsuchome@suse.cz
+
+- YaPI: return dns data only when AD was detected
+- fixed requires
+- 0.2.2
+
+-------------------------------------------------------------------
+Fri Jul 16 14:23:51 CEST 2010 - jsuchome@suse.cz
+
+- added YaPI for leaving AD domain
+
+-------------------------------------------------------------------
+Thu Jul 15 15:04:30 CEST 2010 - jsuchome@suse.cz
+
+- use SambaAD->SetRealm with known realm
+- require new yast2-samba-client
+- require yast2-dbus-server that sets the PATH (bnc#617442)
+- 0.2.1
+
+-------------------------------------------------------------------
+Wed Jul 14 10:57:19 CEST 2010 - jsuchome@suse.cz
+
+- cache AD values (server, workgroup) obtained from network
+- require bind-utils
+
+-------------------------------------------------------------------
+Fri Jul 2 12:35:10 CEST 2010 - jsuchome@suse.cz
+
+- check specific exceptions in tests
+
+-------------------------------------------------------------------
+Fri Jul 2 11:20:22 CEST 2010 - jsuchome@suse.cz
+
+- added basic testsuite
+- basic functionality done
+
+-------------------------------------------------------------------
+Fri Jun 25 15:36:54 CEST 2010 - jsuchome@suse.cz
+
+- initial version
+
calling whatdependson for head-i586
New:
----
ActiveDirectory.pm
org.opensuse.yast.modules.yapi.activedirectory.policy
webyast-activedirectory-ws.changes
webyast-activedirectory-ws-rpmlintrc
webyast-activedirectory-ws.spec
www.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ webyast-activedirectory-ws.spec ++++++
#
# spec file for package webyast-activedirectory-ws
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: webyast-activedirectory-ws
Provides: WebYaST(org.opensuse.yast.modules.yapi.activedirectory)
PreReq: webyast-base-ws
License: GPLv2
Group: Productivity/Networking/Web/Utilities
Url: http://en.opensuse.org/Portal:WebYaST
AutoReqProv: on
Version: 0.2.6
Release: 1
Summary: WebYaST - service for configuration of Active Directory client
Source: www.tar.bz2
Source1: org.opensuse.yast.modules.yapi.activedirectory.policy
Source2: ActiveDirectory.pm
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
BuildRequires: rubygem-restility rubygem-yast2-webservice-tasks
BuildRequires: webyast-base-ws-testsuite
BuildRequires: rubygem-mocha rubygem-test-unit
# for enabling winbind and Kerberos configuration
Requires: samba-winbind samba-client pam_mount yast2-kerberos-client krb5 krb5-client
# for dig
Requires: bind-utils
# reasonable PATH set (bnc#617442)
Requires: yast2-dbus-server >= 2.17.3
# ActiveDirectory.pm is using yast2-samba-client API
# specific versin for SambaAD::SetRealm
Requires: yast2-samba-client >= 2.17.18
#
%define plugin_name activedirectory
%define plugin_dir %{webyast_ws_dir}/vendor/plugins/%{plugin_name}
#
%package testsuite
License: GPLv2
Group: Productivity/Networking/Web/Utilities
Requires: %{name} = %{version}
Requires: webyast-base-ws-testsuite
Summary: Testsuite for webyast-activedirectory-ws package
%description
WebYaST - Plugin providing REST service for configuration of Active Directory client
Authors:
--------
Jiri Suchomel
%description testsuite
This package contains complete testsuite for webyast-activedirectory-ws webservice package.
It's only needed for verifying the functionality of the module and it's not
needed at runtime.
%prep
%setup -q -n www
%build
# build restdoc documentation
mkdir -p public/activedirectory/restdoc
%webyast_ws_restdoc
# do not package restdoc sources
rm -rf restdoc
%check
# run the testsuite
%webyast_ws_check
%install
#
# Install all web and frontend parts.
#
mkdir -p $RPM_BUILD_ROOT%{plugin_dir}
cp -a * $RPM_BUILD_ROOT%{plugin_dir}/
rm -f $RPM_BUILD_ROOT%{plugin_dir}/COPYING
# Policies
mkdir -p $RPM_BUILD_ROOT/usr/share/PolicyKit/policy
install -m 0644 %SOURCE1 $RPM_BUILD_ROOT/usr/share/PolicyKit/policy/
#YaPI
mkdir -p $RPM_BUILD_ROOT/usr/share/YaST2/modules/YaPI/
cp %{SOURCE2} $RPM_BUILD_ROOT/usr/share/YaST2/modules/YaPI/
%clean
rm -rf $RPM_BUILD_ROOT
%post
# granting all permissions for the web user
/usr/sbin/grantwebyastrights --user root --action grant > /dev/null
/usr/sbin/grantwebyastrights --user %{webyast_ws_user} --action grant > /dev/null
%postun
%files
%defattr(-,root,root)
%dir %{webyast_ws_dir}
%dir %{webyast_ws_dir}/vendor
%dir %{webyast_ws_dir}/vendor/plugins
%dir %{plugin_dir}
# YaPI dir
%dir /usr/share/YaST2/
%dir /usr/share/YaST2/modules/
%dir /usr/share/YaST2/modules/YaPI/
/usr/share/YaST2/modules/YaPI/ActiveDirectory.pm
%{plugin_dir}/README
%{plugin_dir}/Rakefile
%{plugin_dir}/init.rb
%{plugin_dir}/install.rb
%{plugin_dir}/uninstall.rb
%{plugin_dir}/app
%{plugin_dir}/config
%{plugin_dir}/doc
%{plugin_dir}/public
%dir /usr/share/PolicyKit
%dir /usr/share/PolicyKit/policy
%attr(644,root,root) %config /usr/share/PolicyKit/policy/org.opensuse.yast.modules.yapi.activedirectory.policy
%doc COPYING
%files testsuite
%defattr(-,root,root)
%{webyast_ws_dir}/vendor/plugins/%{plugin_name}/test
%changelog
++++++ ActiveDirectory.pm ++++++
#--
# Copyright (c) 2009-2010 Novell, Inc.
#
# All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of version 2 of the GNU General Public License
# as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, contact Novell, Inc.
#
# To contact Novell about this file by physical or electronic mail,
# you may find current contact information at www.novell.com
#++
package YaPI::ActiveDirectory;
use strict;
use YaST::YCP qw(:LOGGING);
use YaPI;
use Data::Dumper;
# ------------------- imported modules
YaST::YCP::Import ("Progress");
YaST::YCP::Import ("Samba");
YaST::YCP::Import ("SambaAD");
YaST::YCP::Import ("SambaConfig");
YaST::YCP::Import ("SambaNetJoin");
# -------------------------------------
our $VERSION = '1.0.0';
our @CAPABILITIES = ('SLES11');
our %TYPEINFO;
=item *
C<$hash Read ();>
Returns the Samba client configuration
Can return different kind of result, based on passed arguments:
- if "check_membership" key is present in argument hash, check if the machine
is member of given domain (the string value of check_membership key);
if domain is empty, the one saved in samba config file will be checked
=cut
BEGIN{$TYPEINFO{Read} = ["function",
[ "map", "string", "any" ],
[ "map", "string", "any" ]];
}
sub Read {
my $self = shift;
my $args = shift;
my $ret = {};
Progress->set (0);
Samba->Read ();
# only check for domain membership
if (defined ($args->{"check_membership"})) {
my $domain = $args->{"check_membership"} || Samba->GetWorkgroupOrRealm ();
SambaAD->ReadADS ($domain);
if (SambaAD->ADS ()) {
$domain = SambaAD->GetWorkgroup ($domain);
SambaAD->ReadRealm ();
# return the parts that could be omited later, like AD server, workgroup, realm?
$ret->{"ads"} = SambaAD->ADS ();
$ret->{"workgroup"} = $domain;
$ret->{"realm"} = SambaAD->Realm ();
}
$ret->{"result"} = YaST::YCP::Boolean (SambaNetJoin->Test ($domain));
return $ret;
}
$ret->{"domain"} = Samba->GetWorkgroupOrRealm ();
$ret->{"winbind"} = Samba->GetWinbind ();
$ret->{"mkhomedir"} = Samba->mkhomedir();
return $ret;
}
=item *
C<$string Write ($argument_hash);>
Write Samba configuration or join AD domain
Returns error map, empty means success
=cut
BEGIN{$TYPEINFO{Write} = ["function",
[ "map", "string", "any" ],
[ "map", "string", "any" ]];
}
sub Write {
my $self = shift;
my $args = shift;
my $ret = {};
Progress->set (0);
Samba->Read ();
# try to join AD domain when credentials are present
if ($args->{"administrator"}) {
$ret = $args->{"leave"} ? $self->Leave ($args) : $self->Join ($args);
if ($ret->{"join_error"}) {
y2warning ("join failed, ending write");
return $ret;
}
elsif ($ret->{"leave_error"}) {
y2warning ("leave failed, ending write");
return $ret;
}
}
my $domain = $args->{"domain"} || Samba->GetWorkgroupOrRealm ();
# - after join, AD data are already read
# - do not do the reads when only disabling
if ((! $args->{"administrator"}) && ($args->{"winbind"} || 0)) {
if ($args->{"ads"}) {
SambaAD->SetADS ($args->{"ads"});
}
else {
SambaAD->ReadADS ($domain);
}
# work group = "Pre-Win2k Domain"
if ($args->{"workgroup"}) {
$domain = $args->{"workgroup"};
}
else {
$domain = SambaAD->GetWorkgroup ($domain);
}
Samba->SetWorkgroup ($domain);
if ($args->{"realm"}) {
SambaAD->SetRealm ($args->{"realm"});
}
else {
SambaAD->ReadRealm ();
}
}
Samba->SetWinbind ($args->{"winbind"} || 0) if (defined $args->{"winbind"});;
Samba->SetMkHomeDir ($args->{"mkhomedir"} || 0) if (defined $args->{"mkhomedir"});
$ret->{"write_error"} = 1 unless Samba->Write (0);
return $ret;
}
# Join given AD domain
# Argument map must contain domain and administrator credentials
# It may contain information about workgroup (short name), AD server and realm
BEGIN{$TYPEINFO{Join} = ["function",
[ "map", "string", "any" ],
[ "map", "string", "any" ]];
}
sub Join {
my $self = shift;
my $args = shift;
my $ret = {};
my $domain = $args->{"domain"} || Samba->GetWorkgroupOrRealm ();
if ($args->{"ads"}) {
SambaAD->SetADS ($args->{"ads"});
}
else {
SambaAD->ReadADS ($domain);
}
# work group = "Pre-Win2k Domain"
if ($args->{"workgroup"}) {
$domain = $args->{"workgroup"};
}
else {
$domain = SambaAD->GetWorkgroup ($domain);
}
Samba->SetWorkgroup ($domain);
if ($args->{"realm"}) {
SambaAD->SetRealm ($args->{"realm"});
}
else {
SambaAD->ReadRealm ();
}
my $result = SambaNetJoin->Join ($domain, "member", $args->{"administrator"}, $args->{"password"} || "", $args->{"machine"});
$ret->{"join_error"} = $result if $result;
return $ret;
}
# Leave current AD domain
# Argument map must contain administrator credentials
BEGIN{$TYPEINFO{Leave} = ["function",
[ "map", "string", "any" ],
[ "map", "string", "any" ]];
}
sub Leave {
my $self = shift;
my $args = shift;
my $ret = {};
# domain is currently not used in leave command
my $domain = $args->{"domain"} || Samba->GetWorkgroupOrRealm ();
my $result = SambaNetJoin->Leave ($domain, $args->{"administrator"}, $args->{"password"} || "");
$ret->{"leave_error"} = $result if $result;
return $ret;
}
++++++ webyast-activedirectory-ws-rpmlintrc ++++++
# ignore security warnings (unauthorized PolicyKit permissions) for now
addFilter("I: polkit-unauthorized-privilege")
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org