projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
svn add bb_strtonum.c :(
[oweals/busybox.git]
/
libbb
/
create_icmp_socket.c
diff --git
a/libbb/create_icmp_socket.c
b/libbb/create_icmp_socket.c
index d804b39870f7f8d3afbfdb014e968713add0baf3..431c4d8a7bda978a6dbc68f72bfdda32c516cf96 100644
(file)
--- a/
libbb/create_icmp_socket.c
+++ b/
libbb/create_icmp_socket.c
@@
-2,8
+2,8
@@
/*
* Utility routines.
*
/*
* Utility routines.
*
- * create raw socket for icmp protocol test permision
- * and drop root privileg
i
es if running setuid
+ * create raw socket for icmp protocol test permis
s
ion
+ * 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)
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
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 */
}
/* drop root privs if running setuid */
- setuid(getuid());
+
x
setuid(getuid());
return sock;
}
return sock;
}