RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1748227 - Instance name length is not enforced
Summary: Instance name length is not enforced
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: 389-ds-base
Version: 8.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Simon Pichugin
QA Contact: RHDS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-03 08:02 UTC by Viktor Ashirov
Modified: 2020-11-04 03:07 UTC (History)
6 users (show)

Fixed In Version: 389-ds-1.4-8030020200805152009.618f7055
Doc Type: Bug Fix
Doc Text:
Instance name length is enforced now. We should mention in our documentation that the instance name should be equal or less than 80 symbols.
Clone Of:
Environment:
Last Closed: 2020-11-04 03:07:13 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 4139 0 None None None 2020-09-13 22:30:06 UTC
Red Hat Product Errata RHEA-2020:4695 0 None None None 2020-11-04 03:07:30 UTC

Description Viktor Ashirov 2019-09-03 08:02:15 UTC
Description of problem:
When creating an instance using dscreate, it doesn't enforce max name length. 
The ldapi socket name contains name of the instance. If it's too long, we can hit limits, and the file name will be truncated.

Version-Release number of selected component (if applicable):
389-ds-base-1.4.1.3-5.module+el8.1.0+3776+ece1ae4c.x86_64


How reproducible:
always

Steps to Reproduce:
1. dscreate with instance name containing >100 characters
2. 
3.

Actual results:
[root@server-rhel8 ds]# dscreate from-file test.inf

Starting installation...
Created symlink /etc/systemd/system/multi-user.target.wants/dirsrv → /usr/lib/systemd/system/dirsrv@.service.
Completed installation for 1234567890abcdefghijlmnopqrstuvwxyz1234567890abcdefghijlmnopqrstuvwxyz1234567890abcdefghijlmnopqrstuvwxyz1234567890abcdefghijlmnopqrstuvwxyz1234567890abcdefghijlmnopqrstuvwxyz1234567890abcdefghijlmnopqrstuvwxyz


[root@server-rhel8 ds]# ls /var/run/slapd-* 
/var/run/slapd-1234567890abcdefghijlmnopqrstuvwxyz1234567890abcdefghijlmnopqrstuvwxyz1234567890abcdefgh
[root@server-rhel8 ds]# echo -n $(ls /var/run/slapd-*) | wc -c  
103


Expected results:
dscreate should limit the name length.

Additional info:

Comment 1 Simon Pichugin 2020-05-13 08:55:14 UTC
https://pagure.io/389-ds-base/issue/51086

Comment 5 Viktor Ashirov 2020-07-22 10:11:57 UTC
Build tested: 389-ds-base-1.4.3.8-4.module+el8.3.0+7193+dfd1e8ad.x86_64

When I do a silent install, the error message is displayed: 
# dscreate from-file test.inf
Starting installation...
Error: Server identifier should not be longer than 80 symbols


But when I do interactive install, it is displayed only after asking all other questions:
[root@server-rhel8 ds]# dscreate interactive
Install Directory Server (interactive mode)
===========================================
selinux is disabled, will not relabel ports or files.

Selinux support will be disabled, continue? [yes]:

Enter system's hostname [server-rhel8.example.com]:

Enter the instance name [server-rhel8]: 1234567890abcdefghijlmnopqrstuvwxyz1234567890abcdefghijlmnopqrstuvwxyz1234567890abcdefghijlmnopqrstuvwxyz1234567890abcdefghijlmnopqrstuvwxyz1234567890abcdefghijlmnopqrstuvwxyz1234567890abcdefghijlmnopqrstuvwxyz

Enter port number [389]:

Create self-signed certificate database [yes]:

Enter secure port number [636]:

Enter Directory Manager DN [cn=Directory Manager]:

Enter the Directory Manager password:
Confirm the Directory Manager Password:

Enter the database suffix (or enter "none" to skip) [dc=server-rhel8,dc=example,dc=com]:

Create sample entries in the suffix [no]:

Create just the top suffix entry [no]:

Do you want to start the instance after the installation? [yes]:

Are you ready to install? [no]: yes
Starting installation...
Error: Server identifier should not be longer than 80 symbols


But when for some other checks like spaces or non-ascii characters, it is displayed immediately:
https://pagure.io/389-ds-base/blob/master/f/src/lib389/lib389/instance/setup.py#_310

Enter the instance name [server-rhel8]: f f
Server identifier can not contain a space


I think it should be consistent and be displayed right after entering the value.
Moving to ASSIGNED.

Comment 7 Viktor Ashirov 2020-08-07 07:25:58 UTC
Build tested: 389-ds-base-1.4.3.8-5.module+el8.3.0+7569+08175a8a.x86_64

dscreate interactive
...

Enter the instance name [server-rhel8]: 1234567890abcdefghijlmnopqrstuvwxyz1234567890abcdefghijlmnopqrstuvwxyz1234567890abcdefghijlmnopqrstuvwxyz1234567890abcdefghijlmnopqrstuvwxyz1234567890abcdefghijlmnopqrstuvwxyz1234567890abcdefghijlmnopqrstuvwxyz
Server identifier should not be longer than 80 symbols

...

The warning shows immediately. Marking as VERIFIED.

Comment 10 errata-xmlrpc 2020-11-04 03:07:13 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (389-ds:1.4 bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2020:4695


Note You need to log in before you can comment on or make changes to this bug.