Your message dated Sun, 17 Mar 2019 21:10:00 +0000
with message-id <[email protected]>
and subject line Re: Bug#924870: unblock: twextpy/1:0.1~git20161216.0.b90293c-1
has caused the Debian Bug report #924870,
regarding unblock: twextpy/1:0.1~git20161216.0.b90293c-1
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
924870: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=924870
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: [email protected]
Usertags: unblock

Please unblock package twextpy

An important bug had been identified against calendarserver
(Bug#923230), the fix for which lies in this package. I have also
added a minor decorator as it is the pattern used for other
Directory Services.

As I have written the NSS Directory Service, I have high confidence in
the fix for it. I have also tested my changes for calendarserver with
NSS Directory Service with the newly built package and it is working fine.

I am also attaching the source diff with this report.

unblock twextpy/1:0.1~git20161216.0.b90293c-1

-- System Information:
Debian Release: 9.8
  APT prefers stable
  APT policy: (600, 'stable'), (500, 'stable-updates')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-8-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_IN, LC_CTYPE=en_IN (charmap=UTF-8), LANGUAGE=en_IN:en 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru twextpy-0.1~git20161216.0.b90293c/debian/changelog 
twextpy-0.1~git20161216.0.b90293c/debian/changelog
--- twextpy-0.1~git20161216.0.b90293c/debian/changelog  2017-08-26 
12:23:56.000000000 +0530
+++ twextpy-0.1~git20161216.0.b90293c/debian/changelog  2019-03-18 
01:00:34.000000000 +0530
@@ -1,3 +1,10 @@
+twextpy (1:0.1~git20161216.0.b90293c-2) unstable; urgency=low
+
+  * Removed constructors for NssUserRecord and NssGroupRecord classes allowing
+    them to fallback to the constructor of their parent class (Closes: #923230)
+
+ -- Rahul Amaram <[email protected]>  Mon, 18 Mar 2019 
01:00:34 +0530
+
 twextpy (1:0.1~git20161216.0.b90293c-1) unstable; urgency=low
 
   * New upstream version from master branch commit
diff -Nru twextpy-0.1~git20161216.0.b90293c/debian/patches/nss.patch 
twextpy-0.1~git20161216.0.b90293c/debian/patches/nss.patch
--- twextpy-0.1~git20161216.0.b90293c/debian/patches/nss.patch  2017-08-26 
12:23:56.000000000 +0530
+++ twextpy-0.1~git20161216.0.b90293c/debian/patches/nss.patch  2019-03-18 
01:00:34.000000000 +0530
@@ -2,7 +2,7 @@
 calendarserver package.
 --- /dev/null
 +++ b/twext/who/nss.py
-@@ -0,0 +1,201 @@
+@@ -0,0 +1,208 @@
 +##
 +# Copyright (c) 2016 Rahul Amaram <[email protected]>
 +#
@@ -31,13 +31,15 @@
 +import PAM
 +from time import time
 +from uuid import UUID
++from zope.interface import implementer
 +
 +from twisted.internet.defer import succeed
 +from twext.python.log import Logger
 +from twistedcaldav.directory.util import uuidFromName
 +from .idirectory import (
 +    RecordType,
-+    FieldName
++    FieldName,
++    IPlaintextPasswordVerifier
 +)
 +from .index import (
 +    DirectoryService,
@@ -111,7 +113,7 @@
 +        records = set()
 +        for result in pwd.getpwall():
 +            if self._isValidUid(result[2]):
-+                record = NssUserRecord(
++                record = NssUserRecord.fromUserName(
 +                            service=self,
 +                            userName=result[0],
 +                            gecos=result[4],
@@ -121,7 +123,7 @@
 +        for result in grp.getgrall():
 +            if result[0].startswith(self.groupPrefix) and \
 +                    self._isValidGid(result[2]):
-+                record = NssGroupRecord(
++                record = NssGroupRecord.fromGroupName(
 +                            service=self,
 +                            groupName=result[0],
 +                            members=result[3]
@@ -138,11 +140,14 @@
 +        _lastRefresh = now
 +
 +
++@implementer(IPlaintextPasswordVerifier)
 +class NssUserRecord(DirectoryRecord):
 +    """
 +    NSS Users implementation of L{IDirectoryRecord}.
 +    """
-+    def __init__(self, service, userName, gecos):
++
++    @classmethod
++    def fromUserName(cls, service, userName, gecos):
 +        uid = _generateUID(service.guid, "users", userName)
 +        guid = UUID(uid)
 +        shortNames = (unicode(userName, "utf-8"),)
@@ -154,7 +159,7 @@
 +        log.debug("Creating user record with uid: %r, guid: %r, "
 +                  "shortNames: %r, fullNames: %r, emailAddresses: %r" %
 +                  (uid, guid, shortNames, fullNames, emailAddresses))
-+        super(NssUserRecord, self).__init__(service,  dict([
++        return cls(service,  dict([
 +            (FieldName.recordType, service.recordType.user),
 +            (FieldName.uid, uid),
 +            (FieldName.guid, guid),
@@ -185,7 +190,9 @@
 +    """
 +    NSS Groups implementation of L{IDirectoryRecord}.
 +    """
-+    def __init__(self, service, groupName, members=()):
++
++    @classmethod
++    def fromGroupName(cls, service, groupName, members=()):
 +        groupNameWithoutPrefix = groupName.replace(service.groupPrefix, '', 1)
 +        uid = _generateUID(service.guid, "groups", groupNameWithoutPrefix)
 +        guid = UUID(uid)
@@ -195,7 +202,7 @@
 +        log.debug("Creating group record with uid: %r, guid: %r, "
 +                  "shortNames: %r, memberUIDs: %r" %
 +                  (uid, guid, shortNames, memberUIDs))
-+        super(NssGroupRecord, self).__init__(service, dict([
++        return cls(service, dict([
 +            (FieldName.recordType, service.recordType.group),
 +            (FieldName.uid, uid),
 +            (FieldName.guid, guid),

--- End Message ---
--- Begin Message ---
Rahul Amaram:
> Package: release.debian.org
> Severity: normal
> User: [email protected]
> Usertags: unblock
> 
> Please unblock package twextpy
> 
> An important bug had been identified against calendarserver
> (Bug#923230), the fix for which lies in this package. I have also
> added a minor decorator as it is the pattern used for other
> Directory Services.
> 
> As I have written the NSS Directory Service, I have high confidence in
> the fix for it. I have also tested my changes for calendarserver with
> NSS Directory Service with the newly built package and it is working fine.
> 
> I am also attaching the source diff with this report.
> 
> unblock twextpy/1:0.1~git20161216.0.b90293c-1
> 
> [...]

Unblocked, thanks.
~Niels

--- End Message ---

Reply via email to