cytopia / linux-timemachine

Rsync-based OSX-like time machine for Linux, MacOS and BSD for atomic and resumable local and remote backups
MIT License
780 stars 63 forks source link

Release v1.3 #66

Closed cytopia closed 3 years ago

cytopia commented 3 years ago

Release v1.3

Ensure that $PATH variable is explicitly set, so that you can't overwrite it from outside.

Without setting

The exported $PATH will only be valid/scoped within the script itself and will not effect the outside environment. So with this set, I've tried the path manipulation again:

$ PATH= ./timemachine
2021-04-01 12:26:35 timemachine: [ERROR] <source> and <destination> are required. See -h for help.

So this looks like it is fixing the issue of overriding the path from outside.

Note: In the above export PATH example, I've not specified any sbin/ directories, as they're not required for this script. So overall that should be pretty save, as a user won't be able to write to those directories