summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/include/smb.h2
-rw-r--r--source3/lib/popt_common.c2
-rw-r--r--source3/param/loadparm.c55
-rw-r--r--source3/utils/net_conf.c4
-rw-r--r--source3/web/swat.c15
5 files changed, 2 insertions, 76 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 1d787f52d4..763f9555f0 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -898,7 +898,7 @@ struct connections_data {
/* the following are used by loadparm for option lists */
typedef enum {
P_BOOL,P_BOOLREV,P_CHAR,P_INTEGER,P_OCTAL,P_LIST,
- P_STRING,P_USTRING,P_GSTRING,P_UGSTRING,P_ENUM,P_SEP
+ P_STRING,P_USTRING,P_ENUM,P_SEP
} parm_type;
typedef enum {
diff --git a/source3/lib/popt_common.c b/source3/lib/popt_common.c
index 99c26106af..835eeaecc3 100644
--- a/source3/lib/popt_common.c
+++ b/source3/lib/popt_common.c
@@ -112,7 +112,7 @@ static void popt_common_callback(poptContext con,
if (arg) {
set_logfile(con, arg);
override_logfile = True;
- pstr_sprintf(dyn_LOGFILEBASE, "%s", arg);
+ snprintf(dyn_LOGFILEBASE, sizeof(dyn_LOGFILEBASE), "%s", arg);
}
break;
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 89b1299a5d..529f4bfb3b 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -2999,15 +2999,9 @@ static void show_parameter(int parmIndex)
bool hadFlag;
bool hadSyn;
bool inverse;
-#if 0
- const char *type[] = { "P_BOOL", "P_BOOLREV", "P_CHAR", "P_INTEGER",
- "P_OCTAL", "P_LIST", "P_STRING", "P_USTRING", "P_GSTRING",
- "P_UGSTRING", "P_ENUM", "P_SEP"};
-#else
const char *type[] = { "P_BOOL", "P_BOOLREV", "P_CHAR", "P_INTEGER",
"P_OCTAL", "P_LIST", "P_STRING", "P_USTRING",
"P_ENUM", "P_SEP"};
-#endif
unsigned flags[] = { FLAG_BASIC, FLAG_SHARE, FLAG_PRINT, FLAG_GLOBAL,
FLAG_WIZARD, FLAG_ADVANCED, FLAG_DEVELOPER, FLAG_DEPRECATED,
FLAG_HIDE, FLAG_DOS_STRING};
@@ -4177,17 +4171,6 @@ bool lp_do_parameter(int snum, const char *pszParmName, const char *pszParmValue
strupper_m(*(char **)parm_ptr);
break;
-#if 0
- case P_GSTRING:
- pstrcpy((char *)parm_ptr, pszParmValue);
- break;
-
- case P_UGSTRING:
- pstrcpy((char *)parm_ptr, pszParmValue);
- strupper_m((char *)parm_ptr);
- break;
-#endif
-
case P_ENUM:
lp_set_enum_parm( &parm_table[parmnum], pszParmValue, (int*)parm_ptr );
break;
@@ -4268,15 +4251,6 @@ static void print_parameter(struct parm_struct *p, void *ptr, FILE * f)
}
break;
-#if 0
- case P_GSTRING:
- case P_UGSTRING:
- if ((char *)ptr) {
- fprintf(f, "%s", (char *)ptr);
- }
- break;
-#endif
-
case P_STRING:
case P_USTRING:
if (*(char **)ptr) {
@@ -4310,18 +4284,6 @@ static bool equal_parameter(parm_type type, void *ptr1, void *ptr2)
case P_LIST:
return str_list_compare(*(char ***)ptr1, *(char ***)ptr2);
-#if 0
- case P_GSTRING:
- case P_UGSTRING:
- {
- char *p1 = (char *)ptr1, *p2 = (char *)ptr2;
- if (p1 && !*p1)
- p1 = NULL;
- if (p2 && !*p2)
- p2 = NULL;
- return (p1 == p2 || strequal(p1, p2));
- }
-#endif
case P_STRING:
case P_USTRING:
{
@@ -4415,12 +4377,6 @@ static bool is_default(int i)
case P_USTRING:
return strequal(parm_table[i].def.svalue,
*(char **)parm_table[i].ptr);
-#if 0
- case P_GSTRING:
- case P_UGSTRING:
- return strequal(parm_table[i].def.svalue,
- (char *)parm_table[i].ptr);
-#endif
case P_BOOL:
case P_BOOLREV:
return parm_table[i].def.bvalue ==
@@ -4827,17 +4783,6 @@ static void lp_save_defaults(void)
parm_table[i].def.svalue = NULL;
}
break;
-#if 0
- case P_GSTRING:
- case P_UGSTRING:
- if (parm_table[i].ptr) {
- parm_table[i].def.svalue = SMB_STRDUP((char *)parm_table[i].ptr);
- } else {
- parm_table[i].def.svalue = NULL;
- }
- break;
-#endif
-
case P_BOOL:
case P_BOOLREV:
parm_table[i].def.bvalue =
diff --git a/source3/utils/net_conf.c b/source3/utils/net_conf.c
index 4ff4bd9a29..16b372ca72 100644
--- a/source3/utils/net_conf.c
+++ b/source3/utils/net_conf.c
@@ -474,10 +474,6 @@ static char *parm_valstr(TALLOC_CTX *ctx, struct parm_struct *parm,
case P_USTRING:
valstr = talloc_asprintf(ctx, "%s", *(char **)ptr);
break;
- case P_GSTRING:
- case P_UGSTRING:
- valstr = talloc_asprintf(ctx, "%s", (char *)ptr);
- break;
case P_BOOL:
valstr = talloc_asprintf(ctx, "%s", BOOLSTR(*(bool *)ptr));
break;
diff --git a/source3/web/swat.c b/source3/web/swat.c
index 75a7f1939a..3440010f43 100644
--- a/source3/web/swat.c
+++ b/source3/web/swat.c
@@ -290,16 +290,6 @@ static void show_parameter(int snum, struct parm_struct *parm)
_("Set Default"), make_parm_name(parm->label),fix_backslash((char *)(parm->def.svalue)));
break;
- case P_GSTRING:
- case P_UGSTRING:
- push_utf8_allocate(&utf8_s1, (char *)ptr);
- printf("<input type=text size=40 name=\"parm_%s\" value=\"%s\">",
- make_parm_name(parm->label), fix_quotes(ctx, utf8_s1));
- SAFE_FREE(utf8_s1);
- printf("<input type=button value=\"%s\" onClick=\"swatform.parm_%s.value=\'%s\'\">",
- _("Set Default"), make_parm_name(parm->label),fix_backslash((char *)(parm->def.svalue)));
- break;
-
case P_BOOL:
printf("<select name=\"parm_%s\">",make_parm_name(parm->label));
printf("<option %s>Yes", (*(bool *)ptr)?"selected":"");
@@ -401,11 +391,6 @@ static void show_parameters(int snum, int allparameters, unsigned int parm_filte
if (!strcmp(*(char **)ptr,(char *)(parm->def.svalue))) continue;
break;
- case P_GSTRING:
- case P_UGSTRING:
- if (!strcmp((char *)ptr,(char *)(parm->def.svalue))) continue;
- break;
-
case P_BOOL:
case P_BOOLREV:
if (*(bool *)ptr == (bool)(parm->def.bvalue)) continue;