]> git.ipfire.org Git - thirdparty/chrony.git/blame - sys.h
examples: harden systemd services
[thirdparty/chrony.git] / sys.h
CommitLineData
88840341 1/*
88840341
RC
2 chronyd/chronyc - Programs for keeping computer clocks accurate.
3
4 **********************************************************************
5 * Copyright (C) Richard P. Curnow 1997-2002
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of version 2 of the GNU General Public License as
9 * published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
8e23110a 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
88840341
RC
19 *
20 **********************************************************************
21
22 =======================================================================
23
24 This is the header for the file that links in the operating system-
25 specific parts of the software
26
27*/
28
29#ifndef GOT_SYS_H
30#define GOT_SYS_H
31
32/* Called at the start of the run to do initialisation */
c4434609 33extern void SYS_Initialise(int clock_control);
88840341
RC
34
35/* Called at the end of the run to do final clean-up */
36extern void SYS_Finalise(void);
37
e6848b1e
ML
38typedef enum {
39 SYS_MAIN_PROCESS,
1d4690eb 40 SYS_NTSKE_HELPER,
a96d2880
ML
41} SYS_ProcessContext;
42
43/* Switch to the specified user and group in given context */
44extern void SYS_DropRoot(uid_t uid, gid_t gid, SYS_ProcessContext context);
e6848b1e 45
434faeec
ML
46/* Enable a system call filter to allow only system calls
47 which chronyd normally needs after initialization */
a96d2880 48extern void SYS_EnableSystemCallFilter(int level, SYS_ProcessContext context);
434faeec 49
35e662d8 50extern void SYS_SetScheduler(int SchedPriority);
e3234465 51extern void SYS_LockMemory(void);
35e662d8 52
88840341 53#endif /* GOT_SYS_H */