* smb.h (param_struct): enum_list constified
* loadparam.c: enum_protocol, enum_security, enum_printing, enum_announce_as, enum_case, enum_lm_announce, enum_map_to_guest and enum_ssl_version constified
Этот коммит содержится в:
родитель
8a4ae931d4
Коммит
871ce41fe0
@ -875,7 +875,7 @@ struct parm_struct
|
|||||||
parm_class class;
|
parm_class class;
|
||||||
void *ptr;
|
void *ptr;
|
||||||
BOOL (*special)(char *, char **);
|
BOOL (*special)(char *, char **);
|
||||||
struct enum_list *enum_list;
|
const struct enum_list *enum_list;
|
||||||
unsigned flags;
|
unsigned flags;
|
||||||
union {
|
union {
|
||||||
BOOL bvalue;
|
BOOL bvalue;
|
||||||
|
@ -458,16 +458,16 @@ static BOOL handle_coding_system(char *pszParmValue,char **ptr);
|
|||||||
|
|
||||||
static void set_default_server_announce_type(void);
|
static void set_default_server_announce_type(void);
|
||||||
|
|
||||||
static struct enum_list enum_protocol[] = {{PROTOCOL_NT1, "NT1"}, {PROTOCOL_LANMAN2, "LANMAN2"},
|
static struct enum_list const enum_protocol[] = {{PROTOCOL_NT1, "NT1"}, {PROTOCOL_LANMAN2, "LANMAN2"},
|
||||||
{PROTOCOL_LANMAN1, "LANMAN1"}, {PROTOCOL_CORE,"CORE"},
|
{PROTOCOL_LANMAN1, "LANMAN1"}, {PROTOCOL_CORE,"CORE"},
|
||||||
{PROTOCOL_COREPLUS, "COREPLUS"},
|
{PROTOCOL_COREPLUS, "COREPLUS"},
|
||||||
{PROTOCOL_COREPLUS, "CORE+"}, {-1, NULL}};
|
{PROTOCOL_COREPLUS, "CORE+"}, {-1, NULL}};
|
||||||
|
|
||||||
static struct enum_list enum_security[] = {{SEC_SHARE, "SHARE"}, {SEC_USER, "USER"},
|
static struct enum_list const enum_security[] = {{SEC_SHARE, "SHARE"}, {SEC_USER, "USER"},
|
||||||
{SEC_SERVER, "SERVER"}, {SEC_DOMAIN, "DOMAIN"},
|
{SEC_SERVER, "SERVER"}, {SEC_DOMAIN, "DOMAIN"},
|
||||||
{-1, NULL}};
|
{-1, NULL}};
|
||||||
|
|
||||||
static struct enum_list enum_printing[] = {{PRINT_SYSV, "sysv"}, {PRINT_AIX, "aix"},
|
static struct enum_list const enum_printing[] = {{PRINT_SYSV, "sysv"}, {PRINT_AIX, "aix"},
|
||||||
{PRINT_HPUX, "hpux"}, {PRINT_BSD, "bsd"},
|
{PRINT_HPUX, "hpux"}, {PRINT_BSD, "bsd"},
|
||||||
{PRINT_QNX, "qnx"}, {PRINT_PLP, "plp"},
|
{PRINT_QNX, "qnx"}, {PRINT_PLP, "plp"},
|
||||||
{PRINT_LPRNG, "lprng"}, {PRINT_SOFTQ, "softq"},
|
{PRINT_LPRNG, "lprng"}, {PRINT_SOFTQ, "softq"},
|
||||||
@ -479,11 +479,11 @@ static struct enum_list enum_printing[] = {{PRINT_SYSV, "sysv"}, {PRINT_AIX, "ai
|
|||||||
#define ANNOUNCE_AS_WFW 3
|
#define ANNOUNCE_AS_WFW 3
|
||||||
#define ANNOUNCE_AS_NT_WORKSTATION 4
|
#define ANNOUNCE_AS_NT_WORKSTATION 4
|
||||||
|
|
||||||
static struct enum_list enum_announce_as[] = {{ANNOUNCE_AS_NT_SERVER, "NT"}, {ANNOUNCE_AS_NT_SERVER, "NT Server"}, {ANNOUNCE_AS_NT_WORKSTATION, "NT Workstation"}, {ANNOUNCE_AS_WIN95, "win95"}, {ANNOUNCE_AS_WFW, "WfW"}, {-1, NULL}};
|
static struct enum_list const enum_announce_as[] = {{ANNOUNCE_AS_NT_SERVER, "NT"}, {ANNOUNCE_AS_NT_SERVER, "NT Server"}, {ANNOUNCE_AS_NT_WORKSTATION, "NT Workstation"}, {ANNOUNCE_AS_WIN95, "win95"}, {ANNOUNCE_AS_WFW, "WfW"}, {-1, NULL}};
|
||||||
|
|
||||||
static struct enum_list enum_case[] = {{CASE_LOWER, "lower"}, {CASE_UPPER, "upper"}, {-1, NULL}};
|
static struct enum_list const enum_case[] = {{CASE_LOWER, "lower"}, {CASE_UPPER, "upper"}, {-1, NULL}};
|
||||||
|
|
||||||
static struct enum_list enum_lm_announce[] = {{0, "False"}, {1, "True"}, {2, "Auto"}, {-1, NULL}};
|
static struct enum_list const enum_lm_announce[] = {{0, "False"}, {1, "True"}, {2, "Auto"}, {-1, NULL}};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Do you want session setups at user level security with a invalid
|
Do you want session setups at user level security with a invalid
|
||||||
@ -506,10 +506,10 @@ static struct enum_list enum_lm_announce[] = {{0, "False"}, {1, "True"}, {2, "Au
|
|||||||
level security.
|
level security.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static struct enum_list enum_map_to_guest[] = {{NEVER_MAP_TO_GUEST, "Never"}, {MAP_TO_GUEST_ON_BAD_USER, "Bad User"}, {MAP_TO_GUEST_ON_BAD_PASSWORD, "Bad Password"}, {-1, NULL}};
|
static struct enum_list const enum_map_to_guest[] = {{NEVER_MAP_TO_GUEST, "Never"}, {MAP_TO_GUEST_ON_BAD_USER, "Bad User"}, {MAP_TO_GUEST_ON_BAD_PASSWORD, "Bad Password"}, {-1, NULL}};
|
||||||
|
|
||||||
#ifdef WITH_SSL
|
#ifdef WITH_SSL
|
||||||
static struct enum_list enum_ssl_version[] = {{SMB_SSL_V2, "ssl2"}, {SMB_SSL_V3, "ssl3"},
|
static struct enum_list const enum_ssl_version[] = {{SMB_SSL_V2, "ssl2"}, {SMB_SSL_V3, "ssl3"},
|
||||||
{SMB_SSL_V23, "ssl2or3"}, {SMB_SSL_TLS1, "tls1"}, {-1, NULL}};
|
{SMB_SSL_V23, "ssl2or3"}, {SMB_SSL_TLS1, "tls1"}, {-1, NULL}};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user