loadparm: rename lp[cfg]_hostsallow to lp[cfg]_hosts_allow for consistency with docs
authorMichael Adam <obnox@samba.org>
Sun, 2 Feb 2014 13:14:09 +0000 (14:14 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 3 Feb 2014 00:26:40 +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>
lib/param/param_functions.c
source3/rpc_server/spoolss/srv_spoolss_nt.c
source3/smbd/process.c
source3/smbd/service.c
source3/utils/testparm.c
source4/param/share_classic.c
source4/smbd/service_stream.c

index 4596eed02c948c9dff857d7000bbefcb879bec19..cafa6d5611b43efa2ed8a9525408672a76e2fc4d 100644 (file)
@@ -28,7 +28,7 @@
 */
 
 FN_LOCAL_STRING(path, path)
-FN_LOCAL_LIST(hostsallow, hostsallow)
+FN_LOCAL_LIST(hosts_allow, hostsallow)
 FN_LOCAL_LIST(hostsdeny, hostsdeny)
 FN_LOCAL_STRING(fstype, fstype)
 FN_LOCAL_LIST(ntvfs_handler, ntvfs_handler)
index 150b6ca0ad9a3f29cb50050ddb29b741bea2a8c7..5433d9c221e0eaebc6a37269ac39edef352dc938 100644 (file)
@@ -1888,7 +1888,7 @@ WERROR _spoolss_OpenPrinterEx(struct pipes_struct *p,
                        rhost = raddr;
                }
 
-               if (!allow_access(lp_hostsdeny(snum), lp_hostsallow(snum),
+               if (!allow_access(lp_hostsdeny(snum), lp_hosts_allow(snum),
                                  rhost, raddr)) {
                        DEBUG(3, ("access DENIED (hosts allow/deny) for printer open\n"));
                        ZERO_STRUCTP(r->out.handle);
index 1f4cfe7e65f6e29366be5ce08040ae39546e1d05..93cdb7f0a83cf39807d558c7313cf620ad1d922a 100644 (file)
@@ -1545,7 +1545,7 @@ static connection_struct *switch_message(uint8 type, struct smb_request *req)
                 * Haven't we checked this in smbd_process already???
                 */
 
-               ok = allow_access(lp_hostsdeny(-1), lp_hostsallow(-1),
+               ok = allow_access(lp_hostsdeny(-1), lp_hosts_allow(-1),
                                  sconn->remote_hostname, raddr);
                TALLOC_FREE(raddr);
 
@@ -3483,7 +3483,7 @@ void smbd_process(struct tevent_context *ev_ctx,
                           sconn->remote_hostname,
                           locaddr);
 
-       if (!allow_access(lp_hostsdeny(-1), lp_hostsallow(-1),
+       if (!allow_access(lp_hostsdeny(-1), lp_hosts_allow(-1),
                          sconn->remote_hostname,
                          remaddr)) {
                /*
index 61b655ba0231bb257c2ebd6865ee7344761be31d..32032afd8f1dad520f5db97026c935fed1a00f98 100644 (file)
@@ -248,7 +248,7 @@ static NTSTATUS share_sanity_checks(const struct tsocket_address *remote_address
        }
 
        if (!lp_snum_ok(snum) ||
-           !allow_access(lp_hostsdeny(snum), lp_hostsallow(snum),
+           !allow_access(lp_hostsdeny(snum), lp_hosts_allow(snum),
                          rhost, raddr)) {
                return NT_STATUS_ACCESS_DENIED;
        }
index 7e49c0806426784a600b5f84c08444e8f1bc4ad9..f0c8e5fdc4bbdf2c586eb2e87ed8b137cd5b23c2 100644 (file)
@@ -339,7 +339,7 @@ static int do_global_checks(void)
 static void do_per_share_checks(int s)
 {
        const char **deny_list = lp_hostsdeny(s);
-       const char **allow_list = lp_hostsallow(s);
+       const char **allow_list = lp_hosts_allow(s);
        int i;
 
        if(deny_list) {
@@ -569,8 +569,8 @@ static void do_per_share_checks(int s)
                /* this is totally ugly, a real `quick' hack */
                for (s=0;s<1000;s++) {
                        if (VALID_SNUM(s)) {
-                               if (allow_access(lp_hostsdeny(-1), lp_hostsallow(-1), cname, caddr)
-                                   && allow_access(lp_hostsdeny(s), lp_hostsallow(s), cname, caddr)) {
+                               if (allow_access(lp_hostsdeny(-1), lp_hosts_allow(-1), cname, caddr)
+                                   && allow_access(lp_hostsdeny(s), lp_hosts_allow(s), cname, caddr)) {
                                        fprintf(stderr,"Allow connection from %s (%s) to %s\n",
                                                   cname,caddr,lp_servicename(talloc_tos(), s));
                                } else {
index 7cf04f9efd1c993319059d5e840f6fe36b0aceb9..52a08e382d3aa0929315eddcda41cd0334157d0b 100644 (file)
@@ -287,7 +287,7 @@ static const char **sclassic_string_list_option(TALLOC_CTX *mem_ctx, struct shar
        }
 
        if (strcmp(opt_name, SHARE_HOSTS_ALLOW) == 0) {
-               return lpcfg_hostsallow(s, lpcfg_default_service(lp_ctx));
+               return lpcfg_hosts_allow(s, lpcfg_default_service(lp_ctx));
        }
 
        if (strcmp(opt_name, SHARE_HOSTS_DENY) == 0) {
index 74bb477d287d0d439ec486a34128e36ea80b4352..f6db934e666cc349246dbc2bbb4658bebf4a4024 100644 (file)
@@ -179,7 +179,7 @@ static void stream_new_connection(struct tevent_context *ev,
        srv_conn->event.ctx     = ev;
        srv_conn->lp_ctx        = lp_ctx;
 
-       if (!socket_check_access(sock, "smbd", lpcfg_hostsallow(NULL, lpcfg_default_service(lp_ctx)), lpcfg_hostsdeny(NULL, lpcfg_default_service(lp_ctx)))) {
+       if (!socket_check_access(sock, "smbd", lpcfg_hosts_allow(NULL, lpcfg_default_service(lp_ctx)), lpcfg_hostsdeny(NULL, lpcfg_default_service(lp_ctx)))) {
                stream_terminate_connection(srv_conn, "denied by access rules");
                return;
        }