-
Bug
-
Resolution: Done
-
Minor
-
None
-
6.2.14
Description of problem:
In some companies that sudo rule is forbidden.
/usr/bin/katello-backup
~~~
...
def validate_directory
unless system("sudo -u postgres test -w #
puts "***cancelled***"
puts "Postgres user needs write access to the backup directory"
puts "Please select a directory, such as /tmp or /var/tmp which allows Postgres write access"
cleanup
end
end
...
~~~
Version-Release number of selected component (if applicable):
Would also resolve the issue for:
https://bugzilla.redhat.com/show_bug.cgi?id=1540382
Proposed patch:
~~~
# gendiff /usr/bin/ .bkp
diff -up /usr/bin/katello-backup.bkp /usr/bin/katello-backup
— /usr/bin/katello-backup.bkp 2018-04-26 15:25:34.514218862 +0100
+++ /usr/bin/katello-backup 2018-04-26 15:27:36.528155663 +0100
@@ -286,7 +286,7 @@ def backup_config_files
end
def validate_directory
- unless system("sudo -u postgres test -w #{@dir}
")
+ unless system("su - postgres -c 'test -w #
'")
puts "***cancelled***"
puts "Postgres user needs write access to the backup directory"
puts "Please select a directory, such as /tmp or /var/tmp which allows Postgres write access"
~~~
- external trackers