Uploaded image for project: 'EJBCA'
  1. EJBCA
  2. ECA-8160

ejbca.sh does not detect current working directory correctly

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: EJBCA 7.2.0
    • Component/s: None
    • Labels:
    • Sprint:
      EJBCA Team Bob - 2019 w18

      Description

      When running ejbca.sh with a file as argument, EJBCA CLI does not use the current working directory correctly, i.e

      > pwd
      /foo
      /opt/ejbca/bin/ejbca.sh -f bar should be identical to /opt/ejbca/bin/ejbca.sh -f /foo/bar but it is not.

      This leads to some unexpected results when doing tab completion and breaks at least one AMI script.

      Example of command not working:

      > ~/.workspace/ejbca/bin/ejbca.sh ca importcacert --caname "GlobalSign Extended Validation CodeSigning CA" -f gsextendcodesignsha2g3ocsp.crt 
      Error: gsextendcodesignsha2g3ocsp.crt was not a file, not found or could otherwise not be opened.
      > ls | grep gsextendcodesignsha2g3ocsp.crt 
      gsextendcodesignsha2g3ocsp.crt
      

      echo $PWD in the ejbca.sh script returns /home/bastian/.workspace/ejbca in this case which is wrong.

      > pwd
      /home/bastian/Downloads
      

      Basically, the problem is the `cd` inside the ejbca.sh script.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bastianf Bastian Fredriksson
              Reporter:
              bastianf Bastian Fredriksson
              Verified by:
              Samuel Lidén Borell
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 3 hours Original Estimate - 3 hours
                  3h
                  Remaining:
                  Time Spent - 46 minutes Remaining Estimate - 2 hours, 35 minutes
                  2h 35m
                  Logged:
                  Time Spent - 46 minutes Remaining Estimate - 2 hours, 35 minutes
                  46m