summaryrefslogtreecommitdiff
path: root/static/netbsd/man4/clockctl.4 4.html
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 19:55:15 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 19:55:15 -0400
commit253e67c8b3a72b3a4757fdbc5845297628db0a4a (patch)
treeadf53b66087aa30dfbf8bf391a1dadb044c3bf4d /static/netbsd/man4/clockctl.4 4.html
parenta9157ce950dfe2fc30795d43b9d79b9d1bffc48b (diff)
docs: Added All NetBSD Manuals
Diffstat (limited to 'static/netbsd/man4/clockctl.4 4.html')
-rw-r--r--static/netbsd/man4/clockctl.4 4.html100
1 files changed, 100 insertions, 0 deletions
diff --git a/static/netbsd/man4/clockctl.4 4.html b/static/netbsd/man4/clockctl.4 4.html
new file mode 100644
index 00000000..f38e5984
--- /dev/null
+++ b/static/netbsd/man4/clockctl.4 4.html
@@ -0,0 +1,100 @@
+<table class="head">
+ <tr>
+ <td class="head-ltitle">CLOCKCTL(4)</td>
+ <td class="head-vol">Device Drivers Manual</td>
+ <td class="head-rtitle">CLOCKCTL(4)</td>
+ </tr>
+</table>
+<div class="manual-text">
+<section class="Sh">
+<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1>
+<p class="Pp"><code class="Nm">clockctl</code> &#x2014; <span class="Nd">Clock
+ subsystem user control</span></p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1>
+<p class="Pp"><code class="Cd">pseudo-device clockctl</code></p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1>
+<p class="Pp">The <code class="Nm">clockctl</code> interface brings clock
+ control to non-root users. Any user with write access to
+ <span class="Pa">/dev/clockctl</span> will be able to perform operations
+ such as <a class="Xr">settimeofday(2)</a>,
+ <a class="Xr">clock_settime(2)</a>, <a class="Xr">adjtime(2)</a>, or
+ <a class="Xr">ntp_adjtime(2)</a>, which are normally restricted to the
+ super-user. Using the <code class="Nm">clockctl</code> pseudo-device, it is
+ possible to run daemons such as <a class="Xr">ntpd(8)</a> as non-privileged
+ users, thus reducing the security exposure if a compromise is found in such
+ a daemon.</p>
+<p class="Pp">The <code class="Nm">clockctl</code> pseudo-device driver provides
+ an <a class="Xr">ioctl(2)</a> call for each privileged clock-related system
+ call. The system call stubs in C library will use the
+ <a class="Xr">ioctl(2)</a> on <span class="Pa">/dev/clockctl</span> if the
+ special file is present and accessible, or will revert to the plain
+ super-user-restricted system call if the special file is not accessible.</p>
+<p class="Pp">The following <a class="Xr">ioctl(2)</a> calls are defined in
+ <code class="In">&lt;<a class="In">sys/clockctl.h</a>&gt;</code>:</p>
+<dl class="Bl-tag">
+ <dt id="CLOCKCTL_SETTIMEOFDAY"><a class="permalink" href="#CLOCKCTL_SETTIMEOFDAY"><code class="Dv">CLOCKCTL_SETTIMEOFDAY</code></a></dt>
+ <dd>This will run the <a class="Xr">settimeofday(2)</a> system call. Argument
+ should be a pointer to a <var class="Va">struct
+ clockctl_settimeofday</var>:
+ <div class="Bd Pp Li">
+ <pre>struct clockctl_settimeofday {
+ const struct timeval *tv;
+ const void *tzp;
+};</pre>
+ </div>
+ </dd>
+ <dt id="CLOCKCTL_CLOCK_SETTIME"><a class="permalink" href="#CLOCKCTL_CLOCK_SETTIME"><code class="Dv">CLOCKCTL_CLOCK_SETTIME</code></a></dt>
+ <dd>This will run the <a class="Xr">clock_settime(2)</a> system call. Argument
+ should be a pointer to a <var class="Va">struct
+ clockctl_clock_settime</var>:
+ <div class="Bd Pp Li">
+ <pre>struct clockctl_clock_settime {
+ clockid_t clock_id;
+ struct timespec *tp;
+};</pre>
+ </div>
+ </dd>
+ <dt id="CLOCKCTL_ADJTIME"><a class="permalink" href="#CLOCKCTL_ADJTIME"><code class="Dv">CLOCKCTL_ADJTIME</code></a></dt>
+ <dd>This will run the <a class="Xr">adjtime(2)</a> system call. Argument
+ should be a pointer to a <var class="Va">struct clockctl_adjtime</var>:
+ <div class="Bd Pp Li">
+ <pre>struct clockctl_adjtime {
+ const struct timeval *delta;
+ struct timeval *olddelta;
+};</pre>
+ </div>
+ </dd>
+ <dt id="CLOCKCTL_NTP_ADJTIME"><a class="permalink" href="#CLOCKCTL_NTP_ADJTIME"><code class="Dv">CLOCKCTL_NTP_ADJTIME</code></a></dt>
+ <dd>This will run the <a class="Xr">ntp_adjtime(2)</a> system call. Argument
+ should be a pointer to a <var class="Va">struct
+ clockctl_ntp_adjtime</var>:
+ <div class="Bd Pp Li">
+ <pre>struct clockctl_ntp_adjtime {
+ struct timex *tp;
+};</pre>
+ </div>
+ </dd>
+</dl>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE
+ ALSO</a></h1>
+<p class="Pp"><a class="Xr">adjtime(2)</a>, <a class="Xr">clock_settime(2)</a>,
+ <a class="Xr">ioctl(2)</a>, <a class="Xr">settimeofday(2)</a></p>
+</section>
+<section class="Sh">
+<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1>
+<p class="Pp"><code class="Nm">clockctl</code> appeared in
+ <span class="Ux">NetBSD 1.6</span>.</p>
+</section>
+</div>
+<table class="foot">
+ <tr>
+ <td class="foot-date">February 19, 2009</td>
+ <td class="foot-os">NetBSD 10.1</td>
+ </tr>
+</table>