X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=libbb%2Fcreate_icmp_socket.c;h=431c4d8a7bda978a6dbc68f72bfdda32c516cf96;hb=3ece72dc3f95d195924c760f9ee5059e35908564;hp=d804b39870f7f8d3afbfdb014e968713add0baf3;hpb=7467c8d3b6a50e2cbd8db750963d40b420ad38d1;p=oweals%2Fbusybox.git diff --git a/libbb/create_icmp_socket.c b/libbb/create_icmp_socket.c index d804b3987..431c4d8a7 100644 --- a/libbb/create_icmp_socket.c +++ b/libbb/create_icmp_socket.c @@ -2,8 +2,8 @@ /* * Utility routines. * - * create raw socket for icmp protocol test permision - * and drop root privilegies if running setuid + * create raw socket for icmp protocol test permission + * and drop root privileges if running setuid * */ @@ -25,13 +25,13 @@ int create_icmp_socket(void) if ((sock = socket(AF_INET, SOCK_RAW, (proto ? proto->p_proto : 1))) < 0) { /* 1 == ICMP */ if (errno == EPERM) - error_msg_and_die("permission denied. (are you root?)"); + bb_error_msg_and_die(bb_msg_perm_denied_are_you_root); else - perror_msg_and_die(can_not_create_raw_socket); + bb_perror_msg_and_die(bb_msg_can_not_create_raw_socket); } /* drop root privs if running setuid */ - setuid(getuid()); + xsetuid(getuid()); return sock; }