Ignore:
Timestamp:
Nov 4, 2007, 3:16:40 AM (16 years ago)
Author:
Bruno Cornec
Message:

Update to busybox 1.7.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.5/mindi-busybox/libbb/create_icmp6_socket.c

    r821 r1765  
    88 */
    99
    10 #include <sys/types.h>
    11 #include <netdb.h>
    12 #include <sys/socket.h>
    13 #include <errno.h>
    14 #include <unistd.h>
     10//#include <sys/types.h>
     11//#include <netdb.h>
     12//#include <sys/socket.h>
    1513#include "libbb.h"
    1614
    17 #ifdef CONFIG_FEATURE_IPV6
     15#if ENABLE_FEATURE_IPV6
    1816int create_icmp6_socket(void)
    1917{
     
    2422    /* if getprotobyname failed, just silently force
    2523     * proto->p_proto to have the correct value for "ipv6-icmp" */
    26     if ((sock = socket(AF_INET6, SOCK_RAW,
    27             (proto ? proto->p_proto : IPPROTO_ICMPV6))) < 0) {
     24    sock = socket(AF_INET6, SOCK_RAW,
     25            (proto ? proto->p_proto : IPPROTO_ICMPV6));
     26    if (sock < 0) {
    2827        if (errno == EPERM)
    2928            bb_error_msg_and_die(bb_msg_perm_denied_are_you_root);
    30         else
    31             bb_perror_msg_and_die(bb_msg_can_not_create_raw_socket);
     29        bb_perror_msg_and_die(bb_msg_can_not_create_raw_socket);
    3230    }
    3331
    3432    /* drop root privs if running setuid */
    35     setuid(getuid());
     33    xsetuid(getuid());
    3634
    3735    return sock;
Note: See TracChangeset for help on using the changeset viewer.