bigbiff bigbiff | e60683a | 2013-02-22 20:55:50 -0500 | [diff] [blame] | 1 | /* |
| 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 | |
| 34 | #ifndef _PATH_MAILDIR |
| 35 | #define _PATH_MAILDIR "/var/spool/mail" |
| 36 | #endif |
| 37 | #define _PATH_MOTDFILE "/etc/motd" |
| 38 | #define _PATH_NOLOGIN "/etc/nologin" |
| 39 | |
| 40 | #define _PATH_LOGIN "/bin/login" |
| 41 | #define _PATH_INITTAB "/etc/inittab" |
| 42 | #define _PATH_RC "/etc/rc" |
| 43 | #define _PATH_REBOOT "/sbin/reboot" |
| 44 | #define _PATH_SHUTDOWN "/sbin/shutdown" |
| 45 | #define _PATH_SINGLE "/etc/singleboot" |
| 46 | #define _PATH_SHUTDOWN_CONF "/etc/shutdown.conf" |
| 47 | |
| 48 | #define _PATH_SECURE "/etc/securesingle" |
| 49 | #define _PATH_USERTTY "/etc/usertty" |
| 50 | |
| 51 | /* used in login-utils/shutdown.c */ |
| 52 | |
| 53 | /* used in login-utils/setpwnam.h and login-utils/islocal.c */ |
| 54 | #define _PATH_PASSWD "/etc/passwd" |
| 55 | |
| 56 | /* used in login-utils/newgrp and login-utils/setpwnam.h*/ |
| 57 | #define _PATH_GSHADOW "/etc/gshadow" |
| 58 | |
| 59 | /* used in login-utils/setpwnam.h */ |
| 60 | #define _PATH_GROUP "/etc/group" |
| 61 | #define _PATH_SHADOW_PASSWD "/etc/shadow" |
| 62 | #define _PATH_SHELLS "/etc/shells" |
| 63 | |
| 64 | /* used in term-utils/agetty.c */ |
| 65 | #define _PATH_ISSUE "/etc/issue" |
| 66 | #define _PATH_NUMLOCK_ON _PATH_LOCALSTATEDIR "/numlock-on" |
| 67 | |
| 68 | #define _PATH_LOGINDEFS "/etc/login.defs" |
| 69 | |
| 70 | /* used in misc-utils/look.c */ |
| 71 | #define _PATH_WORDS "/usr/share/dict/words" |
| 72 | #define _PATH_WORDS_ALT "/usr/share/dict/web2" |
| 73 | |
| 74 | /* mount paths */ |
| 75 | #define _PATH_UMOUNT "/bin/umount" |
| 76 | |
| 77 | #define _PATH_FILESYSTEMS "/etc/filesystems" |
| 78 | #define _PATH_PROC_SWAPS "/proc/swaps" |
| 79 | #define _PATH_PROC_FILESYSTEMS "/proc/filesystems" |
| 80 | #define _PATH_PROC_MOUNTS "/proc/mounts" |
| 81 | #define _PATH_PROC_PARTITIONS "/proc/partitions" |
| 82 | #define _PATH_PROC_DEVICES "/proc/devices" |
| 83 | #define _PATH_PROC_MOUNTINFO "/proc/self/mountinfo" |
| 84 | #define _PATH_PROC_LOCKS "/proc/locks" |
| 85 | #define _PATH_PROC_CDROMINFO "/proc/sys/dev/cdrom/info" |
| 86 | |
| 87 | #define _PATH_PROC_ATTR_CURRENT "/proc/self/attr/current" |
| 88 | #define _PATH_PROC_ATTR_EXEC "/proc/self/attr/exec" |
| 89 | #define _PATH_PROC_CAPLASTCAP "/proc/sys/kernel/cap_last_cap" |
| 90 | |
| 91 | |
| 92 | #define _PATH_SYS_BLOCK "/sys/block" |
| 93 | #define _PATH_SYS_DEVBLOCK "/sys/dev/block" |
| 94 | #define _PATH_SYS_CLASS "/sys/class" |
| 95 | #define _PATH_SYS_SCSI "/sys/bus/scsi" |
| 96 | |
| 97 | #define _PATH_SYS_SELINUX "/sys/fs/selinux" |
| 98 | #define _PATH_SYS_APPARMOR "/sys/kernel/security/apparmor" |
| 99 | |
| 100 | #ifndef _PATH_MOUNTED |
| 101 | # ifdef MOUNTED /* deprecated */ |
| 102 | # define _PATH_MOUNTED MOUNTED |
| 103 | # else |
| 104 | # define _PATH_MOUNTED "/etc/mtab" |
| 105 | # endif |
| 106 | #endif |
| 107 | |
| 108 | #ifndef _PATH_MNTTAB |
| 109 | # ifdef MNTTAB /* deprecated */ |
| 110 | # define _PATH_MNTTAB MNTTAB |
| 111 | # else |
| 112 | # define _PATH_MNTTAB "/etc/fstab" |
| 113 | # endif |
| 114 | #endif |
| 115 | |
| 116 | #define _PATH_MNTTAB_DIR _PATH_MNTTAB ".d" |
| 117 | |
| 118 | #define _PATH_MOUNTED_LOCK _PATH_MOUNTED "~" |
| 119 | #define _PATH_MOUNTED_TMP _PATH_MOUNTED ".tmp" |
| 120 | |
| 121 | #ifndef _PATH_DEV |
| 122 | /* |
| 123 | * The tailing '/' in _PATH_DEV is there for compatibility with libc. |
| 124 | */ |
| 125 | # define _PATH_DEV "/dev/" |
| 126 | #endif |
| 127 | |
| 128 | #define _PATH_DEV_LOOP "/dev/loop" |
| 129 | #define _PATH_DEV_LOOPCTL "/dev/loop-control" |
| 130 | #define _PATH_DEV_TTY "/dev/tty" |
| 131 | |
| 132 | |
| 133 | /* udev paths */ |
| 134 | #define _PATH_DEV_BYLABEL "/dev/disk/by-label" |
| 135 | #define _PATH_DEV_BYUUID "/dev/disk/by-uuid" |
| 136 | #define _PATH_DEV_BYID "/dev/disk/by-id" |
| 137 | #define _PATH_DEV_BYPATH "/dev/disk/by-path" |
| 138 | #define _PATH_DEV_BYPARTLABEL "/dev/disk/by-partlabel" |
| 139 | #define _PATH_DEV_BYPARTUUID "/dev/disk/by-partuuid" |
| 140 | |
| 141 | /* hwclock paths */ |
| 142 | #define _PATH_ADJPATH "/etc/adjtime" |
| 143 | #define _PATH_LASTDATE "/var/lib/lastdate" |
| 144 | #ifdef __ia64__ |
| 145 | # define _PATH_RTC_DEV "/dev/efirtc" |
| 146 | #else |
| 147 | # define _PATH_RTC_DEV "/dev/rtc" |
| 148 | #endif |
| 149 | |
| 150 | #ifndef _PATH_BTMP |
| 151 | #define _PATH_BTMP "/var/log/btmp" |
| 152 | #endif |
| 153 | |
| 154 | /* raw paths*/ |
| 155 | #define _PATH_RAWDEVDIR "/dev/raw/" |
| 156 | #define _PATH_RAWDEVCTL _PATH_RAWDEVDIR "rawctl" |
| 157 | /* deprecated */ |
| 158 | #define _PATH_RAWDEVCTL_OLD "/dev/rawctl" |
| 159 | |
| 160 | /* wdctl path */ |
| 161 | #define _PATH_WATCHDOG_DEV "/dev/watchdog" |
| 162 | |
| 163 | /* ipc paths */ |
| 164 | #define _PATH_PROC_SYSV_MSG "/proc/sysvipc/msg" |
| 165 | #define _PATH_PROC_SYSV_SEM "/proc/sysvipc/sem" |
| 166 | #define _PATH_PROC_SYSV_SHM "/proc/sysvipc/shm" |
| 167 | #define _PATH_PROC_IPC_MSGMAX "/proc/sys/kernel/msgmax" |
| 168 | #define _PATH_PROC_IPC_MSGMNB "/proc/sys/kernel/msgmnb" |
| 169 | #define _PATH_PROC_IPC_MSGMNI "/proc/sys/kernel/msgmni" |
| 170 | #define _PATH_PROC_IPC_SEM "/proc/sys/kernel/sem" |
| 171 | #define _PATH_PROC_IPC_SHMALL "/proc/sys/kernel/shmall" |
| 172 | #define _PATH_PROC_IPC_SHMMAX "/proc/sys/kernel/shmmax" |
| 173 | #define _PATH_PROC_IPC_SHMMNI "/proc/sys/kernel/shmmni" |
| 174 | |
| 175 | /* kernel command line */ |
| 176 | #define _PATH_PROC_CMDLINE "/proc/cmdline" |
| 177 | |
| 178 | #endif /* PATHNAMES_H */ |
| 179 | |