#include "../lib/util/util_pw.h"
#include "libsmb/proto.h"
#include "passdb.h"
+#include "cmdline_contexts.h"
/*
* Next two lines needed for SunOS and don't
usage();
}
+ cmdline_messaging_context(configfile);
+
if (!lp_load_global(configfile)) {
fprintf(stderr, "Can't load %s - run testparm to debug it\n",
configfile);
int main(int argc, char **argv)
{
TALLOC_CTX *frame = talloc_stackframe();
- struct messaging_context *msg_ctx = NULL;
int local_flags = 0;
int ret;
setup_logging("smbpasswd", DEBUG_STDERR);
- msg_ctx = server_messaging_context();
- if (msg_ctx == NULL) {
- if (geteuid() != 0) {
- DBG_NOTICE("Unable to initialize messaging context. "
- "Must be root to do that.\n");
- } else {
- fprintf(stderr,
- "smbpasswd is not able to initialize the "
- "messaging context!\n");
- return 1;
- }
- }
-
/*
* Set the machine NETBIOS name if not already
* set from the config file.