Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157142548
D21319.id60996.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
831 B
Referenced Files
None
Subscribers
None
D21319.id60996.diff
View Options
Index: head/sbin/ping6/ping6.c
===================================================================
--- head/sbin/ping6/ping6.c
+++ head/sbin/ping6/ping6.c
@@ -663,12 +663,6 @@
err(1, "socket srecv");
freeaddrinfo(res);
- /* revoke root privilege */
- if (seteuid(getuid()) != 0)
- err(1, "seteuid() failed");
- if (setuid(getuid()) != 0)
- err(1, "setuid() failed");
-
/* set the source address if specified. */
if ((options & F_SRCADDR) != 0) {
/* properly fill sin6_scope_id */
@@ -738,6 +732,12 @@
err(1, "setsockopt(IPV6_RECVRTHDRDSTOPTS)");
#endif
}
+
+ /* revoke root privilege */
+ if (seteuid(getuid()) != 0)
+ err(1, "seteuid() failed");
+ if (setuid(getuid()) != 0)
+ err(1, "setuid() failed");
if ((options & F_FLOOD) && (options & F_INTERVAL))
errx(1, "-f and -i incompatible options");
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, May 19, 5:54 PM (18 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33323606
Default Alt Text
D21319.id60996.diff (831 B)
Attached To
Mode
D21319: ping6: Fix insufficient privileges bug introduced by r350857
Attached
Detach File
Event Timeline
Log In to Comment