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

Use read instead of xargs for sendmail (master) #678

Merged
merged 3 commits into from
Aug 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Update Postgres to SQLite migration. [#581](https://github.com/greenbone/gvmd/pull/581) [#601](https://github.com/greenbone/gvmd/pull/601) [#604](https://github.com/greenbone/gvmd/pull/604) [#605](https://github.com/greenbone/gvmd/pull/605)
- Update result diff generation at delta reports [#650](https://github.com/greenbone/gvmd/pull/650)
- Check and create default permissions individually [#671](https://github.com/greenbone/gvmd/pull/671)
- Add -f arg to sendmail call in email alert [#676](https://github.com/greenbone/gvmd/pull/676)
- Add -f arg to sendmail call in email alert [#676](https://github.com/greenbone/gvmd/pull/676) [#678](https://github.com/greenbone/gvmd/pull/678)

### Fixed
- Fix iCalendar recurrence and timezone handling [#654](https://github.com/greenbone/gvmd/pull/654)
Expand Down
6 changes: 3 additions & 3 deletions src/manage_sql.c
Original file line number Diff line number Diff line change
Expand Up @@ -9506,7 +9506,7 @@ email (const char *to_address, const char *from_address, const char *subject,
return -1;
}

sendmail_args = g_strdup_printf ("-f %s %s",
sendmail_args = g_strdup_printf ("%s %s",
from_address,
to_address);
g_file_set_contents (args_file_name,
Expand All @@ -9524,8 +9524,8 @@ email (const char *to_address, const char *from_address, const char *subject,
return -1;
}

command = g_strdup_printf ("xargs -a %s -I XXX"
" /usr/sbin/sendmail XXX < %s"
command = g_strdup_printf ("read FROM TO < %s;"
" /usr/sbin/sendmail -f \"$FROM\" \"$TO\" < %s"
" > /dev/null 2>&1",
args_file_name,
content_file_name);
Expand Down