extern bool AllowDebugChange;
extern bool override_logfile;
extern char tar_type;
-extern bool in_client;
static int port = 0;
static char *service;
pc = poptGetContext("smbclient", argc, (const char **) argv, long_options, 0);
poptSetOtherOptionHelp(pc, "service <password>");
- in_client = true; /* Make sure that we tell lp_load we are */
+ lp_set_in_client(true); /* Make sure that we tell lp_load we are */
while ((opt = poptGetNextOpt(pc)) != -1) {
* Globals...
*/
-extern bool in_client; /* Boolean for client library */
/*
setup_logging("smbspool", True);
- in_client = True; /* Make sure that we tell lp_load we are */
+ lp_set_in_client(True); /* Make sure that we tell lp_load we are */
load_case_tables();
/* Here we would open the smb.conf file if needed ... */
- in_client = True; /* FIXME, make a param */
+ lp_set_in_client(True);
home = getenv("HOME");
if (home) {
const char *name;
struct samu *sampass = NULL;
void (*oldsig_handler)(int);
- extern bool in_client;
/* Samba initialization. */
load_case_tables();
setup_logging( "pam_smbpass", False );
- in_client = True;
+ lp_set_in_client(True);
ctrl = set_ctrl( flags, argc, argv );
unsigned int ctrl;
int retval, *ret_data = NULL;
struct samu *sampass = NULL;
- extern bool in_client;
const char *name;
void (*oldsig_handler)(int) = NULL;
bool found;
/* Samba initialization. */
load_case_tables();
setup_logging("pam_smbpass",False);
- in_client = True;
+ lp_set_in_client(True);
ctrl = set_ctrl(flags, argc, argv);
unsigned int ctrl;
int retval;
- extern bool in_client;
-
struct samu *sampass = NULL;
void (*oldsig_handler)(int);
const char *user;
/* Samba initialization. */
load_case_tables();
setup_logging( "pam_smbpass", False );
- in_client = True;
+ lp_set_in_client(True);
ctrl = set_ctrl(flags, argc, argv);
#include "includes.h"
-bool in_client = False; /* Not in the client by default */
bool bLoaded = False;
extern enum protocol_types Protocol;
#define HOMES_NAME "homes"
#endif
+static bool in_client = False; /* Not in the client by default */
static uint64_t conf_last_seqnum = 0;
static struct smbconf_ctx *conf_ctx = NULL;
}
}
+
+/***************************************************************************
+ Allow client apps to specify that they are a client
+***************************************************************************/
+void lp_set_in_client(bool b)
+{
+ in_client = b;
+}
+
+
+/***************************************************************************
+ Determine if we're running in a client app
+***************************************************************************/
+bool lp_is_in_client(void)
+{
+ return in_client;
+}
+
+
+
+
/***************************************************************************
Load the services array from the services file. Return True on success,
False on failure.
/* Now we check bWINSsupport and set szWINSserver to 127.0.0.1 */
/* if bWINSsupport is true and we are in the client */
- if (in_client && Globals.bWINSsupport) {
+ if (lp_is_in_client() && Globals.bWINSsupport) {
lp_do_parameter(GLOBAL_SECTION_SNUM, "wins server", "127.0.0.1");
}
#include "includes.h"
-extern bool in_client;
-
/* -------------------------------------------------------------------------- **
* Constants...
*/
static myFILE *OpenConfFile( const char *FileName )
{
const char *func = "params.c:OpenConfFile() -";
- int lvl = in_client?1:0;
+ int lvl = lp_is_in_client() ? 1 : 0;
myFILE *ret;
ret = SMB_MALLOC_P(myFILE);