Changeset 165dd8e in rtems-libbsd for freebsd/lib/libc/resolv


Ignore:
Timestamp:
Apr 8, 2015, 1:37:49 PM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, b96abfd647154f10ea8f7fac68e25676636eded5, ea5d0c78038d92597983c0922a011a62f5dc2dea, aef7a74b94f8860c59438933239fb41314f1abb7, freebsd-9.3, 9b9a9768474265ecab31c40e0502b453a187145f
Children:
b3ff71e
Parents:
76395ec
git-author:
Sebastian Huber <sebastian.huber@…> (04/08/15 13:37:49)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/20/15 07:58:21)
Message:

Update to FreeBSD Stable/9 2015-04-08

Location:
freebsd/lib/libc/resolv
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • freebsd/lib/libc/resolv/herror.c

    r76395ec r165dd8e  
    4949#if defined(LIBC_SCCS) && !defined(lint)
    5050static const char sccsid[] = "@(#)herror.c      8.1 (Berkeley) 6/4/93";
    51 static const char rcsid[] = "$Id: herror.c,v 1.3.18.1 2005/04/27 05:01:09 sra Exp $";
     51static const char rcsid[] = "$Id: herror.c,v 1.4 2005/04/27 04:56:41 sra Exp $";
    5252#endif /* LIBC_SCCS and not lint */
    5353#include <sys/cdefs.h>
  • freebsd/lib/libc/resolv/res_comp.c

    r76395ec r165dd8e  
    6969#if defined(LIBC_SCCS) && !defined(lint)
    7070static const char sccsid[] = "@(#)res_comp.c    8.1 (Berkeley) 6/4/93";
    71 static const char rcsid[] = "$Id: res_comp.c,v 1.3.18.2 2005/07/28 07:38:11 marka Exp $";
     71static const char rcsid[] = "$Id: res_comp.c,v 1.5 2005/07/28 06:51:50 marka Exp $";
    7272#endif /* LIBC_SCCS and not lint */
    7373#include <sys/cdefs.h>
  • freebsd/lib/libc/resolv/res_data.c

    r76395ec r165dd8e  
    1919
    2020#if defined(LIBC_SCCS) && !defined(lint)
    21 static const char rcsid[] = "$Id: res_data.c,v 1.3.18.2 2007/09/14 05:35:47 marka Exp $";
     21static const char rcsid[] = "$Id: res_data.c,v 1.7 2008/12/11 09:59:00 marka Exp $";
    2222#endif /* LIBC_SCCS and not lint */
    2323#include <sys/cdefs.h>
     
    110110                _res.options = RES_DEFAULT;
    111111
    112         /*
    113          * This one used to initialize implicitly to zero, so unless the app
    114          * has set it to something in particular, we can randomize it now.
    115          */
    116         if (!_res.id)
    117                 _res.id = res_randomid();
    118 
    119112        return (__res_vinit(&_res, 1));
    120113}
     
    265258                                 class, type,
    266259                                 answer, anslen));
     260}
     261
     262u_int
     263res_randomid(void) {
     264        if ((_res.options & RES_INIT) == 0U && res_init() == -1) {
     265                RES_SET_H_ERRNO(&_res, NETDB_INTERNAL);
     266                return (-1);
     267        }
     268
     269        return (res_nrandomid(&_res));
    267270}
    268271
  • freebsd/lib/libc/resolv/res_debug.c

    r76395ec r165dd8e  
    11#include <machine/rtems-bsd-user-space.h>
     2
     3/*
     4 * Portions Copyright (C) 2004, 2005, 2008, 2009  Internet Systems Consortium, Inc. ("ISC")
     5 * Portions Copyright (C) 1996-2003  Internet Software Consortium.
     6 *
     7 * Permission to use, copy, modify, and/or distribute this software for any
     8 * purpose with or without fee is hereby granted, provided that the above
     9 * copyright notice and this permission notice appear in all copies.
     10 *
     11 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
     12 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
     13 * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
     14 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
     15 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
     16 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
     17 * PERFORMANCE OF THIS SOFTWARE.
     18 */
    219
    320/*
    421 * Copyright (c) 1985
    522 *    The Regents of the University of California.  All rights reserved.
    6  * 
     23 *
    724 * Redistribution and use in source and binary forms, with or without
    825 * modification, are permitted provided that the following conditions
     
    1633 *    may be used to endorse or promote products derived from this software
    1734 *    without specific prior written permission.
    18  * 
     35 *
    1936 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
    2037 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     
    3249/*
    3350 * Portions Copyright (c) 1993 by Digital Equipment Corporation.
    34  * 
     51 *
    3552 * Permission to use, copy, modify, and distribute this software for any
    3653 * purpose with or without fee is hereby granted, provided that the above
     
    3956 * publicity pertaining to distribution of the document or software without
    4057 * specific, written prior permission.
    41  * 
     58 *
    4259 * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
    4360 * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
     
    7592 */
    7693
    77 /*
    78  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
    79  * Portions Copyright (c) 1996-1999 by Internet Software Consortium.
    80  *
    81  * Permission to use, copy, modify, and distribute this software for any
    82  * purpose with or without fee is hereby granted, provided that the above
    83  * copyright notice and this permission notice appear in all copies.
    84  *
    85  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
    86  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    87  * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
    88  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    89  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    90  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
    91  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    92  */
    93 
    9494#if defined(LIBC_SCCS) && !defined(lint)
    9595static const char sccsid[] = "@(#)res_debug.c   8.1 (Berkeley) 6/4/93";
    96 static const char rcsid[] = "$Id: res_debug.c,v 1.10.18.6 2008/04/03 23:15:15 marka Exp $";
     96static const char rcsid[] = "$Id: res_debug.c,v 1.19 2009/02/26 11:20:20 tbox Exp $";
    9797#endif /* LIBC_SCCS and not lint */
    9898#include <sys/cdefs.h>
     
    330330                        p_section(ns_s_ar, opcode), arcount);
    331331        }
    332         if ((!statp->pfcode) || (statp->pfcode & 
     332        if ((!statp->pfcode) || (statp->pfcode &
    333333                (RES_PRF_HEADX | RES_PRF_HEAD2 | RES_PRF_HEAD1))) {
    334334                putc('\n',file);
     
    497497        {ns_t_srv,      "SRV",          "server selection"},
    498498        {ns_t_atma,     "ATMA",         "ATM address (unimplemented)"},
     499        {ns_t_naptr,    "NAPTR",        "naptr"},
     500        {ns_t_kx,       "KX",           "key exchange"},
     501        {ns_t_cert,     "CERT",         "certificate"},
     502        {ns_t_a6,       "A",            "IPv6 address (experminental)"},
     503        {ns_t_dname,    "DNAME",        "non-terminal redirection"},
     504        {ns_t_opt,      "OPT",          "opt"},
     505        {ns_t_apl,      "apl",          "apl"},
     506        {ns_t_ds,       "DS",           "delegation signer"},
     507        {ns_t_sshfp,    "SSFP",         "SSH fingerprint"},
     508        {ns_t_ipseckey, "IPSECKEY",     "IPSEC key"},
     509        {ns_t_rrsig,    "RRSIG",        "rrsig"},
     510        {ns_t_nsec,     "NSEC",         "nsec"},
     511        {ns_t_dnskey,   "DNSKEY",       "DNS key"},
     512        {ns_t_dhcid,    "DHCID",       "dynamic host configuration identifier"},
     513        {ns_t_nsec3,    "NSEC3",        "nsec3"},
     514        {ns_t_nsec3param, "NSEC3PARAM", "NSEC3 parameters"},
     515        {ns_t_hip,      "HIP",          "host identity protocol"},
     516        {ns_t_spf,      "SPF",          "sender policy framework"},
    499517        {ns_t_tkey,     "TKEY",         "tkey"},
    500518        {ns_t_tsig,     "TSIG",         "transaction signature"},
     
    512530        {ns_t_opt,      "OPT",          "EDNS Options"},
    513531        {ns_t_any,      "ANY",          "\"any\""},
     532        {ns_t_dlv,      "DLV",          "DNSSEC look-aside validation"},
    514533        {0,             NULL,           NULL}
    515534};
     
    939958                cp++;
    940959        }
    941    
     960
    942961        if (*cp == '+')
    943962                cp++;
     
    968987
    969988        siz = precsize_aton(&cp);
    970        
     989
    971990        while (!isspace((unsigned char)*cp) && (cp < maxcp))    /*%< if trailing garbage or m */
    972991                cp++;
     
    10011020        PUTLONG(longit,bcp);
    10021021        PUTLONG(alt,bcp);
    1003    
     1022
    10041023        return (16);            /*%< size of RR in octets */
    10051024}
     
    10271046        u_int32_t templ;
    10281047        u_int8_t sizeval, hpval, vpval, versionval;
    1029    
     1048
    10301049        char *sizestr, *hpstr, *vpstr;
    10311050
     
    11411160
    11421161/*%
    1143  * Make dates expressed in seconds-since-Jan-1-1970 easy to read. 
     1162 * Make dates expressed in seconds-since-Jan-1-1970 easy to read.
    11441163 * SIG records are required to be printed like this, by the Secure DNS RFC.
    11451164 */
     
    11511170#ifdef HAVE_TIME_R
    11521171        struct tm res;
    1153        
     1172
    11541173        time = gmtime_r(&clock, &res);
    11551174#else
  • freebsd/lib/libc/resolv/res_findzonecut.c

    r76395ec r165dd8e  
    22
    33#if !defined(lint) && !defined(SABER)
    4 static const char rcsid[] = "$Id: res_findzonecut.c,v 1.7.18.3 2005/10/11 00:25:11 marka Exp $";
     4static const char rcsid[] = "$Id: res_findzonecut.c,v 1.10 2005/10/11 00:10:16 marka Exp $";
    55#endif /* not lint */
    66
  • freebsd/lib/libc/resolv/res_init.c

    r76395ec r165dd8e  
    6969#if defined(LIBC_SCCS) && !defined(lint)
    7070static const char sccsid[] = "@(#)res_init.c    8.1 (Berkeley) 6/7/93";
    71 static const char rcsid[] = "$Id: res_init.c,v 1.16.18.7 2007/07/09 01:52:58 marka Exp $";
     71static const char rcsid[] = "$Id: res_init.c,v 1.26 2008/12/11 09:59:00 marka Exp $";
    7272#endif /* LIBC_SCCS and not lint */
    7373#include <sys/cdefs.h>
     
    9393#include <unistd.h>
    9494#include <netdb.h>
     95
     96#ifndef HAVE_MD5
     97# include "../dst/md5.h"
     98#else
     99# ifdef SOLARIS2
     100#  include <sys/md5.h>
     101# elif _LIBC
     102# include <md5.h>
     103# endif
     104#endif
     105#ifndef _MD5_H_
     106# define _MD5_H_ 1      /*%< make sure we do not include rsaref md5.h file */
     107#endif
    95108
    96109#include "un-namespace.h"
     
    181194                statp->retry = RES_DFLRETRY;
    182195                statp->options = RES_DEFAULT;
    183                 statp->id = res_randomid();
    184         }
     196        }
     197
     198        statp->_rnd = malloc(16);
     199        res_rndinit(statp);
     200        statp->id = res_nrandomid(statp);
    185201
    186202        memset(u, 0, sizeof(u));
     
    718734#endif
    719735
     736static u_char srnd[16];
     737
     738void
     739res_rndinit(res_state statp)
     740{
     741        struct timeval now;
     742        u_int32_t u32;
     743        u_int16_t u16;
     744        u_char *rnd = statp->_rnd == NULL ? srnd : statp->_rnd;
     745
     746        gettimeofday(&now, NULL);
     747        u32 = now.tv_sec;
     748        memcpy(rnd, &u32, 4);
     749        u32 = now.tv_usec;
     750        memcpy(rnd + 4, &u32, 4);
     751        u32 += now.tv_sec;
     752        memcpy(rnd + 8, &u32, 4);
     753        u16 = getpid();
     754        memcpy(rnd + 12, &u16, 2);
     755}
     756
    720757u_int
    721 res_randomid(void) {
     758res_nrandomid(res_state statp) {
    722759        struct timeval now;
     760        u_int16_t u16;
     761        MD5_CTX ctx;
     762        u_char *rnd = statp->_rnd == NULL ? srnd : statp->_rnd;
    723763
    724764        gettimeofday(&now, NULL);
    725         return (0xffff & (now.tv_sec ^ now.tv_usec ^ getpid()));
     765        u16 = (u_int16_t) (now.tv_sec ^ now.tv_usec);
     766        memcpy(rnd + 14, &u16, 2);
     767#ifndef HAVE_MD5
     768        MD5_Init(&ctx);
     769        MD5_Update(&ctx, rnd, 16);
     770        MD5_Final(rnd, &ctx);
     771#else
     772        MD5Init(&ctx);
     773        MD5Update(&ctx, rnd, 16);
     774        MD5Final(rnd, &ctx);
     775#endif
     776        memcpy(&u16, rnd + 14, 2);
     777        return ((u_int) u16);
    726778}
    727779
     
    753805res_ndestroy(res_state statp) {
    754806        res_nclose(statp);
    755         if (statp->_u._ext.ext != NULL)
     807        if (statp->_u._ext.ext != NULL) {
    756808                free(statp->_u._ext.ext);
     809                statp->_u._ext.ext = NULL;
     810        }
     811        if (statp->_rnd != NULL) {
     812                free(statp->_rnd);
     813                statp->_rnd = NULL;
     814        }
    757815        statp->options &= ~RES_INIT;
    758         statp->_u._ext.ext = NULL;
    759816}
    760817
  • freebsd/lib/libc/resolv/res_mkquery.c

    r76395ec r165dd8e  
    11#include <machine/rtems-bsd-user-space.h>
     2
     3/*
     4 * Portions Copyright (C) 2004, 2005, 2008  Internet Systems Consortium, Inc. ("ISC")
     5 * Portions Copyright (C) 1996, 1997, 1988, 1999, 2001, 2003  Internet Software Consortium.
     6 *
     7 * Permission to use, copy, modify, and/or distribute this software for any
     8 * purpose with or without fee is hereby granted, provided that the above
     9 * copyright notice and this permission notice appear in all copies.
     10 *
     11 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
     12 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
     13 * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
     14 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
     15 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
     16 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
     17 * PERFORMANCE OF THIS SOFTWARE.
     18 */
    219
    320/*
    421 * Copyright (c) 1985, 1993
    522 *    The Regents of the University of California.  All rights reserved.
    6  * 
     23 *
    724 * Redistribution and use in source and binary forms, with or without
    825 * modification, are permitted provided that the following conditions
     
    1633 *    may be used to endorse or promote products derived from this software
    1734 *    without specific prior written permission.
    18  * 
     35 *
    1936 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
    2037 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     
    3249/*
    3350 * Portions Copyright (c) 1993 by Digital Equipment Corporation.
    34  * 
     51 *
    3552 * Permission to use, copy, modify, and distribute this software for any
    3653 * purpose with or without fee is hereby granted, provided that the above
     
    3956 * publicity pertaining to distribution of the document or software without
    4057 * specific, written prior permission.
    41  * 
     58 *
    4259 * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
    4360 * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
     
    5067 */
    5168
    52 /*
    53  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
    54  * Portions Copyright (c) 1996-1999 by Internet Software Consortium.
    55  *
    56  * Permission to use, copy, modify, and distribute this software for any
    57  * purpose with or without fee is hereby granted, provided that the above
    58  * copyright notice and this permission notice appear in all copies.
    59  *
    60  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
    61  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    62  * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
    63  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    64  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    65  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
    66  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    67  */
    68 
    6969#if defined(LIBC_SCCS) && !defined(lint)
    7070static const char sccsid[] = "@(#)res_mkquery.c 8.1 (Berkeley) 6/4/93";
    71 static const char rcsid[] = "$Id: res_mkquery.c,v 1.5.18.2 2008/04/03 23:15:15 marka Exp $";
     71static const char rcsid[] = "$Id: res_mkquery.c,v 1.10 2008/12/11 09:59:00 marka Exp $";
    7272#endif /* LIBC_SCCS and not lint */
    7373#include <sys/cdefs.h>
     
    124124        memset(buf, 0, HFIXEDSZ);
    125125        hp = (HEADER *) buf;
    126         hp->id = htons(++statp->id);
     126        statp->id = res_nrandomid(statp);
     127        hp->id = htons(statp->id);
    127128        hp->opcode = op;
    128129        hp->rd = (statp->options & RES_RECURSE) != 0U;
  • freebsd/lib/libc/resolv/res_mkupdate.c

    r76395ec r165dd8e  
    2525
    2626#if !defined(lint) && !defined(SABER)
    27 static const char rcsid[] = "$Id: res_mkupdate.c,v 1.4.18.4 2005/10/14 05:44:12 marka Exp $";
     27static const char rcsid[] = "$Id: res_mkupdate.c,v 1.10 2008/12/11 09:59:00 marka Exp $";
    2828#endif /* not lint */
    2929#include <sys/cdefs.h>
     
    119119        memset(buf, 0, HFIXEDSZ);
    120120        hp = (HEADER *) buf;
    121         hp->id = htons(++statp->id);
     121        statp->id = res_nrandomid(statp);
     122        hp->id = htons(statp->id);
    122123        hp->opcode = ns_o_update;
    123124        hp->rcode = NOERROR;
  • freebsd/lib/libc/resolv/res_query.c

    r76395ec r165dd8e  
    11#include <machine/rtems-bsd-user-space.h>
     2
     3/*
     4 * Portions Copyright (C) 2004, 2005, 2008  Internet Systems Consortium, Inc. ("ISC")
     5 * Portions Copyright (C) 1996-2001, 2003  Internet Software Consortium.
     6 *
     7 * Permission to use, copy, modify, and/or distribute this software for any
     8 * purpose with or without fee is hereby granted, provided that the above
     9 * copyright notice and this permission notice appear in all copies.
     10 *
     11 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
     12 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
     13 * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
     14 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
     15 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
     16 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
     17 * PERFORMANCE OF THIS SOFTWARE.
     18 */
    219
    320/*
    421 * Copyright (c) 1988, 1993
    522 *    The Regents of the University of California.  All rights reserved.
    6  * 
     23 *
    724 * Redistribution and use in source and binary forms, with or without
    825 * modification, are permitted provided that the following conditions
     
    1633 *    may be used to endorse or promote products derived from this software
    1734 *    without specific prior written permission.
    18  * 
     35 *
    1936 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
    2037 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     
    3249/*
    3350 * Portions Copyright (c) 1993 by Digital Equipment Corporation.
    34  * 
     51 *
    3552 * Permission to use, copy, modify, and distribute this software for any
    3653 * purpose with or without fee is hereby granted, provided that the above
     
    3956 * publicity pertaining to distribution of the document or software without
    4057 * specific, written prior permission.
    41  * 
     58 *
    4259 * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
    4360 * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
     
    5067 */
    5168
    52 /*
    53  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
    54  * Portions Copyright (c) 1996-1999 by Internet Software Consortium.
    55  *
    56  * Permission to use, copy, modify, and distribute this software for any
    57  * purpose with or without fee is hereby granted, provided that the above
    58  * copyright notice and this permission notice appear in all copies.
    59  *
    60  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
    61  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    62  * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
    63  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    64  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    65  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
    66  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    67  */
    68 
    6969#if defined(LIBC_SCCS) && !defined(lint)
    7070static const char sccsid[] = "@(#)res_query.c   8.1 (Berkeley) 6/4/93";
    71 static const char rcsid[] = "$Id: res_query.c,v 1.7.18.2 2008/04/03 23:15:15 marka Exp $";
     71static const char rcsid[] = "$Id: res_query.c,v 1.11 2008/11/14 02:36:51 marka Exp $";
    7272#endif /* LIBC_SCCS and not lint */
    7373#include <sys/cdefs.h>
  • freebsd/lib/libc/resolv/res_send.c

    r76395ec r165dd8e  
    11#include <machine/rtems-bsd-user-space.h>
     2
     3/*
     4 * Portions Copyright (C) 2004-2009  Internet Systems Consortium, Inc. ("ISC")
     5 * Portions Copyright (C) 1996-2003  Internet Software Consortium.
     6 *
     7 * Permission to use, copy, modify, and/or distribute this software for any
     8 * purpose with or without fee is hereby granted, provided that the above
     9 * copyright notice and this permission notice appear in all copies.
     10 *
     11 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
     12 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
     13 * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
     14 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
     15 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
     16 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
     17 * PERFORMANCE OF THIS SOFTWARE.
     18 */
    219
    320/*
    421 * Copyright (c) 1985, 1989, 1993
    522 *    The Regents of the University of California.  All rights reserved.
    6  * 
     23 *
    724 * Redistribution and use in source and binary forms, with or without
    825 * modification, are permitted provided that the following conditions
     
    1633 *    may be used to endorse or promote products derived from this software
    1734 *    without specific prior written permission.
    18  * 
     35 *
    1936 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
    2037 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     
    3249/*
    3350 * Portions Copyright (c) 1993 by Digital Equipment Corporation.
    34  * 
     51 *
    3552 * Permission to use, copy, modify, and distribute this software for any
    3653 * purpose with or without fee is hereby granted, provided that the above
     
    3956 * publicity pertaining to distribution of the document or software without
    4057 * specific, written prior permission.
    41  * 
     58 *
    4259 * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
    4360 * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
     
    5067 */
    5168
    52 /*
    53  * Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC")
    54  * Portions Copyright (c) 1996-1999 by Internet Software Consortium.
    55  *
    56  * Permission to use, copy, modify, and distribute this software for any
    57  * purpose with or without fee is hereby granted, provided that the above
    58  * copyright notice and this permission notice appear in all copies.
    59  *
    60  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
    61  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    62  * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
    63  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    64  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    65  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
    66  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    67  */
    68 
    6969#if defined(LIBC_SCCS) && !defined(lint)
    7070static const char sccsid[] = "@(#)res_send.c    8.1 (Berkeley) 6/4/93";
    71 static const char rcsid[] = "$Id: res_send.c,v 1.9.18.10 2008/01/27 02:06:26 marka Exp $";
     71static const char rcsid[] = "$Id: res_send.c,v 1.22 2009/01/22 23:49:23 tbox Exp $";
    7272#endif /* LIBC_SCCS and not lint */
    7373#include <sys/cdefs.h>
     
    356356                                        continue;
    357357                                peerlen = sizeof(peer);
    358                                 if (_getsockname(EXT(statp).nssocks[ns],
     358                                if (_getpeername(EXT(statp).nssocks[ns],
    359359                                    (struct sockaddr *)&peer, &peerlen) < 0) {
    360360                                        needclose++;
     
    407407                for (ns = 0; ns < lastns; ns++) {
    408408                        if (EXT(statp).ext != NULL)
    409                                 EXT(statp).ext->nsaddrs[ns] =
     409                                EXT(statp).ext->nsaddrs[ns] =
    410410                                        EXT(statp).ext->nsaddrs[ns + 1];
    411411                        statp->nsaddr_list[ns] = statp->nsaddr_list[ns + 1];
     
    689689                 * Disable generation of SIGPIPE when writing to a closed
    690690                 * socket.  Write should return -1 and set errno to EPIPE
    691                  * instead. 
     691                 * instead.
    692692                 *
    693693                 * Push on even if setsockopt(SO_NOSIGPIPE) fails.
    694694                 */
    695695                (void)_setsockopt(statp->_vcsock, SOL_SOCKET, SO_NOSIGPIPE, &on,
    696                                 sizeof(on));
     696                                sizeof(on));
    697697#endif
    698698                errno = 0;
  • freebsd/lib/libc/resolv/res_update.c

    r76395ec r165dd8e  
    22
    33#if !defined(lint) && !defined(SABER)
    4 static const char rcsid[] = "$Id: res_update.c,v 1.12.18.1 2005/04/27 05:01:12 sra Exp $";
     4static const char rcsid[] = "$Id: res_update.c,v 1.13 2005/04/27 04:56:43 sra Exp $";
    55#endif /* not lint */
    66
Note: See TracChangeset for help on using the changeset viewer.