On 10/02/2012 08:23 PM, Rob Crittenden wrote:
> Clear the host session key when enrolling a client.
> Make sure dbdir is preserved when a new connection is created.
> rob

I tested repeatedly installing, uninstalling client and unlike previously, I
did not receive any NSS initialization error. Other test were also OK for me,
so generally I agree with the patch.

I just see one potential issue in this section:

+                if (current_conn is not None and
+                  hasattr(current_conn.conn._ServerProxy__transport, 'dbdir')):
+                    dbdir = current_conn.conn._ServerProxy__transport.dbdir
+                    self.debug('Using dbdir %s' % dbdir)

If I understand that correctly, dbdir attribute in
current_conn.conn._ServerProxy__transport may be changed by other thread, i.e.
I would rather do something like that:

if current_conn is not None:
    dbdir = getattr(current_conn.conn._ServerProxy__transport, 'dbdir', None)
    if dbdir is not None:
        self.debug('Using dbdir %s' % dbdir)

I did not reproduce that, but I'd be afraid that some other thread may remove
'dbdir' right after our hasattr check, so the next statement would fail.


Freeipa-devel mailing list

Reply via email to