[Bug 1860729] Review Request: wshowkeys - Displays keypresses on screen on supported Wayland compositors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1860729



--- Comment #5 from Bob Hepple <bob.hepple@xxxxxxxxx> ---
Cool - that stopped the compiler error.

This is now the code:


        if (setgid(getgid()) != 0) {
                fprintf(stderr, "devmgr: setgid: %s\n", strerror(errno));
                return 1;
        }
        if (setuid(getuid()) != 0) {
                fprintf(stderr, "devmgr: setuid: %s\n", strerror(errno));
                return 1;
        }
        if (setgroups(0, NULL) != -1) {
                fprintf(stderr, "devmgr: failed to drop root\n");
                return 1;
        }
        if (setuid(0) != -1) {
                fprintf(stderr, "devmgr: failed to drop root\n");
                return 1;
        }

The program works as before but rpmlint still complains:

$ rpmlint
/home/bhepple/rpmbuild/RPMS/x86_64/wshowkeys-0-3.20200727git6388a49.fc31.x86_64.rpm
wshowkeys.x86_64: W: spelling-error %description -l en_US wlr -> war, SLR
wshowkeys.x86_64: W: spelling-error %description -l en_US eg -> eh, e, g
wshowkeys.x86_64: W: spelling-error %description -l en_US monospace -> mono
space, mono-space, aerospace
wshowkeys.x86_64: E: missing-call-to-setgroups-before-setuid /usr/bin/wshowkeys
wshowkeys.x86_64: E: setuid-binary /usr/bin/wshowkeys root 4711
wshowkeys.x86_64: E: non-standard-executable-perm /usr/bin/wshowkeys 4711
wshowkeys.x86_64: E: non-standard-executable-perm /usr/bin/wshowkeys 4711
wshowkeys.x86_64: W: no-manual-page-for-binary wshowkeys
1 packages and 0 specfiles checked; 4 errors, 4 warnings.

Since I'm fumbling in the dark here, I also tried this:


        if (setgroups(0, NULL) != -1) {
                fprintf(stderr, "devmgr: failed to drop root\n");
                return 1;
        }
        if (setgid(getgid()) != 0) {
                fprintf(stderr, "devmgr: setgid: %s\n", strerror(errno));
                return 1;
        }
        if (setuid(getuid()) != 0) {
                fprintf(stderr, "devmgr: setuid: %s\n", strerror(errno));
                return 1;
        }
        if (setuid(0) != -1) {
                fprintf(stderr, "devmgr: failed to drop root\n");
                return 1;
        }

... but no joy


-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/package-review@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite Conditions]     [KDE Users]

  Powered by Linux