POSIX
Version 9 (Matthew Iselin, 11/14/2010 01:16 am)
| 1 | 1 | h1. POSIX |
|
|---|---|---|---|
| 2 | 1 | ||
| 3 | 1 | This page has been created as a quick reference for Pedigree's POSIX subsystem's compliancy. If a function is not here, it can be assumed to not exist. |
|
| 4 | 1 | ||
| 5 | 5 | Matthew Iselin | This list does not include standard C library functions (eg, malloc) which are provided by newlib. |
| 6 | 5 | Matthew Iselin | |
| 7 | 5 | Matthew Iselin | h2. Statistics |
| 8 | 5 | Matthew Iselin | |
| 9 | 5 | Matthew Iselin | Total POSIX Functions: 273 |
| 10 | 9 | Matthew Iselin | Total Implemented: 168 |
| 11 | 8 | Matthew Iselin | Total Not Implemented: 107 |
| 12 | 5 | Matthew Iselin | |
| 13 | 1 | h2. The List |
|
| 14 | 1 | ||
| 15 | 5 | Matthew Iselin | The following list is sorted in such a way that implemented functions are above unimplemented functions, and then sorted in ascending alphabetical order. |
| 16 | 5 | Matthew Iselin | |
| 17 | 1 | | *Function* | *Implemented?* | *Notes* | |
|
| 18 | 1 | | _execve | yes | none | |
|
| 19 | 1 | | _exit | yes | none | |
|
| 20 | 5 | Matthew Iselin | | _isatty | yes | none | |
| 21 | 5 | Matthew Iselin | | accept | yes | always blocks | |
| 22 | 5 | Matthew Iselin | | access | yes | only checks for file existence: never checks permissions | |
| 23 | 5 | Matthew Iselin | | alarm | yes | none | |
| 24 | 5 | Matthew Iselin | | basename | yes | essentially strchr, which is fairly ugly | |
| 25 | 1 | | bind | yes | will not have expected result on non-listen sockets | |
|
| 26 | 1 | | chdir | yes | none | |
|
| 27 | 6 | Matthew Iselin | | chmod | yes | allows any change regardless of user privilege | |
| 28 | 6 | Matthew Iselin | | chown | yes | allows any change regardless of user privilege | |
| 29 | 5 | Matthew Iselin | | clock_gettime | yes | none | |
| 30 | 5 | Matthew Iselin | | close | yes | none | |
| 31 | 5 | Matthew Iselin | | closedir | yes | none | |
| 32 | 5 | Matthew Iselin | | closelog | yes | none | |
| 33 | 5 | Matthew Iselin | | connect | yes | none | |
| 34 | 5 | Matthew Iselin | | dlclose | yes | technically a stub | |
| 35 | 5 | Matthew Iselin | | dlopen | yes | none | |
| 36 | 5 | Matthew Iselin | | dlsym | yes | none | |
| 37 | 5 | Matthew Iselin | | dup | yes | none | |
| 38 | 5 | Matthew Iselin | | dup2 | yes | none | |
| 39 | 1 | | endpwent | yes | none | |
|
| 40 | 1 | | err | yes | format string issues | |
|
| 41 | 8 | Matthew Iselin | | fchdir | yes | none | |
| 42 | 7 | Matthew Iselin | | fchmod | yes | see chmod | |
| 43 | 7 | Matthew Iselin | | fchown | yes | see chown | |
| 44 | 5 | Matthew Iselin | | fcntl | yes | partially implemented - no record locking commands | |
| 45 | 1 | | fork | yes | none | |
|
| 46 | 5 | Matthew Iselin | | fpurge | yes | none | |
| 47 | 5 | Matthew Iselin | | freeaddrinfo | yes | none | |
| 48 | 5 | Matthew Iselin | | fseek | yes | none | |
| 49 | 1 | | fstat | yes | does not set errno on failure | |
|
| 50 | 9 | Matthew Iselin | | fstatvfs | yes | doesn't use information from the filesystem | |
| 51 | 5 | Matthew Iselin | | ftruncate | yes | none | |
| 52 | 5 | Matthew Iselin | | gai_strerror | yes | none | |
| 53 | 5 | Matthew Iselin | | getaddrinfo | yes | should be moved into the kernel somewhat | |
| 54 | 5 | Matthew Iselin | | getcwd | yes | none | |
| 55 | 5 | Matthew Iselin | | getdelim | yes | none | |
| 56 | 5 | Matthew Iselin | | getdtablesize | yes | just calls getrlimit for NOFILE | |
| 57 | 5 | Matthew Iselin | | getegid | yes | none | |
| 58 | 5 | Matthew Iselin | | geteuid | yes | none | |
| 59 | 5 | Matthew Iselin | | getgid | yes | none | |
| 60 | 5 | Matthew Iselin | | getgrname | yes | completely hacked to only return “httpd” for Apache | |
| 61 | 5 | Matthew Iselin | | getgroups | yes | only returns getgid() in first element | |
| 62 | 5 | Matthew Iselin | | gethostbyaddr | yes | none | |
| 63 | 5 | Matthew Iselin | | gethostbyname | yes | none | |
| 64 | 5 | Matthew Iselin | | gethostname | yes | none | |
| 65 | 5 | Matthew Iselin | | getline | yes | none | |
| 66 | 5 | Matthew Iselin | | getpagesize | yes | none | |
| 67 | 5 | Matthew Iselin | | getpgrp | yes | none | |
| 68 | 1 | | getpid | yes | none | |
|
| 69 | 5 | Matthew Iselin | | getprotobyname | yes | just tcp, udp and icmp | |
| 70 | 5 | Matthew Iselin | | getpwent | yes | none | |
| 71 | 5 | Matthew Iselin | | getpwnam | yes | none | |
| 72 | 5 | Matthew Iselin | | getpwuid | yes | none | |
| 73 | 5 | Matthew Iselin | | getservbyname | yes | none | |
| 74 | 5 | Matthew Iselin | | getservbyport | yes | none | |
| 75 | 5 | Matthew Iselin | | getsockname | yes | returns an empty structure | |
| 76 | 5 | Matthew Iselin | | gettimeofday | yes | none | |
| 77 | 5 | Matthew Iselin | | getuid | yes | none | |
| 78 | 5 | Matthew Iselin | | herror | yes | none | |
| 79 | 5 | Matthew Iselin | | hstrerror | yes | none | |
| 80 | 5 | Matthew Iselin | | htonl | yes | none | |
| 81 | 5 | Matthew Iselin | | htons | yes | none | |
| 82 | 5 | Matthew Iselin | | inet_addr | yes | none | |
| 83 | 5 | Matthew Iselin | | inet_aton | yes | calls inet_addr directly | |
| 84 | 5 | Matthew Iselin | | inet_ntoa | yes | wrapper around sprintf, so potentially exploitable | |
| 85 | 5 | Matthew Iselin | | ioctl | yes | only implements two commands | |
| 86 | 5 | Matthew Iselin | | kill | yes | none | |
| 87 | 5 | Matthew Iselin | | listen | yes | none | |
| 88 | 5 | Matthew Iselin | | lseek | yes | conditions EOVERFLOW EINVAL and ESPIPE not checked | |
| 89 | 5 | Matthew Iselin | | lstat | yes | currently synonymous to stat even when working on a symlink | |
| 90 | 5 | Matthew Iselin | | mkdir | yes | does not set errno on failure (Filesystem::createDirectory *should* but no current implementations do) | |
| 91 | 5 | Matthew Iselin | | mmap | yes | some inputs are exploitable, others do not work | |
| 92 | 5 | Matthew Iselin | | munmap | yes | some areas are not unmappable | |
| 93 | 5 | Matthew Iselin | | nanosleep | yes | none | |
| 94 | 5 | Matthew Iselin | | ntohl | yes | none | |
| 95 | 5 | Matthew Iselin | | ntohs | yes | none | |
| 96 | 1 | | open | yes | none | |
|
| 97 | 5 | Matthew Iselin | | opendir | yes | none | |
| 98 | 5 | Matthew Iselin | | openlog | yes | none | |
| 99 | 5 | Matthew Iselin | | pipe | yes | none | |
| 100 | 5 | Matthew Iselin | | poll | yes | none | |
| 101 | 5 | Matthew Iselin | | pthread_atfork | yes | none | |
| 102 | 5 | Matthew Iselin | | pthread_attr_destroy | yes | none | |
| 103 | 5 | Matthew Iselin | | pthread_attr_getdetachstate | yes | none | |
| 104 | 5 | Matthew Iselin | | pthread_attr_getstacksize | yes | none | |
| 105 | 5 | Matthew Iselin | | pthread_attr_init | yes | none | |
| 106 | 5 | Matthew Iselin | | pthread_attr_setdetachstate | yes | none | |
| 107 | 5 | Matthew Iselin | | pthread_attr_setstacksize | yes | none | |
| 108 | 5 | Matthew Iselin | | pthread_create | yes | none | |
| 109 | 5 | Matthew Iselin | | pthread_detach | yes | none | |
| 110 | 5 | Matthew Iselin | | pthread_equal | yes | none | |
| 111 | 5 | Matthew Iselin | | pthread_exit | yes | none | |
| 112 | 5 | Matthew Iselin | | pthread_getspecific | yes | none | |
| 113 | 5 | Matthew Iselin | | pthread_join | yes | none | |
| 114 | 5 | Matthew Iselin | | pthread_key_create | yes | none | |
| 115 | 5 | Matthew Iselin | | pthread_key_delete | yes | none | |
| 116 | 5 | Matthew Iselin | | pthread_key_destructor | yes | none | |
| 117 | 5 | Matthew Iselin | | pthread_kill | yes | none | |
| 118 | 5 | Matthew Iselin | | pthread_mutex_destroy | yes | none | |
| 119 | 5 | Matthew Iselin | | pthread_mutex_init | yes | none | |
| 120 | 5 | Matthew Iselin | | pthread_mutex_lock | yes | none | |
| 121 | 5 | Matthew Iselin | | pthread_mutex_trylock | yes | none | |
| 122 | 5 | Matthew Iselin | | pthread_mutex_unlock | yes | none | |
| 123 | 5 | Matthew Iselin | | pthread_once | yes | none | |
| 124 | 5 | Matthew Iselin | | pthread_self | yes | none | |
| 125 | 5 | Matthew Iselin | | pthread_setspecific | yes | none | |
| 126 | 5 | Matthew Iselin | | pthread_sigmask | yes | none | |
| 127 | 5 | Matthew Iselin | | pthread_spin_destroy | yes | none | |
| 128 | 5 | Matthew Iselin | | pthread_spin_init | yes | none | |
| 129 | 5 | Matthew Iselin | | pthread_spin_lock | yes | none | |
| 130 | 5 | Matthew Iselin | | pthread_spin_trylock | yes | none | |
| 131 | 5 | Matthew Iselin | | pthread_spin_unlock | yes | none | |
| 132 | 5 | Matthew Iselin | | raise | yes | none | |
| 133 | 1 | | read | yes | none | |
|
| 134 | 5 | Matthew Iselin | | readdir | yes | none | |
| 135 | 5 | Matthew Iselin | | readlink | yes | none | |
| 136 | 5 | Matthew Iselin | | readv | yes | none | |
| 137 | 5 | Matthew Iselin | | realpath | yes | copies the first argument into the second argument – not properly implemented. | |
| 138 | 5 | Matthew Iselin | | recv | yes | see send | |
| 139 | 5 | Matthew Iselin | | recvfrom | yes | TCP pretends :) | |
| 140 | 5 | Matthew Iselin | | rename | yes | implemented as a complete read of the old file, and a write into the new file – horrible. | |
| 141 | 5 | Matthew Iselin | | rewinddir | yes | none | |
| 142 | 1 | | sbrk | yes | none | |
|
| 143 | 5 | Matthew Iselin | | sched_yield | yes | none | |
| 144 | 5 | Matthew Iselin | | select | yes | uncertain about errorfds handling | |
| 145 | 5 | Matthew Iselin | | sem_close | yes | badly implemented | |
| 146 | 5 | Matthew Iselin | | sem_destroy | yes | badly implemented | |
| 147 | 5 | Matthew Iselin | | sem_getvalue | yes | badly implemented | |
| 148 | 5 | Matthew Iselin | | sem_init | yes | badly implemented | |
| 149 | 5 | Matthew Iselin | | sem_post | yes | badly implemented | |
| 150 | 5 | Matthew Iselin | | sem_timedwait | yes | badly implemented | |
| 151 | 5 | Matthew Iselin | | sem_trywait | yes | badly implemented | |
| 152 | 5 | Matthew Iselin | | sem_wait | yes | badly implemented | |
| 153 | 5 | Matthew Iselin | | send | yes | errno not set if the connection is reset | |
| 154 | 5 | Matthew Iselin | | sendto | yes | TCP sendto will still send to the connected address not the passed address | |
| 155 | 5 | Matthew Iselin | | setegid | yes | see setgid | |
| 156 | 5 | Matthew Iselin | | seteuid | yes | see setuid | |
| 157 | 5 | Matthew Iselin | | setgid | yes | hardly spec-compliant: zero permission checks | |
| 158 | 5 | Matthew Iselin | | sethostname | yes | none | |
| 159 | 5 | Matthew Iselin | | setlogmask | yes | none | |
| 160 | 5 | Matthew Iselin | | setpgid | yes | none | |
| 161 | 5 | Matthew Iselin | | setpwent | yes | none | |
| 162 | 5 | Matthew Iselin | | setsid | yes | none | |
| 163 | 5 | Matthew Iselin | | setuid | yes | hardly spec-compliant: zero permission checks | |
| 164 | 5 | Matthew Iselin | | shutdown | yes | none | |
| 165 | 5 | Matthew Iselin | | sigaction | yes | none | |
| 166 | 5 | Matthew Iselin | | sigaltstack | yes | none | |
| 167 | 5 | Matthew Iselin | | signal | yes | none | |
| 168 | 5 | Matthew Iselin | | sleep | yes | none | |
| 169 | 5 | Matthew Iselin | | socket | yes | handles only PF_INET and PF_SOCKET for domain | |
| 170 | 1 | | stat | yes | none | |
|
| 171 | 9 | Matthew Iselin | | statvfs | yes | doesn't get information from the filesystem | |
| 172 | 5 | Matthew Iselin | | strsignal | yes | none | |
| 173 | 5 | Matthew Iselin | | symlink | yes | none | |
| 174 | 5 | Matthew Iselin | | sysconf | yes | a lot of entries just return -1 | |
| 175 | 5 | Matthew Iselin | | syslog | yes | none | |
| 176 | 5 | Matthew Iselin | | tcgetattr | yes | only supports 4 flags | |
| 177 | 5 | Matthew Iselin | | tcsetattr | yes | see tcgetattr | |
| 178 | 5 | Matthew Iselin | | uname | yes | not from a syscall | |
| 179 | 1 | | unlink | yes | does not set errno on failure | |
|
| 180 | 5 | Matthew Iselin | | usleep | yes | none | |
| 181 | 5 | Matthew Iselin | | vfork | yes | essentially just a call to fork() | |
| 182 | 1 | | wait | yes | none | |
|
| 183 | 1 | | waitpid | yes | doesn't handle groups (but that's fine) | |
|
| 184 | 1 | | write | yes | none | |
|
| 185 | 5 | Matthew Iselin | | writev | yes | none | |
| 186 | 5 | Matthew Iselin | | cfgetispeed | no | stubbed | |
| 187 | 5 | Matthew Iselin | | cfgetospeed | no | stubbed | |
| 188 | 1 | | cfsetispeed | no | stubbed | |
|
| 189 | 1 | | cfsetospeed | no | stubbed | |
|
| 190 | 5 | Matthew Iselin | | chroot | no | stubbed | |
| 191 | 5 | Matthew Iselin | | dlerror | no | stubbed | |
| 192 | 5 | Matthew Iselin | | endfsent | no | stubbed | |
| 193 | 5 | Matthew Iselin | | endgrent | no | stubbed | |
| 194 | 5 | Matthew Iselin | | endprotoent | no | stubbed | |
| 195 | 1 | | endservent | no | stubbed | |
|
| 196 | 5 | Matthew Iselin | | fdatasync | no | stubbed | |
| 197 | 5 | Matthew Iselin | | forkpty | no | stubbed | |
| 198 | 5 | Matthew Iselin | | fpathconf | no | see pathconf | |
| 199 | 5 | Matthew Iselin | | fstatfs | no | stubbed | |
| 200 | 5 | Matthew Iselin | | fsync | no | stubbed | |
| 201 | 5 | Matthew Iselin | | ftime | no | stubbed | |
| 202 | 5 | Matthew Iselin | | getfsent | no | stubbed | |
| 203 | 5 | Matthew Iselin | | getfsfile | no | stubbed | |
| 204 | 5 | Matthew Iselin | | getfsspec | no | stubbed | |
| 205 | 5 | Matthew Iselin | | getgrent | no | stubbed | |
| 206 | 5 | Matthew Iselin | | getgrgid | no | stubbed | |
| 207 | 5 | Matthew Iselin | | getgrgid_r | no | stubbed | |
| 208 | 5 | Matthew Iselin | | getgrname_r | no | stubbed | |
| 209 | 5 | Matthew Iselin | | getitimer | no | stubbed | |
| 210 | 5 | Matthew Iselin | | getmntinfo | no | stubbed | |
| 211 | 5 | Matthew Iselin | | getnameinfo | no | stubbed | |
| 212 | 1 | | getpeername | no | stubbed | |
|
| 213 | 5 | Matthew Iselin | | getppid | no | stubbed | |
| 214 | 5 | Matthew Iselin | | getprotobynumber | no | stubbed | |
| 215 | 5 | Matthew Iselin | | getprotoent | no | stubbed | |
| 216 | 5 | Matthew Iselin | | getpwnam_r | no | stubbed | |
| 217 | 5 | Matthew Iselin | | getpwuid_r | no | stubbed | |
| 218 | 5 | Matthew Iselin | | getrlimit | no | stubbed | |
| 219 | 5 | Matthew Iselin | | getrusage | no | stubbed | |
| 220 | 5 | Matthew Iselin | | getservent | no | stubbed | |
| 221 | 4 | Matthew Iselin | | getsockopt | no | stubbed | |
| 222 | 5 | Matthew Iselin | | grantpt | no | stubbed | |
| 223 | 5 | Matthew Iselin | | if_freenameindex | no | stubbed | |
| 224 | 5 | Matthew Iselin | | if_indextoname | no | stubbed | |
| 225 | 5 | Matthew Iselin | | if_nameindex | no | stubbed | |
| 226 | 5 | Matthew Iselin | | if_nametoindex | no | stubbed | |
| 227 | 5 | Matthew Iselin | | inet_ntop | no | stubbed | |
| 228 | 5 | Matthew Iselin | | inet_pton | no | stubbed | |
| 229 | 5 | Matthew Iselin | | initgroups | no | stubbed | |
| 230 | 5 | Matthew Iselin | | link | no | stubbed | |
| 231 | 5 | Matthew Iselin | | logwtmp | no | stubbed | |
| 232 | 5 | Matthew Iselin | | makedev | no | stubbed | |
| 233 | 5 | Matthew Iselin | | mkdtemp | no | stubbed | |
| 234 | 5 | Matthew Iselin | | mkfifo | no | stubbed | |
| 235 | 5 | Matthew Iselin | | mknod | no | stubbed | |
| 236 | 5 | Matthew Iselin | | mprotect | no | none | |
| 237 | 5 | Matthew Iselin | | pathconf | no | stubbed | |
| 238 | 5 | Matthew Iselin | | pause | no | stubbed | |
| 239 | 5 | Matthew Iselin | | pclose | no | stubbed | |
| 240 | 5 | Matthew Iselin | | popen | no | stubbed | |
| 241 | 5 | Matthew Iselin | | pthread_attr_getschedparam | no | returns 0 | |
| 242 | 5 | Matthew Iselin | | pthread_attr_setschedparam | no | returns 0 | |
| 243 | 5 | Matthew Iselin | | pthread_cancel | no | stubbed | |
| 244 | 5 | Matthew Iselin | | pthread_cond_broadcast | no | stubbed | |
| 245 | 5 | Matthew Iselin | | pthread_cond_destroy | no | stubbed | |
| 246 | 5 | Matthew Iselin | | pthread_cond_init | no | stubbed | |
| 247 | 5 | Matthew Iselin | | pthread_cond_signal | no | stubbed | |
| 248 | 5 | Matthew Iselin | | pthread_cond_timedwait | no | stubbed | |
| 249 | 5 | Matthew Iselin | | pthread_cond_wait | no | stubbed | |
| 250 | 5 | Matthew Iselin | | pthread_condattr_init | no | stubbed | |
| 251 | 5 | Matthew Iselin | | pthread_mutexattr_destroy | no | returns 0 | |
| 252 | 5 | Matthew Iselin | | pthread_mutexattr_init | no | returns 0 | |
| 253 | 5 | Matthew Iselin | | ptsname | no | stubbed | |
| 254 | 5 | Matthew Iselin | | pututline | no | stubbed | |
| 255 | 1 | | recvmsg | no | stubbed | |
|
| 256 | 5 | Matthew Iselin | | rmdir | no | stubbed | |
| 257 | 5 | Matthew Iselin | | sem_open | no | stubbed | |
| 258 | 5 | Matthew Iselin | | sem_unlink | no | stubbed | |
| 259 | 1 | | sendmsg | no | stubbed | |
|
| 260 | 5 | Matthew Iselin | | setfsent | no | stubbed | |
| 261 | 5 | Matthew Iselin | | setgrent | no | stubbed | |
| 262 | 5 | Matthew Iselin | | setgroups | no | stubbed | |
| 263 | 5 | Matthew Iselin | | setitimer | no | stubbed | |
| 264 | 5 | Matthew Iselin | | setprotoent | no | stubbed | |
| 265 | 5 | Matthew Iselin | | setresgid | no | stubbed | |
| 266 | 5 | Matthew Iselin | | setresuid | no | stubbed | |
| 267 | 5 | Matthew Iselin | | setreuid | no | stubbed | |
| 268 | 5 | Matthew Iselin | | setrlimit | no | stubbed | |
| 269 | 1 | | setsockopt | no | stubbed | |
|
| 270 | 5 | Matthew Iselin | | sigblock | no | stubbed | |
| 271 | 5 | Matthew Iselin | | siggetmask | no | stubbed | |
| 272 | 5 | Matthew Iselin | | siglongjmp | no | stubbed | |
| 273 | 5 | Matthew Iselin | | sigmask | no | stubbed | |
| 274 | 5 | Matthew Iselin | | sigpending | no | stubbed | |
| 275 | 5 | Matthew Iselin | | sigprocmask | no | stubbed | |
| 276 | 5 | Matthew Iselin | | sigsetjmp | no | stubbed | |
| 277 | 5 | Matthew Iselin | | sigsetmask | no | stubbed | |
| 278 | 5 | Matthew Iselin | | sigsuspend | no | stubbed | |
| 279 | 1 | | sockatmark | no | stubbed | |
|
| 280 | 1 | | socketpair | no | stubbed | |
|
| 281 | 5 | Matthew Iselin | | statfs | no | stubbed | |
| 282 | 5 | Matthew Iselin | | sync | no | stubbed | |
| 283 | 5 | Matthew Iselin | | tcdrain | no | stubbed | |
| 284 | 5 | Matthew Iselin | | tcflow | no | always returns zero | |
| 285 | 5 | Matthew Iselin | | tcflush | no | always returns zero | |
| 286 | 5 | Matthew Iselin | | tcgetpgrp | no | stubbed | |
| 287 | 5 | Matthew Iselin | | tcsendbreak | no | stubbed | |
| 288 | 5 | Matthew Iselin | | timegm | no | stubbed | |
| 289 | 5 | Matthew Iselin | | times OR getrusage | no | stubbed | |
| 290 | 5 | Matthew Iselin | | umask | no | stubbed always returns zero | |
| 291 | 5 | Matthew Iselin | | unlockpt | no | stubbed | |
| 292 | 5 | Matthew Iselin | | utime | no | stubbed | |