Re: [Vchanger-users] 'update slots' missing?!
Brought to you by:
jaybus2
|
From: Marco G. <ga...@li...> - 2022-09-12 16:10:30
|
Mandi! Marco Gaiarin
In chel di` si favelave...
> with execvp(), but i can go any further...
OK, it is not bacula-sd that do a bconsole run, but the udev scripts when an
RDX get inserted, that do a 'vchanger <conffile> refresh'.
The strange things is that udev is run by root, and with the suggestion of
some friend i've tried to 'strace' it:
root@sdpve2:~# strace -f -o /tmp/vchanger.strace /usr/bin/vchanger --force /etc/vchanger/SDPVE2RDX.conf refresh
obviously by root. result:
30533 execve("/usr/bin/vchanger", ["/usr/bin/vchanger", "--force", "/etc/vchanger/SDPVE2RDX.conf", "refresh"], 0x7ffc292bdc20 /* 20 vars */) = 0
[...]
30533 clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f43d8e37a90) = 30534
30534 execve("/usr/sbin/bconsole", ["/usr/sbin/bconsole", "-n", "-u", "30"], 0x7ffc3a659bc0 /* 20 vars */) = 0
[...]
30534 openat(AT_FDCWD, "/etc/bacula/bconsole.conf", O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission denied)
30534 openat(AT_FDCWD, "/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
30534 openat(AT_FDCWD, "/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
30534 openat(AT_FDCWD, "/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
30534 openat(AT_FDCWD, "/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
30534 openat(AT_FDCWD, "/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
30534 openat(AT_FDCWD, "/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
30534 fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
30534 write(1, "bconsole: ERROR TERMINATION at p"..., 135) = 135
30534 openat(AT_FDCWD, "/etc/localtime", O_RDONLY|O_CLOEXEC) = 4
30534 fstat(4, {st_mode=S_IFREG|0644, st_size=2692, ...}) = 0
30534 fstat(4, {st_mode=S_IFREG|0644, st_size=2692, ...}) = 0
30534 read(4, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\7\0\0\0\7\0\0\0\0"..., 3072) = 2692
30534 lseek(4, -1719, SEEK_CUR) = 973
30534 read(4, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\10\0\0\0\10\0\0\0\0"..., 3072) = 1719
30534 close(4) = 0
30534 write(1, "12-Sep 13:10 bconsole: ERROR TER"..., 148) = 148
30534 exit_group(1) = ?
30534 +++ exited with 1 +++
Very strange. Note that vchanger and bconsole are not suid:
root@sdpve2:~# ls -la /usr/bin/vchanger /usr/sbin/bconsole
-rwxr-xr-x 1 root root 142960 May 4 18:12 /usr/bin/vchanger
-rwxr-xr-x 1 root root 53072 Aug 30 2020 /usr/sbin/bconsole
and conf file permission seems good:
root@sdpve2:~# ls -la /etc/bacula/
total 62
drwxr-xr-x 3 root root 11 Jul 18 09:49 .
drwxr-xr-x 93 root root 191 Sep 11 01:22 ..
-rw-r----- 1 root bacula 1135 Jul 18 09:49 bacula-fd.conf
-rw-r----- 1 root root 1120 Jul 18 09:44 bacula-fd.conf~
-rw-r----- 1 root root 1120 Jul 18 09:44 bacula-fd.conf.dist
-rw-r----- 1 bacula bacula 3905 Jul 15 12:39 bacula-sd.conf
-rw-r----- 1 root root 9999 Jul 12 15:55 bacula-sd.conf.dist
-rw-r----- 1 root bacula 271 Jul 12 15:40 bconsole.conf
-rw-r----- 1 root root 266 Jul 12 15:39 bconsole.conf.dist
-rw------- 1 root root 500 Jul 12 15:36 common_default_passwords
drwxr-xr-x 2 root root 8 Jul 12 15:36 scripts
Note that if i explicitly set bconsole config file adding in /etc/vchanger/SDPVE2RDX.conf
the row:
bconsole config = /etc/bacula/bconsole.conf
vchanger fail early:
14655 openat(AT_FDCWD, "/var/log/vchanger/SDPVE2RDX.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = 3
14655 lseek(3, 0, SEEK_END) = 5962
14655 access("/var/spool/vchanger/SDPVE2RDX", W_OK) = 0
14655 access("/etc/bacula/bconsole.conf", R_OK) = -1 EACCES (Permission denied)
Summoning it: 'vchanger', even run by root, seems not able (EACCES,
permission Denied) to access bconsole config file.
WHY?!
--
...e andate chissa` dove per non pagar le tasse
col ghigno e l'ignoranza dei primi della classe. (F. Guccini)
|