Skip to content

SELinux file context on /etc/resolv.conf #283

@43qcc2cn

Description

@43qcc2cn

Describe the bug
Starting an initial connection breaks the SELinux file context on /etc/resolv.conf.

OS and app information:

To Reproduce
Steps to reproduce the behavior:

  1. Install package.
  2. Login.
  3. Connect.
  4. Disconnect.

File context before:

-rw-r--r--. 1 root root system_u:object_r:net_conf_t:s0 55 Dec 10 13:29 /etc/resolv.conf

File context after:

ls -alZ /etc/resolv.conf*
-rw-r--r--. 1 root root system_u:object_r:tmp_t:s0 25 Dec 10 13:46 /etc/resolv.conf
-rw-r--r--. 1 root root system_u:object_r:etc_t:s0 55 Dec 10 13:37 /etc/resolv.conf.default

As far as I can see, the "/opt/windscribe/scripts/update-network-manager" script copies and moves files around but doesn't take SELinux into account.

Fix suggestions:

  • Change "cp" commands to "cp -a".
  • Add "restorecon -F" commands after "mv" commands.

Expected behavior
The SELinux file context on /etc/resolv.conf should be unchanged.

Debug log or username
N/A.

Screenshots
N/A.

Additional context
Unknown.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions