param: Merge common param elements by adding .flags
authorAndrew Bartlett <abartlet@samba.org>
Thu, 12 Apr 2012 06:29:21 +0000 (16:29 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 16 Apr 2012 04:32:29 +0000 (14:32 +1000)
This removes the difference between many of the key elements of the global
parameters table, and makes it easier to merge the two tables.

Andrew Bartlett

lib/param/loadparm.c

index e3792b61950ded78e7e8b79cd56585ea00db3bec..c407429f15ef1bc93c461a74ff892f3605a16d7c 100644 (file)
@@ -165,7 +165,8 @@ static struct parm_struct parm_table[] = {
                .p_class        = P_LOCAL,
                .offset         = LOCAL_VAR(comment),
                .special        = NULL,
-               .enum_list      = NULL
+               .enum_list      = NULL,
+               .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE | FLAG_PRINT
        },
        {
                .label          = "path",
@@ -173,7 +174,8 @@ static struct parm_struct parm_table[] = {
                .p_class        = P_LOCAL,
                .offset         = LOCAL_VAR(szPath),
                .special        = NULL,
-               .enum_list      = NULL
+               .enum_list      = NULL,
+               .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE | FLAG_PRINT,
        },
        {
                .label          = "directory",
@@ -181,7 +183,8 @@ static struct parm_struct parm_table[] = {
                .p_class        = P_LOCAL,
                .offset         = LOCAL_VAR(szPath),
                .special        = NULL,
-               .enum_list      = NULL
+               .enum_list      = NULL,
+               .flags          = FLAG_HIDE,
        },
        {
                .label          = "workgroup",
@@ -189,7 +192,8 @@ static struct parm_struct parm_table[] = {
                .p_class        = P_GLOBAL,
                .offset         = GLOBAL_VAR(szWorkgroup),
                .special        = NULL,
-               .enum_list      = NULL
+               .enum_list      = NULL,
+               .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_WIZARD,
        },
        {
                .label          = "realm",
@@ -197,7 +201,8 @@ static struct parm_struct parm_table[] = {
                .p_class        = P_GLOBAL,
                .offset         = GLOBAL_VAR(szRealm),
                .special        = handle_realm,
-               .enum_list      = NULL
+               .enum_list      = NULL,
+               .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_WIZARD,
        },
        {
                .label          = "netbios name",
@@ -205,7 +210,8 @@ static struct parm_struct parm_table[] = {
                .p_class        = P_GLOBAL,
                .offset         = GLOBAL_VAR(szNetbiosName),
                .special        = NULL,
-               .enum_list      = NULL
+               .enum_list      = NULL,
+               .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_WIZARD,
        },
        {
                .label          = "netbios aliases",
@@ -221,7 +227,8 @@ static struct parm_struct parm_table[] = {
                .p_class        = P_GLOBAL,
                .offset         = GLOBAL_VAR(szNetbiosScope),
                .special        = NULL,
-               .enum_list      = NULL
+               .enum_list      = NULL,
+               .flags          = FLAG_ADVANCED,
        },
        {
                .label          = "server string",
@@ -229,7 +236,8 @@ static struct parm_struct parm_table[] = {
                .p_class        = P_GLOBAL,
                .offset         = GLOBAL_VAR(szServerString),
                .special        = NULL,
-               .enum_list      = NULL
+               .enum_list      = NULL,
+               .flags          = FLAG_BASIC | FLAG_ADVANCED,
        },
        {
                .label          = "interfaces",
@@ -237,7 +245,8 @@ static struct parm_struct parm_table[] = {
                .p_class        = P_GLOBAL,
                .offset         = GLOBAL_VAR(szInterfaces),
                .special        = NULL,
-               .enum_list      = NULL
+               .enum_list      = NULL,
+               .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_WIZARD,
        },
        {
                .label          = "bind interfaces only",
@@ -245,7 +254,8 @@ static struct parm_struct parm_table[] = {
                .p_class        = P_GLOBAL,
                .offset         = GLOBAL_VAR(bBindInterfacesOnly),
                .special        = NULL,
-               .enum_list      = NULL
+               .enum_list      = NULL,
+               .flags          = FLAG_ADVANCED | FLAG_WIZARD,
        },
        {
                .label          = "ntvfs handler",
@@ -310,7 +320,8 @@ static struct parm_struct parm_table[] = {
                .p_class        = P_GLOBAL,
                .offset         = GLOBAL_VAR(bNullPasswords),
                .special        = NULL,
-               .enum_list      = NULL
+               .enum_list      = NULL,
+               .flags          = FLAG_ADVANCED | FLAG_DEPRECATED,
        },
        {
                .label          = "obey pam restrictions",
@@ -318,7 +329,8 @@ static struct parm_struct parm_table[] = {
                .p_class        = P_GLOBAL,
                .offset         = GLOBAL_VAR(bObeyPamRestrictions),
                .special        = NULL,
-               .enum_list      = NULL
+               .enum_list      = NULL,
+               .flags          = FLAG_ADVANCED,
        },
        {
                .label          = "password server",
@@ -358,7 +370,8 @@ static struct parm_struct parm_table[] = {
                .p_class        = P_GLOBAL,
                .offset         = GLOBAL_VAR(bLanmanAuth),
                .special        = NULL,
-               .enum_list      = NULL
+               .enum_list      = NULL,
+               .flags          = FLAG_ADVANCED,
        },
        {
                .label          = "ntlm auth",
@@ -366,7 +379,8 @@ static struct parm_struct parm_table[] = {
                .p_class        = P_GLOBAL,
                .offset         = GLOBAL_VAR(bNTLMAuth),
                .special        = NULL,
-               .enum_list      = NULL
+               .enum_list      = NULL,
+               .flags          = FLAG_ADVANCED,
        },
        {
                .label          = "client NTLMv2 auth",
@@ -374,7 +388,8 @@ static struct parm_struct parm_table[] = {
                .p_class        = P_GLOBAL,
                .offset         = GLOBAL_VAR(bClientNTLMv2Auth),
                .special        = NULL,
-               .enum_list      = NULL
+               .enum_list      = NULL,
+               .flags          = FLAG_ADVANCED,
        },
        {
                .label          = "client lanman auth",
@@ -382,7 +397,8 @@ static struct parm_struct parm_table[] = {
                .p_class        = P_GLOBAL,
                .offset         = GLOBAL_VAR(bClientLanManAuth),
                .special        = NULL,
-               .enum_list      = NULL
+               .enum_list      = NULL,
+               .flags          = FLAG_ADVANCED,
        },
        {
                .label          = "client plaintext auth",
@@ -390,7 +406,8 @@ static struct parm_struct parm_table[] = {
                .p_class        = P_GLOBAL,
                .offset         = GLOBAL_VAR(bClientPlaintextAuth),
                .special        = NULL,
-               .enum_list      = NULL
+               .enum_list      = NULL,
+               .flags          = FLAG_ADVANCED,
        },
        {
                .label          = "client use spnego principal",