Johannes Meixner
Johannes Meixner
@pcahyna @lzaoral feel free to use what I further developed here so far which is all based on your foundations during https://github.com/rear/rear/pull/3171 to make whatever "get the value of a...
Since https://github.com/rear/rear/pull/3177 is merged there is a merge conflict here which I solved right now:
Via https://github.com/rear/rear/pull/3203/commits/f79454fe2101b50180ba5abf79e68d581a7cf317 I renamed the function again, now from get_shell_file_config_variable into source_variable_from_file to make it explicit that the file is sourced and to make the name less generic (no longer...
An offhanded generic idea how to avoid problems with "safely processing/interpreting untrustworthy files" or with "safely using data from untrustworthy files" or generically with "safely using untrustworthy files": My idea...
My curent `is_trustworthy_for_root` implementation is likely on the one hand too sceptical because e.g. on my openSUSE Leap 15.5 system: ``` # stat -c '%U %G %A' /etc/chrony.keys root chrony...
My current is_trustworthy_for_root is meant for files that are not ReaR files, like some shell-syntax config files. We use our Source() function only for ReaR files (hopefully - as far...
Regarding "why calling 'source'" and "why having another bash in between" see my explanations above and in particular see the history of all that in https://github.com/rear/rear/pull/3165 and https://github.com/rear/rear/pull/3171 Neither "calling...
@schlomo regarding your suggested get_shell_file_config_variable(): I think your goal is different than the goal behind the 'source' method, cf. my https://github.com/rear/rear/pull/3203#issuecomment-2056083708 therein in particular what I think what the generic...
Regarding /etc/os-release versus /usr/lib/os-release: At least on my openSUSE Leap 15.5 I have: ``` # ls -l /etc/os-release lrwxrwxrwx 1 root root ... /etc/os-release -> ../usr/lib/os-release ``` so at least...
FYI where we call 'source' in our scripts: I used the output of ``` # find usr/sbin/rear usr/share/rear/ -type f \ | xargs egrep '^source |[^$_(]source ' \ | egrep...