VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/UserInterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main/UserInterface.cpp')
-rw-r--r--src/Main/UserInterface.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/Main/UserInterface.cpp b/src/Main/UserInterface.cpp
index 09b1fcdd..0f11ec0b 100644
--- a/src/Main/UserInterface.cpp
+++ b/src/Main/UserInterface.cpp
@@ -32,6 +32,15 @@
namespace VeraCrypt
{
+ class AdminPasswordRequestHandler : public GetStringFunctor
+ {
+ public:
+ virtual void operator() (string &str)
+ {
+ throw ElevationFailed (SRC_POS, "sudo", 1, "");
+ }
+ };
+
UserInterface::UserInterface ()
{
}
@@ -558,14 +567,6 @@ namespace VeraCrypt
}
else
{
- struct AdminPasswordRequestHandler : public GetStringFunctor
- {
- virtual void operator() (string &str)
- {
- throw ElevationFailed (SRC_POS, "sudo", 1, "");
- }
- };
-
Core->SetAdminPasswordCallback (shared_ptr <GetStringFunctor> (new AdminPasswordRequestHandler));
}