param: Rename variable used for lp_pathname szPath
authorAndrew Bartlett <abartlet@samba.org>
Tue, 24 Dec 2013 03:03:16 +0000 (16:03 +1300)
committerJeremy Allison <jra@samba.org>
Sat, 25 Jan 2014 00:18:42 +0000 (16:18 -0800)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/param/loadparm.c
lib/param/param_functions.c
lib/param/param_table.c
source3/param/loadparm.c

index 47acb04a567d05e959c29fb4144a91068de12abe..a7a11ec5df4efb5b91e6c9dbd0136dbf2d52c1da 100644 (file)
@@ -745,11 +745,11 @@ bool lpcfg_add_home(struct loadparm_context *lp_ctx,
        if (service == NULL)
                return false;
 
-       if (!(*(default_service->szPath))
-           || strequal(default_service->szPath, lp_ctx->sDefault->szPath)) {
-               service->szPath = talloc_strdup(service, pszHomedir);
+       if (!(*(default_service->pathname))
+           || strequal(default_service->pathname, lp_ctx->sDefault->pathname)) {
+               service->pathname = talloc_strdup(service, pszHomedir);
        } else {
-               service->szPath = string_sub_talloc(service, lpcfg_pathname(default_service, lp_ctx->sDefault), "%H", pszHomedir);
+               service->pathname = string_sub_talloc(service, lpcfg_pathname(default_service, lp_ctx->sDefault), "%H", pszHomedir);
        }
 
        if (!(*(service->comment))) {
@@ -759,7 +759,7 @@ bool lpcfg_add_home(struct loadparm_context *lp_ctx,
        service->bBrowseable = default_service->bBrowseable;
 
        DEBUG(3, ("adding home's share [%s] for user '%s' at '%s'\n",
-                 pszHomename, user, service->szPath));
+                 pszHomename, user, service->pathname));
 
        return true;
 }
index 151c8b9f1e7d0eec112458d39c1733d96ddc0b6e..350266ca360d497618b18df346c3f2c477e61c14 100644 (file)
@@ -27,7 +27,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-FN_LOCAL_STRING(pathname, szPath)
+FN_LOCAL_STRING(pathname, pathname)
 FN_LOCAL_LIST(hostsallow, szHostsallow)
 FN_LOCAL_LIST(hostsdeny, szHostsdeny)
 FN_LOCAL_STRING(fstype, fstype)
index 3b1555d93645f9bc002e4cd148823c47490852e4..dcd8f3efd225eee677d6773c6e25b94faa25bc41 100644 (file)
@@ -310,7 +310,7 @@ static struct parm_struct parm_table[] = {
                .label          = "path",
                .type           = P_STRING,
                .p_class        = P_LOCAL,
-               .offset         = LOCAL_VAR(szPath),
+               .offset         = LOCAL_VAR(pathname),
                .special        = NULL,
                .enum_list      = NULL,
                .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE | FLAG_PRINT,
@@ -319,7 +319,7 @@ static struct parm_struct parm_table[] = {
                .label          = "directory",
                .type           = P_STRING,
                .p_class        = P_LOCAL,
-               .offset         = LOCAL_VAR(szPath),
+               .offset         = LOCAL_VAR(pathname),
                .special        = NULL,
                .enum_list      = NULL,
                .flags          = FLAG_HIDE,
index 66d77048692e28be66e5c4822edcb9789d0649ca..329cfd8475e42bec581a82547c3d8a3af5b44493 100644 (file)
@@ -146,7 +146,7 @@ static struct loadparm_service sDefault =
        .usershare = 0,
        .usershare_last_mod = {0, 0},
        .szService = NULL,
-       .szPath = NULL,
+       .pathname = NULL,
        .szUsername = NULL,
        .szInvalidUsers = NULL,
        .szValidUsers = NULL,
@@ -1678,10 +1678,10 @@ bool lp_add_home(const char *pszHomename, int iDefaultService,
        if (i < 0)
                return false;
 
-       if (!(*(ServicePtrs[iDefaultService]->szPath))
-           || strequal(ServicePtrs[iDefaultService]->szPath,
+       if (!(*(ServicePtrs[iDefaultService]->pathname))
+           || strequal(ServicePtrs[iDefaultService]->pathname,
                        lp_pathname(talloc_tos(), GLOBAL_SECTION_SNUM))) {
-               string_set(&ServicePtrs[i]->szPath, pszHomedir);
+               string_set(&ServicePtrs[i]->pathname, pszHomedir);
        }
 
        if (!(*(ServicePtrs[i]->comment))) {
@@ -1701,7 +1701,7 @@ bool lp_add_home(const char *pszHomename, int iDefaultService,
        ServicePtrs[i]->autoloaded = true;
 
        DEBUG(3, ("adding home's share [%s] for user '%s' at '%s'\n", pszHomename, 
-              user, ServicePtrs[i]->szPath ));
+              user, ServicePtrs[i]->pathname ));
 
        return true;
 }
@@ -1736,7 +1736,7 @@ static bool lp_add_ipc(const char *ipc_name, bool guest_ok)
                return false;
        }
 
-       string_set(&ServicePtrs[i]->szPath, tmpdir());
+       string_set(&ServicePtrs[i]->pathname, tmpdir());
        string_set(&ServicePtrs[i]->szUsername, "");
        string_set(&ServicePtrs[i]->comment, comment);
        string_set(&ServicePtrs[i]->fstype, "IPC");
@@ -2347,7 +2347,7 @@ bool service_ok(int iService)
                        ServicePtrs[iService]->bBrowseable = false;
        }
 
-       if (ServicePtrs[iService]->szPath[0] == '\0' &&
+       if (ServicePtrs[iService]->pathname[0] == '\0' &&
            strwicmp(ServicePtrs[iService]->szService, HOMES_NAME) != 0 &&
            ServicePtrs[iService]->szMSDfsProxy[0] == '\0'
            ) {
@@ -4197,7 +4197,7 @@ enum usershare_err parse_usershare_file(TALLOC_CTX *ctx,
                }
        }
 
-       if (snum != -1 && (strcmp(sharepath, ServicePtrs[snum]->szPath) == 0)) {
+       if (snum != -1 && (strcmp(sharepath, ServicePtrs[snum]->pathname) == 0)) {
                /* Path didn't change, no checks needed. */
                *pp_sharepath = sharepath;
                *pp_comment = comment;
@@ -4470,7 +4470,7 @@ static int process_usershare_file(const char *dir_name, const char *file_name, i
 
        /* And note when it was loaded. */
        ServicePtrs[iService]->usershare_last_mod = sbuf.st_ex_mtime;
-       string_set(&ServicePtrs[iService]->szPath, sharepath);
+       string_set(&ServicePtrs[iService]->pathname, sharepath);
        string_set(&ServicePtrs[iService]->comment, comment);
 
        ret = iService;