Browse Source

opensnitch-git: fix getpwuid usage

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
master
Steven Noonan 3 years ago
parent
commit
c8717b7a20
No known key found for this signature in database GPG Key ID: 7EACB44BA7B30DB9
  1. 13
      opensnitch-git/PKGBUILD
  2. 13
      opensnitch-git/fix-uid.patch

13
opensnitch-git/PKGBUILD

@ -3,7 +3,7 @@
pkgbase=opensnitch-git
pkgname=(opensnitch-git)
pkgver=r348.980876e
pkgrel=1
pkgrel=2
pkgdesc="OpenSnitch is a GNU/Linux port of the Little Snitch application firewall."
arch=(any)
url=https://github.com/evilsocket/${pkgname%-git}
@ -15,14 +15,21 @@ depends=(go protobuf libpcap python python-pyqt5 python-netfilterqueue-git
makedepends=(git python-setuptools python-grpcio-tools)
provides=(${pkgname%-git})
conflicts=(${pkgname%-git})
source=($pkgname::git+https://github.com/evilsocket/${pkgname%-git}.git)
sha256sums=('SKIP')
source=($pkgname::git+https://github.com/evilsocket/${pkgname%-git}.git
fix-uid.patch)
sha256sums=('SKIP'
'37ca64d7b653976bfa3adacb60d629d3ef370c4a9d81db4d798fe8732a23bb7e')
pkgver() {
cd $pkgname
printf "r%s.%s" $(git rev-list --count HEAD) $(git rev-parse --short HEAD)
}
prepare() {
cd "$srcdir/$pkgname"
patch -Np1 -i "${srcdir}/fix-uid.patch"
}
build() {
export GOPATH="${srcdir}"
export PATH="$PATH:$GOPATH/bin"

13
opensnitch-git/fix-uid.patch

@ -0,0 +1,13 @@
diff --git a/ui/opensnitch/dialogs/stats.py b/ui/opensnitch/dialogs/stats.py
index 738363b..40d2a99 100644
--- a/ui/opensnitch/dialogs/stats.py
+++ b/ui/opensnitch/dialogs/stats.py
@@ -202,7 +202,7 @@ class StatsDialog(QtWidgets.QDialog, uic.loadUiType(DIALOG_UI_PATH)[0]):
if self._address is None:
for uid, hits in self._stats.by_uid.items():
try:
- pw_name = pwd.getpwall(int(uid)).pw_name
+ pw_name = pwd.getpwuid(int(uid)).pw_name
except KeyError:
pw_name = "(UID error)"
finally:
Loading…
Cancel
Save