-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
./configure option to select whether the "usb" backend should run as root #121
Comments
If we define a new variable like |
hello @tillkamppeter |
@surajkulriya thanks, the suggestion in your first posting looks reasonable, but the way in your second posting does not work, as filters always run unprivileged and the command line tools also need to be run by any user, so thay cannot be set with 744 mode. |
@tillkamppeter ok, User give none of these input: User give both of these options input, with maybe same or different variable User give input only User give input only What's your thoughts? Should we implement it in this way ? |
I think the simplest solution is to treat the USB backend as a run-as-root backend on all platforms besides macOS since it talks directly to local device files that, without explicit configuration, will require root access. |
@michaelrsweet OK, let us go this way. |
[master bf5f504] Install the USB backend to run as root. |
Probably most distributions make the USB raw devices for printers accessible for the "lp" user by group ownerships and permissions or by using ACLs. Probably therefore CUPS installs the "usb" backend with 755 permissions so that it gets executed as the unprivileged "lp" user.
Some distributions (at lease Debian, Ubuntu, and probably everything derived from that) run "usb" as root, simply by removing the executable bits for group and others (744) after running
make install
during the package build.The same I do in the CUPS Snap. As in the Snap I cannot create an "lp" user and group and I also cannot change ownerships and permissions of the raw USB devices from within the Snap, I need to run the "usb" backend as root. Currently I am, also changing the permissions of the backend after "make install", actually as a "prime-override" in
snapcraft.yaml
.Now I want to ask if one could add a new option to
./configure
, like--enable-usb-backend-run-as-root
to letmake install
to install the "usb" backend with 744 permissions right away.I habe looked into the
backend/Makefile
and I was not sure how to best implement this without breaking anything.The text was updated successfully, but these errors were encountered: