cups-pk-helper issueshttps://gitlab.freedesktop.org/cups-pk-helper/cups-pk-helper/-/issues2024-01-19T19:54:01Zhttps://gitlab.freedesktop.org/cups-pk-helper/cups-pk-helper/-/issues/130.2.7: test suite is failing2024-01-19T19:54:01ZTomasz Kłoczko0.2.7: test suite is failingLooks like test suite is failing
```
+ cd cups-pk-helper-0.2.7
+ /usr/bin/meson test -C x86_64-redhat-linux-gnu --num-processes 48 --print-errorlogs
ninja: Entering directory `/home/tkloczko/rpmbuild/BUILD/cups-pk-helper-0.2.7/x86_64-red...Looks like test suite is failing
```
+ cd cups-pk-helper-0.2.7
+ /usr/bin/meson test -C x86_64-redhat-linux-gnu --num-processes 48 --print-errorlogs
ninja: Entering directory `/home/tkloczko/rpmbuild/BUILD/cups-pk-helper-0.2.7/x86_64-redhat-linux-gnu'
ninja: no work to do.
1/2 test-cups FAIL 0.03s exit status 1
>>> MALLOC_PERTURB_=234 G_TEST_SRCDIR=/home/tkloczko/rpmbuild/BUILD/cups-pk-helper-0.2.7/src G_TEST_BUILDDIR=/home/tkloczko/rpmbuild/BUILD/cups-pk-helper-0.2.7/x86_64-redhat-linux-gnu/src /home/tkloczko/rpmbuild/BUILD/cups-pk-helper-0.2.7/x86_64-redhat-linux-gnu/src/test-cups
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ✀ ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
stderr:
** (process:761021): CRITICAL **: 07:45:06.834: Failed to connect to cupsd
(process:761021): GLib-GObject-CRITICAL **: 07:45:06.834: Custom constructor for class CphCups returned NULL (which is invalid). Please use GInitable instead.
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
2/2 test-cups-pk OK 0.10s
Summary of Failures:
1/2 test-cups FAIL 0.03s exit status 1
Ok: 1
Expected Fail: 0
Fail: 1
Unexpected Pass: 0
Skipped: 0
Timeout: 0
```https://gitlab.freedesktop.org/cups-pk-helper/cups-pk-helper/-/issues/12Should `test-cups` and `test-cups-pk` be run in `meson test`?2022-09-07T02:09:12ZMatt TurnerShould `test-cups` and `test-cups-pk` be run in `meson test`?`test-cups` and `test-cups-pk` were listed as `noinst_PROGRAMS` in autotools, and were not run as a part of `make check`.
Under meson, they are run during `meson test`, and apparently require privileges:
````
1/2 test-cups OK ...`test-cups` and `test-cups-pk` were listed as `noinst_PROGRAMS` in autotools, and were not run as a part of `make check`.
Under meson, they are run during `meson test`, and apparently require privileges:
````
1/2 test-cups OK 0.01s
02:04:13 MALLOC_PERTURB_=176 G_TEST_BUILDDIR=/var/tmp/portage/net-print/cups-pk-helper-0.2.7/work/cups-pk-helper-0.2.7-build/src G_TEST_SRCDIR=/var/tmp/portage/net-print/cups-pk-helper-0.2.7/work/cups-pk-helper-0.2.7/src /var/tmp/portage/net-print/cups-pk-helper-0.2.7/work/cups-pk-helper-0.2.7-build/src/test-cups
----------------------------------- output -----------------------------------
ouch: client-error-forbidden
------------------------------------------------------------------------------
2/2 test-cups-pk OK 4.18s
02:04:13 MALLOC_PERTURB_=59 G_TEST_BUILDDIR=/var/tmp/portage/net-print/cups-pk-helper-0.2.7/work/cups-pk-helper-0.2.7-build/src G_TEST_SRCDIR=/var/tmp/portage/net-print/cups-pk-helper-0.2.7/work/cups-pk-helper-0.2.7/src /var/tmp/portage/net-print/cups-pk-helper-0.2.7/work/cups-pk-helper-0.2.7-build/src/test-cups-pk
----------------------------------- output -----------------------------------
Error: GDBus.Error:org.opensuse.CupsPkHelper.Mechanism.NotPrivileged: Not Authorized for action: org.opensuse.cupspkhelper.mechanism.printer-remote-edit
------------------------------------------------------------------------------
````
I think these should probably *not* be run as part of `meson test`, unless there's a way to run them without requiring elevated privileges.https://gitlab.freedesktop.org/cups-pk-helper/cups-pk-helper/-/issues/110.2.7: org.opensuse.CupsPkHelper.Mechanism.conf not installed?2022-08-28T19:21:27ZTomasz Kłoczko0.2.7: org.opensuse.CupsPkHelper.Mechanism.conf not installed?Looks liek src/org.opensuse.CupsPkHelper.Mechanism.conf file sis not installed.
Is that intentional? :thinking:Looks liek src/org.opensuse.CupsPkHelper.Mechanism.conf file sis not installed.
Is that intentional? :thinking:https://gitlab.freedesktop.org/cups-pk-helper/cups-pk-helper/-/issues/9Updating the freedesktop wiki2020-11-28T20:11:43ZAlberto Salvia NovellaUpdating the freedesktop wikiThe [wiki](http://www.freedesktop.org/wiki/Software/cups-pk-helper) still points to the old resources. I would update it.
Just linking to the Gitlab readme would be good enough, less duplicate work.The [wiki](http://www.freedesktop.org/wiki/Software/cups-pk-helper) still points to the old resources. I would update it.
Just linking to the Gitlab readme would be good enough, less duplicate work.https://gitlab.freedesktop.org/cups-pk-helper/cups-pk-helper/-/issues/8Removing the GitHub instance2020-11-28T19:08:52ZAlberto Salvia NovellaRemoving the GitHub instanceThere's an outdated [GitHub instance](https://github.com/freedesktop/cups-pk-helper) for this project. I would remove it.There's an outdated [GitHub instance](https://github.com/freedesktop/cups-pk-helper) for this project. I would remove it.https://gitlab.freedesktop.org/cups-pk-helper/cups-pk-helper/-/issues/7Results of setegid()/setegid() not checked2020-02-24T15:57:21ZLaurent BigonvilleResults of setegid()/setegid() not checkedHello,
It seems tha the results of setegid()/setegid() are not checked:
```
cups.c: In function ‘_cph_cups_set_effective_id’:
cups.c:582:25: error: ignoring return value of ‘setegid’, declared with attribute warn_unused_result [-Werror...Hello,
It seems tha the results of setegid()/setegid() are not checked:
```
cups.c: In function ‘_cph_cups_set_effective_id’:
cups.c:582:25: error: ignoring return value of ‘setegid’, declared with attribute warn_unused_result [-Werror=unused-result]
582 | setegid (getgid ());
| ^~~~~~~~~~~~~~~~~~~
cups.c:592:25: error: ignoring return value of ‘setegid’, declared with attribute warn_unused_result [-Werror=unused-result]
592 | setegid (getgid ());
| ^~~~~~~~~~~~~~~~~~~
cups.c: In function ‘_cph_cups_reset_effective_id’:
cups.c:610:9: error: ignoring return value of ‘seteuid’, declared with attribute warn_unused_result [-Werror=unused-result]
610 | seteuid (getuid ());
| ^~~~~~~~~~~~~~~~~~~
cups.c:611:9: error: ignoring return value of ‘setegid’, declared with attribute warn_unused_result [-Werror=unused-result]
611 | setegid (getgid ());
| ^~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
```
According to the man page this is a grave security error:
> Note: there are cases where seteuid() can fail even when the caller is UID 0; it is a grave security error to omit checking for a failure return from seteuid().https://gitlab.freedesktop.org/cups-pk-helper/cups-pk-helper/-/issues/6cups-pk-helper-mechanism sometime sigabrt in g_variant_valist_new_nnp2019-01-10T14:48:52ZSebastiencups-pk-helper-mechanism sometime sigabrt in g_variant_valist_new_nnpThe issue gets regular reports in Ubuntu (and has been reported in other distributions like fedora), it's still an issue with 0.2.6. The report have no specific description of how to trigger it though
Stacktrace (from a 0.2.5 report)
`...The issue gets regular reports in Ubuntu (and has been reported in other distributions like fedora), it's still an issue with 0.2.6. The report have no specific description of how to trigger it though
Stacktrace (from a 0.2.5 report)
```
#0 0x00007f045e394afb in _g_log_abort (breakpoint=1) at /build/glib2.0-7ZsPUq/glib2.0-2.48.2/./glib/gmessages.c:325
No locals.
#1 g_logv (log_domain=0x7f045e3d588e "GLib", log_level=G_LOG_LEVEL_ERROR, format=<optimized out>, args=args@entry=0x7ffff9d812f0) at /build/glib2.0-7ZsPUq/glib2.0-2.48.2/./glib/gmessages.c:1080
domain = 0x0
data = 0x0
depth = 1
log_func = 0x7f045e3942c0 <g_log_default_handler>
domain_fatal_mask = <optimized out>
masquerade_fatal = 0
test_level = <optimized out>
was_fatal = <optimized out>
was_recursion = <optimized out>
msg = 0x558a5e4f0a00 "g_variant_new: expected GVariant of type 'a{ss}' but received value has type '(null)'"
msg_alloc = 0x558a5e4f0a00 "g_variant_new: expected GVariant of type 'a{ss}' but received value has type '(null)'"
i = 2
#2 0x00007f045e394c6f in g_log (log_domain=log_domain@entry=0x7f045e3d588e "GLib", log_level=log_level@entry=G_LOG_LEVEL_ERROR, format=format@entry=0x7f045e4305c0 "g_variant_new: expected GVariant of type '%s' but received value has type '%s'") at /build/glib2.0-7ZsPUq/glib2.0-2.48.2/./glib/gmessages.c:1119
args = <error reading variable args (Attempt to dereference a generic pointer.)>
#3 0x00007f045e3c5f9b in g_variant_valist_new_nnp (str=0x7ffff9d81558, ptr=0x0) at /build/glib2.0-7ZsPUq/glib2.0-2.48.2/./glib/gvariant.c:4722
__func__ = "g_variant_valist_new_nnp"
#4 0x00007f045e3c7576 in g_variant_valist_new_leaf (app=0x7ffff9d81580, str=0x7ffff9d81558) at /build/glib2.0-7ZsPUq/glib2.0-2.48.2/./glib/gvariant.c:4878
No locals.
#5 g_variant_valist_new (str=str@entry=0x7ffff9d81558, app=app@entry=0x7ffff9d81580) at /build/glib2.0-7ZsPUq/glib2.0-2.48.2/./glib/gvariant.c:5060
__func__ = "g_variant_valist_new"
#6 0x00007f045e3c75fb in g_variant_valist_new (str=str@entry=0x7ffff9d81558, app=app@entry=0x7ffff9d81580) at /build/glib2.0-7ZsPUq/glib2.0-2.48.2/./glib/gvariant.c:5112
b = {x = {0, 94052775945760, 0, 0, 0, 18446744073709551615, 94052776130192, 8, 1, 2, 1033660112, 0, 0, 0, 0, 0}}
__func__ = "g_variant_valist_new"
#7 0x00007f045e3c7a92 in g_variant_new_va (format_string=0x558a5d88034b "a{ss})", endptr=0x0, app=0x7ffff9d81580) at /build/glib2.0-7ZsPUq/glib2.0-2.48.2/./glib/gvariant.c:5288
value = <optimized out>
#8 0x00007f045e3c7d0d in g_variant_new (format_string=format_string@entry=0x558a5d880348 "(s@a{ss})") at /build/glib2.0-7ZsPUq/glib2.0-2.48.2/./glib/gvariant.c:5223
ap = <error reading variable ap (Attempt to dereference a generic pointer.)>
__func__ = "g_variant_new"
#9 0x0000558a5d87d2a8 in cph_iface_mechanism_complete_devices_get (object=object@entry=0x558a5e4e5890, invocation=invocation@entry=0x7f044c009920, error=<optimized out>, devices=<optimized out>) at cph-iface-mechanism.c:6737
No locals.
#10 0x0000558a5d879c53 in cph_mechanism_devices_get (object=0x558a5e4e5890, context=0x7f044c009920, timeout=<optimized out>, limit=<optimized out>, include_schemes=0x558a5e4ca620, exclude_schemes=0x558a5e4cb4c0) at cups-pk-helper-mechanism.c:704
mechanism = 0x558a5e4e5890
ret = 0
devices = 0x0
#11 0x00007f045d07fe40 in ffi_call_unix64 () at ../src/x86/unix64.S:76
No locals.
```https://gitlab.freedesktop.org/cups-pk-helper/cups-pk-helper/-/issues/2Deleting or stopping print jobs does not work2018-10-12T21:17:06ZBugzilla Migration UserDeleting or stopping print jobs does not work## Submitted by Eso..@..il.com
Assigned to **Marek Kasik `@mkasik`**
**[Link to original bug (#107740)](https://bugs.freedesktop.org/show_bug.cgi?id=107740)**
## Description
I forward the information from this bug report here:
htt...## Submitted by Eso..@..il.com
Assigned to **Marek Kasik `@mkasik`**
**[Link to original bug (#107740)](https://bugs.freedesktop.org/show_bug.cgi?id=107740)**
## Description
I forward the information from this bug report here:
https://bugs.launchpad.net/ubuntu/+source/cups-pk-helper/+bug/934291
Deleting or stopping print jobs through the "gnome-control-center -> printers" menu is not possible.
(Black rectangle for stopping can be pressed, nothing happens.)
Deleting with cups via webinterface does work. ( http://localhost:631/ )
[Impact]
The most intuitive way for users to maintain printers and look after print jobs is the printing part of the GNOME Control Center. As this tool makes use of cups-pk-helper for authentication, a lot of its functionality is not working dur to the non-working in cups-pk-helper package.
This way a key functionality in Ubuntu Desktop is not working which may people turn away from Linux on the desktop.
[Test Case]
Do job operations (remove, move to other printer, ...) with print jobs using the printing tool of GNOME Control Center ("Devices" -> "Printers"). You will see that most or all of these operations do not work.https://gitlab.freedesktop.org/cups-pk-helper/cups-pk-helper/-/issues/4autoconf: Don't use deprecated GNOME_ macros2020-02-24T15:57:21ZBugzilla Migration Userautoconf: Don't use deprecated GNOME_ macros## Submitted by Guido Guenther
Assigned to **Marek Kasik `@mkasik`**
**[Link to original bug (#97016)](https://bugs.freedesktop.org/show_bug.cgi?id=97016)**
## Description
Created attachment 125206
Drop deprecated (and unused) GNO...## Submitted by Guido Guenther
Assigned to **Marek Kasik `@mkasik`**
**[Link to original bug (#97016)](https://bugs.freedesktop.org/show_bug.cgi?id=97016)**
## Description
Created attachment 125206
Drop deprecated (and unused) GNOME_MAINTAINER_MODE_DEFINES
The attached patches get rid of GNOME_COMPILE_WARNINGS [1] and GNOME_MAINTAINER_MODE_DEFINES . Follow up patches fix the warnings spotted by the usage of AX_COMPILER_FLAGS.
[1]: https://git.gnome.org/browse/gnome-common/commit/?id=b57bae0be
**Patch 125206**, "Drop deprecated (and unused) GNOME_MAINTAINER_MODE_DEFINES":
[0001-Drop-deprecated-and-unused-GNOME_MAINTAINER_MODE_DEF.patch](/uploads/4da3c6253d422a139f559d980dfbdfbd/0001-Drop-deprecated-and-unused-GNOME_MAINTAINER_MODE_DEF.patch)Marek KasikMarek Kasikhttps://gitlab.freedesktop.org/cups-pk-helper/cups-pk-helper/-/issues/5Support authentication for SMB/other queues2018-10-12T21:17:21ZBugzilla Migration UserSupport authentication for SMB/other queues## Submitted by Michael Gratton
Assigned to **Marek Kasik `@mkasik`**
**[Link to original bug (#68636)](https://bugs.freedesktop.org/show_bug.cgi?id=68636)**
## Description
Currently, to send jobs to an SMB print queue that requir...## Submitted by Michael Gratton
Assigned to **Marek Kasik `@mkasik`**
**[Link to original bug (#68636)](https://bugs.freedesktop.org/show_bug.cgi?id=68636)**
## Description
Currently, to send jobs to an SMB print queue that requires authentication the user's credentials must be encoded in clear text in the URL for the printer as configured in CUPS I.e.:
smb://username:password@host/queue
Without this, CUPS reports the error "Session setup failed: NT_STATUS_UNSUCCESSFUL" for all jobs.
This is clearly quite suboptimal. It would be great if cups-pk-helper would prompt the user for credentials when needed, per OS X.Marek KasikMarek Kasikhttps://gitlab.freedesktop.org/cups-pk-helper/cups-pk-helper/-/issues/1adding printer: root password required for console user in wheel group2018-10-12T21:16:53ZBugzilla Migration Useradding printer: root password required for console user in wheel group## Submitted by Scott Doty
Assigned to **Marek Kasik `@mkasik`**
**[Link to original bug (#46943)](https://bugs.freedesktop.org/show_bug.cgi?id=46943)**
## Description
This bug would appear to be the one Linus Torvalds was gretchi...## Submitted by Scott Doty
Assigned to **Marek Kasik `@mkasik`**
**[Link to original bug (#46943)](https://bugs.freedesktop.org/show_bug.cgi?id=46943)**
## Description
This bug would appear to be the one Linus Torvalds was gretching about w/respect to his daughter adding a printer at school.
While checking this, I was logged in on the console, in an Xfce session, with my primary username on the system (which was, and is in the "wheel" group).
See screenshots of dialogues I encountered:
http://ponzo.net/PolKit-printer/
-Scotthttps://gitlab.freedesktop.org/cups-pk-helper/cups-pk-helper/-/issues/3Set requesting user name for requests2018-10-12T21:17:11ZBugzilla Migration UserSet requesting user name for requests## Submitted by Vincent Untz `@vuntz`
Assigned to **Marek Kasik `@mkasik`**
**[Link to original bug (#46890)](https://bugs.freedesktop.org/show_bug.cgi?id=46890)**
## Description
We have a nice and simple _cph_cups_add_requesting_...## Submitted by Vincent Untz `@vuntz`
Assigned to **Marek Kasik `@mkasik`**
**[Link to original bug (#46890)](https://bugs.freedesktop.org/show_bug.cgi?id=46890)**
## Description
We have a nice and simple _cph_cups_add_requesting_user_name() function to do this.
See [bug 45304](https://bugs.freedesktop.org/show_bug.cgi?id=45304) comment 4 for the rationale.