diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2011-05-16 22:27:59 +0200 |
---|---|---|
committer | Denys Vlasenko <dvlasenk@redhat.com> | 2011-05-16 22:27:59 +0200 |
commit | 554dc681d36b7e1cb306eb8d7ce5958a87dfc397 (patch) | |
tree | fe348cebc150dc98d3a5714ea3ff2e10eb4c7570 /src/plugins/abrt-action-install-debuginfo.c | |
parent | 5de5702c52cab8b0684ed4dc4df01f09657f9527 (diff) | |
download | abrt-554dc681d36b7e1cb306eb8d7ce5958a87dfc397.tar.gz abrt-554dc681d36b7e1cb306eb8d7ce5958a87dfc397.tar.xz abrt-554dc681d36b7e1cb306eb8d7ce5958a87dfc397.zip |
abrt-action-install-debuginfo: support --ids=- (read from stdin)
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src/plugins/abrt-action-install-debuginfo.c')
-rw-r--r-- | src/plugins/abrt-action-install-debuginfo.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/abrt-action-install-debuginfo.c b/src/plugins/abrt-action-install-debuginfo.c index 112620b4..0d5d0d9d 100644 --- a/src/plugins/abrt-action-install-debuginfo.c +++ b/src/plugins/abrt-action-install-debuginfo.c @@ -45,13 +45,18 @@ static void error_msg_and_die(const char *msg, const char *arg) int main(int argc, char **argv) { /* - * We disallow passing of arguments which point to writable dirs. + * We disallow passing of arguments which point to writable dirs + * and other files possibly not accessible to calling user. * This way, the script will always use default values for these arguments. */ char **pp = argv; char *arg; while ((arg = *++pp) != NULL) { + /* Allow taking ids from stdin */ + if (strcmp(arg, "--ids=-") == 0) + continue; + if (strncmp(arg, "--cache", 7) == 0) error_msg_and_die("bad option", arg); if (strncmp(arg, "--tmpdir", 8) == 0) |