#3078 use the ERROR and PRINT macros consistently
Closed: Fixed by pbrezina. Opened by jhrozek.

we have macros like ERROR and PRINT in the tools code but sometimes also just call printf or fprintf. We should choose one or the other and stick with it.


Fields changed

milestone: NEEDS_TRIAGE => SSSD Deferred

Fields changed

rhbz: => 0

Metadata Update from @jhrozek:
- Issue set to the milestone: SSSD Patches welcome

https://github.com/SSSD/sssd/pull/902

Commit f24e5ab5 fixes this issue

  • master
    • f24e5ab53f820ed230ac785c85ef6ac4c96b7350 - Added ERROR and PRINT macros to the tools

Metadata Update from @pbrezina:
- Custom field design_review reset (from 0)
- Custom field mark reset (from 0)
- Custom field patch reset (from 0)
- Custom field review reset (from 0)
- Custom field sensitive reset (from 0)
- Custom field testsupdated reset (from 0)

Metadata Update from @mzidek:
- Custom field design_review adjusted to on (was: false)
- Custom field mark adjusted to on (was: false)
- Custom field patch adjusted to on (was: false)
- Custom field review adjusted to on (was: false)
- Custom field sensitive adjusted to on (was: false)
- Custom field testsupdated adjusted to on (was: false)
- Issue status updated to: Open (was: Closed)

I am reopening this because there still are printf and fprintf used in SSSD where PRINT and ERROR could be used.

Sorry I did not check the issue associated with the PR and though it was only about the sss_tools.c

So this needs one or few more patches still.

Ahg... those are not strings we translate. Closing again. Sorry for the spam :D

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

What about sssctl_domains.c:

puts(_("None so far.\n"));

?

There is also:

sssctl/sssctl_cert.c:            puts(name);
sssctl/sssctl_cert.c:        puts(" - no mapped users found -");
sssctl/sssctl_domains.c:        puts(name);

but those are not wrapped in _() so not so sure...

Metadata Update from @atikhonov:
- Issue status updated to: Open (was: Closed)

This can be changed to PRINT

puts(_("None so far.\n"));

This cannot be changed to PRINT:

sssctl/sssctl_cert.c:            puts(name);
sssctl/sssctl_domains.c:        puts(name);

This can be changed to PRINT if we want to translate the string (makes sense IMO):

sssctl/sssctl_cert.c:        puts(" - no mapped users found -");

@mzidek I can make those changes if you want.

@mzidek I can make those changes if you want.

Ok, if you send patches, we will review them. Thanks.

@mzidek done. PR https://github.com/SSSD/sssd/pull/910

Metadata Update from @atikhonov:
- Issue tagged with: PR

Commit 258e9a55 fixes this issue

  • master
    • 258e9a5587e2e8beebb79ef2cd230e7e92edf02f - Added PRINT macro in the sssctl tool

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/4111

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