• ntp 漏洞修复| ntp编译升级


    wget https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p15.tar.gz
    
    mkdir /tmp/ntp
    
    service ntp stop #关闭ntp服务,如果没有开启可以跳过
    
    mv /usr/sbin/ntp* /tmp/ntp
    
    tar xvf ntp4/ntp-4.2/ntp-4.2.8p15.tar.gz
    cd ntp-4.2.8p15
    
    vim include/ntp_syscall.h.patch #输入以下内容
    --- ntp-4.2.4p7/include/ntp_syscall.h
    
    +++ ntp-4.2.4p7/include/ntp_syscall.h
    
    @@ -14,5+14,13 @@
    
    #include
    
    #endif
    
    +#if defined(ADJ_NANO) && !defined(MOD_NANO)
    
    +#define MOD_NANO ADJ_NANO
    
    +#endif
    
    +
    
    +#if defined(ADJ_TAI) && !defined(MOD_TAI)
    
    +#define MOD_TAI ADJ_TAI
    
    +#endif
    
    +
    
    #ifndefNTP_SYSCALLS_LIBC
    
    #ifdefNTP_SYSCALLS_STD
    
    # cd include
    
    # patch -p0 < ntp_syscall.h.patch
    
    patch file to:ntp_syscall.h
    
    # cd ..
    
    # make && make install
    cd include
    patch -p1 < ntp_syscall.h.patch
    #然后点击回车
    
    cd ..
    ./configure --prefix=/usr/local/ntp --enable-all-clocks --enable-parse-clocks --enable-clockctl
    
    make
    make install
    cp /usr/local/ntp/bin/ntp* /usr/sbin/
    
    #注意检查ntp.conf的配置
    chkconfig ntp on
    service ntp start
    service ntp status
    ntpd --version
    python, equal to anything!
  • 相关阅读:
    省常中模拟 Test4
    省常中模拟 Test3 Day1
    省常中模拟 Test3 Day2
    省常中模拟 Test1 Day1
    树型动态规划练习总结
    noip2010提高组题解
    noip2003提高组题解
    noip2009提高组题解
    noip2004提高组题解
    noip2002提高组题解
  • 原文地址:https://www.cnblogs.com/lixingli/p/14989259.html
Copyright © 2020-2023  润新知