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

Two problems with stderr output #4

Open
CasperVector opened this issue Aug 27, 2015 · 3 comments
Open

Two problems with stderr output #4

CasperVector opened this issue Aug 27, 2015 · 3 comments

Comments

@CasperVector
Copy link

This line in crontab

*/1 * * * * printf 'To: someuser\nSubject: spam\n' > /dev/stderr

results in the following behaviour:

  • For root, the spam is sent, verbatim, to someuser
    (and of course, if the printf()-ed string is changed to something
    that does not fit the format of an email, the MTA will probably refuse to send it).
  • For non-root user, an error message will occur saying
    /bin/sh: /dev/stderr: Permission denied.

While one expects that:

  • To the user that the crontab belongs to (or whoever it finally redirects to via mail aliases),
    a message is sent back, with the printf()-ed string as the mail body.
@CasperVector
Copy link
Author

Also it seems obvious that the ability to feed arbitrary text to MTA is a security and administrative risk, even if only root has the permission to do that.

@dubiousjim
Copy link
Owner

I don't see why there is any fresh risk exposure here. The root user can already feed arbitrary text to the MTA, even via their crontab if they like. So no new ability is being granted. I'll have to think about the other complaint. I believe this behavior comes from the original design of the program. Perhaps it's not the best solution, but I'm not yet on board with the alternative that you describe or another alternative.

@CasperVector
Copy link
Author

I also think that the security risk does not seem serious; nevertheless, current behaviour at least appears counter-intuitive to me...

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

No branches or pull requests

2 participants