oravirt / ansible-oracle-modules

Oracle modules for Ansible
MIT License
214 stars 159 forks source link

Wrong owner in oracle_opatch procedure get_file_owner #101

Closed Rendanic closed 5 years ago

Rendanic commented 5 years ago

There is an issue with the procedure during execution of oracle_opatch in Grid-Infrastructure 18c. The executable sqlplus is owned by root.

-rwsr-s--x. 1 oracle oinstall 414625240 May 3 09:57 oracle -rwxr-xr-x. 1 root oinstall 25336 May 3 09:51 sqlplus

It is better to check against the oracle binary.

def get_file_owner(module, msg, oracle_home):
...

-    ownership on ORACLE_HOME/bin/sqlplus.
+    ownership on ORACLE_HOME/bin/oracle.
     returns the owner
     '''

-    checkfile = '%s/bin/sqlplus' % (oracle_home)
+    checkfile = '%s/bin/oracle' % (oracle_home)

I am still working on the PR.