Skip to content

Commit 8f911eb

Browse files
committed
perform radical pkexecectomy
1 parent 47dd104 commit 8f911eb

7 files changed

+5
-43
lines changed

ChangeLog

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# Copyright (c) 2022 Greg Kroah-Hartman <[email protected]>
44
#
55

6+
version 3.0.x
7+
- remove now-unnecessary policykit/pkexec support
8+
69
version 3.0
710
- remove need for debugfs/usbdevfs/usbfs file entirely, rely only on
811
sysfs now. This removes the need to run the program as root, which

Makefile.am

-6
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,13 @@ interface.o: $(icon_bitmaps_xpm)
2828

2929
EXTRA_DIST = $(man_MANS) usbview_icon.svg usbview.desktop \
3030
usbview_logo.xcf \
31-
org.freedesktop.pkexec.usbview.policy \
3231
LICENSES/GPL-2.0-only.txt
3332

3433
desktopdir = $(datadir)/applications
3534
if DESKTOP
3635
desktop_DATA = usbview.desktop
3736
endif
3837

39-
polkitactiondir = $(datadir)/polkit-1/actions
40-
if POLKIT
41-
polkitaction_DATA = org.freedesktop.pkexec.usbview.policy
42-
endif
43-
4438
icondir = $(datadir)/icons
4539

4640
icon_bitmaps_png = \

configure.ac

-8
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@ AC_ARG_ENABLE(desktop,
2727
[desktop=yes])
2828
AC_MSG_RESULT([$desktop])
2929

30-
AC_MSG_CHECKING([whether to try to install policykit file])
31-
AC_ARG_ENABLE(polkit,
32-
[AS_HELP_STRING([--enable-policykit],[try to install policykit file (default=yes)])],
33-
[polkit=$enableval],
34-
[polkit=yes])
35-
AC_MSG_RESULT([$polkit])
36-
3730
# Checks for programs.
3831

3932
AC_PROG_CC
@@ -49,7 +42,6 @@ AS_IF([test "$have_convert" = "no"],
4942
icons=no])
5043

5144
AM_CONDITIONAL(DESKTOP,[test x${desktop} = xyes])
52-
AM_CONDITIONAL(POLKIT,[test x${polkit} = xyes])
5345
AM_CONDITIONAL(ICONS,[test x${icons} = xyes])
5446

5547
# Checks for libraries.

main.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,8 @@
1616
int main (int argc, char *argv[])
1717
{
1818
GtkWidget *window1;
19-
gboolean is_pkexec = getenv("PKEXEC_UID") != NULL;
2019

21-
// only evalute command line parameters if not running in pkexec
22-
// privilege escalation context to avoid potential attack vectors
23-
gtk_init (is_pkexec ? NULL : &argc, is_pkexec ? NULL : &argv);
20+
gtk_init (&argc, &argv);
2421

2522
initialize_stuff();
2623

org.freedesktop.pkexec.usbview.policy

-18
This file was deleted.

usbview.desktop

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Name=USBView
33
GenericName=USB Device Viewer
44
Comment=View USB devices attached to system
5-
Exec=pkexec /usr/bin/usbview
5+
Exec=usbview
66
Icon=usbview
77
Terminal=false
88
Type=Application

usbview.spdx

-6
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,6 @@ LicenseConcluded: NOASSERTION
147147
LicenseInfoInFile: GPL-2.0-only
148148
FileCopyrightText: <text>Copyright (c) 1999, 2000 by Greg Kroah-Hartman, <[email protected]></text>
149149

150-
FileName: ./org.freedesktop.pkexec.usbview.policy
151-
SPDXID: SPDXRef-e1edd9361c0b2f7f3a558b68a2678aa1
152-
FileChecksum: SHA1: 0b4c127e5936771ffe64804894c307167d2cd258
153-
LicenseConcluded: NOASSERTION
154-
FileCopyrightText: NONE
155-
156150
FileName: ./sysfs.c
157151
SPDXID: SPDXRef-63056d996de2c47eaf5023eb00f93cce
158152
FileChecksum: SHA1: a2233ef39597b84d31656e763859e31eb2f11a0b

0 commit comments

Comments
 (0)