~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/auth_file/auth_file.cc

  • Committer: Andrew Hutchings
  • Date: 2011-01-10 16:11:45 UTC
  • mto: (2069.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2070.
  • Revision ID: andrew@linuxjedi.co.uk-20110110161145-isdc0ncbo2hx2n5c
Fix pandora error message

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include <config.h>
 
20
#include "config.h"
21
21
 
22
22
#include <fstream>
23
23
#include <map>
27
27
#include <boost/program_options.hpp>
28
28
#include <boost/filesystem.hpp>
29
29
 
30
 
#include <drizzled/configmake.h>
31
 
#include <drizzled/plugin/authentication.h>
32
 
#include <drizzled/identifier.h>
33
 
#include <drizzled/util/convert.h>
34
 
#include <drizzled/algorithm/sha1.h>
35
 
#include <drizzled/module/option_map.h>
 
30
#include "drizzled/configmake.h"
 
31
#include "drizzled/plugin/authentication.h"
 
32
#include "drizzled/identifier.h"
 
33
#include "drizzled/util/convert.h"
 
34
#include "drizzled/algorithm/sha1.h"
 
35
#include "drizzled/module/option_map.h"
36
36
 
37
37
namespace po= boost::program_options;
38
38
namespace fs= boost::filesystem;
222
222
  const module::option_map &vm= context.getOptions();
223
223
 
224
224
  AuthFile *auth_file = new AuthFile("auth_file", fs::path(vm["users"].as<string>()));
225
 
  if (not auth_file->loadFile())
 
225
  if (!auth_file->loadFile())
226
226
  {
227
 
    errmsg_printf(error::ERROR, _("Could not load auth file: %s\n"),
 
227
    errmsg_printf(ERRMSG_LVL_ERROR, _("Could not load auth file: %s\n"),
228
228
                  auth_file->getError().c_str());
229
229
    delete auth_file;
230
230
    return 1;
232
232
 
233
233
  context.add(auth_file);
234
234
  context.registerVariable(new sys_var_const_string_val("users", vm["users"].as<string>()));
235
 
 
236
235
  return 0;
237
236
}
238
237