home-assistant / home-assistant/supervisor

Backups open and read /etc/passwd and /etc/group for each file that is added

Open
#4,252 4 comments 0 reactions 1 assignee View on GitHub

@mdegat01 is already working on this.

Since Apr 27, 2023.

new-feature stale
Dominant language
Python
Stars
2.2k
Forks
807
Avg merge
1d 6h
Merged PRs (30d)
55

Description

Describe the issue you are experiencing

strace sample:

[pid   108] newfstatat(AT_FDCWD, "/data/homeassistant/yalexs-ble/.git/refs/tags/v1.9.7", {st_mode=S_IFREG|0644, st_size=41, ...}, 0) = 0
[pid   108] newfstatat(AT_FDCWD, "/data/homeassistant/yalexs-ble/.git/refs/tags/v1.9.7", {st_mode=S_IFREG|0644, st_size=41, ...}, AT_SYMLINK_NOFOLLOW) = 0
[pid   108] openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 39
[pid   108] fcntl(39, F_SETFD, FD_CLOEXEC) = 0
[pid   108] fcntl(39, F_SETFD, FD_CLOEXEC) = 0
[pid   108] read(39, "root:x:0:0:root:/root:/bin/ash\nb"..., 1024) = 1024
[pid   108] lseek(39, -993, SEEK_CUR)   = 31
[pid   108] close(39)                   = 0
[pid   108] openat(AT_FDCWD, "/etc/group", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 39
[pid   108] fcntl(39, F_SETFD, FD_CLOEXEC) = 0
[pid   108] fcntl(39, F_SETFD, FD_CLOEXEC) = 0
[pid   108] read(39, "root:x:0:root\nbin:x:1:root,bin,d"..., 1024) = 697
[pid   108] lseek(39, -683, SEEK_CUR)   = 14
[pid   108] close(39)                   = 0
[pid   108] openat(AT_FDCWD, "/data/homeassistant/yalexs-ble/.git/refs/tags/v1.9.7", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 39
[pid   108] fcntl(39, F_SETFD, FD_CLOEXEC) = 0
[pid   108] fstat(39, {st_mode=S_IFREG|0644, st_size=41, ...}) = 0
[pid   108] ioctl(39, TIOCGWINSZ, 0xffff87b3a5a8) = -1 ENOTTY (Not a tty)
[pid   108] lseek(39, 0, SEEK_CUR)      = 0
[pid   108] read(39, "7c7682ec8049bac41e02e62a041f6ba7"..., 4096) = 41
[pid   108] close(39)                   = 0
[pid   108] newfstatat(AT_FDCWD, "/data/homeassistant/yalexs-ble/.git/refs/tags/v2.1.11", {st_mode=S_IFREG|0644, st_size=41, ...}, 0) = 0
[pid   108] newfstatat(AT_FDCWD, "/data/homeassistant/yalexs-ble/.git/refs/tags/v2.1.11", {st_mode=S_IFREG|0644, st_size=41, ...}, AT_SYMLINK_NOFOLLOW) = 0
[pid   108] openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 39
[pid   108] fcntl(39, F_SETFD, FD_CLOEXEC) = 0
[pid   108] fcntl(39, F_SETFD, FD_CLOEXEC) = 0
[pid   108] read(39, "root:x:0:0:root:/root:/bin/ash\nb"..., 1024) = 1024
[pid   108] lseek(39, -993, SEEK_CUR)   = 31
[pid   108] close(39)                   = 0
[pid   108] openat(AT_FDCWD, "/etc/group", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 39
[pid   108] fcntl(39, F_SETFD, FD_CLOEXEC) = 0
[pid   108] fcntl(39, F_SETFD, FD_CLOEXEC) = 0
[pid   108] read(39, "root:x:0:root\nbin:x:1:root,bin,d"..., 1024) = 697
[pid   108] lseek(39, -683, SEEK_CUR)   = 14
[pid   108] close(39)                   = 0
[pid   108] openat(AT_FDCWD, "/data/homeassistant/yalexs-ble/.git/refs/tags/v2.1.11", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 39
[pid   108] fcntl(39, F_SETFD, FD_CLOEXEC) = 0
[pid   108] fstat(39, {st_mode=S_IFREG|0644, st_size=41, ...}) = 0
[pid   108] ioctl(39, TIOCGWINSZ, 0xffff87b3a5a8) = -1 ENOTTY (Not a tty)
[pid   108] lseek(39, 0, SEEK_CUR)      = 0
[pid   108] read(39, "a7897b0faf087779b377d351f03ddb5a"..., 4096) = 41
[pid   108] close(39)                   = 0
[pid   108] newfstatat(AT_FDCWD, "/data/homeassistant/yalexs-ble/.git/refs/tags/v1.9.3", {st_mode=S_IFREG|0644, st_size=41, ...}, 0) = 0
[pid   108] newfstatat(AT_FDCWD, "/data/homeassistant/yalexs-ble/.git/refs/tags/v1.9.3", {st_mode=S_IFREG|0644, st_size=41, ...}, AT_SYMLINK_NOFOLLOW) = 0
What type of installation are you running?

Home Assistant OS

Which operating system are you running on?

Home Assistant Operating System

Steps to reproduce the issue

Do a back, strace the supervisor python process

Anything in the Supervisor logs that might be useful for us?
n/a
System Health information

n/a

Supervisor diagnostics

No response

Additional information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.