Just another round of "quiet the gcc warnings"
authorpacman <pacman>
Wed, 14 Mar 2001 06:54:54 +0000 (06:54 +0000)
committerpacman <pacman>
Wed, 14 Mar 2001 06:54:54 +0000 (06:54 +0000)
src/include/radiusd.h
src/main/auth.c
src/main/client.c
src/main/conffile.c
src/main/proxy.c
src/main/radiusd.c
src/main/session.c
src/modules/rlm_preprocess/rlm_preprocess.c
src/modules/rlm_realm/rlm_realm.c

index 56a16f8..be22258 100644 (file)
@@ -219,6 +219,7 @@ REALM               *realm_findbyaddr(uint32_t ipno);
 int            pairlist_read(const char *file, PAIR_LIST **list, int complain);
 void           pairlist_free(PAIR_LIST **);
 int            read_config_files(void);
+int            read_realms_file(const char *file);
 
 /* nas.c */
 int            read_naslist_file(char *);
@@ -250,6 +251,7 @@ int proxy_send(REQUEST *request);
 char   *auth_name(char *buf, size_t buflen, REQUEST *request, int do_cli);
 int            rad_authenticate (REQUEST *);
 VALUE_PAIR     *rad_getpass(REQUEST *request);
+int            rad_check_password(REQUEST *request);
 
 /* exec.c */
 int            radius_exec_program(const char *,  REQUEST *,
index 94d1217..5e63365 100644 (file)
@@ -865,7 +865,7 @@ VALUE_PAIR *rad_getpass(REQUEST *request) {
        auth_item->lvalue = PW_DECODED;
 
        /* ignore more than one trailing '\0' */
-       auth_item->length = strlen(auth_item->strvalue);
+       auth_item->length = strlen((char *)auth_item->strvalue);
 
        return auth_item;
 }
index df0eba5..4a951bc 100644 (file)
@@ -183,7 +183,7 @@ int read_clients_file(const char *file)
                 *      Only do DNS lookups for machines.  Just print
                 *      the network as the long name.
                 */
-               if (c->netmask == ~0) {
+               if (c->netmask == ~0U) {
                        ip_hostname(c->longname, sizeof(c->longname), c->ipaddr);
                } else {
                        hostnm[strlen(hostnm)] = '/';
index 7d78671..2d7ed5e 100644 (file)
@@ -78,7 +78,6 @@ CONF_SECTION *config = NULL;
  */
 extern RADCLIENT *clients;
 extern REALM *realms;
-extern int read_realms_file(const char *file);
 
 static int generate_realms(const char *filename);
 static int generate_clients(const char *filename);
index dc08eee..f0258a0 100644 (file)
@@ -278,7 +278,8 @@ int proxy_send(REQUEST *request)
 
                rad_pwencode((char *)vp->strvalue,
                                &(vp->length),
-                               realm->secret, (char *)request->proxy->vector);
+                               (char *)realm->secret,
+                               (char *)request->proxy->vector);
  
        /*
         *      If there is no PW_CHAP_CHALLENGE attribute but there
index 74a62bb..f4009ab 100644 (file)
@@ -961,7 +961,7 @@ int main(int argc, char **argv)
                                RADCLIENT *cl;
                                if ((cl = client_find(packet->src_ipaddr)) == NULL) {
                                        radlog(L_ERR, "Ignoring request from unknown client %s:%d",
-                                       ip_ntoa(buffer, packet->src_ipaddr),
+                                       ip_ntoa((char *)buffer, packet->src_ipaddr),
                                        packet->src_port);
                                        rad_free(&packet);
                                        continue;
@@ -973,7 +973,7 @@ int main(int argc, char **argv)
                                REALM *rl;
                                if ((rl = realm_findbyaddr(packet->src_ipaddr)) == NULL) {
                                        radlog(L_ERR, "Ignoring request from unknown proxy %s:%d",
-                                       ip_ntoa(buffer, packet->src_ipaddr),
+                                       ip_ntoa((char *)buffer, packet->src_ipaddr),
                                        packet->src_port);
                                        rad_free(&packet);
                                        continue;
@@ -1284,7 +1284,7 @@ static int rad_lowerpair(REQUEST *request, VALUE_PAIR *vp) {
                return -1;
        }
 
-       rad_lowercase(vp->strvalue);
+       rad_lowercase((char *)vp->strvalue);
        DEBUG2("rad_lowerpair:  %s now '%s'", vp->name, vp->strvalue);
        return 0;
 }
@@ -1297,8 +1297,8 @@ static int rad_rmspace_pair(REQUEST *request, VALUE_PAIR *vp) {
                return -1;
        }
        
-       rad_rmspace(vp->strvalue);
-       vp->length = strlen(vp->strvalue);
+       rad_rmspace((char *)vp->strvalue);
+       vp->length = strlen((char *)vp->strvalue);
        DEBUG2("rad_rmspace_pair:  %s now '%s'", vp->name, vp->strvalue);
        
        return 0;
@@ -1972,7 +1972,6 @@ static int rad_spawn_child(REQUEST *request, RAD_REQUEST_FUNP fun)
 void sig_cleanup(int sig)
 {
 #ifndef HAVE_PTHREAD_H
-       int i;
        int status;
        child_pid_t pid;
        REQUEST *curreq;
index 3e6ae43..1926dfe 100644 (file)
@@ -93,7 +93,7 @@ int session_zap(uint32_t nasaddr, int port, const char *user,
        } else {
                INTPAIR(PW_SERVICE_TYPE, PW_LOGIN_USER); /* A guess, really */
        }
-       if(cliaddr != NULL)
+       if(cliaddr != 0)
                IPPAIR(PW_FRAMED_IP_ADDRESS, cliaddr);
        INTPAIR(PW_ACCT_SESSION_TIME, 0);
        INTPAIR(PW_ACCT_INPUT_OCTETS, 0);
index 60fd6a3..22831f4 100644 (file)
@@ -129,8 +129,9 @@ static void cisco_vsa_hack(VALUE_PAIR *vp)
                 */
                if ((ptr = strchr(vp->strvalue, '=')) != NULL) {
                        strNcpy(newattr, ptr + 1, sizeof(newattr));
-                       strNcpy(vp->strvalue, newattr, sizeof(vp->strvalue));
-                       vp->length = strlen(vp->strvalue);
+                       strNcpy((char *)vp->strvalue, newattr,
+                               sizeof(vp->strvalue));
+                       vp->length = strlen((char *)vp->strvalue);
                }
        }
 }
@@ -184,12 +185,12 @@ static void rad_mangle(rlm_preprocess_t *data, REQUEST *request)
                 *
                 *      Reported by Lucas Heise <root@laonet.net>
                 */
-               if ((strlen(namepair->strvalue) > 10) &&
+               if ((strlen((char *)namepair->strvalue) > 10) &&
                    (namepair->strvalue[10] == '/')) {
-                       for (ptr = namepair->strvalue + 11; *ptr; ptr++)
+                       for (ptr = (char *)namepair->strvalue + 11; *ptr; ptr++)
                                *(ptr - 1) = *ptr;
                        *(ptr - 1) = 0;
-                       namepair->length = strlen(namepair->strvalue);
+                       namepair->length = strlen((char *)namepair->strvalue);
                }
        }
 
index b6fa0ce..60b3917 100644 (file)
@@ -85,7 +85,7 @@ static REALM *check_for_realm(void *instance, REQUEST *request)
         *      We will be modifing this later, so we want our own copy
         *      of it.
         */
-       strNcpy(namebuf, request->username->strvalue, sizeof(namebuf));
+       strNcpy(namebuf, (char *)request->username->strvalue, sizeof(namebuf));
        username = namebuf;
 
        switch(inst->format)