projects
/
apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
do delay the test for http, too, to make it more reliable
[apt.git]
/
cmdline
/
apt-dump-solver.cc
diff --git
a/cmdline/apt-dump-solver.cc
b/cmdline/apt-dump-solver.cc
index aa16b127149f74fe2114e720aa23d3520498c9ea..4729eac55a649c8ce6b5fec4c3322860581e6f20 100644
(file)
--- a/
cmdline/apt-dump-solver.cc
+++ b/
cmdline/apt-dump-solver.cc
@@
-9,19
+9,20
@@
// Include Files /*{{{*/
#include <apt-pkg/edsp.h>
// Include Files /*{{{*/
#include <apt-pkg/edsp.h>
-#include <
confi
g.h>
-
+#include <
strin
g.h>
+#include <unistd.h>
#include <cstdio>
#include <iostream>
#include <cstdio>
#include <iostream>
+
+#include <config.h>
/*}}}*/
// ShowHelp - Show a help screen /*{{{*/
// ---------------------------------------------------------------------
/* */
/*}}}*/
// ShowHelp - Show a help screen /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool ShowHelp() {
-
+
static
bool ShowHelp() {
+ ioprintf(std::cout, "%s %s (%s)\n", PACKAGE, PACKAGE_VERSION, COMMON_ARCH);
std::cout <<
std::cout <<
- PACKAGE " " PACKAGE_VERSION " for " COMMON_ARCH " compiled on " __DATE__ " " __TIME__ << std::endl <<
"Usage: apt-dump-resolver\n"
"\n"
"apt-dump-resolver is a dummy solver who just dumps its input to the\n"
"Usage: apt-dump-resolver\n"
"\n"
"apt-dump-resolver is a dummy solver who just dumps its input to the\n"
@@
-38,6
+39,8
@@
int main(int argc,const char *argv[]) /*{{{*/
ShowHelp();
return 0;
}
ShowHelp();
return 0;
}
+ // we really don't need anything
+ DropPrivileges();
FILE* input = fdopen(STDIN_FILENO, "r");
FILE* output = fopen("/tmp/dump.edsp", "w");
FILE* input = fdopen(STDIN_FILENO, "r");
FILE* output = fopen("/tmp/dump.edsp", "w");