kfw 1.2.6 exports

Jeffrey Altman jaltman at columbia.edu
Thu Nov 7 11:55:01 EST 2002


Those APIs are for internal use only.  Since they don't do anything at
all related to Kerberos you sould replace them with your own
application specific functions that read from/write to the network.


int
my_write_message(krb5_pointer ptr, krb5_data *data)
{
    int fd = *((int *)ptr);
    long msglen;

    msglen = htonl(data->length);
    if (net_write(fd,(CHAR *)&msglen,4) != 4) {
        return(-1);
    }
    if ( data->length ) {
        if (net_write(fd,data->data,data->length) != data->length) {
            return(-1);
        }
    }
    return(0);
}

int
my_read_message( krb5_pointer ptr,  krb5_data * data)
{
    extern int ttyfd;
    int fd = *((int *)ptr);
    long msglen;
    char *p;
    int i, rc;

    if (net_read(fd,&msglen,4) < 0)
        return(-1);

    data->length = ntohl(msglen);
    if ( data->length ) {
        data->data = malloc(data->length);

        i = 0;
        while ( i < data->length ) {
            if ((rc = net_read(fd,&data->data[i],(data->length - i)))
< 0)
                return(-1);
            i += rc;
        }
    }
    return(0);
}


> <fontfamily><param>Arial</param><smaller>I'm finializing an
> implementation of lprng clients (lpr, lpq and lprm) for the WIN2K
> platform.  I've run into a problem with kwf krb5-1.2.6 final libraries. 
> Two api's, krb5_read_message and krb5_write_message, are no long being
> exported.  These two api's are used by the lprng clients.  Is it possible
> to get these two api's exported.
> 
> 
> David
> 



More information about the krbdev mailing list