Changeset cb1e8a46 in rtems for cpukit/pppd


Ignore:
Timestamp:
Feb 27, 2002, 10:43:31 PM (18 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
e51bd96
Parents:
c52f1c7
Message:

2002-02-27 Ilya Alexeev <ilya@…>

  • net/if_ppp.c, pppd/auth.c, pppd/chat.c, pppd/pppd.h, pppd/sys-rtems.c: Add server with pap-authorization capabilities as well as eliminate some warnings.
Location:
cpukit/pppd
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cpukit/pppd/auth.c

    rc52f1c7 rcb1e8a46  
    117117
    118118/* Hook for a plugin to check the PAP user and password */
    119 int (*pap_auth_hook) __P((char *user, char *passwd, char **msgp,
     119int (*pap_auth_hook) __P((char *user, char *passwd/*, char **msgp,
    120120                          struct wordlist **paddrs,
    121                           struct wordlist **popts)) = NULL;
     121                          struct wordlist **popts*/)) = NULL;
    122122
    123123/* Hook for a plugin to know about the PAP user logout */
     
    740740    char **msg;
    741741{
     742    char passwd[64], user[64];
     743
     744    if (pap_auth_hook)
     745    {
     746        slprintf(passwd, sizeof(passwd), "%.*v", passwdlen, apasswd);
     747        slprintf(user, sizeof(user), "%.*v", userlen, auser);
     748
     749        return (*pap_auth_hook)(user, passwd/*, NULL, NULL, NULL*/) ?
     750            UPAP_AUTHACK : UPAP_AUTHNAK;
     751    }
     752
     753    return UPAP_AUTHACK;
     754
     755#if 0
    742756    int    ret = (int)UPAP_AUTHNAK;
    743757
     
    748762
    749763    return ret;
     764#endif
    750765}
    751766
     
    794809    int *lacks_ipp;
    795810{
     811    return 1;
     812
     813#if 0
    796814    int ret = (int)0;
    797815
     
    803821
    804822    return ( ret );
     823#endif
    805824}
    806825
     
    10121031    u_int32_t addr;
    10131032{
     1033#if 0
    10141034    int ok;
     1035#endif
    10151036
    10161037    /* don't allow loopback or multicast address */
    10171038    if (bad_ip_adrs(addr))
    10181039        return 0;
    1019 
     1040       
     1041    return 1;
     1042
     1043#if 0
    10201044    if (addresses[unit] != NULL) {
    10211045        ok = ip_addr_check(addr, addresses[unit]);
     
    10261050        return 0;               /* no addresses authorized */
    10271051    return allow_any_ip || !have_route_to(addr);
     1052#endif
    10281053}
    10291054
  • cpukit/pppd/chat.c

    rc52f1c7 rcb1e8a46  
    599599register char *s;
    600600{
    601     char file_data[STR_LEN];
     601/*  char file_data[STR_LEN];  */
    602602
    603603    if (say_next) {
  • cpukit/pppd/pppd.h

    rc52f1c7 rcb1e8a46  
    481481extern int (*holdoff_hook) __P((void));
    482482extern int (*pap_check_hook) __P((void));
    483 extern int (*pap_auth_hook) __P((char *user, char *passwd, char **msgp,
     483extern int (*pap_auth_hook) __P((char *user, char *passwd/*, char **msgp,
    484484                                 struct wordlist **paddrs,
    485                                  struct wordlist **popts));
     485                                 struct wordlist **popts*/));
    486486extern void (*pap_logout_hook) __P((void));
    487487extern int (*pap_passwd_hook) __P((char *user, char *passwd));
  • cpukit/pppd/sys-rtems.c

    rc52f1c7 rcb1e8a46  
    956956    int cmd;
    957957{
    958     int    status;
     958/*    int    status;  */
    959959    struct sockaddr_in address;
    960960    struct sockaddr_in netmask;
Note: See TracChangeset for help on using the changeset viewer.