Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change cd to handle not readable directories: chdir+open instead of open+fchdir #10436

Closed
wants to merge 6 commits into from

Commits on Apr 11, 2024

  1. change cd to handle not readable directories: chdir+open instead of o…

    …pen+fchdir
    
    The previous code for the cd builtin used open(.., O_RDONLY) + fchdir to change the working directory.
    This fails, if the user has no read permission on the directory (but has the x permission).
    Now we first chdir and then try to open the new workin directory. this might fail,
    but in this case cd was already successful.
    
    The alternative would be to use O_PATH instead of O_RDONLY, but this is not portable.
    As an improvement, we could use O_PATH for supported platforms later.
    TheJonny committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    9f267c3 View commit details
    Browse the repository at this point in the history
  2. format

    TheJonny committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    e9d4dfa View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    07724d2 View commit details
    Browse the repository at this point in the history

Commits on Apr 12, 2024

  1. cd & Parser: reset cwd_fd if opening the working directory fails

    this prevents keeping a fd to the previous working directory
    TheJonny committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    92e46a2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5470a09 View commit details
    Browse the repository at this point in the history
  3. notice in CHANGELOG.rst

    TheJonny committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    d1ce49d View commit details
    Browse the repository at this point in the history