backend/common/rhnException.py | 1 +
backend/server/handlers/xmlrpc/up2date.py | 8 +++++++-
backend/spacewalk-backend.spec | 5 ++++-
rel-eng/packages/spacewalk-backend | 2 +-
4 files changed, 13 insertions(+), 3 deletions(-)
New commits:
commit 171b1831d3b11a5fff10092a72b2d9431e8225f4
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Jul 31 12:02:33 2012 +0200
Automatic commit of package [spacewalk-backend] release [1.8.56-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index f54e88c..55289d5 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -12,7 +12,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 1.8.55
+Version: 1.8.56
Release: 1%{?dist}
URL:
https://fedorahosted.org/spacewalk
Source0:
https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -647,6 +647,9 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Tue Jul 31 2012 Michael Mraka <michael.mraka(a)redhat.com> 1.8.56-1
+- 838502 - block subscription to satellite and proxy channels
+
* Tue Jul 31 2012 Michael Mraka <michael.mraka(a)redhat.com> 1.8.55-1
- pylint on Fedoras need disable before whole try-except block
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 0699dea..b2759b8 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-1.8.55-1 backend/
+1.8.56-1 backend/
commit 6812a5aa43f7a6cebbf46d0057ee4d85a5ae072d
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Jul 31 11:22:50 2012 +0200
838502 - block subscription to satellite and proxy channels
they need to be activated properly
diff --git a/backend/common/rhnException.py b/backend/common/rhnException.py
index 5f46a5d..b8c6f61 100644
--- a/backend/common/rhnException.py
+++ b/backend/common/rhnException.py
@@ -191,6 +191,7 @@ on this system."),
administrators for further details.
"""),
72: _("""You can not unsubscribe from base
channel."""),
+ 73: _("""Satellite or Proxy channel can not be
subscribed."""),
# 80-90: server group errors
80: _("There was an error while trying to join the system to its
groups"),
diff --git a/backend/server/handlers/xmlrpc/up2date.py
b/backend/server/handlers/xmlrpc/up2date.py
index 9452e30..24429cf 100644
--- a/backend/server/handlers/xmlrpc/up2date.py
+++ b/backend/server/handlers/xmlrpc/up2date.py
@@ -32,6 +32,9 @@ from spacewalk.server import rhnChannel, rhnPackage, rhnDependency,\
rhnCapability
from spacewalk.server.rhnServer import server_route
+import re
+NONSUBSCRIBABLE_CHANNELS = re.compile("(rhn-proxy|rhn-satellite)")
+
class Up2date(rhnHandler):
""" xml-rpc Server Functions that we will provide for the outside
world.
"""
@@ -159,7 +162,10 @@ class Up2date(rhnHandler):
# log the entry
log_debug(1, self.server_id, channelNames)
for channelName in channelNames:
- rhnChannel.subscribe_channel(self.server_id, channelName,
+ if NONSUBSCRIBABLE_CHANNELS.search(channelName):
+ raise rhnFault(73)
+ else:
+ rhnChannel.subscribe_channel(self.server_id, channelName,
username, passwd)
return 0