diff options
author | Pavlina Moravcova Varekova <pmoravco@redhat.com> | 2019-04-24 10:29:14 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2020-03-26 11:57:58 +0200 |
commit | 1a5d2d5a6fd32000715971c6935fc1559d900dc1 (patch) | |
tree | c25eafacf1067c628e5688e88f764304db448d8d | |
parent | b5b1a7f523751cffe69db4ce0d18369cf724900c (diff) | |
download | rpm-1a5d2d5a6fd32000715971c6935fc1559d900dc1.tar.gz |
Use --dpbath only with full path (RhBug:1696408)
Before the patch rpm treats the relative path as a full path.
The new behavior is similar to the "--root" option.
(cherry picked from commit d313baf1d3a4756447e398ee55f8c6760f942d50)
-rw-r--r-- | lib/poptALL.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/poptALL.c b/lib/poptALL.c index f8fe23068..c48067a0b 100644 --- a/lib/poptALL.c +++ b/lib/poptALL.c @@ -137,6 +137,10 @@ static void rpmcliAllArgCallback( poptContext con, break; case POPT_DBPATH: rpmcliConfigured(); + if (arg && arg[0] != '/') { + fprintf(stderr, _("arguments to --dbpath must begin with '/'\n")); + exit(EXIT_FAILURE); + } rpmPushMacro(NULL, "_dbpath", NULL, arg, RMIL_CMDLINE); break; case POPT_SHOWVERSION: |