Bug 1222505

Summary: ckermit: cannot create lock file in /var/lock
Product: [openSUSE] openSUSE Distribution Reporter: Christian Eggers <ceggers>
Component: OtherAssignee: Ruediger Oertel <ro>
Status: NEW --- QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: aloisio, joop.boonen, simonf.lees
Version: Leap 15.6   
Target Milestone: ---   
Hardware: x86-64   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Christian Eggers 2024-04-09 07:25:52 UTC
Kermit needs to create a lock file for the used serial port (e.g. /dev/ttyUSB0) under /var/lock (symlink to /run/lock). Until Leap 15.5, that directory was owned by group "lock", so it was sufficient to add the current user to the "lock" group. But now the directory is owned by group "root", so using the "lock" group is not sufficient anymore.

Reproducible: Always

Steps to Reproduce:
1. Add current user to "dialout" group (and create re-login after that).
2. Ensure that step 1. was successful (e.g. by using the "id" command).
3. kermit -l /dev/ttyUSB0

Actual Results:  
Kermit gives an error "can't open device". Using "set line /dev/ttyUSB0" in kermit's interactive mode gives a more precise error message:

"Sorry, write access to UUCP lockfile directory denied."

Expected Results:  
kermit should have created the lock file and open /dev/ttyUSB0

A workaround is to change the group of /run/lock to "dialout" (and to add the current user to this group). But this change is lost after every reboot.

Possibly related to https://bugzilla.opensuse.org/show_bug.cgi?id=624290 ("ckermit from contrib repository does not use lockdev, so cannot write to /var/lock").

The packet installed is:
$ rpm -q ckermit --info
Name        : ckermit
Version     : 9.0.302
Release     : 150000.3.3.1
Architecture: x86_64
Install Date: Mo 08 Apr 2024 09:44:42 CEST
Group       : Hardware/Modem
Size        : 2621762
License     : BSD-3-Clause
Signature   : RSA/SHA256, Fr 01 Apr 2022 13:39:36 CEST, Key ID 70af9e8139db7c82
Source RPM  : ckermit-9.0.302-150000.3.3.1.src.rpm
Build Date  : Fr 01 Apr 2022 13:39:14 CEST
Build Host  : goat10
Relocations : (not relocatable)
Packager    : https://www.suse.com/
Vendor      : SUSE LLC <https://www.suse.com/>
URL         : http://www.kermitproject.org/
Summary     : A Combined Serial and Network Communication Software Package
Description :
C-Kermit is a combined serial and network communication software
package offering a consistent, medium-independent, and cross-platform
approach to connection establishment, terminal sessions, file transfer,
character-set translation, and automation of communication tasks.
Distribution: SUSE Linux Enterprise 15
Comment 1 Christian Eggers 2024-04-11 11:03:24 UTC
minicom is also affected.
Comment 2 Ruediger Oertel 2024-05-21 15:35:34 UTC
are all packages affected from https://bugzilla.suse.com/show_bug.cgi?id=1212801
since lockdev was dropped ?
Comment 3 Ruediger Oertel 2024-05-21 15:39:54 UTC
adding minicom bugowner
Comment 4 Ruediger Oertel 2024-05-21 15:44:24 UTC
uucp is using a patch to directly lock the device
https://build.opensuse.org/projects/openSUSE:Factory/packages/uucp/files/uucp-1.07-locking.patch?expand=1 migth be an approach