apparmor profile is too restrictive and sabotages gpsfake

Bug #2032802 reported by Aron Cserkaszky
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gpsd (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

gpsfake is a tool to replay gps data from a text file for testing, it is supplied with the gpsd-clients package and gpsfake and gpsd tries to communicate through a /dev/pts/* device, but apparmor blocks them

user@machine:~/gpsd_sim> gpsfake test.nmea -P 12947 -i
/usr/bin/gpsfake:21: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils import spawn
Processing test.nmea
gpsfake: log cycle of test.nmea begins.
gpsfake: line 1: $GPGGA,194546.127,5231.525,N,01323.391,E,1,12,1.0,0.0,M,0.0,M,,*6E?
gpsfake: line 2: $GPGSA,A,3,01,02,03,04,05,06,07,08,09,10,11,12,1.0,1.0,1.0*30?
gpsfake: line 3: $GPRMC,194546.127,A,5231.525,N,01323.391,E,2372.1,093.7,200220,000.0,W*40?
gpsfake: line 4: $GPGGA,194547.127,5231.456,N,01324.467,E,1,12,1.0,0.0,M,0.0,M,,*63?
gpsfake: line 5: $GPGSA,A,3,01,02,03,04,05,06,07,08,09,10,11,12,1.0,1.0,1.0*30? gpsd:ERROR: SER: device open of /dev/pts/8 failed: Permission denied - retrying read-only
gpsd:ERROR: SER: read-only device open of /dev/pts/8 failed: Permission denied
gpsd:ERROR: /dev/pts/8: device activation failed, freeing device.

gpsfake: line 6: $GPRMC,194547.127,A,5231.456,N,01324.467,E,3968.7,122.8,200220,000.0,W*4F?
gpsfake: line 7: $GPGGA,194548.127,5230.657,N,01325.713,E,1,12,1.0,0.0,M,0.0,M,,*6F?
gpsfake: line 8: $GPGSA,A,3,01,02,03,04,05,06,07,08,09,10,11,12,1.0,1.0,1.0*30?

user@machine:~> gpscsv localhost:12947
time,lat,lon,altHAE

syslog:
Aug 23 14:58:08 machine kernel: [415183.738526] audit: type=1400 audit(1692795488.630:20273): apparmor="DENIED" operation="open" class="file" profile="/usr/sbin/gpsd" name="/dev/pts/8" pid=1657911 comm="gpsd" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
Aug 23 14:58:08 machine kernel: [415183.738534] audit: type=1400 audit(1692795488.630:20274): apparmor="DENIED" operation="open" class="file" profile="/usr/sbin/gpsd" name="/dev/pts/8" pid=1657911 comm="gpsd" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000

Revision history for this message
Paride Legovini (paride) wrote :

Hello Aron and thanks for this bug report. This looks like a duplicate of LP: #1894330, which has been fixed in Hirsute but not in Focal as far as I can tell. As you running Focal? Are you able to test if the bug is fixed in Jammy?

This may be a candidate for a SRU (https://wiki.ubuntu.com/StableReleaseUpdates) to Focal, but first we need to know if we're actually speaking of LP: #1894330. Thanks.

Changed in gpsd (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for gpsd (Ubuntu) because there has been no activity for 60 days.]

Changed in gpsd (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.