We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Patched ls to do a chroot before kdbOpen:
ls
--- a/src/tools/kdb/ls.cpp +++ b/src/tools/kdb/ls.cpp @@ -14,10 +14,13 @@ #include <kdb.hpp> #include <keysetio.hpp> +#include <unistd.h> + + using namespace kdb; using namespace std; -LsCommand::LsCommand () : kdb (root) +LsCommand::LsCommand () { } @@ -28,12 +31,17 @@ int LsCommand::execute (Cmdline const & cl) throw invalid_argument ("1 argument required"); } - printWarnings (cerr, root); - root = cl.createKey (0); + chroot ("/tmp"); + { + kdb::Key root = cl.createKey (0); + kdb::KDB kdb (root); + kdb::KeySet ks; kdb.get (ks, root); + printWarnings (cerr, root); + if (cl.verbose) cout << "size of all keys in mountpoint: " << ks.size () << endl; KeySet part (ks.cut (root)); @@ -48,6 +56,7 @@ int LsCommand::execute (Cmdline const & cl) cout << part; printWarnings (cerr, root); + } return 0; } diff --git a/src/tools/kdb/ls.hpp b/src/tools/kdb/ls.hpp index 01dc588..c81ac00 100644 --- a/src/tools/kdb/ls.hpp +++ b/src/tools/kdb/ls.hpp @@ -15,10 +15,6 @@ class LsCommand : public Command { - kdb::Key root; - kdb::KDB kdb; - kdb::KeySet ks; - public: LsCommand (); ~LsCommand ();
That sudo kdb ls / does ls in the new chroot.
sudo kdb ls /
Hang in endless loop in elektraResolveDir, in src/plugins/resolver/filename.c because the dir will never get equal /.
elektraResolveDir
src/plugins/resolver/filename.c
/
Workaround: disable dir resolving. (e.g. uncommenting elektraResolveDir)
dir
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe what you wanted to do
Patched
ls
to do a chroot before kdbOpen:Describe what you expected
That
sudo kdb ls /
doesls
in the new chroot.Describe what actually happened
Hang in endless loop in
elektraResolveDir
, insrc/plugins/resolver/filename.c
because the dir will never get equal/
.Workaround: disable
dir
resolving. (e.g. uncommentingelektraResolveDir
)System Information
Further Log Files and Output
The text was updated successfully, but these errors were encountered: