Skip to content

Conversation

@dwolstroRH
Copy link
Contributor

When a "Generic Upload" is encountered (meaning a
non-implemented distribution) and the upload directory
is not specified, fail with a helpful error message (the
upload would previously fail on permissions as it tries
to write to the root directory of sftp).

Related: RHEL-124680


Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines

  • Is the commit message split over multiple lines and hard-wrapped at 72 characters?
  • Is the subject and message clear and concise?
  • Does the subject start with [plugin_name] if submitting a plugin patch or a [section_name] if part of the core sosreport code?
  • Does the commit contain a Signed-off-by: First Lastname email@example.com?
  • Are any related Issues or existing PRs properly referenced via a Closes (Issue) or Resolved (PR) line?
  • Are all passwords or private data gathered by this PR obfuscated?

	When a "Generic Upload" is encountered (meaning a
	non-implemented distribution) and the upload directory
	is not specified, fail with a helpful error message (the
	upload would previously fail on permissions as it tries
	to write to the root directory of sftp).

Related: RHEL-124680

Signed-off-by: David Wolstromer <dwolstro@redhat.com>
@packit-as-a-service
Copy link

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/sosreport-sos-4167
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

@TurboTurtle
Copy link
Member

I don't know that we want to impose this as an always-fail situation.

In the case of a configured ChrootDirectory, the session will automatically switch to the user's home dir after applying the chroot. This means that it is entirely a valid configuration to not specify a directory and at the same time properly expect that the file being transferred end up in the ssh user's homedir instead of the rootdir of the sftp session.

This change would prevent an upload in such a configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants