#
b5a37565 |
| 15-Apr-2024 |
florian <florian@openbsd.org> |
Add scandirat(3); from freebsd
To be used in httpd(8) shortly to prevent toctu issues.
This makes __fdopendir internally accessible to avoid unnecessary syscalls in scandirat(3). Suggested & diff b
Add scandirat(3); from freebsd
To be used in httpd(8) shortly to prevent toctu issues.
This makes __fdopendir internally accessible to avoid unnecessary syscalls in scandirat(3). Suggested & diff by guenther
suggested by & OK millert tweak & OK guenther OK tb, jca
This rides the libc crank.
show more ...
|
#
6ecde746 |
| 09-Sep-2016 |
millert <millert@openbsd.org> |
Move the 10 (!) defintions of NULL to their own mini header file and update the NULL definition for C++11. OK deraadt@ guenther@ kettenis@
|
#
d33565a9 |
| 13-Dec-2013 |
zhuk <zhuk@openbsd.org> |
Zap some getdirentries() leftovers.
okay guenther@
|
#
e3635453 |
| 16-Aug-2013 |
guenther <guenther@openbsd.org> |
Tweak the getdents() kernel prototype to use "void *" Provide a declaration for userspace Fix the kernel's sanity check on the buflen argument
lack of prototype pointed out by sthen@ and landry@ ok
Tweak the getdents() kernel prototype to use "void *" Provide a declaration for userspace Fix the kernel's sanity check on the buflen argument
lack of prototype pointed out by sthen@ and landry@ ok kettenis@ otto@
show more ...
|
#
cc0a63af |
| 02-Jun-2013 |
guenther <guenther@openbsd.org> |
XPG 4 apparently exposed d_ino and ino_t. Also, always pull in <sys/_types.h> for the internal types
ok matthew@
|
#
d7fe39fb |
| 24-Mar-2013 |
deraadt <deraadt@openbsd.org> |
I can see no reason for #ifndef _KERNEL check in a /usr/include (ie. non-kernel) .h file
|
#
a737da78 |
| 29-Nov-2012 |
guenther <guenther@openbsd.org> |
Change scandir()'s 'select' argument from int (*)(struct dirent *) to int (*)(const struct dirent *) to match POSIX.
ok millert@, ports check by naddy@
|
#
d4dd0b48 |
| 24-Mar-2012 |
guenther <guenther@openbsd.org> |
Provide the old prototypes for scandir() and alphasort() for code that requests the pre-standardized version
requested by millert@
|
#
e55576ca |
| 22-Mar-2012 |
matthew <matthew@openbsd.org> |
Make DIR a private type within libc, give it the same underlying typedef regardless of __BSD_VISIBLE, and eliminate the dirfd() macro.
ok guenther@
|
#
9142ec07 |
| 22-Mar-2012 |
guenther <guenther@openbsd.org> |
Update alphasort() and scandir()'s argument types to match POSIX: use "const struct dirent **" instead of "const void *". Also, add __restrict to readdir_r().
ok matthew@
|
#
94e5217d |
| 22-Mar-2012 |
matthew <matthew@openbsd.org> |
Add dirfd() as a function to libc per POSIX requirement; dirfd() macro to be pruned later when DIR is made an opaque type.
ok guenther@; prodding by brad@ for VLC and other ports
|
#
f02fac78 |
| 18-Jul-2011 |
matthew <matthew@openbsd.org> |
Expose a bunch of new functionality from POSIX 2008: openat(2), fchmodat(2), fstatat(2), mkdirat(2), mkfifoat(2), mknodat(2), faccessat(2), fchownat(2), linkat(2), readlinkat(2), renameat(2), symlink
Expose a bunch of new functionality from POSIX 2008: openat(2), fchmodat(2), fstatat(2), mkdirat(2), mkfifoat(2), mknodat(2), faccessat(2), fchownat(2), linkat(2), readlinkat(2), renameat(2), symlinkat(2), unlinkat(2), utimensat(2), futimens(2), and fdopendir(3).
"Minor" libc bump.
Tested in a bulk build by naddy@ Much help from guenther@, thib@, tedu@, oga@, and others. ok deraadt@, naddy@
show more ...
|
#
8cf26851 |
| 14-Jul-2011 |
deraadt <deraadt@openbsd.org> |
__opendir2, DTF_NODUP, and __DTF_READALL can die. struct dirent dd_flags is renamed to the placeholder position dd_unused so that we can spot "broken software" which assumes we have Jan Simon Pendry
__opendir2, DTF_NODUP, and __DTF_READALL can die. struct dirent dd_flags is renamed to the placeholder position dd_unused so that we can spot "broken software" which assumes we have Jan Simon Pendry's union mounts (we don't have them, and won't have them ever again). __opendir2 question spotted by matthew verified to not break ports by sthen
show more ...
|
#
c4ff7bee |
| 03-Jul-2011 |
jsg <jsg@openbsd.org> |
As pointed out by Richard Guenther our definition of NULL was incorrect for c++ compilers that aren't gcc (or pretend to be gcc like clang).
ok miod@
|
#
0c2a5da7 |
| 06-Apr-2011 |
miod <miod@openbsd.org> |
Define NULL as a void * instead of a long integer, as required by Single Unix. Kernel and bootblocks still use the old 0L value until all the NULL abuses in the code are fixed.
|
#
3e110e7b |
| 31-Dec-2010 |
guenther <guenther@openbsd.org> |
Standards compliance: expose dirfd with XPG7 and scandir and alphasort with POSIX 2008
ok millert@
|
#
3f3251d0 |
| 28-Oct-2010 |
millert <millert@openbsd.org> |
Change basep parameter of getdirentries() to be off_t *, not long * so it works correctly with large offsets (and matches other systems). This requires adding a new getdirentries syscall, with the ol
Change basep parameter of getdirentries() to be off_t *, not long * so it works correctly with large offsets (and matches other systems). This requires adding a new getdirentries syscall, with the old one renamed to ogetdirentries. All in-tree consumers of getdirentries() have been updated. Bump libc and libpthread major numbers. OK and with deraadt@
show more ...
|
#
45e14c38 |
| 05-Jun-2007 |
kurt <kurt@openbsd.org> |
_FD_LOCK/UNLOCK() is libpthread specific and not needed for librthread, so isolate its usage to libpthread only and replace with generic non-static mutex support in the one place it is needed: - rem
_FD_LOCK/UNLOCK() is libpthread specific and not needed for librthread, so isolate its usage to libpthread only and replace with generic non-static mutex support in the one place it is needed: - remove _FD_LOCK/UNLOCK from lseek and ftruncate in libc and make the functions weak so that libpthread can override with its own new versions that do the locking. - remove _thread_fd_lock/unlock() weak functions from libc and adjust libpthread for the change. - add generic _thread_mutex_lock/unlock/destroy() weak functions in libc to support non-static mutexes in libc and add libpthread and librthread implementations for them. libc can utilize non-static mutexes via the new _MUTEX_LOCK/UNLOCK/DESTROY() macros. Actually these new macros can support both static and non-static mutexes but currently only using them for non-static. - make opendir/closedir/readdir/readdir_r/seekdir/telldir() thread-safe for both thread libraries by using a non-static mutex in the struct _dirdesc (typedef DIR), utilizing it in the *dir functions and remove remaining and incorrect _FD_LOCK/UNLOCK() use in libc. - add comments to both thread libraries to indicate libc depends on the current implementation of static mutex initialization. suggested by marc@ - major bump libc and libpthread due to function removal, structure change and weak symbol conversions. okay marc@, tedu@
show more ...
|
#
9dad84be |
| 08-Feb-2007 |
millert <millert@openbsd.org> |
g/c __DTF_READALL. It was a flag to the internal __opendir2() but is never set now that the unionfs support has been removed from readdir(). OK pedro@
|
#
3e18185e |
| 01-Apr-2006 |
otto <otto@openbsd.org> |
- Plug huge mem leak; mostly samba was suffering. - Fix semantics: seekdir(pos); telldir() shoud return pos. The code that implements this will be made faster in a later commit. - We loose documented
- Plug huge mem leak; mostly samba was suffering. - Fix semantics: seekdir(pos); telldir() shoud return pos. The code that implements this will be made faster in a later commit. - We loose documented behaviour (after closedir() the telldir() positions are not valid anymore). This was never in Posix, and most other systems have nothing like it.
Diff originally from Paul Thorn, rewritten by me using some FreeBSD code. "slap it in" deraadt@
show more ...
|
#
52a0e603 |
| 13-Dec-2005 |
millert <millert@openbsd.org> |
First step in include files overhaul. Use __FOO_VISIBLE (as defined in sys/cdefs.h) instead of _FOO_SOURCE. Also fix several namespace pollution issues, including the byte order defines. OK deraad
First step in include files overhaul. Use __FOO_VISIBLE (as defined in sys/cdefs.h) instead of _FOO_SOURCE. Also fix several namespace pollution issues, including the byte order defines. OK deraadt@
show more ...
|
#
8ec6394d |
| 18-Jun-2005 |
millert <millert@openbsd.org> |
Remove remaining whiteout tentacles; OK deraadt@ miod@ weingart@
|
#
89b95c1c |
| 01-Aug-2003 |
avsm <avsm@openbsd.org> |
add __bounded__ attributes for userland headers; enabled with -Wbounded ok deraadt@
|
#
3e87668a |
| 26-Jun-2003 |
avsm <avsm@openbsd.org> |
backout the __bounded__ attributes for a while; requested by deraadt@
|
#
585be00b |
| 26-Jun-2003 |
avsm <avsm@openbsd.org> |
Mark various standard library functions with the __bounded__ attribute. You must have an up-to-date gcc for this! deraadt@ ok
|