summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_parse/parse_misc.c70
-rw-r--r--source3/web/swat.c46
2 files changed, 57 insertions, 59 deletions
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c
index f0d4c67d9f..17a96fff80 100644
--- a/source3/rpc_parse/parse_misc.c
+++ b/source3/rpc_parse/parse_misc.c
@@ -1217,22 +1217,22 @@ void init_dom_rid4(DOM_RID4 *rid4, uint16 unknown, uint16 attr, uint32 rid)
Inits a DOM_CLNT_SRV structure.
********************************************************************/
-static void init_clnt_srv(DOM_CLNT_SRV *log, const char *logon_srv, const char *comp_name)
+static void init_clnt_srv(DOM_CLNT_SRV *logcln, const char *logon_srv, const char *comp_name)
{
DEBUG(5,("init_clnt_srv: %d\n", __LINE__));
if (logon_srv != NULL) {
- log->undoc_buffer = 1;
- init_unistr2(&log->uni_logon_srv, logon_srv, strlen(logon_srv)+1);
+ logcln->undoc_buffer = 1;
+ init_unistr2(&logcln->uni_logon_srv, logon_srv, strlen(logon_srv)+1);
} else {
- log->undoc_buffer = 0;
+ logcln->undoc_buffer = 0;
}
if (comp_name != NULL) {
- log->undoc_buffer2 = 1;
- init_unistr2(&log->uni_comp_name, comp_name, strlen(comp_name)+1);
+ logcln->undoc_buffer2 = 1;
+ init_unistr2(&logcln->uni_comp_name, comp_name, strlen(comp_name)+1);
} else {
- log->undoc_buffer2 = 0;
+ logcln->undoc_buffer2 = 0;
}
}
@@ -1240,9 +1240,9 @@ static void init_clnt_srv(DOM_CLNT_SRV *log, const char *logon_srv, const char *
Inits or writes a DOM_CLNT_SRV structure.
********************************************************************/
-static BOOL smb_io_clnt_srv(const char *desc, DOM_CLNT_SRV *log, prs_struct *ps, int depth)
+static BOOL smb_io_clnt_srv(const char *desc, DOM_CLNT_SRV *logcln, prs_struct *ps, int depth)
{
- if (log == NULL)
+ if (logcln == NULL)
return False;
prs_debug(ps, depth, desc, "smb_io_clnt_srv");
@@ -1251,22 +1251,22 @@ static BOOL smb_io_clnt_srv(const char *desc, DOM_CLNT_SRV *log, prs_struct *ps,
if(!prs_align(ps))
return False;
- if(!prs_uint32("undoc_buffer ", ps, depth, &log->undoc_buffer))
+ if(!prs_uint32("undoc_buffer ", ps, depth, &logcln->undoc_buffer))
return False;
- if (log->undoc_buffer != 0) {
- if(!smb_io_unistr2("unistr2", &log->uni_logon_srv, log->undoc_buffer, ps, depth))
+ if (logcln->undoc_buffer != 0) {
+ if(!smb_io_unistr2("unistr2", &logcln->uni_logon_srv, logcln->undoc_buffer, ps, depth))
return False;
}
if(!prs_align(ps))
return False;
- if(!prs_uint32("undoc_buffer2", ps, depth, &log->undoc_buffer2))
+ if(!prs_uint32("undoc_buffer2", ps, depth, &logcln->undoc_buffer2))
return False;
- if (log->undoc_buffer2 != 0) {
- if(!smb_io_unistr2("unistr2", &log->uni_comp_name, log->undoc_buffer2, ps, depth))
+ if (logcln->undoc_buffer2 != 0) {
+ if(!smb_io_unistr2("unistr2", &logcln->uni_comp_name, logcln->undoc_buffer2, ps, depth))
return False;
}
@@ -1277,28 +1277,28 @@ static BOOL smb_io_clnt_srv(const char *desc, DOM_CLNT_SRV *log, prs_struct *ps,
Inits a DOM_LOG_INFO structure.
********************************************************************/
-void init_log_info(DOM_LOG_INFO *log, const char *logon_srv, const char *acct_name,
+void init_log_info(DOM_LOG_INFO *loginfo, const char *logon_srv, const char *acct_name,
uint16 sec_chan, const char *comp_name)
{
DEBUG(5,("make_log_info %d\n", __LINE__));
- log->undoc_buffer = 1;
+ loginfo->undoc_buffer = 1;
- init_unistr2(&log->uni_logon_srv, logon_srv, strlen(logon_srv)+1);
- init_unistr2(&log->uni_acct_name, acct_name, strlen(acct_name)+1);
+ init_unistr2(&loginfo->uni_logon_srv, logon_srv, strlen(logon_srv)+1);
+ init_unistr2(&loginfo->uni_acct_name, acct_name, strlen(acct_name)+1);
- log->sec_chan = sec_chan;
+ loginfo->sec_chan = sec_chan;
- init_unistr2(&log->uni_comp_name, comp_name, strlen(comp_name)+1);
+ init_unistr2(&loginfo->uni_comp_name, comp_name, strlen(comp_name)+1);
}
/*******************************************************************
Reads or writes a DOM_LOG_INFO structure.
********************************************************************/
-BOOL smb_io_log_info(const char *desc, DOM_LOG_INFO *log, prs_struct *ps, int depth)
+BOOL smb_io_log_info(const char *desc, DOM_LOG_INFO *loginfo, prs_struct *ps, int depth)
{
- if (log == NULL)
+ if (loginfo == NULL)
return False;
prs_debug(ps, depth, desc, "smb_io_log_info");
@@ -1307,18 +1307,18 @@ BOOL smb_io_log_info(const char *desc, DOM_LOG_INFO *log, prs_struct *ps, int de
if(!prs_align(ps))
return False;
- if(!prs_uint32("undoc_buffer", ps, depth, &log->undoc_buffer))
+ if(!prs_uint32("undoc_buffer", ps, depth, &loginfo->undoc_buffer))
return False;
- if(!smb_io_unistr2("unistr2", &log->uni_logon_srv, True, ps, depth))
+ if(!smb_io_unistr2("unistr2", &loginfo->uni_logon_srv, True, ps, depth))
return False;
- if(!smb_io_unistr2("unistr2", &log->uni_acct_name, True, ps, depth))
+ if(!smb_io_unistr2("unistr2", &loginfo->uni_acct_name, True, ps, depth))
return False;
- if(!prs_uint16("sec_chan", ps, depth, &log->sec_chan))
+ if(!prs_uint16("sec_chan", ps, depth, &loginfo->sec_chan))
return False;
- if(!smb_io_unistr2("unistr2", &log->uni_comp_name, True, ps, depth))
+ if(!smb_io_unistr2("unistr2", &loginfo->uni_comp_name, True, ps, depth))
return False;
return True;
@@ -1457,21 +1457,21 @@ BOOL smb_io_clnt_info(const char *desc, DOM_CLNT_INFO *clnt, prs_struct *ps, in
Inits a DOM_LOGON_ID structure.
********************************************************************/
-void init_logon_id(DOM_LOGON_ID *log, uint32 log_id_low, uint32 log_id_high)
+void init_logon_id(DOM_LOGON_ID *logonid, uint32 log_id_low, uint32 log_id_high)
{
DEBUG(5,("make_logon_id: %d\n", __LINE__));
- log->low = log_id_low;
- log->high = log_id_high;
+ logonid->low = log_id_low;
+ logonid->high = log_id_high;
}
/*******************************************************************
Reads or writes a DOM_LOGON_ID structure.
********************************************************************/
-BOOL smb_io_logon_id(const char *desc, DOM_LOGON_ID *log, prs_struct *ps, int depth)
+BOOL smb_io_logon_id(const char *desc, DOM_LOGON_ID *logonid, prs_struct *ps, int depth)
{
- if (log == NULL)
+ if (logonid == NULL)
return False;
prs_debug(ps, depth, desc, "smb_io_logon_id");
@@ -1480,9 +1480,9 @@ BOOL smb_io_logon_id(const char *desc, DOM_LOGON_ID *log, prs_struct *ps, int de
if(!prs_align(ps))
return False;
- if(!prs_uint32("low ", ps, depth, &log->low ))
+ if(!prs_uint32("low ", ps, depth, &logonid->low ))
return False;
- if(!prs_uint32("high", ps, depth, &log->high))
+ if(!prs_uint32("high", ps, depth, &logonid->high))
return False;
return True;
diff --git a/source3/web/swat.c b/source3/web/swat.c
index 7f9492933a..d97278c485 100644
--- a/source3/web/swat.c
+++ b/source3/web/swat.c
@@ -31,8 +31,6 @@
#include "includes.h"
#include "../web/swat_proto.h"
-#define GLOBALS_SNUM -1
-
static BOOL demo_mode = False;
static BOOL have_write_access = False;
static BOOL have_read_access = False;
@@ -579,7 +577,7 @@ static void wizard_params_page(void)
d_printf("<H2>Wizard Parameter Edit Page</H2>\n");
if (cgi_variable("Commit")) {
- commit_parameters(GLOBALS_SNUM);
+ commit_parameters(GLOBAL_SECTION_SNUM);
save_reload(0);
}
@@ -593,7 +591,7 @@ static void wizard_params_page(void)
d_printf("<p>\n");
d_printf("<table>\n");
- show_parameters(GLOBALS_SNUM, 1, parm_filter, 0);
+ show_parameters(GLOBAL_SECTION_SNUM, 1, parm_filter, 0);
d_printf("</table>\n");
d_printf("</form>\n");
}
@@ -603,7 +601,7 @@ static void wizard_params_page(void)
****************************************************************************/
static void rewritecfg_file(void)
{
- commit_parameters(GLOBALS_SNUM);
+ commit_parameters(GLOBAL_SECTION_SNUM);
save_reload(0);
d_printf("<H2>Note: smb.conf %s</H2>\n", _("file has been read and rewritten"));
}
@@ -637,37 +635,37 @@ static void wizard_page(void)
HomeExpo = atoi(cgi_variable("HomeExpo"));
/* Plain text passwords are too badly broken - use encrypted passwords only */
- lp_do_parameter( GLOBALS_SNUM, "encrypt passwords", "Yes");
+ lp_do_parameter( GLOBAL_SECTION_SNUM, "encrypt passwords", "Yes");
switch ( SerType ){
case 0:
/* Stand-alone Server */
- lp_do_parameter( GLOBALS_SNUM, "security", "USER" );
- lp_do_parameter( GLOBALS_SNUM, "domain logons", "No" );
+ lp_do_parameter( GLOBAL_SECTION_SNUM, "security", "USER" );
+ lp_do_parameter( GLOBAL_SECTION_SNUM, "domain logons", "No" );
break;
case 1:
/* Domain Member */
- lp_do_parameter( GLOBALS_SNUM, "security", "DOMAIN" );
- lp_do_parameter( GLOBALS_SNUM, "domain logons", "No" );
+ lp_do_parameter( GLOBAL_SECTION_SNUM, "security", "DOMAIN" );
+ lp_do_parameter( GLOBAL_SECTION_SNUM, "domain logons", "No" );
break;
case 2:
/* Domain Controller */
- lp_do_parameter( GLOBALS_SNUM, "security", "USER" );
- lp_do_parameter( GLOBALS_SNUM, "domain logons", "Yes" );
+ lp_do_parameter( GLOBAL_SECTION_SNUM, "security", "USER" );
+ lp_do_parameter( GLOBAL_SECTION_SNUM, "domain logons", "Yes" );
break;
}
switch ( winstype ) {
case 0:
- lp_do_parameter( GLOBALS_SNUM, "wins support", "No" );
- lp_do_parameter( GLOBALS_SNUM, "wins server", "" );
+ lp_do_parameter( GLOBAL_SECTION_SNUM, "wins support", "No" );
+ lp_do_parameter( GLOBAL_SECTION_SNUM, "wins server", "" );
break;
case 1:
- lp_do_parameter( GLOBALS_SNUM, "wins support", "Yes" );
- lp_do_parameter( GLOBALS_SNUM, "wins server", "" );
+ lp_do_parameter( GLOBAL_SECTION_SNUM, "wins support", "Yes" );
+ lp_do_parameter( GLOBAL_SECTION_SNUM, "wins server", "" );
break;
case 2:
- lp_do_parameter( GLOBALS_SNUM, "wins support", "No" );
- lp_do_parameter( GLOBALS_SNUM, "wins server", cgi_variable("WINSAddr"));
+ lp_do_parameter( GLOBAL_SECTION_SNUM, "wins support", "No" );
+ lp_do_parameter( GLOBAL_SECTION_SNUM, "wins server", cgi_variable("WINSAddr"));
break;
}
@@ -677,7 +675,7 @@ static void wizard_page(void)
pstrcpy(unix_share,HOMES_NAME);
load_config(False);
- lp_copy_service(GLOBALS_SNUM, unix_share);
+ lp_copy_service(GLOBAL_SECTION_SNUM, unix_share);
iNumNonAutoPrintServices = lp_numservices();
have_home = lp_servicenumber(HOMES_NAME);
lp_do_parameter( have_home, "read only", "No");
@@ -692,7 +690,7 @@ static void wizard_page(void)
have_home = -1;
}
- commit_parameters(GLOBALS_SNUM);
+ commit_parameters(GLOBAL_SECTION_SNUM);
save_reload(0);
}
else
@@ -778,7 +776,7 @@ static void globals_page(void)
d_printf("<H2>%s</H2>\n", _("Global Variables"));
if (cgi_variable("Commit")) {
- commit_parameters(GLOBALS_SNUM);
+ commit_parameters(GLOBAL_SECTION_SNUM);
save_reload(0);
}
@@ -810,7 +808,7 @@ static void globals_page(void)
d_printf("<p>\n");
d_printf("<table>\n");
- show_parameters(GLOBALS_SNUM, 1, parm_filter, 0);
+ show_parameters(GLOBAL_SECTION_SNUM, 1, parm_filter, 0);
d_printf("</table>\n");
d_printf("</form>\n");
}
@@ -847,7 +845,7 @@ static void shares_page(void)
if (cgi_variable("createshare") && (share=cgi_variable("newshare"))) {
load_config(False);
- lp_copy_service(GLOBALS_SNUM, share);
+ lp_copy_service(GLOBAL_SECTION_SNUM, share);
iNumNonAutoPrintServices = lp_numservices();
save_reload(0);
snum = lp_servicenumber(share);
@@ -1186,7 +1184,7 @@ static void printers_page(void)
if (cgi_variable("createshare") && (share=cgi_variable("newshare"))) {
load_config(False);
- lp_copy_service(GLOBALS_SNUM, share);
+ lp_copy_service(GLOBAL_SECTION_SNUM, share);
iNumNonAutoPrintServices = lp_numservices();
snum = lp_servicenumber(share);
lp_do_parameter(snum, "print ok", "Yes");