#2248 SSSD fails to start if sssd.conf does not end with '\n'
Closed: Invalid None Opened 10 years ago by preichl.

SSSD fails to start if sssd.conf does not end with new line.

Some editors such as vim defaultly appends new line at the end of the file which is IMO reason this bug was not noticed before.

hexdump -C /etc/sssd/sssd.conf
...
000001b0  31 32 30 30 30                                    |12000|

/usr/sbin/sssd -i -d 4
[sssd] [confdb_init_db] (0x0010): Parse error reading configuration file [/etc/sssd/sssd.conf]
Parsing errors and warnings in file: /etc/sssd/sssd.conf
Error (1) on line 18: Data is too long.
[sssd] [load_configuration] (0x0010): ConfDB initialization has failed [Input/output error]
[sssd] [main] (0x0020): Error loading configuration database: [5]: Input/output error

SSSD starts normally when sssd.conf ends with '\n'.

hexdump -C /etc/sssd/sssd.conf
...
000001b0  31 32 30 30 30 0a                                 |12000.|

Please attach an example config file.

Please attach an example config file.

Please attach an example config file.

I should have noticed that this is happening just on RHEL 6.5. Sorry for that.

This behaviour was same on both clean installation:

# rpm -qf /usr/sbin/sssd
sssd-1.9.2-129.el6.x86_64

# rpm -qf /usr/lib64/compiz/libini.so
compiz-0.8.2-24.el6.x86_64

# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.5 (Santiago)

and after update of sssd:

# rpm -qf /usr/sbin/sssd
sssd-common-1.11.2-40.el6.x86_64

# rpm -qf /usr/lib64/compiz/libini.so
compiz-0.8.2-24.el6.x86_64

# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.5 (Santiago)

I should have noticed that this is happening just on RHEL 6.5. Sorry for that.

This behaviour was same on both clean installation:

# rpm -qf /usr/sbin/sssd
sssd-1.9.2-129.el6.x86_64

# rpm -qf /usr/lib64/compiz/libini.so
compiz-0.8.2-24.el6.x86_64

# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.5 (Santiago)

and after update of sssd:

# rpm -qf /usr/sbin/sssd
sssd-common-1.11.2-40.el6.x86_64

# rpm -qf /usr/lib64/compiz/libini.so
compiz-0.8.2-24.el6.x86_64

# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.5 (Santiago)

I should have noticed that this is happening just on RHEL 6.5. Sorry for that.

This behaviour was same on both clean installation:

# rpm -qf /usr/sbin/sssd
sssd-1.9.2-129.el6.x86_64

# rpm -qf /usr/lib64/compiz/libini.so
compiz-0.8.2-24.el6.x86_64

# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.5 (Santiago)

and after update of sssd:

# rpm -qf /usr/sbin/sssd
sssd-common-1.11.2-40.el6.x86_64

# rpm -qf /usr/lib64/compiz/libini.so
compiz-0.8.2-24.el6.x86_64

# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.5 (Santiago)

config file not ending with '\n'
sssd.conf

config file not ending with '\n'
sssd.conf

config file not ending with '\n'
sssd.conf

I did some investigation and even tried to port the fix from the later version. One thing to another it starts the whole chain of changes. Bottom line - the new parsing implementation can't be easily back ported. The new implementation uses getline() and allocates memory dynamically while old implementation uses fgets() and static buffers. Old function reads and parses right away but new function is much more structured. One function reads and completely different does parsing.

The changes become to drastic. I think it is not worth it.
Suggest close this issue as addressed in the latest version of the libini.

I did some investigation and even tried to port the fix from the later version. One thing to another it starts the whole chain of changes. Bottom line - the new parsing implementation can't be easily back ported. The new implementation uses getline() and allocates memory dynamically while old implementation uses fgets() and static buffers. Old function reads and parses right away but new function is much more structured. One function reads and completely different does parsing.

The changes become to drastic. I think it is not worth it.
Suggest close this issue as addressed in the latest version of the libini.

I did some investigation and even tried to port the fix from the later version. One thing to another it starts the whole chain of changes. Bottom line - the new parsing implementation can't be easily back ported. The new implementation uses getline() and allocates memory dynamically while old implementation uses fgets() and static buffers. Old function reads and parses right away but new function is much more structured. One function reads and completely different does parsing.

The changes become to drastic. I think it is not worth it.
Suggest close this issue as addressed in the latest version of the libini.

It is already fixed in latest version so closing.

milestone: NEEDS_TRIAGE => Tools 1.0.1
resolution: => wontfix
status: new => closed

It is already fixed in latest version so closing.

milestone: NEEDS_TRIAGE => Tools 1.0.1
resolution: => wontfix
status: new => closed

It is already fixed in latest version so closing.

milestone: NEEDS_TRIAGE => Tools 1.0.1
resolution: => wontfix
status: new => closed

Metadata Update from @preichl:
- Issue set to the milestone: Tools 1.0.1

7 years ago

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

This issue has been cloned to Github and is available here:
- https://github.com/SSSD/sssd/issues/3290

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.

Login to comment on this ticket.

Metadata