On 10.06.2016 17:14, Florence Blanc-Renaud wrote:
Hi,
I am working on a bug linked to a trailing / in a directory name. It
looks like hardcoded paths for directories sometimes contain the
trailing / but not always (for instance dsinstance.config_dirname()
returns something like
'/etc/dirsrv/slapd-DOM-221-ABC-IDM-LAB-ENG-BRQ-REDHAT-COM*/*' while
HTTPD_ALIAS_DIR = "/etc/httpd/alias").
So my question is: is there a rule inside FreeIPA to use the directory
name with the / or not? For most of the tools, it doesn't matter but
when looking for a cert monitored by certmonger it is important. I
think that a consistent rule would also avoid ugly logs with double
slashes in the file names.
Flo.
Hello,
we don't have any rule on how to represent directory name, but with
using proper python tools, this should not be issue, for manipulation
with paths should be used os.path module, for example
os.path.join('directory', 'file')
if trailing slash is an issue with certmonger, you can use
os.path.normpath()
If you see any double slashes please file a tickets for them, or provide
patch if it is quickfix.
HTH
Martin^2
--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code