#51086 Improve dscreate instance name validation
Closed: wontfix by spichugi. Opened by spichugi.

Issue Description

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.
Also, it doesn't sanitize the instance name, it's possible to create an instance with non-ascii symbols in its name.

Steps to reproduce

  1. dscreate create-template > test.inf
  2. Replace instance_name with the name containing emoji or any other non-ascii characters, for example, Cyrillic.
  3. Replace instance_name with the name containing >100 characters

Actual results

  1. Success
  2. The instance is successfully created but fails to start.
  3. The socket file name is truncated.

Expected results

  1. Success
    2-3. The socket filename length and content are properly validated during dscreate.

Metadata Update from @spichugi:
- Issue assigned to spichugi

Metadata Update from @spichugi:
- Custom field origin adjusted to None
- Custom field reviewstatus adjusted to None
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1748244 https://bugzilla.redhat.com/show_bug.cgi?id=1748227

Metadata Update from @mreynolds:
- Issue priority set to: normal
- Issue set to the milestone: 1.4.1

https://pagure.io/389-ds-base/pull-request/51097

75e3b867d..e0e2db1de master -> origin/master
62cc505f2..cba77de52 389-ds-base-1.4.1 -> 389-ds-base-1.4.1
50f3f34d7..bbfaf7cdd 389-ds-base-1.4.2 -> 389-ds-base-1.4.2
23e0d6490..c03f549bd 389-ds-base-1.4.3 -> 389-ds-base-1.4.3

Metadata Update from @spichugi:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

632a8e085..d5c9c4e61 master -> origin/master
b5d3327ce..a91592d55 389-ds-base-1.4.1 -> 389-ds-base-1.4.1
d6ca851eb..f2dc78ad6 389-ds-base-1.4.2 -> 389-ds-base-1.4.2
7c089195f..e036c6097 389-ds-base-1.4.3 -> 389-ds-base-1.4.3

Metadata Update from @spichugi:
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1748244, https://bugzilla.redhat.com/show_bug.cgi?id=1748227 (was: https://bugzilla.redhat.com/show_bug.cgi?id=1748244 https://bugzilla.redhat.com/show_bug.cgi?id=1748227)

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/4139

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: fixed)

Metadata