}
}
- TimeInit();
-
in_client = True; /* Make sure that we tell lp_load we are */
old_debug = DEBUGLEVEL;
else
setenv("CLI_FORCE_ASCII", "true", 1);
- TimeInit();
-
in_client = True; /* Make sure that we tell lp_load we are */
if (getenv("USER")) {
setup_logging("smbspool", True);
- TimeInit();
-
in_client = True; /* Make sure that we tell lp_load we are */
if (!lp_load(dyn_CONFIGFILE, True, False, False))
*/
-int serverzone=0;
int extra_time_offset = 0;
#ifndef CHAR_BIT
}
+static BOOL done_serverzone_init;
-/*******************************************************************
-init the time differences
-********************************************************************/
-void TimeInit(void)
+/* Return the smb serverzone value */
+
+static int get_serverzone(void)
{
- serverzone = TimeZone(time(NULL));
+ static int serverzone;
- if ((serverzone % 60) != 0) {
- DEBUG(1,("WARNING: Your timezone is not a multiple of 1 minute.\n"));
- }
+ if (!done_serverzone_init) {
+ serverzone = TimeZone(time(NULL));
+
+ if ((serverzone % 60) != 0) {
+ DEBUG(1,("WARNING: Your timezone is not a multiple of 1 minute.\n"));
+ }
- DEBUG(4,("Serverzone is %d\n",serverzone));
+ DEBUG(4,("Serverzone is %d\n",serverzone));
+
+ done_serverzone_init = True;
+ }
+
+ return serverzone;
}
+/* Re-read the smb serverzone value */
+
+void TimeInit(void)
+{
+ done_serverzone_init = False;
+ get_serverzone();
+}
/*******************************************************************
return the same value as TimeZone, but it should be more efficient.
ret = (time_t)(d+0.5);
/* this takes us from kludge-GMT to real GMT */
- ret -= serverzone;
+ ret -= get_serverzone();
ret += LocTimeDiff(ret);
return(ret);
}
/* this converts GMT to kludge-GMT */
- t -= LocTimeDiff(t) - serverzone;
+ t -= LocTimeDiff(t) - get_serverzone();
d = (double)(t);
d += TIME_FIXUP_CONSTANT;
sys_srandom(time(NULL) ^ sys_getpid());
- TimeInit();
-
slprintf(debugf, sizeof(debugf)-1, "%s/log.nmbd", dyn_LOGFILEBASE);
setup_logging( argv[0], False );
}
}
- TimeInit();
-
if (!lp_load(dyn_CONFIGFILE, True, False, False)) {
DEBUG(0, ("error opening config file\n"));
exit(1);
*p = 0;
}
- TimeInit();
-
if (!reload_services_file(False)) {
DEBUG(0, ("error opening config file\n"));
exit(1);
if (!initialised) {
initialised = 1;
DEBUGLEVEL = 0;
- TimeInit();
setup_logging("nss_wins",True);
lp_load(dyn_CONFIGFILE,True,False,False);
load_interfaces();
load_interfaces();
- TimeInit();
-
get_myname((*global_myname)?NULL:global_myname);
strupper(global_myname);
load_interfaces();
- TimeInit();
-
/* Check arguments make sense */
if (do_sam_sync && do_sam_repl) {
append_log = True;
- TimeInit();
-
if(!specified_logfile) {
slprintf(debugf, sizeof(debugf)-1, "%s/log.smbd",
dyn_LOGFILEBASE);
argc -= NSERVERS;
argv += NSERVERS;
- TimeInit();
-
lp_load(dyn_CONFIGFILE,True,False,False);
load_interfaces();
argc -= 4;
argv += 4;
- TimeInit();
-
lp_load(dyn_CONFIGFILE,True,False,False);
load_interfaces();
argc -= 1;
argv += 1;
- TimeInit();
-
lp_load(dyn_CONFIGFILE,True,False,False);
load_interfaces();
int i, n;
char buf[12];
- TimeInit();
setup_logging(argv[0],True);
lp_load(dyn_CONFIGFILE,False,False,False);
setup_logging(pname, True);
- TimeInit();
-
myumask = umask(0);
umask(myumask);
DEBUGLEVEL = 1;
*lookup = 0;
- TimeInit();
-
setup_logging(argv[0],True);
while ((opt = getopt(argc, argv, "d:B:U:i:s:SMrhART")) != EOF)
char *profile_path = NULL;
char *smbpasswd = NULL;
- TimeInit();
-
setup_logging("tdbedit", True);
if (argc < 2) {
argc -= 2;
argv += 2;
- TimeInit();
-
lp_load(dyn_CONFIGFILE,True,False,False);
load_interfaces();
extern int optind;
BOOL interactive = False;
- TimeInit();
setup_logging(argv[0],True);
if (argc < 2) usage(True);
char *desthost;
pstring configfile;
- TimeInit();
-
setup_logging(argv[0],True);
pstrcpy(configfile,dyn_CONFIGFILE);
enum SID_NAME_USE sid_type;
- TimeInit();
-
setup_logging("groupedit", True);
if (argc < 2) {
set_auth_parameters(argc, argv);
#endif /* HAVE_SET_AUTH_PARAMETERS */
- TimeInit();
-
setup_logging("smbpasswd", True);
if(!initialize_password_db(True)) {
setup_logging(argv[0],True);
- TimeInit();
-
lp_load(dyn_CONFIGFILE,True,False,False);
load_interfaces();
int profile_only = 0, new_debuglevel = -1;
TDB_CONTEXT *tdb;
- TimeInit();
setup_logging(argv[0],True);
DEBUGLEVEL = 0;
*term_code = 0;
- TimeInit();
-
setup_logging(argv[0],True);
while ((opt = getopt(argc, argv,"shL:t:")) != EOF) {
{
char *pszTemp;
- TimeInit();
-
setup_logging(argv[0],True);
if (argc < 2 || argc > 3)