mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
loadparm: rename the variable for "path" from pathname to path
for consistency docs/variable/function. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
This commit is contained in:
parent
d85bab275a
commit
3e8d02be8e
@ -743,11 +743,11 @@ bool lpcfg_add_home(struct loadparm_context *lp_ctx,
|
||||
if (service == NULL)
|
||||
return false;
|
||||
|
||||
if (!(*(default_service->pathname))
|
||||
|| strequal(default_service->pathname, lp_ctx->sDefault->pathname)) {
|
||||
service->pathname = talloc_strdup(service, pszHomedir);
|
||||
if (!(*(default_service->path))
|
||||
|| strequal(default_service->path, lp_ctx->sDefault->path)) {
|
||||
service->path = talloc_strdup(service, pszHomedir);
|
||||
} else {
|
||||
service->pathname = string_sub_talloc(service, lpcfg_path(default_service, lp_ctx->sDefault), "%H", pszHomedir);
|
||||
service->path = string_sub_talloc(service, lpcfg_path(default_service, lp_ctx->sDefault), "%H", pszHomedir);
|
||||
}
|
||||
|
||||
if (!(*(service->comment))) {
|
||||
@ -757,7 +757,7 @@ bool lpcfg_add_home(struct loadparm_context *lp_ctx,
|
||||
service->browseable = default_service->browseable;
|
||||
|
||||
DEBUG(3, ("adding home's share [%s] for user '%s' at '%s'\n",
|
||||
pszHomename, user, service->pathname));
|
||||
pszHomename, user, service->path));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
FN_LOCAL_STRING(path, pathname)
|
||||
FN_LOCAL_STRING(path, path)
|
||||
FN_LOCAL_LIST(hostsallow, hostsallow)
|
||||
FN_LOCAL_LIST(hostsdeny, hostsdeny)
|
||||
FN_LOCAL_STRING(fstype, fstype)
|
||||
|
@ -310,7 +310,7 @@ static struct parm_struct parm_table[] = {
|
||||
.label = "path",
|
||||
.type = P_STRING,
|
||||
.p_class = P_LOCAL,
|
||||
.offset = LOCAL_VAR(pathname),
|
||||
.offset = LOCAL_VAR(path),
|
||||
.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(pathname),
|
||||
.offset = LOCAL_VAR(path),
|
||||
.special = NULL,
|
||||
.enum_list = NULL,
|
||||
.flags = FLAG_HIDE,
|
||||
|
@ -146,7 +146,7 @@ static struct loadparm_service sDefault =
|
||||
.usershare = 0,
|
||||
.usershare_last_mod = {0, 0},
|
||||
.szService = NULL,
|
||||
.pathname = NULL,
|
||||
.path = NULL,
|
||||
.username = NULL,
|
||||
.invalid_users = NULL,
|
||||
.valid_users = NULL,
|
||||
@ -1726,10 +1726,10 @@ bool lp_add_home(const char *pszHomename, int iDefaultService,
|
||||
if (i < 0)
|
||||
return false;
|
||||
|
||||
if (!(*(ServicePtrs[iDefaultService]->pathname))
|
||||
|| strequal(ServicePtrs[iDefaultService]->pathname,
|
||||
if (!(*(ServicePtrs[iDefaultService]->path))
|
||||
|| strequal(ServicePtrs[iDefaultService]->path,
|
||||
lp_path(talloc_tos(), GLOBAL_SECTION_SNUM))) {
|
||||
string_set(&ServicePtrs[i]->pathname, pszHomedir);
|
||||
string_set(&ServicePtrs[i]->path, pszHomedir);
|
||||
}
|
||||
|
||||
if (!(*(ServicePtrs[i]->comment))) {
|
||||
@ -1749,7 +1749,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]->pathname ));
|
||||
user, ServicePtrs[i]->path ));
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -1784,7 +1784,7 @@ static bool lp_add_ipc(const char *ipc_name, bool guest_ok)
|
||||
return false;
|
||||
}
|
||||
|
||||
string_set(&ServicePtrs[i]->pathname, tmpdir());
|
||||
string_set(&ServicePtrs[i]->path, tmpdir());
|
||||
string_set(&ServicePtrs[i]->username, "");
|
||||
string_set(&ServicePtrs[i]->comment, comment);
|
||||
string_set(&ServicePtrs[i]->fstype, "IPC");
|
||||
@ -2370,7 +2370,7 @@ bool service_ok(int iService)
|
||||
ServicePtrs[iService]->browseable = false;
|
||||
}
|
||||
|
||||
if (ServicePtrs[iService]->pathname[0] == '\0' &&
|
||||
if (ServicePtrs[iService]->path[0] == '\0' &&
|
||||
strwicmp(ServicePtrs[iService]->szService, HOMES_NAME) != 0 &&
|
||||
ServicePtrs[iService]->msdfs_proxy[0] == '\0'
|
||||
) {
|
||||
@ -4006,7 +4006,7 @@ enum usershare_err parse_usershare_file(TALLOC_CTX *ctx,
|
||||
}
|
||||
}
|
||||
|
||||
if (snum != -1 && (strcmp(sharepath, ServicePtrs[snum]->pathname) == 0)) {
|
||||
if (snum != -1 && (strcmp(sharepath, ServicePtrs[snum]->path) == 0)) {
|
||||
/* Path didn't change, no checks needed. */
|
||||
*pp_sharepath = sharepath;
|
||||
*pp_comment = comment;
|
||||
@ -4279,7 +4279,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]->pathname, sharepath);
|
||||
string_set(&ServicePtrs[iService]->path, sharepath);
|
||||
string_set(&ServicePtrs[iService]->comment, comment);
|
||||
|
||||
ret = iService;
|
||||
|
Loading…
x
Reference in New Issue
Block a user