Well thanks to Jack Woehr and Kevin Adler I got a handle around this.
Looks like the only hole is the incorrect reporting of the home directory to the QSH job that I call when it’s called from bash.
I ended up retrieving the user’s home dir from CL and adding a HOME environment variable and that worked around ths issue.
Definitely an interesting one.
Regards,
Richard Schoen
Web:
http://www.richardschoen.net<
http://www.richardschoen.net/>
Email: richard@xxxxxxxxxxxxxxxxx<mailto:richard@xxxxxxxxxxxxxxxxx>
Phn: (612) 315-1745
From: Richard Schoen
Sent: Tuesday, September 03, 2019 1:03 PM
To: midrange-l@xxxxxxxxxxxxxxxxxx
Subject: RE: Interesting Thing with SSH, bash and Qshell.Pase Calls and Qsecofr User
The CL commands already work from a standard IBMi job and also works if I set up a .gitconfig profile for QSECOFR before the command runs from bash.
I guess that may be the answer. You have to set up a default git profile for QSECOFR if you want to use the commands from SSH/bash.
Seems like a security hole, but since nobody has given me a workaround for compromising QSECOFR with SSH that will be the documented solution for now 😊
Regards,
Richard Schoen
Web:
http://www.richardschoen.net<
http://www.richardschoen.net/>
Email: richard@xxxxxxxxxxxxxxxxx<mailto:richard@xxxxxxxxxxxxxxxxx>
Phn: (612) 315-1745
------------------------------------
You could have the CL write the results of its logic to a Db2 file and then
read the results from the original bash script
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
Richard Schoen
Sent: Tuesday, September 3, 2019 12:19 AM
I have a bash command line process where I am calling a CL command which
calls several pase commands via STRQSH from the CL command.
As an Amazon Associate we earn from qualifying purchases.