password authentication broken with python2.7

Bug #777999 reported by Bevan
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bcfg2 (Ubuntu)
Fix Released
Undecided
Stéphane Graber
Natty
Fix Released
Undecided
Stéphane Graber

Bug Description

Binary package hint: bcfg2

The bcfg2 client does not send his authentication data to the server when using python2.7 and authentication via password (BasicAuth) is enabled. So bcfg2 is completely useles when using this kind of configuration.

More information and a patch (which also will be included in the next bcfg2 version) can be found here:
http://comments.gmane.org/gmane.comp.sysutils.bcfg2.devel/4048

I think it would be a good idea to include this patch in the package.

Ubuntu version: 11.04 (natty)
Package version: 1.1.1-2ubuntu1

Marc Gariépy (mgariepy)
Changed in bcfg2 (Ubuntu):
status: New → Incomplete
status: Incomplete → Confirmed
Revision history for this message
Marc Gariépy (mgariepy) wrote :

I have the same problem.
here is the patche you need to apply to the code.

i build the package in my ppa for testing here: https://launchpad.net/~mgariepy/+archive/ppa/+packages

===================================================================
--- bcfg2-1.1.1.orig/src/lib/Proxy.py 2011-05-13 16:31:07.067761778 -0400
+++ bcfg2-1.1.1/src/lib/Proxy.py 2011-05-13 16:31:26.647790486 -0400
@@ -250,7 +250,7 @@
         self.timeout = timeout

     def make_connection(self, host):
- host = self.get_host_info(host)[0]
+ host, self._extra_headers = self.get_host_info(host)[0:2]
         http = SSLHTTPConnection(host, key=self.key, cert=self.cert, ca=self.ca,
                                  scns=self.scns, timeout=self.timeout)
         https = httplib.HTTP()

Changed in bcfg2 (Ubuntu):
assignee: nobody → Stéphane Graber (stgraber)
status: Confirmed → Triaged
Revision history for this message
Stéphane Graber (stgraber) wrote :

Thanks for reporting this bug.
I'm currently preparing an SRU fixing it.

Once it's accepted in -proposed, I'd appreciate if you could install the new package and make sure it works fine for you.

Changed in bcfg2 (Ubuntu Natty):
status: New → In Progress
milestone: none → natty-updates
assignee: nobody → Stéphane Graber (stgraber)
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bcfg2 - 1.1.1-3ubuntu2

---------------
bcfg2 (1.1.1-3ubuntu2) oneiric; urgency=low

  * Add python2.7 fix (LP: #777999)
  * Sort patches/series to make it easier to read
 -- Stephane Graber <email address hidden> Mon, 16 May 2011 09:56:46 -0400

Changed in bcfg2 (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Clint Byrum (clint-fewbar) wrote : Please test proposed package

Accepted bcfg2 into natty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Marc Gariépy (mgariepy) wrote :

I just tested the package in proposed and it works wonderfully thanks :)

Revision history for this message
Stéphane Graber (stgraber) wrote :

I can also confirm the fix.

---------------------------

root@ltsp-root01:~# bcfg2 -qkv
Server failure: Protocol Error: 401 Unauthorized
Failed to download probes from bcfg2
Server Failure

oot@ltsp-root01:~# apt-get install bcfg2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  bcfg2
1 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
Need to get 89.4 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ natty-proposed/universe bcfg2 all 1.1.1-2ubuntu1.1 [89.4 kB]
1% [1 bcfg2 1,131 B/89.4 kB 1%]
Fetched 89.4 kB in 1s (79.0 kB/s)
(Reading database ... 15320 files and directories currently installed.)
Preparing to replace bcfg2 1.1.1-2ubuntu1 (using .../bcfg2_1.1.1-2ubuntu1.1_all.deb) ...
Unpacking replacement bcfg2 ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up bcfg2 (1.1.1-2ubuntu1.1) ...

root@ltsp-root01:~# bcfg2 -qkv
Running probe raid
Probe raid has result:

Running probe laptop
Probe laptop has result:
group:hw-server
server
...

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bcfg2 - 1.1.1-2ubuntu1.1

---------------
bcfg2 (1.1.1-2ubuntu1.1) natty-proposed; urgency=low

  * Fix python2.7 support (LP: #777999)
 -- Stephane Graber <email address hidden> Mon, 16 May 2011 09:20:10 -0400

Changed in bcfg2 (Ubuntu Natty):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.