Mailinglist Archive: yast-commit (1271 mails)

< Previous Next >
[yast-commit] [ci_new_pac] JFYI yast2-registration -> sle12
Script 'mail_helper' called by ro
Hello packager,

This is just FYI. Your package was checked in in distribution "sle12"
by autobuild-member: ro.

Here comes the log...

---------------------------%<------------------------------
Hi,

here is the log from ci_new_pac /mounts/work_src_done/SLE12/yast2-registration
-> sle12



## BNC# 894670 : "Yast registration module logs old NCC credentials to y2log"
(RESOLVED/FIXED)

Changes:
--------
--- /work/SRC/SUSE:SLE-12:GA/yast2-registration/yast2-registration.changes
2014-09-02 15:57:58.000000000 +0200
+++ /mounts/work_src_done/SLE12/yast2-registration/yast2-registration.changes
2014-09-03 09:50:56.000000000 +0200
@@ -1,0 +2,7 @@
+Tue Sep 2 15:30:07 UTC 2014 - lslezak@xxxxxxx
+
+- do not log the registration code or the credentials to y2log
+ (bnc#894670)
+- 3.1.115
+
+-------------------------------------------------------------------

calling whatdependson for sle12-i586
Packages directly triggered for rebuild:
- yast2-registration
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/SUSE:SLE-12:GA/yast2-registration (Old)
and /mounts/work_src_done/SLE12/yast2-registration (BS:build ID:43502
MAIL:yast-commit@xxxxxxxxxxxx) (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-registration", Maintainer is "yast-commit@xxxxxxxxxxxx"


Old:
----
yast2-registration-3.1.114.tar.bz2

New:
----
yast2-registration-3.1.115.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-registration.spec ++++++
--- /var/tmp/diff_new_pack.DNPp4B/_old 2014-09-03 16:39:27.000000000 +0200
+++ /var/tmp/diff_new_pack.DNPp4B/_new 2014-09-03 16:39:27.000000000 +0200
@@ -17,7 +17,7 @@


Name: yast2-registration
-Version: 3.1.114
+Version: 3.1.115
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build

++++++ yast2-registration-3.1.114.tar.bz2 -> yast2-registration-3.1.115.tar.bz2
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-registration-3.1.114/package/yast2-registration.changes
new/yast2-registration-3.1.115/package/yast2-registration.changes
--- old/yast2-registration-3.1.114/package/yast2-registration.changes
2014-09-01 20:04:20.000000000 +0200
+++ new/yast2-registration-3.1.115/package/yast2-registration.changes
2014-09-03 09:46:06.000000000 +0200
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Tue Sep 2 15:30:07 UTC 2014 - lslezak@xxxxxxx
+
+- do not log the registration code or the credentials to y2log
+ (bnc#894670)
+- 3.1.115
+
+-------------------------------------------------------------------
Mon Sep 1 17:21:41 UTC 2014 - lslezak@xxxxxxx

- ignore SUSE Manager services in SLP discovery (bnc#894470)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-registration-3.1.114/package/yast2-registration.spec
new/yast2-registration-3.1.115/package/yast2-registration.spec
--- old/yast2-registration-3.1.114/package/yast2-registration.spec
2014-09-01 20:04:20.000000000 +0200
+++ new/yast2-registration-3.1.115/package/yast2-registration.spec
2014-09-03 09:46:07.000000000 +0200
@@ -17,7 +17,7 @@


Name: yast2-registration
-Version: 3.1.114
+Version: 3.1.115
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-registration-3.1.114/src/clients/scc_auto.rb
new/yast2-registration-3.1.115/src/clients/scc_auto.rb
--- old/yast2-registration-3.1.114/src/clients/scc_auto.rb 2014-09-01
20:04:20.000000000 +0200
+++ new/yast2-registration-3.1.115/src/clients/scc_auto.rb 2014-09-03
09:46:08.000000000 +0200
@@ -65,7 +65,7 @@
func = WFM.Args[0]
param = WFM.Args[1] || {}

- log.info "func: #{func}, param: #{param}"
+ log.info "func: #{func}, param:
#{::Registration::Helpers.hide_reg_codes(param)}"

case func
when "Summary"
@@ -100,7 +100,7 @@
raise "Unknown function parameter: #{func}"
end

- log.info "ret: #{ret}"
+ log.info "ret: #{::Registration::Helpers.hide_reg_codes(ret)}"
log.info "scc_auto finished"

ret
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-registration-3.1.114/src/lib/registration/helpers.rb
new/yast2-registration-3.1.115/src/lib/registration/helpers.rb
--- old/yast2-registration-3.1.114/src/lib/registration/helpers.rb
2014-09-01 20:04:20.000000000 +0200
+++ new/yast2-registration-3.1.115/src/lib/registration/helpers.rb
2014-09-03 09:46:10.000000000 +0200
@@ -43,6 +43,9 @@
Yast.import "Mode"
Yast.import "SlpService"

+ # reg. code replacement
+ FILTERED = "[FILTERED]"
+
# Get the language for using in HTTP requests (in "Accept-Language" header)
def self.language
lang = Yast::WFM.GetLanguage
@@ -181,5 +184,30 @@
configuration
end

+ # Hide registration codes in Autoyast data
+ # The result should be just logged, the result might not be a full
duplicate
+ # of the input is all cases and therefore should NOT be modified.
+ # @param settings input value
+ # @return either the original value or a value with replaced "reg_code"
entries
+ # TODO: move AutoYast settings to a separate class and override #to_s
+ def self.hide_reg_codes(settings)
+ return settings unless settings.is_a?(Hash)
+
+ # create a duplicate
+ filtered = settings.dup
+ filtered["reg_code"] &&= FILTERED
+
+ return filtered unless filtered["addons"]
+
+ # duplicate the nested values
+ filtered["addons"] = filtered["addons"].map(&:dup)
+
+ filtered["addons"].each do |addon|
+ addon["reg_code"] &&= FILTERED
+ end
+
+ filtered
+ end
+
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-registration-3.1.114/src/lib/registration/sw_mgmt.rb
new/yast2-registration-3.1.115/src/lib/registration/sw_mgmt.rb
--- old/yast2-registration-3.1.114/src/lib/registration/sw_mgmt.rb
2014-09-01 20:04:20.000000000 +0200
+++ new/yast2-registration-3.1.115/src/lib/registration/sw_mgmt.rb
2014-09-03 09:46:12.000000000 +0200
@@ -166,8 +166,8 @@
credentials_file)
log.info "Using #{credentials_file} credentials path in update mode"
end
- # TODO FIXME: SCC currenly does not return credentials for the service,
- # just reuse the global credentials and save to a different file
+ # SCC uses the same credentials for all services, just save them to
+ # a different file
service_credentials = credentials.dup
service_credentials.file = credentials_file
service_credentials.write
@@ -286,7 +286,7 @@

credentials = SUSE::Connect::Credentials.read(new_file)
# note: SUSE::Connect::Credentials override #to_s, the password is
filtered out
- log.info "Using previous NCC credentials: #{credentials.inspect}"
+ log.info "Using previous NCC credentials: #{credentials}"
end

if File.exist?(scc_file)
@@ -295,7 +295,7 @@
::FileUtils.cp(scc_file, new_file)
credentials = SUSE::Connect::Credentials.read(new_file)
# note: SUSE::Connect::Credentials override #to_s, the password is
filtered out
- log.info "Using previous SCC credentials: #{credentials.inspect}"
+ log.info "Using previous SCC credentials: #{credentials}"
end
end

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-registration-3.1.114/test/helpers_spec.rb
new/yast2-registration-3.1.115/test/helpers_spec.rb
--- old/yast2-registration-3.1.114/test/helpers_spec.rb 2014-09-01
20:04:20.000000000 +0200
+++ new/yast2-registration-3.1.115/test/helpers_spec.rb 2014-09-03
09:46:15.000000000 +0200
@@ -234,4 +234,34 @@
end
end

+ describe ".hide_reg_codes" do
+ it "returns the original value if the input is not a Hash" do
+ test = "test"
+ expect(Registration::Helpers.hide_reg_codes(test)).to be(test)
+ end
+
+ it "it does not change anything if there is no registration code in the
Hash" do
+ test = { "test" => "foo" }
+ expect(Registration::Helpers.hide_reg_codes(test)).to eq(test)
+ end
+
+ it "it replaces \"reg_code\" value by [FILTERED]" do
+ test = { "reg_code" => "foo" }
+ expect(Registration::Helpers.hide_reg_codes(test)).to eq("reg_code" =>
"[FILTERED]")
+ end
+
+ it "it replaces \"reg_code\" also in nested \"addons\" list" do
+ test = { "addons" => [{ "reg_code" => "foo" }, { "reg_code" => "bar" }] }
+ expect(Registration::Helpers.hide_reg_codes(test)).to eq(
+ "addons" => [{ "reg_code"=>"[FILTERED]" }, { "reg_code"=>"[FILTERED]"
}])
+ end
+
+ it "it does not modify the original input value" do
+ test = { "addons" => [{ "reg_code" => "foo" }, { "reg_code" => "bar" }] }
+ Registration::Helpers.hide_reg_codes(test)
+ # make sure the copy is deep, i.e. the original value is unchanged
+ expect(test).to eq({ "addons" => [{ "reg_code" => "foo" }, { "reg_code"
=> "bar" }] })
+ end
+ end
+
end

continue with "q"...


Checked in at Wed Sep 3 16:39:56 CEST 2014 by ro

Remember to have fun...

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread