Skip to content

Add BrowseIPPSOnly boolean directive and update man page#1564

Open
abubakarsabir924-cell wants to merge 5 commits intoOpenPrinting:masterfrom
abubakarsabir924-cell:fix/auth-failure-log-level
Open

Add BrowseIPPSOnly boolean directive and update man page#1564
abubakarsabir924-cell wants to merge 5 commits intoOpenPrinting:masterfrom
abubakarsabir924-cell:fix/auth-failure-log-level

Conversation

@abubakarsabir924-cell
Copy link
Copy Markdown
Contributor

@abubakarsabir924-cell abubakarsabir924-cell commented May 1, 2026

Added the BrowseIPPSOnly directive in conf.c and conf.h.
Implemented the filtering logic in scheduler/dirsvc.c for both registration and deregistration.
Verified that the code compiles successfully with make.
Updated the manual page cupsd.conf.5 with the new directive description.
The implementation ensures only IPPS services are advertised when the directive is enabled.

@abubakarsabir924-cell abubakarsabir924-cell force-pushed the fix/auth-failure-log-level branch from a0aa34e to 7367e78 Compare May 1, 2026 02:37
@abubakarsabir924-cell
Copy link
Copy Markdown
Contributor Author

@michaelrsweet Sir! I have updated the PR with the following changes:
Added the BrowseIPPSOnly directive in conf.c and conf.h.
Implemented the filtering logic in scheduler/dirsvc.c for both registration and deregistration.
Verified that the code compiles successfully with make.
Updated the manual page cupsd.conf.5 with the new directive description.
The implementation ensures only IPPS services are advertised when the directive is enabled.

@abubakarsabir924-cell abubakarsabir924-cell force-pushed the fix/auth-failure-log-level branch 6 times, most recently from b3396be to a9f84a7 Compare May 1, 2026 04:40
@michaelrsweet michaelrsweet self-assigned this May 1, 2026
@michaelrsweet michaelrsweet added the enhancement New feature or request label May 1, 2026
@michaelrsweet michaelrsweet added this to the v2.5 milestone May 1, 2026
@michaelrsweet michaelrsweet linked an issue May 1, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Member

@michaelrsweet michaelrsweet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some changes needed here...

The biggest thing seems to be testing BrowseIPPSOnly and the printer type to completely disable registration/deregistration. You want to test BrowseIPPSOnly in the dnssdRegisterPrinter function to determine whether to add the _ipp or _fax-ipp services but otherwise that should be all that is needed.

Comment thread man/cupsd.conf.5
Comment thread scheduler/dirsvc.c Outdated
Comment thread scheduler/dirsvc.c Outdated
Comment thread scheduler/dirsvc.c Outdated
@abubakarsabir924-cell
Copy link
Copy Markdown
Contributor Author

abubakarsabir924-cell commented May 1, 2026

Ok Michael Sir, thank you for the detailed feedback!
Regarding the use of raw hex numbers: I initially used them because I ran into some compilation issues on GitHub with the constant, and I used the hex value as a temporary workaround. However, I completely understand why the constants are necessary for the codebase.
I am now updating the PR to remove the extern declaration, add the anchor comments in the man page, and move the logic into dnssdRegisterPrinter using the CUPS_PTYPE_xxx constants as you suggested.

I will ping you once the updated changes are ready for review. Thank you for your guidance sir!

@abubakarsabir924-cell abubakarsabir924-cell force-pushed the fix/auth-failure-log-level branch from a9f84a7 to 3a81e14 Compare May 1, 2026 15:47
@abubakarsabir924-cell
Copy link
Copy Markdown
Contributor Author

abubakarsabir924-cell commented May 1, 2026

@michaelrsweet Sir. I've moved the logic to the beginning of dnssdRegisterPrinter, replaced raw hex with CUPS_PTYPE_REMOTE, and added the man page anchor as requested.

Copy link
Copy Markdown
Member

@michaelrsweet michaelrsweet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still need some changes...

Comment thread scheduler/dirsvc.c Outdated
Comment thread scheduler/dirsvc.c
@abubakarsabir924-cell
Copy link
Copy Markdown
Contributor Author

Sir @michaelrsweet I've updated the PR with these specific fixes:
Comment Restored: Added the missing comment in cupsdDeregisterPrinter.

Logic Cleaned: Removed the redundant check on line 481.

Correct Wrapper: Wrapped the standard _ipp registration with if (!BrowseIPPSOnly) while keeping _ipps unconditional.

Verified: Confirmed the build works perfectly with make.

Please review and let me know if any further adjustments are needed to meet the project's standards,

@abubakarsabir924-cell
Copy link
Copy Markdown
Contributor Author

Sir Also, I just pushed an additional commit to initialize the num_txt and txt variables. This fixes the 'uninitialized variable' error that was causing the CI build to fail. Now the build should be green!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cupsd: Allow IPPS-only printer sharing

2 participants