[Pkg-freeipa-devel] [Git][freeipa-team/389-ds-base][master] 9 commits: Issue 4534 - libasan read buffer overflow in filtercmp (#4541)
Timo Aaltonen
gitlab at salsa.debian.org
Thu Jan 28 11:09:10 GMT 2021
Timo Aaltonen pushed to branch master at FreeIPA packaging / 389-ds-base
Commits:
e0e1803c by progier389 at 2021-01-18T15:13:32+01:00
Issue 4534 - libasan read buffer overflow in filtercmp (#4541)
(cherry picked from commit 111774dcc74f9b216f929e641bcc376f20e8c6f2)
- - - - -
552c6c68 by Mark Reynolds at 2021-01-18T09:57:35-05:00
Issue 4535 - lib389 - Fix log function in backends.py
Description: Had a typo for the log function in a lint test that
is breaking freeipa healthcheck
Relates: https://github.com/389ds/389-ds-base/issues/4535
Reviewed by: mreynolds (one line commit rule)
- - - - -
b50e7452 by Simon Pichugin at 2021-01-19T12:11:40-05:00
Issue 4513 - Fix schema test and lib389 task module (#4514)
Issue 4513 - Fix schema test and lib389 task module
Description: Fix the assertion in schema_test.py.
Make sure that all of the tasks are up to date
with the recent changes in the task API.
Relates: #4513
Reviewed by: @mreynolds389, @Firstyear (Thanks!)
- - - - -
a3534437 by Mark Reynolds at 2021-01-20T11:13:28-05:00
Issue 4548 - CLI - dsconf needs better root DN access control plugin validation
Description: There is no validation done for any of the root DN access control
plugin settings.
Relates: https://github.com/389ds/389-ds-base/issues/4548
Reviewed by: spichugi & firstyear (Thanks!!)
- - - - -
16e40086 by Mark Reynolds at 2021-01-25T14:23:07-05:00
Bump version to 1.4.4.11
- - - - -
91737952 by Timo Aaltonen at 2021-01-28T12:28:50+02:00
Merge branch 'upstream'
- - - - -
00f87311 by Timo Aaltonen at 2021-01-28T12:29:07+02:00
bump the version
- - - - -
12527457 by Timo Aaltonen at 2021-01-28T13:03:28+02:00
fix-s390x-failure.diff: Fix a crash on big-endian architectures like s390x.
- - - - -
9c480924 by Timo Aaltonen at 2021-01-28T13:03:40+02:00
releasing package 389-ds-base version 1.4.4.11-1
- - - - -
11 changed files:
- VERSION.sh
- debian/changelog
- + debian/patches/fix-s390x-failure.diff
- debian/patches/series
- dirsrvtests/tests/suites/clu/schema_test.py
- dirsrvtests/tests/suites/vlv/regression_test.py
- ldap/servers/slapd/filtercmp.c
- src/lib389/lib389/backend.py
- src/lib389/lib389/cli_conf/plugins/rootdn_ac.py
- src/lib389/lib389/tasks.py
- src/lib389/lib389/utils.py
Changes:
=====================================
VERSION.sh
=====================================
@@ -10,7 +10,7 @@ vendor="389 Project"
# PACKAGE_VERSION is constructed from these
VERSION_MAJOR=1
VERSION_MINOR=4
-VERSION_MAINT=4.10
+VERSION_MAINT=4.11
# NOTE: VERSION_PREREL is automatically set for builds made out of a git tree
VERSION_PREREL=
VERSION_DATE=$(date -u +%Y%m%d)
=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+389-ds-base (1.4.4.11-1) unstable; urgency=medium
+
+ * New upstream release.
+ * fix-s390x-failure.diff: Fix a crash on big-endian architectures like
+ s390x.
+
+ -- Timo Aaltonen <tjaalton at debian.org> Thu, 28 Jan 2021 13:03:32 +0200
+
389-ds-base (1.4.4.10-1) unstable; urgency=medium
* New upstream release.
=====================================
debian/patches/fix-s390x-failure.diff
=====================================
@@ -0,0 +1,34 @@
+commit 900e6fdcf152dd696b5ae189cb1d7c67ab143bae
+Author: tbordaz <tbordaz at redhat.com>
+Date: Thu Jan 28 10:39:31 2021 +0100
+
+ Issue 4563 - Failure on s390x: 'Fails to split RDN "o=pki-tomcat-CA" into components' (#4573)
+
+ Bug description:
+ SLAPI_OPERATION_TYPE is a stored/read as an int (slapi_pblock_get/set).
+ This although the storage field is an unsigned long.
+ Calling slapi_pblock_get with an long (8 btyes) destination creates
+ a problem on big-endian (s390x).
+
+ Fix description:
+ Define destination op_type as an int (4 bytes)
+
+ relates: https://github.com/389ds/389-ds-base/issues/4563
+
+ Reviewed by: Mark Reynolds, William Brown
+
+ Platforms tested: F31 (little endian), Debian (big endian)
+
+diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modify.c b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
+index a507f3c31..49ca01d1d 100644
+--- a/ldap/servers/slapd/back-ldbm/ldbm_modify.c
++++ b/ldap/servers/slapd/back-ldbm/ldbm_modify.c
+@@ -216,7 +216,7 @@ error:
+ int32_t
+ entry_get_rdn_mods(Slapi_PBlock *pb, Slapi_Entry *entry, CSN *csn, int repl_op, Slapi_Mods **smods_ret)
+ {
+- unsigned long op_type = SLAPI_OPERATION_NONE;
++ int op_type = SLAPI_OPERATION_NONE;
+ char *new_rdn = NULL;
+ char **dns = NULL;
+ char **rdns = NULL;
=====================================
debian/patches/series
=====================================
@@ -1,2 +1,3 @@
fix-saslpath.diff
CVE-2017-15135.patch
+fix-s390x-failure.diff
=====================================
dirsrvtests/tests/suites/clu/schema_test.py
=====================================
@@ -30,7 +30,7 @@ def test_origins_with_extra_parenthesis(topo):
'names': [ATTR_NAME],
'oid': '1.1.1.1.1.1.1.22222',
'desc': 'Test extra parenthesis in X-ORIGIN',
- 'x_origin': X_ORG_VAL,
+ 'x_origin': [X_ORG_VAL],
'syntax': '1.3.6.1.4.1.1466.115.121.1.15',
'syntax_len': None,
'x_ordered': None,
@@ -58,4 +58,3 @@ if __name__ == '__main__':
# -s for DEBUG mode
CURRENT_FILE = os.path.realpath(__file__)
pytest.main(["-s", CURRENT_FILE])
-
=====================================
dirsrvtests/tests/suites/vlv/regression_test.py
=====================================
@@ -84,8 +84,8 @@ def test_bulk_import_when_the_backend_with_vlv_was_recreated(topology_m2):
MappingTrees(M2).list()[0].delete()
Backends(M2).list()[0].delete()
# Recreate the backend and the VLV index on Master 2.
- M2.mappingtree.create(DEFAULT_SUFFIX, "userRoot")
M2.backend.create(DEFAULT_SUFFIX, {BACKEND_NAME: "userRoot"})
+ M2.mappingtree.create(DEFAULT_SUFFIX, "userRoot")
# Recreating vlvSrchDn and vlvIndexDn on Master 2.
vlv_searches.create(
basedn="cn=userRoot,cn=ldbm database,cn=plugins,cn=config",
@@ -101,6 +101,8 @@ def test_bulk_import_when_the_backend_with_vlv_was_recreated(topology_m2):
repl.test_replication(M2, M1, 30)
entries = M2.search_s(DEFAULT_SUFFIX, ldap.SCOPE_SUBTREE, "(cn=*)")
assert len(entries) > 0
+ entries = M2.search_s(DEFAULT_SUFFIX, ldap.SCOPE_SUBTREE, "(objectclass=*)")
+ entries = M2.search_s(DEFAULT_SUFFIX, ldap.SCOPE_SUBTREE, "(objectclass=*)")
if __name__ == "__main__":
=====================================
ldap/servers/slapd/filtercmp.c
=====================================
@@ -344,6 +344,7 @@ slapi_filter_compare(struct slapi_filter *f1, struct slapi_filter *f2)
struct berval *inval1[2], *inval2[2], **outval1, **outval2;
int ret;
Slapi_Attr sattr;
+ int cmplen;
slapi_log_err(SLAPI_LOG_TRACE, "slapi_filter_compare", "=>\n");
@@ -373,21 +374,26 @@ slapi_filter_compare(struct slapi_filter *f1, struct slapi_filter *f2)
}
slapi_attr_init(&sattr, f1->f_ava.ava_type);
key1 = get_normalized_value(&sattr, &f1->f_ava);
+ key2 = get_normalized_value(&sattr, &f2->f_ava);
+ ret = 1;
+ if (key1 && key2) {
+ struct berval bvkey1 = {
+ slapi_value_get_length(key1[0]),
+ slapi_value_get_string(key1[0])
+ };
+ struct berval bvkey2 = {
+ slapi_value_get_length(key2[0]),
+ slapi_value_get_string(key2[0])
+ };
+ ret = slapi_berval_cmp(&bvkey1, &bvkey2);
+ }
if (key1) {
- key2 = get_normalized_value(&sattr, &f2->f_ava);
- if (key2) {
- ret = memcmp(slapi_value_get_string(key1[0]),
- slapi_value_get_string(key2[0]),
- slapi_value_get_length(key1[0]));
- valuearray_free(&key1);
- valuearray_free(&key2);
- attr_done(&sattr);
- break;
- }
valuearray_free(&key1);
}
+ if (key2) {
+ valuearray_free(&key2);
+ }
attr_done(&sattr);
- ret = 1;
break;
case LDAP_FILTER_PRESENT:
ret = (slapi_UTF8CASECMP(f1->f_type, f2->f_type));
=====================================
src/lib389/lib389/backend.py
=====================================
@@ -527,7 +527,7 @@ class Backend(DSLdapObject):
yield report
except:
# Suffix is not replicated
- self.log.debug(f"_lint_cl_trimming - backend ({suffix}) is not replicated")
+ self._log.debug(f"_lint_cl_trimming - backend ({suffix}) is not replicated")
pass
def create_sample_entries(self, version):
=====================================
src/lib389/lib389/cli_conf/plugins/rootdn_ac.py
=====================================
@@ -6,7 +6,9 @@
# See LICENSE for details.
# --- END COPYRIGHT BLOCK ---
+import socket
from lib389.plugins import RootDNAccessControlPlugin
+from lib389.utils import is_valid_hostname
from lib389.cli_conf import add_generic_plugin_parsers, generic_object_edit
arg_to_attr = {
@@ -20,8 +22,71 @@ arg_to_attr = {
}
+def validate_args(args):
+ # validate the args
+ if args.close_time is not None:
+ try:
+ int(args.close_time)
+ except:
+ raise ValueError("The close time must be a 4 digit number: HHMM")
+ if len(args.close_time) != 4:
+ raise ValueError("The close time must be a 4 digit number: HHMM")
+ hour = int(args.close_time[:2])
+ if hour < 0 or hour > 23:
+ raise ValueError(f"The hour portion of the time is invalid: {hour} Must be between 0 and 23")
+ min = int(args.close_time[-2:])
+ if min < 0 or min > 59:
+ raise ValueError(f"The minute portion of the time is invalid: {min} Must be between 1 and 59")
+
+ if args.open_time is not None:
+ try:
+ int(args.open_time)
+ except:
+ raise ValueError("The open time must be a 4 digit number: HHMM")
+ if len(args.open_time) != 4:
+ raise ValueError("The open time must be a 4 digit number: HHMM")
+ hour = int(args.open_time[:2])
+ if hour < 0 or hour > 23:
+ raise ValueError(f"The hour portion of the time is invalid: {hour} Must be between 0 and 23")
+ min = int(args.open_time[-2:])
+ if min < 0 or min > 59:
+ raise ValueError(f"The minute portion of the time is invalid: {min} Must be between 1 and 59")
+
+ if args.days_allowed is not None:
+ valid_days = ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun']
+ choosen_days = args.days_allowed.lower().replace(' ', '').split(',')
+ for day in choosen_days:
+ if day not in valid_days:
+ raise ValueError(f"Invalid day entered ({day}), valid days are: Mon, Tue, Wed, Thu, Fri, Sat, Sun")
+
+ if args.allow_ip is not None:
+ for ip in args.allow_ip:
+ try:
+ socket.inet_aton(ip)
+ except socket.error:
+ raise ValueError(f"Invalid IP address ({ip}) for '--allow-ip'")
+
+ if args.deny_ip is not None:
+ for ip in args.deny_ip:
+ try:
+ socket.inet_aton(ip)
+ except socket.error:
+ raise ValueError(f"Invalid IP address ({ip}) for '--deny-ip'")
+
+ if args.allow_host is not None:
+ for hostname in args.allow_host:
+ if not is_valid_hostname(hostname):
+ raise ValueError(f"Invalid hostname ({hostname}) for '--allow-host'")
+
+ if args.deny_host is not None:
+ for hostname in args.deny_host:
+ if not is_valid_hostname(hostname):
+ raise ValueError(f"Invalid hostname ({hostname}) for '--deny-host'")
+
+
def rootdn_edit(inst, basedn, log, args):
log = log.getChild('rootdn_edit')
+ validate_args(args)
plugin = RootDNAccessControlPlugin(inst)
generic_object_edit(plugin, log, args, arg_to_attr)
=====================================
src/lib389/lib389/tasks.py
=====================================
@@ -512,8 +512,8 @@ class Tasks(object):
else:
self.log.info("Import task %s for file %s completed successfully",
cn, input_file)
- if warningCode:
- self.log.info("with warning code %d", warningCode)
+ if warningCode:
+ self.log.info("with warning code %d", warningCode)
self.dn = dn
self.entry = entry
return exitCode
@@ -574,8 +574,9 @@ class Tasks(object):
# start the task and possibly wait for task completion
self.conn.add_s(entry)
exitCode = 0
+ warningCode = 0
if args and args.get(TASK_WAIT, False):
- (done, exitCode) = self.conn.tasks.checkTask(entry, True)
+ (done, exitCode, warningCode) = self.conn.tasks.checkTask(entry, True)
if exitCode:
self.log.error("Error: export task %s for file %s exited with %d",
@@ -583,6 +584,8 @@ class Tasks(object):
else:
self.log.info("Export task %s for file %s completed successfully",
cn, output_file)
+ if warningCode:
+ self.log.info("with warning code %d", warningCode)
self.dn = dn
self.entry = entry
@@ -626,14 +629,17 @@ class Tasks(object):
return -1
exitCode = 0
+ warningCode = 0
if args and args.get(TASK_WAIT, False):
- (done, exitCode) = self.conn.tasks.checkTask(entry, True)
+ (done, exitCode, warningCode) = self.conn.tasks.checkTask(entry, True)
if exitCode:
self.log.error("Error: backup task %s exited with %d",
cn, exitCode)
else:
self.log.info("Backup task %s completed successfully", cn)
+ if warningCode:
+ self.log.info("with warning code %d", warningCode)
self.dn = dn
self.entry = entry
@@ -680,14 +686,17 @@ class Tasks(object):
return -1
exitCode = 0
+ warningCode = 0
if args and args.get(TASK_WAIT, False):
- (done, exitCode) = self.conn.tasks.checkTask(entry, True)
+ (done, exitCode, warningCode) = self.conn.tasks.checkTask(entry, True)
if exitCode:
self.log.error("Error: restore task %s exited with %d",
cn, exitCode)
else:
self.log.info("Restore task %s completed successfully", cn)
+ if warningCode:
+ self.log.info("with warning code %d", warningCode)
self.dn = dn
self.entry = entry
@@ -805,14 +814,17 @@ class Tasks(object):
return -1
exitCode = 0
+ warningCode = 0
if args is not None and args.get(TASK_WAIT, False):
- (done, exitCode) = self.conn.tasks.checkTask(entry, True)
+ (done, exitCode, warningCode) = self.conn.tasks.checkTask(entry, True)
if exitCode:
self.log.error("Error: index task %s exited with %d",
cn, exitCode)
else:
self.log.info("Index task %s completed successfully", cn)
+ if warningCode:
+ self.log.info("with warning code %d", warningCode)
self.dn = dn
self.entry = entry
@@ -883,8 +895,9 @@ class Tasks(object):
return -1
exitCode = 0
+ warningCode = 0
if args and args.get(TASK_WAIT, False):
- (done, exitCode) = self.conn.tasks.checkTask(entry, True)
+ (done, exitCode, warningCode) = self.conn.tasks.checkTask(entry, True)
if exitCode:
self.log.error(
@@ -894,6 +907,8 @@ class Tasks(object):
self.log.info(
"fixupMemberOf task %s for basedn %s completed successfully",
cn, suffix)
+ if warningCode:
+ self.log.info("with warning code %d", warningCode)
self.dn = dn
self.entry = entry
@@ -942,8 +957,9 @@ class Tasks(object):
return -1
exitCode = 0
+ warningCode = 0
if args and args.get(TASK_WAIT, False):
- (done, exitCode) = self.conn.tasks.checkTask(entry, True)
+ (done, exitCode, warningCode) = self.conn.tasks.checkTask(entry, True)
if exitCode:
self.log.error(
@@ -955,6 +971,8 @@ class Tasks(object):
"tombstone fixup task %s for backend %s completed "
"successfully",
cn, bename)
+ if warningCode:
+ self.log.info("with warning code %d", warningCode)
self.dn = dn
self.entry = entry
@@ -992,8 +1010,9 @@ class Tasks(object):
return -1
exitCode = 0
+ warningCode = 0
if args and args.get(TASK_WAIT, False):
- (done, exitCode) = self.conn.tasks.checkTask(entry, True)
+ (done, exitCode, warningCode) = self.conn.tasks.checkTask(entry, True)
if exitCode:
self.log.error(
@@ -1003,6 +1022,8 @@ class Tasks(object):
self.log.info(
"Automember Rebuild Membership task(%s) completed"
"successfully", cn)
+ if warningCode:
+ self.log.info("with warning code %d", warningCode)
self.dn = dn
self.entry = entry
@@ -1045,8 +1066,9 @@ class Tasks(object):
return -1
exitCode = 0
+ warningCode = 0
if args and args.get(TASK_WAIT, False):
- (done, exitCode) = self.conn.tasks.checkTask(entry, True)
+ (done, exitCode, warningCode) = self.conn.tasks.checkTask(entry, True)
if exitCode:
self.log.error(
@@ -1056,6 +1078,8 @@ class Tasks(object):
self.log.info(
"Automember Export Updates task (%s) completed successfully",
cn)
+ if warningCode:
+ self.log.info("with warning code %d", warningCode)
self.dn = dn
self.entry = entry
@@ -1093,8 +1117,9 @@ class Tasks(object):
return -1
exitCode = 0
+ warningCode = 0
if args and args.get(TASK_WAIT, False):
- (done, exitCode) = self.conn.tasks.checkTask(entry, True)
+ (done, exitCode, warningCode) = self.conn.tasks.checkTask(entry, True)
if exitCode:
self.log.error(
@@ -1103,6 +1128,8 @@ class Tasks(object):
else:
self.log.info(
"Automember Map Updates task (%s) completed successfully", cn)
+ if warningCode:
+ self.log.info("with warning code %d", warningCode)
self.dn = dn
self.entry = entry
@@ -1135,8 +1162,9 @@ class Tasks(object):
return -1
exitCode = 0
+ warningCode = 0
if args and args.get(TASK_WAIT, False):
- (done, exitCode) = self.conn.tasks.checkTask(entry, True)
+ (done, exitCode, warningCode) = self.conn.tasks.checkTask(entry, True)
if exitCode:
self.log.error(
@@ -1145,6 +1173,8 @@ class Tasks(object):
else:
self.log.info(
"Fixup Linked Attributes task (%s) completed successfully", cn)
+ if warningCode:
+ self.log.info("with warning code %d", warningCode)
self.dn = dn
self.entry = entry
@@ -1176,14 +1206,17 @@ class Tasks(object):
return -1
exitCode = 0
+ warningCode = 0
if args and args.get(TASK_WAIT, False):
- (done, exitCode) = self.conn.tasks.checkTask(entry, True)
+ (done, exitCode, warningCode) = self.conn.tasks.checkTask(entry, True)
if exitCode:
self.log.error("Error: Schema Reload task (%s) exited with %d",
cn, exitCode)
else:
self.log.info("Schema Reload task (%s) completed successfully", cn)
+ if warningCode:
+ self.log.info("with warning code %d", warningCode)
self.dn = dn
self.entry = entry
@@ -1218,8 +1251,9 @@ class Tasks(object):
return -1
exitCode = 0
+ warningCode = 0
if args and args.get(TASK_WAIT, False):
- (done, exitCode) = self.conn.tasks.checkTask(entry, True)
+ (done, exitCode, warningCode) = self.conn.tasks.checkTask(entry, True)
if exitCode:
self.log.error(
@@ -1228,6 +1262,8 @@ class Tasks(object):
else:
self.log.info(
"'memberuid task' (%s) completed successfully", cn)
+ if warningCode:
+ self.log.info("with warning code %d", warningCode)
self.dn = dn
self.entry = entry
@@ -1262,8 +1298,9 @@ class Tasks(object):
return -1
exitCode = 0
+ warningCode = 0
if args and args.get(TASK_WAIT, False):
- (done, exitCode) = self.conn.tasks.checkTask(entry, True)
+ (done, exitCode, warningCode) = self.conn.tasks.checkTask(entry, True)
if exitCode:
self.log.error("Error: Syntax Validate (%s) exited with %d",
@@ -1271,6 +1308,8 @@ class Tasks(object):
else:
self.log.info("Syntax Validate task (%s) completed successfully",
cn)
+ if warningCode:
+ self.log.info("with warning code %d", warningCode)
self.dn = dn
self.entry = entry
@@ -1310,8 +1349,9 @@ class Tasks(object):
return -1
exitCode = 0
+ warningCode = 0
if args and args.get(TASK_WAIT, False):
- (done, exitCode) = self.conn.tasks.checkTask(entry, True)
+ (done, exitCode, warningCode) = self.conn.tasks.checkTask(entry, True)
if exitCode:
self.log.error(
@@ -1320,6 +1360,8 @@ class Tasks(object):
else:
self.log.info(
"USN tombstone cleanup task (%s) completed successfully", cn)
+ if warningCode:
+ self.log.info("with warning code %d", warningCode)
self.dn = dn
self.entry = entry
@@ -1358,8 +1400,9 @@ class Tasks(object):
return -1
exitCode = 0
+ warningCode = 0
if args and args.get(TASK_WAIT, False):
- (done, exitCode) = self.conn.tasks.checkTask(entry, True)
+ (done, exitCode, warningCode) = self.conn.tasks.checkTask(entry, True)
if exitCode:
self.log.error("Error: Sysconfig Reload task (%s) exited with %d",
@@ -1367,6 +1410,8 @@ class Tasks(object):
else:
self.log.info("Sysconfig Reload task (%s) completed successfully",
cn)
+ if warningCode:
+ self.log.info("with warning code %d", warningCode)
self.dn = dn
self.entry = entry
@@ -1407,14 +1452,17 @@ class Tasks(object):
return (dn, -1)
exitCode = 0
+ warningCode = 0
if args and args.get(TASK_WAIT, False):
- (done, exitCode) = self.conn.tasks.checkTask(entry, True)
+ (done, exitCode, warningCode) = self.conn.tasks.checkTask(entry, True)
if exitCode:
self.log.error("Error: cleanAllRUV task (%s) exited with %d",
cn, exitCode)
else:
self.log.info("cleanAllRUV task (%s) completed successfully", cn)
+ if warningCode:
+ self.log.info("with warning code %d", warningCode)
self.dn = dn
self.entry = entry
@@ -1459,8 +1507,9 @@ class Tasks(object):
return (dn, -1)
exitCode = 0
+ warningCode = 0
if args and args.get(TASK_WAIT, False):
- (done, exitCode) = self.conn.tasks.checkTask(entry, True)
+ (done, exitCode, warningCode) = self.conn.tasks.checkTask(entry, True)
if exitCode:
self.log.error(
@@ -1469,6 +1518,8 @@ class Tasks(object):
else:
self.log.info(
"Abort cleanAllRUV task (%s) completed successfully", cn)
+ if warningCode:
+ self.log.info("with warning code %d", warningCode)
self.dn = dn
self.entry = entry
@@ -1510,14 +1561,17 @@ class Tasks(object):
return -1
exitCode = 0
+ warningCode = 0
if args and args.get(TASK_WAIT, False):
- (done, exitCode) = self.conn.tasks.checkTask(entry, True)
+ (done, exitCode, warningCode) = self.conn.tasks.checkTask(entry, True)
if exitCode:
self.log.error("Error: upgradedb task (%s) exited with %d",
cn, exitCode)
else:
self.log.info("Upgradedb task (%s) completed successfully", cn)
+ if warningCode:
+ self.log.info("with warning code %d", warningCode)
self.dn = dn
self.entry = entry
=====================================
src/lib389/lib389/utils.py
=====================================
@@ -1418,3 +1418,12 @@ def cmp(self, x, y):
and strictly positive if x > y.
"""
return (x > y) - (x < y)
+
+
+def is_valid_hostname(hostname):
+ if len(hostname) > 255:
+ return False
+ if hostname[-1] == ".":
+ hostname = hostname[:-1] # strip exactly one dot from the right, if present
+ allowed = re.compile("(?!-)[A-Z\d-]{1,63}(?<!-)$", re.IGNORECASE)
+ return all(allowed.match(x) for x in hostname.split("."))
View it on GitLab: https://salsa.debian.org/freeipa-team/389-ds-base/-/compare/98378d499db8dc026c24318e5976f112f5eb093e...9c4809245df97f5c9a4144b165f09d94625eb471
--
View it on GitLab: https://salsa.debian.org/freeipa-team/389-ds-base/-/compare/98378d499db8dc026c24318e5976f112f5eb093e...9c4809245df97f5c9a4144b165f09d94625eb471
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-freeipa-devel/attachments/20210128/e3514485/attachment-0001.html>
More information about the Pkg-freeipa-devel
mailing list