From 0f1eb0a8979e24461d2dfa42997a12b76bc61409 Mon Sep 17 00:00:00 2001 From: Pavlina Moravcova Varekova Date: Apr 23 2020 14:26:58 +0000 Subject: 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. --- diff --git a/lib/poptALL.c b/lib/poptALL.c index f8fe230..c48067a 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: