blob: 0d21b980b131e5e5d07c3703786a60809caf999d [file] [log] [blame]
bigbiff bigbiffe60683a2013-02-22 20:55:50 -05001/*
2 * Vaguely based on
3 * @(#)pathnames.h 5.3 (Berkeley) 5/9/89
4 * This code is in the public domain.
5 */
6#ifndef PATHNAMES_H
7#define PATHNAMES_H
8
9#ifdef HAVE_PATHS_H
10#include <paths.h>
11#endif
12
13#ifndef __STDC__
14# error "we need an ANSI compiler"
15#endif
16
17/* used by kernel in /proc (e.g. /proc/swaps) for deleted files */
18#define PATH_DELETED_SUFFIX "\\040(deleted)"
19#define PATH_DELETED_SUFFIX_SZ (sizeof(PATH_DELETED_SUFFIX) - 1)
20
21/* DEFPATHs from <paths.h> don't include /usr/local */
22#undef _PATH_DEFPATH
23#define _PATH_DEFPATH "/usr/local/bin:/bin:/usr/bin"
24
25#undef _PATH_DEFPATH_ROOT
26#define _PATH_DEFPATH_ROOT "/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
27
28#define _PATH_SECURETTY "/etc/securetty"
29#define _PATH_WTMPLOCK "/etc/wtmplock"
30
31#define _PATH_HUSHLOGIN ".hushlogin"
32#define _PATH_HUSHLOGINS "/etc/hushlogins"
33
bigbiff7b4c7a62015-01-01 19:44:14 -050034#define _PATH_NOLOGIN_TXT "/etc/nologin.txt"
35
bigbiff bigbiffe60683a2013-02-22 20:55:50 -050036#ifndef _PATH_MAILDIR
37#define _PATH_MAILDIR "/var/spool/mail"
38#endif
39#define _PATH_MOTDFILE "/etc/motd"
40#define _PATH_NOLOGIN "/etc/nologin"
bigbiff7b4c7a62015-01-01 19:44:14 -050041#define _PATH_VAR_NOLOGIN "/var/run/nologin"
bigbiff bigbiffe60683a2013-02-22 20:55:50 -050042
43#define _PATH_LOGIN "/bin/login"
44#define _PATH_INITTAB "/etc/inittab"
45#define _PATH_RC "/etc/rc"
46#define _PATH_REBOOT "/sbin/reboot"
47#define _PATH_SHUTDOWN "/sbin/shutdown"
48#define _PATH_SINGLE "/etc/singleboot"
49#define _PATH_SHUTDOWN_CONF "/etc/shutdown.conf"
50
51#define _PATH_SECURE "/etc/securesingle"
52#define _PATH_USERTTY "/etc/usertty"
53
bigbiff7b4c7a62015-01-01 19:44:14 -050054#define _PATH_TERMCOLORS_DIRNAME "terminal-colors.d"
55#define _PATH_TERMCOLORS_DIR "/etc/" _PATH_TERMCOLORS_DIRNAME
56
bigbiff bigbiffe60683a2013-02-22 20:55:50 -050057/* used in login-utils/shutdown.c */
58
59/* used in login-utils/setpwnam.h and login-utils/islocal.c */
60#define _PATH_PASSWD "/etc/passwd"
61
62/* used in login-utils/newgrp and login-utils/setpwnam.h*/
63#define _PATH_GSHADOW "/etc/gshadow"
64
65/* used in login-utils/setpwnam.h */
66#define _PATH_GROUP "/etc/group"
67#define _PATH_SHADOW_PASSWD "/etc/shadow"
68#define _PATH_SHELLS "/etc/shells"
69
70/* used in term-utils/agetty.c */
71#define _PATH_ISSUE "/etc/issue"
bigbiff7b4c7a62015-01-01 19:44:14 -050072#define _PATH_OS_RELEASE "/etc/os-release"
bigbiff bigbiffe60683a2013-02-22 20:55:50 -050073#define _PATH_NUMLOCK_ON _PATH_LOCALSTATEDIR "/numlock-on"
74
75#define _PATH_LOGINDEFS "/etc/login.defs"
76
77/* used in misc-utils/look.c */
78#define _PATH_WORDS "/usr/share/dict/words"
79#define _PATH_WORDS_ALT "/usr/share/dict/web2"
80
81/* mount paths */
82#define _PATH_UMOUNT "/bin/umount"
83
84#define _PATH_FILESYSTEMS "/etc/filesystems"
85#define _PATH_PROC_SWAPS "/proc/swaps"
86#define _PATH_PROC_FILESYSTEMS "/proc/filesystems"
87#define _PATH_PROC_MOUNTS "/proc/mounts"
88#define _PATH_PROC_PARTITIONS "/proc/partitions"
89#define _PATH_PROC_DEVICES "/proc/devices"
90#define _PATH_PROC_MOUNTINFO "/proc/self/mountinfo"
91#define _PATH_PROC_LOCKS "/proc/locks"
92#define _PATH_PROC_CDROMINFO "/proc/sys/dev/cdrom/info"
93
bigbiff7b4c7a62015-01-01 19:44:14 -050094#define _PATH_PROC_UIDMAP "/proc/self/uid_map"
95#define _PATH_PROC_GIDMAP "/proc/self/gid_map"
96
bigbiff bigbiffe60683a2013-02-22 20:55:50 -050097#define _PATH_PROC_ATTR_CURRENT "/proc/self/attr/current"
98#define _PATH_PROC_ATTR_EXEC "/proc/self/attr/exec"
99#define _PATH_PROC_CAPLASTCAP "/proc/sys/kernel/cap_last_cap"
100
101
102#define _PATH_SYS_BLOCK "/sys/block"
103#define _PATH_SYS_DEVBLOCK "/sys/dev/block"
104#define _PATH_SYS_CLASS "/sys/class"
105#define _PATH_SYS_SCSI "/sys/bus/scsi"
106
107#define _PATH_SYS_SELINUX "/sys/fs/selinux"
108#define _PATH_SYS_APPARMOR "/sys/kernel/security/apparmor"
109
110#ifndef _PATH_MOUNTED
111# ifdef MOUNTED /* deprecated */
112# define _PATH_MOUNTED MOUNTED
113# else
114# define _PATH_MOUNTED "/etc/mtab"
115# endif
116#endif
117
118#ifndef _PATH_MNTTAB
119# ifdef MNTTAB /* deprecated */
120# define _PATH_MNTTAB MNTTAB
121# else
122# define _PATH_MNTTAB "/etc/fstab"
123# endif
124#endif
125
126#define _PATH_MNTTAB_DIR _PATH_MNTTAB ".d"
127
128#define _PATH_MOUNTED_LOCK _PATH_MOUNTED "~"
129#define _PATH_MOUNTED_TMP _PATH_MOUNTED ".tmp"
130
131#ifndef _PATH_DEV
132 /*
133 * The tailing '/' in _PATH_DEV is there for compatibility with libc.
134 */
135# define _PATH_DEV "/dev/"
136#endif
137
bigbiff7b4c7a62015-01-01 19:44:14 -0500138#define _PATH_DEV_MEM "/dev/mem"
139
bigbiff bigbiffe60683a2013-02-22 20:55:50 -0500140#define _PATH_DEV_LOOP "/dev/loop"
141#define _PATH_DEV_LOOPCTL "/dev/loop-control"
142#define _PATH_DEV_TTY "/dev/tty"
143
144
145/* udev paths */
146#define _PATH_DEV_BYLABEL "/dev/disk/by-label"
147#define _PATH_DEV_BYUUID "/dev/disk/by-uuid"
148#define _PATH_DEV_BYID "/dev/disk/by-id"
149#define _PATH_DEV_BYPATH "/dev/disk/by-path"
150#define _PATH_DEV_BYPARTLABEL "/dev/disk/by-partlabel"
151#define _PATH_DEV_BYPARTUUID "/dev/disk/by-partuuid"
152
153/* hwclock paths */
bigbiff7b4c7a62015-01-01 19:44:14 -0500154#ifdef CONFIG_ADJTIME_PATH
155# define _PATH_ADJTIME CONFIG_ADJTIME_PATH
156#else
157# define _PATH_ADJTIME "/etc/adjtime"
158#endif
159
bigbiff bigbiffe60683a2013-02-22 20:55:50 -0500160#define _PATH_LASTDATE "/var/lib/lastdate"
161#ifdef __ia64__
162# define _PATH_RTC_DEV "/dev/efirtc"
163#else
164# define _PATH_RTC_DEV "/dev/rtc"
165#endif
166
167#ifndef _PATH_BTMP
168#define _PATH_BTMP "/var/log/btmp"
169#endif
170
171/* raw paths*/
172#define _PATH_RAWDEVDIR "/dev/raw/"
173#define _PATH_RAWDEVCTL _PATH_RAWDEVDIR "rawctl"
174/* deprecated */
175#define _PATH_RAWDEVCTL_OLD "/dev/rawctl"
176
177/* wdctl path */
178#define _PATH_WATCHDOG_DEV "/dev/watchdog"
179
180/* ipc paths */
181#define _PATH_PROC_SYSV_MSG "/proc/sysvipc/msg"
182#define _PATH_PROC_SYSV_SEM "/proc/sysvipc/sem"
183#define _PATH_PROC_SYSV_SHM "/proc/sysvipc/shm"
184#define _PATH_PROC_IPC_MSGMAX "/proc/sys/kernel/msgmax"
185#define _PATH_PROC_IPC_MSGMNB "/proc/sys/kernel/msgmnb"
186#define _PATH_PROC_IPC_MSGMNI "/proc/sys/kernel/msgmni"
187#define _PATH_PROC_IPC_SEM "/proc/sys/kernel/sem"
188#define _PATH_PROC_IPC_SHMALL "/proc/sys/kernel/shmall"
189#define _PATH_PROC_IPC_SHMMAX "/proc/sys/kernel/shmmax"
190#define _PATH_PROC_IPC_SHMMNI "/proc/sys/kernel/shmmni"
191
192/* kernel command line */
193#define _PATH_PROC_CMDLINE "/proc/cmdline"
194
195#endif /* PATHNAMES_H */
196