diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-05-08 11:53:42 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-05-08 11:53:42 +0300 |
commit | 6ca5373aa1f58ccc60e844bd8fd006a738670883 (patch) | |
tree | e247734973c366663ec1561713a3f6f2d461bd38 /lib/rpmts.h | |
parent | 6006265faf97316d9685b0dc958770f50b954a3e (diff) | |
download | rpm-6ca5373aa1f58ccc60e844bd8fd006a738670883.tar.gz rpm-6ca5373aa1f58ccc60e844bd8fd006a738670883.tar.bz2 rpm-6ca5373aa1f58ccc60e844bd8fd006a738670883.zip |
Check for transaction root sanity in rpmtsSetRootDir()
- only regular paths starting with / permitted
- change prototype to permit return codes
Diffstat (limited to 'lib/rpmts.h')
-rw-r--r-- | lib/rpmts.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rpmts.h b/lib/rpmts.h index 5d8928aa0..0b4af3693 100644 --- a/lib/rpmts.h +++ b/lib/rpmts.h @@ -416,11 +416,11 @@ const char * rpmtsRootDir(rpmts ts); /** \ingroup rpmts * Set transaction rootDir, i.e. path to chroot(2). - * @todo disallow funky http:// etc urls... * @param ts transaction set * @param rootDir new transaction rootDir (or NULL) + * @return 0 on success, -1 on error (invalid rootDir) */ -void rpmtsSetRootDir(rpmts ts, const char * rootDir); +int rpmtsSetRootDir(rpmts ts, const char * rootDir); /** \ingroup rpmts * Get transaction currDir, i.e. current directory before chroot(2). |