Page MenuHomeFreeBSD

D22358.id64341.diff
No OneTemporary

D22358.id64341.diff

Index: contrib/ntp/ntpd/ntpd.c
===================================================================
--- contrib/ntp/ntpd/ntpd.c
+++ contrib/ntp/ntpd/ntpd.c
@@ -138,6 +138,10 @@
# include <seccomp.h>
#endif /* LIBSECCOMP and KERN_SECCOMP */
+#ifdef __FreeBSD_cc_version
+#include <sys/procctl.h>
+#endif
+
#ifdef HAVE_DNSREGISTRATION
# include <dns_sd.h>
DNSServiceRef mdns;
@@ -402,6 +406,19 @@
char *argv[]
)
{
+#ifdef __FreeBSD_cc_version
+ {
+ int aslr_var;
+
+ pid_t my_pid = getpid();
+
+ aslr_var = PROC_ASLR_FORCE_DISABLE;
+ if (procctl(P_PID, my_pid, PROC_ASLR_CTL, &aslr_var) != 0) {
+ msyslog(LOG_ERR,"procctl set aslr mode failed");
+ exit(255);
+ }
+ }
+#endif
return ntpdmain(argc, argv);
}
#endif /* !SYS_WINNT */

File Metadata

Mime Type
text/plain
Expires
Fri, Oct 24, 5:30 PM (15 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24138526
Default Alt Text
D22358.id64341.diff (752 B)

Event Timeline