⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 netbsd

📁 基于ntp协议的网络时间服务程序
💻
字号:
Starting with NetBSD-1.6, it is possible to delegate the system clock control to a non root user. This enable running ntpd in a chroot jail under a non privilegied UID/GID, using ntpd -i and -u flags.The delegation is done through the clockctl(4) pseudodevice driver. This driver makes privilegied system calls such as ntp_adjtime(2)available through ioctl(2) on the /dev/clockctl device. If a useris able to write to /dev/clockctl, then (s)he can control the system clock.In order to use this feature, make sure that:1) Your kernel is compiled with the following option:pseudo-device	clockctlThis is true for GENERIC kernels on most ports. Please check http://wwW.netbsd.org/Documentation/kernel/if you need information about building a kernel.2) You have a ntpd user on your system. Here is the /etc/master.passwdentry for ntpd user on NetBSD-1.6:ntpd:*:15:15::0:0:& pseudo-user:/var/chroot/ntpd:/sbin/nologinAnd here is the /etc/group entry for group 15:ntpd:*:15:3) /dev/clockctl exists and is writtable by user ntpd. Default NetBSD-1.6 setting is:crw-rw----  1 root  ntpd  61, 0 Apr 1  2002 /dev/clockctlMajor device number and date is likely to be different on your system.If you need to create the device, issue the following command:cd /dev && ./MAKEDEV clockctlHere is an example of how to run ntpd chrooted in /var/chroot/ntpd, running with ntpd UID and ntpd GID:ntpd -i /var/chroot/ntpd -u ntpd:ntpdNote that -i and -u options are enabled at configure time if your system supports system clock control by an unprivilegied user. If thisis not the case, then the -i and -u options will not be available.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -