]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
remove more unused variables
authorAlan T. DeKok <aland@freeradius.org>
Tue, 19 May 2020 23:00:26 +0000 (19:00 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 19 May 2020 23:01:25 +0000 (19:01 -0400)
src/modules/proto_control/proto_control_tcp.c
src/modules/proto_dhcpv4/proto_dhcpv4_udp.c
src/modules/proto_dhcpv6/proto_dhcpv6_udp.c
src/modules/proto_radius/proto_radius_load.c
src/modules/proto_radius/proto_radius_tcp.c
src/modules/proto_radius/proto_radius_udp.c
src/modules/proto_vmps/proto_vmps_udp.c

index e7dfc964101a9ca00028f334fb7d84ef7993d7a1..4803402878c88a95a362bbcda49b3962734afa15 100644 (file)
@@ -207,7 +207,6 @@ static int mod_open(fr_listen_t *li)
 
        int                             sockfd;
        uint16_t                        port = inst->port;
-       CONF_ITEM                       *ci;
 
        fr_assert(!inst->connection);
 
@@ -232,11 +231,6 @@ static int mod_open(fr_listen_t *li)
 
        inst->sockfd = sockfd;
 
-       ci = cf_parent(inst->cs); /* listen { ... } */
-       fr_assert(ci != NULL);
-       ci = cf_parent(ci);
-       fr_assert(ci != NULL);
-
        inst->name = fr_app_io_socket_name(inst, &proto_control_tcp,
                                           NULL, 0,
                                           &inst->ipaddr, inst->port);
index ab4bc3f814302861ef3458f5af8a56d8cc5fac71..bd6d5e2b41657aa6644b8a642460a17a8a9081db 100644 (file)
@@ -461,7 +461,6 @@ static int mod_open(fr_listen_t *li)
 
        int                             sockfd, rcode;
        uint16_t                        port = inst->port;
-       CONF_ITEM                       *ci;
 
        li->fd = sockfd = fr_socket_server_udp(&inst->ipaddr, &port, inst->port_name, true);
        if (sockfd < 0) {
@@ -496,12 +495,7 @@ static int mod_open(fr_listen_t *li)
                }
        }
 
-       /*
-        *      SUID up is really only needed if interface is set, OR port <1024.
-        */
-       rad_suid_up();
        rcode = fr_socket_bind(sockfd, &inst->ipaddr, &port, inst->interface);
-       rad_suid_down();
        if (rcode < 0) {
                close(sockfd);
                PERROR("Failed binding socket");
@@ -510,11 +504,6 @@ static int mod_open(fr_listen_t *li)
 
        thread->sockfd = sockfd;
 
-       ci = cf_parent(inst->cs); /* listen { ... } */
-       fr_assert(ci != NULL);
-       ci = cf_parent(ci);
-       fr_assert(ci != NULL);
-
        thread->name = fr_app_io_socket_name(thread, &proto_dhcpv4_udp,
                                             NULL, 0,
                                             &inst->ipaddr, inst->port,
index ad7e9d1d0b56803d45d314435f274aa0b00171ab..4caf3f6ec833a88b526980e16dd5bfbb8572943e 100644 (file)
@@ -300,7 +300,6 @@ static int mod_open(fr_listen_t *li)
 
        int                             sockfd, rcode;
        uint16_t                        port = inst->port;
-       CONF_ITEM                       *ci;
 
        li->fd = sockfd = fr_socket_server_udp(&inst->ipaddr, &port, inst->port_name, true);
        if (sockfd < 0) {
@@ -384,11 +383,6 @@ static int mod_open(fr_listen_t *li)
 
        thread->sockfd = sockfd;
 
-       ci = cf_parent(inst->cs); /* listen { ... } */
-       fr_assert(ci != NULL);
-       ci = cf_parent(ci);
-       fr_assert(ci != NULL);
-
        thread->name = fr_app_io_socket_name(thread, &proto_dhcpv6_udp,
                                             NULL, 0,
                                             &inst->ipaddr, inst->port,
index 5ce567999ac13901839e7d74d8f8863359b77525..b4cbfe24663effb7b46719912304b863f0c57995 100644 (file)
@@ -210,7 +210,6 @@ static int mod_open(fr_listen_t *li)
        proto_radius_load_thread_t      *thread = talloc_get_type_abort(li->thread_instance, proto_radius_load_thread_t);
 
        fr_ipaddr_t                     ipaddr;
-       CONF_ITEM                       *ci;
 
        if (socketpair(AF_UNIX, SOCK_STREAM, 0, (int *) &thread->sockets) < 0) {
                PERROR("Failed opening /dev/null: %s", fr_syserror(errno));
@@ -223,11 +222,6 @@ static int mod_open(fr_listen_t *li)
        ipaddr.af = AF_INET;
        li->app_io_addr = fr_app_io_socket_addr(li, IPPROTO_UDP, &ipaddr, 0);
 
-       ci = cf_parent(inst->cs); /* listen { ... } */
-       fr_assert(ci != NULL);
-       ci = cf_parent(ci);
-       fr_assert(ci != NULL);
-
        thread->name = talloc_typed_asprintf(thread, "radius_load from filename %s", inst->filename ? inst->filename : "none");
        thread->parent = talloc_parent(li);
 
index 71b904b42d5aae856ee5b300e1c1a669fbd708e9..488e7084583b70a5a7973e0123bb3a8b1f2373b9 100644 (file)
@@ -290,7 +290,6 @@ static int mod_open(fr_listen_t *li)
 
        int                             sockfd;
        uint16_t                        port = inst->port;
-       CONF_ITEM                       *ci;
 
        fr_assert(!thread->connection);
 
@@ -315,11 +314,6 @@ static int mod_open(fr_listen_t *li)
 
        thread->sockfd = sockfd;
 
-       ci = cf_parent(inst->cs); /* listen { ... } */
-       fr_assert(ci != NULL);
-       ci = cf_parent(ci);
-       fr_assert(ci != NULL);
-
        thread->name = fr_app_io_socket_name(thread, &proto_radius_tcp,
                                             NULL, 0,
                                             &inst->ipaddr, inst->port,
index 7bd7247dbbae5a85dce7cc6944fcedf25b3a2fa2..20c923f07c2eda0b3dcf03213372c151f48cdad8 100644 (file)
@@ -299,7 +299,6 @@ static int mod_open(fr_listen_t *li)
 
        int                             sockfd;
        uint16_t                        port = inst->port;
-       CONF_ITEM                       *ci;
 
        li->fd = sockfd = fr_socket_server_udp(&inst->ipaddr, &port, inst->port_name, true);
        if (sockfd < 0) {
@@ -353,11 +352,6 @@ static int mod_open(fr_listen_t *li)
 
        thread->sockfd = sockfd;
 
-       ci = cf_parent(inst->cs); /* listen { ... } */
-       fr_assert(ci != NULL);
-       ci = cf_parent(ci);
-       fr_assert(ci != NULL);
-
        thread->name = fr_app_io_socket_name(thread, &proto_radius_udp,
                                             NULL, 0,
                                             &inst->ipaddr, inst->port,
index b501f493869064caccc1bc2f05bdbff64ab1842f..d44c96dba0d910c0378cefe4b61176e7049e78d1 100644 (file)
@@ -305,7 +305,6 @@ static int mod_open(fr_listen_t *li)
 
        int                             sockfd;
        uint16_t                        port = inst->port;
-       CONF_ITEM                       *ci;
 
        li->fd = sockfd = fr_socket_server_udp(&inst->ipaddr, &port, inst->port_name, true);
        if (sockfd < 0) {
@@ -337,11 +336,6 @@ static int mod_open(fr_listen_t *li)
 
        thread->sockfd = sockfd;
 
-       ci = cf_parent(inst->cs); /* listen { ... } */
-       fr_assert(ci != NULL);
-       ci = cf_parent(ci);
-       fr_assert(ci != NULL);
-
        thread->name = fr_app_io_socket_name(thread, &proto_vmps_udp,
                                             NULL, 0,
                                             &inst->ipaddr, inst->port,