summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-03-23 23:26:33 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:15 -0500
commit5d1cb8e79edea9e8581d3c2c9dd297310cd9a98c (patch)
tree12142ce30c28b602882cb6c3492dfc5811a7eace /source3/param
parent920745f0df024741f28e8557c52187a8db01c5d1 (diff)
downloadsamba-5d1cb8e79edea9e8581d3c2c9dd297310cd9a98c.tar.gz
samba-5d1cb8e79edea9e8581d3c2c9dd297310cd9a98c.tar.bz2
samba-5d1cb8e79edea9e8581d3c2c9dd297310cd9a98c.zip
r6014: rather large change set....
pulling back all recent rpc changes from trunk into 3.0. I've tested a compile and so don't think I've missed any files. But if so, just mail me and I'll clean backup in a couple of hours. Changes include \winreg, \eventlog, \svcctl, and general parse_misc.c updates. I am planning on bracketing the event code with an #ifdef ENABLE_EVENTLOG until I finish merging Marcin's changes (very soon). (This used to be commit 4e0ac63c36527cd8c52ef720cae17e84f67e7221)
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c46
1 files changed, 45 insertions, 1 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index a75a19f85c..59d2db0527 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -183,8 +183,16 @@ typedef struct
char *szAddShareCommand;
char *szChangeShareCommand;
char *szDeleteShareCommand;
+ char *szEventLogOpenCommand;
+ char *szEventLogReadCommand;
+ char *szEventLogClearCommand;
+ char *szEventLogNumRecordsCommand;
+ char *szEventLogOldestRecordCommand;
+ char *szEventLogCloseCommand;
+ char **szEventLogs;
char *szGuestaccount;
char *szManglingMethod;
+ char **szServicesList;
int mangle_prefix;
int max_log_size;
char *szLogLevel;
@@ -583,6 +591,7 @@ static BOOL handle_netbios_scope( int snum, const char *pszParmValue, char **ptr
static BOOL handle_charset( int snum, const char *pszParmValue, char **ptr );
static BOOL handle_acl_compatibility( int snum, const char *pszParmValue, char **ptr);
static BOOL handle_printing( int snum, const char *pszParmValue, char **ptr);
+static BOOL handle_eventlog( int snum, const char *pszParmValue, char **ptr);
static void set_server_role(void);
static void set_default_server_announce_type(void);
@@ -935,6 +944,8 @@ static struct parm_struct parm_table[] = {
{"server signing", P_ENUM, P_GLOBAL, &Globals.server_signing, NULL, enum_smb_signing_vals, FLAG_ADVANCED},
{"client use spnego", P_BOOL, P_GLOBAL, &Globals.bClientUseSpnego, NULL, NULL, FLAG_ADVANCED},
+ {"enable svcctl", P_LIST, P_GLOBAL, &Globals.szServicesList, NULL, NULL, FLAG_ADVANCED},
+
{N_("Tuning Options"), P_SEP, P_SEPARATOR},
{"block size", P_INTEGER, P_LOCAL, &sDefault.iBlock_size, NULL, NULL, FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL},
@@ -978,6 +989,7 @@ static struct parm_struct parm_table[] = {
{"cups server", P_STRING, P_GLOBAL, &Globals.szCupsServer, NULL, NULL, FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL},
{"print command", P_STRING, P_LOCAL, &sDefault.szPrintcommand, NULL, NULL, FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL},
{"disable spoolss", P_BOOL, P_GLOBAL, &Globals.bDisableSpoolss, NULL, NULL, FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL},
+ {"enable spoolss", P_BOOLREV, P_GLOBAL, &Globals.bDisableSpoolss, NULL, NULL, FLAG_HIDE},
{"lpq command", P_STRING, P_LOCAL, &sDefault.szLpqcommand, NULL, NULL, FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL},
{"lprm command", P_STRING, P_LOCAL, &sDefault.szLprmcommand, NULL, NULL, FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL},
{"lppause command", P_STRING, P_LOCAL, &sDefault.szLppausecommand, NULL, NULL, FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL},
@@ -1113,6 +1125,14 @@ static struct parm_struct parm_table[] = {
{"change share command", P_STRING, P_GLOBAL, &Globals.szChangeShareCommand, NULL, NULL, FLAG_ADVANCED},
{"delete share command", P_STRING, P_GLOBAL, &Globals.szDeleteShareCommand, NULL, NULL, FLAG_ADVANCED},
+ {N_("EventLog Options"), P_SEP, P_SEPARATOR},
+ {"eventlog open command", P_STRING, P_GLOBAL, &Globals.szEventLogOpenCommand, handle_eventlog, NULL, FLAG_ADVANCED},
+ {"eventlog read command", P_STRING, P_GLOBAL, &Globals.szEventLogReadCommand, handle_eventlog, NULL, FLAG_ADVANCED},
+ {"eventlog clear command", P_STRING, P_GLOBAL, &Globals.szEventLogClearCommand, handle_eventlog, NULL, FLAG_ADVANCED},
+ {"eventlog num records command", P_STRING, P_GLOBAL, &Globals.szEventLogNumRecordsCommand, handle_eventlog, NULL, FLAG_ADVANCED},
+ {"eventlog oldest record command", P_STRING, P_GLOBAL, &Globals.szEventLogOldestRecordCommand, handle_eventlog, NULL, FLAG_ADVANCED},
+ {"eventlog list", P_LIST, P_GLOBAL, &Globals.szEventLogs, NULL, NULL, FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE},
+
{"config file", P_STRING, P_GLOBAL, &Globals.szConfigFile, NULL, NULL, FLAG_HIDE},
{"preload", P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, NULL, FLAG_ADVANCED},
{"auto services", P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, NULL, FLAG_ADVANCED},
@@ -1381,7 +1401,7 @@ static void init_globals(void)
Globals.AlgorithmicRidBase = BASE_RID;
Globals.bLoadPrinters = True;
- Globals.PrintcapCacheTime = 0;
+ Globals.PrintcapCacheTime = 750; /* 12.5 minutes */
/* Was 65535 (0xFFFF). 0x4101 matches W2K and causes major speed improvements... */
/* Discovered by 2 days of pain by Don McCall @ HP :-). */
Globals.max_xmit = 0x4104;
@@ -1530,6 +1550,12 @@ static void init_globals(void)
string_set(&Globals.szAclCompat, "");
string_set(&Globals.szCupsServer, "");
+ string_set(&Globals.szEventLogOpenCommand, "");
+ string_set(&Globals.szEventLogReadCommand, "");
+ string_set(&Globals.szEventLogClearCommand, "");
+ string_set(&Globals.szEventLogNumRecordsCommand, "");
+ string_set(&Globals.szEventLogOldestRecordCommand, "");
+
Globals.winbind_cache_time = 300; /* 5 minutes */
Globals.bWinbindEnableLocalAccounts = False;
Globals.bWinbindEnumUsers = True;
@@ -1556,6 +1582,8 @@ static void init_globals(void)
operations as root */
Globals.bEnablePrivileges = False;
+
+ Globals.szServicesList = str_list_make( "Spooler NETLOGON", NULL );
}
static TALLOC_CTX *lp_talloc;
@@ -1722,6 +1750,7 @@ FN_GLOBAL_BOOL(lp_winbind_use_default_domain, &Globals.bWinbindUseDefaultDomain)
FN_GLOBAL_BOOL(lp_winbind_trusted_domains_only, &Globals.bWinbindTrustedDomainsOnly)
FN_GLOBAL_BOOL(lp_winbind_nested_groups, &Globals.bWinbindNestedGroups)
+
FN_GLOBAL_LIST(lp_idmap_backend, &Globals.szIdmapBackend)
FN_GLOBAL_BOOL(lp_enable_rid_algorithm, &Globals.bEnableRidAlgorithm)
@@ -1741,6 +1770,14 @@ FN_GLOBAL_STRING(lp_add_share_cmd, &Globals.szAddShareCommand)
FN_GLOBAL_STRING(lp_change_share_cmd, &Globals.szChangeShareCommand)
FN_GLOBAL_STRING(lp_delete_share_cmd, &Globals.szDeleteShareCommand)
+FN_GLOBAL_STRING(lp_eventlog_open_cmd, &Globals.szEventLogOpenCommand)
+FN_GLOBAL_STRING(lp_eventlog_read_cmd, &Globals.szEventLogReadCommand)
+FN_GLOBAL_STRING(lp_eventlog_clear_cmd, &Globals.szEventLogClearCommand)
+FN_GLOBAL_STRING(lp_eventlog_num_records_cmd, &Globals.szEventLogNumRecordsCommand)
+FN_GLOBAL_STRING(lp_eventlog_oldest_record_cmd, &Globals.szEventLogOldestRecordCommand)
+FN_GLOBAL_STRING(lp_eventlog_close_cmd, &Globals.szEventLogCloseCommand)
+FN_GLOBAL_LIST(lp_eventlog_list, &Globals.szEventLogs)
+
FN_GLOBAL_BOOL(lp_disable_netbios, &Globals.bDisableNetbios)
FN_GLOBAL_BOOL(lp_ms_add_printer_wizard, &Globals.bMsAddPrinterWizard)
FN_GLOBAL_BOOL(lp_dns_proxy, &Globals.bDNSproxy)
@@ -1838,6 +1875,7 @@ FN_LOCAL_STRING(lp_username, szUsername)
FN_LOCAL_LIST(lp_invalid_users, szInvalidUsers)
FN_LOCAL_LIST(lp_valid_users, szValidUsers)
FN_LOCAL_LIST(lp_admin_users, szAdminUsers)
+FN_GLOBAL_LIST(lp_enable_svcctl, &Globals.szServicesList)
FN_LOCAL_STRING(lp_cups_options, szCupsOptions)
FN_GLOBAL_STRING(lp_cups_server, &Globals.szCupsServer)
FN_LOCAL_STRING(lp_printcommand, szPrintcommand)
@@ -2769,6 +2807,12 @@ static BOOL handle_charset(int snum, const char *pszParmValue, char **ptr)
return True;
}
+static BOOL handle_eventlog(int snum, const char *pszParmValue, char **ptr)
+{
+ string_set(ptr, pszParmValue);
+ return True;
+}
+
static BOOL handle_workgroup(int snum, const char *pszParmValue, char **ptr)
{
BOOL ret;