Univention Bugzilla – Attachment 6609 Details for
Bug 33256
Changing empty DNS TTL on Host record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
newer version of patch
udmm.patch (text/plain), 3.22 KB, created by
Drees Dormann
on 2015-01-19 13:11 CET
(
hide
)
Description:
newer version of patch
Filename:
MIME Type:
Creator:
Drees Dormann
Created:
2015-01-19 13:11 CET
Size:
3.22 KB
patch
obsolete
>Index: univention-directory-manager-modules/modules/univention/admin/handlers/policies/pwhistory.py >=================================================================== >--- univention-directory-manager-modules/modules/univention/admin/handlers/policies/pwhistory.py (Revision 57356) >+++ univention-directory-manager-modules/modules/univention/admin/handlers/policies/pwhistory.py (Arbeitskopie) >@@ -174,9 +174,9 @@ > > mapping=univention.admin.mapping.mapping() > mapping.register('name', 'cn', None, univention.admin.mapping.ListToString) >-mapping.register('length', 'univentionPWHistoryLen', None, univention.admin.mapping.ListToString) >-mapping.register('expiryInterval', 'univentionPWExpiryInterval', None, univention.admin.mapping.ListToString) >-mapping.register('pwLength', 'univentionPWLength', None, univention.admin.mapping.ListToString) >+mapping.register('length', 'univentionPWHistoryLen', None, univention.admin.mapping.ListToIntToString) >+mapping.register('expiryInterval', 'univentionPWExpiryInterval', None, univention.admin.mapping.ListToIntToString) >+mapping.register('pwLength', 'univentionPWLength', None, univention.admin.mapping.ListToIntToString) > mapping.register('pwQualityCheck', 'univentionPWQualityCheck', None, univention.admin.mapping.ListToString) > mapping.register('requiredObjectClasses', 'requiredObjectClasses') > mapping.register('prohibitedObjectClasses', 'prohibitedObjectClasses') >Index: univention-directory-manager-modules/modules/univention/admin/mapping.py >=================================================================== >--- univention-directory-manager-modules/modules/univention/admin/mapping.py (Revision 57356) >+++ univention-directory-manager-modules/modules/univention/admin/mapping.py (Arbeitskopie) >@@ -57,6 +57,14 @@ > else: > return '' > >+def ListToIntToString(_list): >+ if len(_list)>0: >+ try: >+ return int(_list[0]) >+ except (ValueError, TypeError): >+ return '0' >+ return '0' >+ > def ListToLowerString(list): > return StringToLower(ListToString(list)) > >@@ -73,11 +81,17 @@ > if list != 'None': > return list > >-def unmapUNIX_TimeInterval( value ): >+def _stringToInt(value): >+ try: >+ return int(value) >+ except (ValueError, TypeError): >+ return 0 >+ >+def unmapUNIX_TimeInterval(value): > if type(value) == types.ListType: >- value = int(value[0]) >+ value = _stringToInt(value[0]) > else: >- value = int(value) >+ value = _stringToInt(value) > unit = 'seconds' > if value % 60 == 0: > value /= 60 >@@ -88,23 +102,23 @@ > if value % 24 == 0: > value /= 24 > unit = 'days' >- return [ unicode( value ), unit ] >+ return [unicode(value), unit] > >-def mapUNIX_TimeInterval( value ): >+def mapUNIX_TimeInterval(value): > unit = 'seconds' >- if isinstance( value, ( tuple, list ) ): >- if len( value ) > 1: >- unit = value[ 1 ] >- value = int( value[ 0 ] ) >+ if isinstance(value, (tuple, list)): >+ if len(value) > 1: >+ unit = value[1] >+ value = StringtoInt(value[0]) > else: >- value = int( value ) >+ value = _stringToInt(value) > if unit == 'days': > value *= 24 * 60 * 60 > elif unit == 'hours': > value *= 60 * 60 > elif unit == 'minutes': > value *= 60 >- return unicode( value ) >+ return unicode(value) > > def unmapBase64( value ): > '''mapBase64 converts binary data (as found in LDAP) to Base64 encoded UDM propertry values'''
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 33256
:
6608
| 6609 |
6620