loadparm: rename lp[cfg]_pathname to lp[cfg]_path for consistency with docs
authorMichael Adam <obnox@samba.org>
Sun, 2 Feb 2014 13:04:46 +0000 (14:04 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 3 Feb 2014 00:26:13 +0000 (13:26 +1300)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
13 files changed:
lib/param/loadparm.c
lib/param/param_functions.c
source3/param/loadparm.c
source3/printing/nt_printing.c
source3/printing/printing.c
source3/printing/printspoolss.c
source3/rpc_server/srvsvc/srv_srvsvc_nt.c
source3/rpc_server/winreg/srv_winreg_nt.c
source3/smbd/lanman.c
source3/smbd/msdfs.c
source3/smbd/password.c
source3/smbd/service.c
source4/param/share_classic.c

index 09042685d19592cfb110090a6d23da9b4d7239ae..d7306eafafe6223448d582515737766054508577 100644 (file)
@@ -747,7 +747,7 @@ bool lpcfg_add_home(struct loadparm_context *lp_ctx,
            || strequal(default_service->pathname, lp_ctx->sDefault->pathname)) {
                service->pathname = talloc_strdup(service, pszHomedir);
        } else {
-               service->pathname = string_sub_talloc(service, lpcfg_pathname(default_service, lp_ctx->sDefault), "%H", pszHomedir);
+               service->pathname = string_sub_talloc(service, lpcfg_path(default_service, lp_ctx->sDefault), "%H", pszHomedir);
        }
 
        if (!(*(service->comment))) {
index 2e8026fc62cc46ccdf35bb98a7ee2c5fda09d5ed..868bef3e2b3ae1724317f28bf8fa51c145e326b2 100644 (file)
@@ -27,7 +27,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-FN_LOCAL_STRING(pathname, pathname)
+FN_LOCAL_STRING(path, pathname)
 FN_LOCAL_LIST(hostsallow, hostsallow)
 FN_LOCAL_LIST(hostsdeny, hostsdeny)
 FN_LOCAL_STRING(fstype, fstype)
index ebf49726a25c2ffaa070e87dc76a42e79ab138d6..a7fc416d5bdbf21931eeef98984f5a3e237000b9 100644 (file)
@@ -1728,7 +1728,7 @@ bool lp_add_home(const char *pszHomename, int iDefaultService,
 
        if (!(*(ServicePtrs[iDefaultService]->pathname))
            || strequal(ServicePtrs[iDefaultService]->pathname,
-                       lp_pathname(talloc_tos(), GLOBAL_SECTION_SNUM))) {
+                       lp_path(talloc_tos(), GLOBAL_SECTION_SNUM))) {
                string_set(&ServicePtrs[i]->pathname, pszHomedir);
        }
 
index 73c4cf76ee1ee61b22ec33cd3e8b1dafd436395d..9b0fcdccfc80343665222293e34f4750e56e1c91 100644 (file)
@@ -89,7 +89,7 @@ static bool print_driver_directories_init(void)
                return true;
        }
 
-       driver_path = lp_pathname(mem_ctx, service);
+       driver_path = lp_path(mem_ctx, service);
        if (driver_path == NULL) {
                talloc_free(mem_ctx);
                return false;
@@ -682,7 +682,7 @@ static uint32 get_correct_cversion(struct auth_session_info *session_info,
                                           server_messaging_context(),
                                           &conn,
                                           printdollar_snum,
-                                          lp_pathname(talloc_tos(), printdollar_snum),
+                                          lp_path(talloc_tos(), printdollar_snum),
                                           session_info, &oldcwd);
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(0,("get_correct_cversion: create_conn_struct "
@@ -1069,7 +1069,7 @@ WERROR move_driver_to_download_area(struct auth_session_info *session_info,
                                           server_messaging_context(),
                                           &conn,
                                           printdollar_snum,
-                                          lp_pathname(talloc_tos(), printdollar_snum),
+                                          lp_path(talloc_tos(), printdollar_snum),
                                           session_info, &oldcwd);
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(0,("move_driver_to_download_area: create_conn_struct "
@@ -1604,7 +1604,7 @@ bool delete_driver_files(const struct auth_session_info *session_info,
                                           server_messaging_context(),
                                           &conn,
                                           printdollar_snum,
-                                          lp_pathname(talloc_tos(), printdollar_snum),
+                                          lp_path(talloc_tos(), printdollar_snum),
                                           session_info, &oldcwd);
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(0,("delete_driver_files: create_conn_struct "
index ea93f74b190f674c2e1ee102b4268f3546017492..2f23607980a19283b27ec407443733af68611bdb 100644 (file)
@@ -2656,7 +2656,7 @@ static WERROR print_job_checks(const struct auth_session_info *server_info,
        /* see if we have sufficient disk space */
        if (lp_minprintspace(snum)) {
                minspace = lp_minprintspace(snum);
-               ret = sys_fsusage(lp_pathname(talloc_tos(), snum), &dspace, &dsize);
+               ret = sys_fsusage(lp_path(talloc_tos(), snum), &dspace, &dsize);
                if (ret == 0 && dspace < 2*minspace) {
                        DEBUG(3, ("print_job_checks: "
                                  "disk space check failed.\n"));
@@ -2702,7 +2702,7 @@ static WERROR print_job_spool_file(int snum, uint32_t jobid,
         * Verify that the file name is ok, within path, and it is
         * already already there */
        if (output_file) {
-               path = lp_pathname(talloc_tos(), snum);
+               path = lp_path(talloc_tos(), snum);
                len = strlen(path);
                if (strncmp(output_file, path, len) == 0 &&
                    (output_file[len - 1] == '/' || output_file[len] == '/')) {
@@ -2731,7 +2731,7 @@ static WERROR print_job_spool_file(int snum, uint32_t jobid,
        }
 
        slprintf(pjob->filename, sizeof(pjob->filename)-1,
-                "%s/%sXXXXXX", lp_pathname(talloc_tos(), snum),
+                "%s/%sXXXXXX", lp_path(talloc_tos(), snum),
                 PRINT_SPOOL_PREFIX);
        mask = umask(S_IRWXO | S_IRWXG);
        pjob->fd = mkstemp(pjob->filename);
@@ -2778,7 +2778,7 @@ WERROR print_job_start(const struct auth_session_info *server_info,
                return WERR_INTERNAL_DB_CORRUPTION;
        }
 
-       path = lp_pathname(talloc_tos(), snum);
+       path = lp_path(talloc_tos(), snum);
 
        werr = print_job_checks(server_info, msg_ctx, snum, &njobs);
        if (!W_ERROR_IS_OK(werr)) {
index 0507e834466eb7ed6680219f90c539d144e6819c..26d8a006460721ba17849a3efe8d26006c70f9ea 100644 (file)
@@ -121,8 +121,8 @@ NTSTATUS print_spool_open(files_struct *fsp,
         */
 
        pf->filename = talloc_asprintf(pf, "%s/%sXXXXXX",
-                                       lp_pathname(talloc_tos(),
-                                                   SNUM(fsp->conn)),
+                                       lp_path(talloc_tos(),
+                                               SNUM(fsp->conn)),
                                        PRINT_SPOOL_PREFIX);
        if (!pf->filename) {
                status = NT_STATUS_NO_MEMORY;
index f6db6fc2611bf4d3e458be110bb5d0a17e75507b..6058ac9e7760d6a28435b702b686c0b9a048149a 100644 (file)
@@ -201,7 +201,7 @@ static void init_srv_share_info_1(struct pipes_struct *p,
        if (remark) {
                remark = talloc_sub_advanced(
                        p->mem_ctx, lp_servicename(talloc_tos(), snum),
-                       get_current_username(), lp_pathname(talloc_tos(), snum),
+                       get_current_username(), lp_path(talloc_tos(), snum),
                        p->session_info->unix_token->uid, get_current_username(),
                        "", remark);
        }
@@ -229,12 +229,12 @@ static void init_srv_share_info_2(struct pipes_struct *p,
        if (remark) {
                remark = talloc_sub_advanced(
                        p->mem_ctx, lp_servicename(talloc_tos(), snum),
-                       get_current_username(), lp_pathname(talloc_tos(), snum),
+                       get_current_username(), lp_path(talloc_tos(), snum),
                        p->session_info->unix_token->uid, get_current_username(),
                        "", remark);
        }
        path = talloc_asprintf(p->mem_ctx,
-                       "C:%s", lp_pathname(talloc_tos(), snum));
+                       "C:%s", lp_path(talloc_tos(), snum));
 
        if (path) {
                /*
@@ -294,7 +294,7 @@ static void init_srv_share_info_501(struct pipes_struct *p,
        if (remark) {
                remark = talloc_sub_advanced(
                        p->mem_ctx, lp_servicename(talloc_tos(), snum),
-                       get_current_username(), lp_pathname(talloc_tos(), snum),
+                       get_current_username(), lp_path(talloc_tos(), snum),
                        p->session_info->unix_token->uid, get_current_username(),
                        "", remark);
        }
@@ -328,11 +328,11 @@ static void init_srv_share_info_502(struct pipes_struct *p,
        if (remark) {
                remark = talloc_sub_advanced(
                        p->mem_ctx, lp_servicename(talloc_tos(), snum),
-                       get_current_username(), lp_pathname(talloc_tos(), snum),
+                       get_current_username(), lp_path(talloc_tos(), snum),
                        p->session_info->unix_token->uid, get_current_username(),
                        "", remark);
        }
-       path = talloc_asprintf(ctx, "C:%s", lp_pathname(talloc_tos(), snum));
+       path = talloc_asprintf(ctx, "C:%s", lp_path(talloc_tos(), snum));
        if (path) {
                /*
                 * Change / to \\ so that win2k will see it as a valid path.  This was added to
@@ -369,7 +369,7 @@ static void init_srv_share_info_1004(struct pipes_struct *p,
        if (remark) {
                remark = talloc_sub_advanced(
                        p->mem_ctx, lp_servicename(talloc_tos(), snum),
-                       get_current_username(), lp_pathname(talloc_tos(), snum),
+                       get_current_username(), lp_path(talloc_tos(), snum),
                        p->session_info->unix_token->uid, get_current_username(),
                        "", remark);
        }
@@ -1563,7 +1563,7 @@ WERROR _srvsvc_NetShareSetInfo(struct pipes_struct *p,
 
        switch (r->in.level) {
        case 1:
-               pathname = lp_pathname(ctx, snum);
+               pathname = lp_path(ctx, snum);
                comment = talloc_strdup(ctx, info->info1->comment);
                type = info->info1->type;
                psd = NULL;
@@ -1592,7 +1592,7 @@ WERROR _srvsvc_NetShareSetInfo(struct pipes_struct *p,
                map_generic_share_sd_bits(psd);
                break;
        case 1004:
-               pathname = lp_pathname(ctx, snum);
+               pathname = lp_path(ctx, snum);
                comment = talloc_strdup(ctx, info->info1004->comment);
                type = STYPE_DISKTREE;
                break;
@@ -1613,7 +1613,7 @@ WERROR _srvsvc_NetShareSetInfo(struct pipes_struct *p,
        case 1007:
                return WERR_ACCESS_DENIED;
        case 1501:
-               pathname = lp_pathname(ctx, snum);
+               pathname = lp_path(ctx, snum);
                comment = lp_comment(ctx, snum);
                psd = info->info1501->sd;
                map_generic_share_sd_bits(psd);
@@ -1654,7 +1654,7 @@ WERROR _srvsvc_NetShareSetInfo(struct pipes_struct *p,
 
        /* Only call modify function if something changed. */
 
-       if (strcmp(path, lp_pathname(talloc_tos(), snum)) || strcmp(comment, lp_comment(talloc_tos(), snum))
+       if (strcmp(path, lp_path(talloc_tos(), snum)) || strcmp(comment, lp_comment(talloc_tos(), snum))
                        || (lp_max_connections(snum) != max_connections)) {
                if (!lp_change_share_cmd(talloc_tos()) || !*lp_change_share_cmd(talloc_tos())) {
                        DEBUG(10,("_srvsvc_NetShareSetInfo: No change share command\n"));
@@ -2112,7 +2112,7 @@ WERROR _srvsvc_NetGetFileSecurity(struct pipes_struct *p,
                                           server_event_context(),
                                           server_messaging_context(),
                                           &conn,
-                                          snum, lp_pathname(talloc_tos(), snum),
+                                          snum, lp_path(talloc_tos(), snum),
                                           p->session_info, &oldcwd);
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(10, ("create_conn_struct failed: %s\n",
@@ -2259,7 +2259,7 @@ WERROR _srvsvc_NetSetFileSecurity(struct pipes_struct *p,
                                           server_event_context(),
                                           server_messaging_context(),
                                           &conn,
-                                          snum, lp_pathname(talloc_tos(), snum),
+                                          snum, lp_path(talloc_tos(), snum),
                                           p->session_info, &oldcwd);
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(10, ("create_conn_struct failed: %s\n",
index fc57c225999e3598d3804bc4284721194c367c8b..c2f2b5385a3823781cbd1fceac1f560bbd6b08ef 100644 (file)
@@ -663,7 +663,7 @@ static int validate_reg_filename(TALLOC_CTX *ctx, char **pp_fname )
                        continue;
                }
 
-               share_path = lp_pathname(talloc_tos(), snum);
+               share_path = lp_path(talloc_tos(), snum);
 
                /* make sure we have a path (e.g. [homes] ) */
                if (strlen(share_path) == 0) {
index 5e6a8a05603b48428b9e24a30dbde5a5b199db14..d0cf6ad37855a9d5ec1b4110e8c7895881c5fb7a 100644 (file)
@@ -1909,7 +1909,7 @@ static int fill_share_info(connection_struct *conn, int snum, int uLevel,
                        len += StrlenExpanded(conn,snum,lp_comment(talloc_tos(), snum));
                }
                if (uLevel > 1) {
-                       len += strlen(lp_pathname(talloc_tos(), snum)) + 1;
+                       len += strlen(lp_path(talloc_tos(), snum)) + 1;
                }
                if (buflen) {
                        *buflen = struct_len;
@@ -1961,7 +1961,7 @@ static int fill_share_info(connection_struct *conn, int snum, int uLevel,
                SSVALS(p,22,-1);                /* max uses */
                SSVAL(p,24,1); /* current uses */
                SIVAL(p,26,PTR_DIFF(p2,baseaddr)); /* local pathname */
-               len += CopyAndAdvance(&p2,lp_pathname(talloc_tos(),snum),&l2);
+               len += CopyAndAdvance(&p2,lp_path(talloc_tos(),snum),&l2);
                memset(p+30,0,SHPWLEN+2); /* passwd (reserved), pad field */
        }
 
index 53c06dd015c017b3f5ab1bc3afab1be4fc09a566..97849d2e6e6a775a0fef0963468383cc8bd93a1e 100644 (file)
@@ -1027,7 +1027,7 @@ NTSTATUS get_referred_path(TALLOC_CTX *ctx,
                                        server_event_context(),
                                        server_messaging_context(),
                                        &conn, snum,
-                                       lp_pathname(talloc_tos(), snum), NULL, &oldpath);
+                                       lp_path(talloc_tos(), snum), NULL, &oldpath);
        if (!NT_STATUS_IS_OK(status)) {
                TALLOC_FREE(pdp);
                return status;
@@ -1219,14 +1219,14 @@ static bool junction_to_local_path(const struct junction_map *jucn,
                                        server_event_context(),
                                        server_messaging_context(),
                                        conn_out,
-                                       snum, lp_pathname(talloc_tos(), snum), NULL, oldpath);
+                                       snum, lp_path(talloc_tos(), snum), NULL, oldpath);
        if (!NT_STATUS_IS_OK(status)) {
                return False;
        }
 
        *pp_path_out = talloc_asprintf(*conn_out,
                        "%s/%s",
-                       lp_pathname(talloc_tos(), snum),
+                       lp_path(talloc_tos(), snum),
                        jucn->volume_name);
        if (!*pp_path_out) {
                vfs_ChDir(*conn_out, *oldpath);
@@ -1361,7 +1361,7 @@ static int count_dfs_links(TALLOC_CTX *ctx, int snum)
        DIR *dirp = NULL;
        const char *dname = NULL;
        char *talloced = NULL;
-       const char *connect_path = lp_pathname(talloc_tos(), snum);
+       const char *connect_path = lp_path(talloc_tos(), snum);
        const char *msdfs_proxy = lp_msdfs_proxy(talloc_tos(), snum);
        connection_struct *conn;
        NTSTATUS status;
@@ -1431,7 +1431,7 @@ static int form_junctions(TALLOC_CTX *ctx,
        DIR *dirp = NULL;
        const char *dname = NULL;
        char *talloced = NULL;
-       const char *connect_path = lp_pathname(talloc_tos(), snum);
+       const char *connect_path = lp_path(talloc_tos(), snum);
        char *service_name = lp_servicename(talloc_tos(), snum);
        const char *msdfs_proxy = lp_msdfs_proxy(talloc_tos(), snum);
        connection_struct *conn;
index 3a64d1b13845307d7dab05bfd8d565c492f65deb..edff5d9d2ecc4ecf7437e173ea4a86306c7c0025 100644 (file)
@@ -127,7 +127,7 @@ int register_homes_share(const char *username)
        if (result != -1) {
                DEBUG(3, ("Using static (or previously created) service for "
                          "user '%s'; path = '%s'\n", username,
-                         lp_pathname(talloc_tos(), result)));
+                         lp_path(talloc_tos(), result)));
                return result;
        }
 
index a7464f0722c5011c44ccb3c845a6e7ad54cf6da9..61b655ba0231bb257c2ebd6865ee7344761be31d 100644 (file)
@@ -597,7 +597,7 @@ static NTSTATUS make_connection_snum(struct smbd_server_connection *sconn,
                                        conn->session_info->unix_token->gid,
                                        conn->session_info->unix_info->sanitized_username,
                                        conn->session_info->info->domain_name,
-                                       lp_pathname(talloc_tos(), snum));
+                                       lp_path(talloc_tos(), snum));
                if (!s) {
                        status = NT_STATUS_NO_MEMORY;
                        goto err_root_exit;
index 50b05f322e94fa402f1dc5781e42b35cd4d8f002..7cf04f9efd1c993319059d5e840f6fe36b0aceb9 100644 (file)
@@ -76,7 +76,7 @@ static const char *sclassic_string_option(struct share_config *scfg,
        }
 
        if (strcmp(opt_name, SHARE_PATH) == 0) {
-               return lpcfg_pathname(s, lpcfg_default_service(lp_ctx));
+               return lpcfg_path(s, lpcfg_default_service(lp_ctx));
        }
 
        if (strcmp(opt_name, SHARE_COMMENT) == 0) {