OpenBSD CVS

CVS log for src/libexec/ld.so/dir.c


[BACK] Up to [local] / src / libexec / ld.so

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.25 / (download) - annotate - [select for diffs], Sat Jan 8 06:49:41 2022 UTC (2 years, 4 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, HEAD
Changes since 1.24: +1 -5 lines
Diff to previous 1.24 (colored)

Prep .c files for removing the #includes from */archdep.h
 * replace #include "archdep.h" with #includes of what is used, pulling in
   "syscall.h", "util.h", and "archdep.h" as needed
 * delete #include <sys/syscall.h> from syscall.h
 * only pull in <sys/stat.h> to the three files that use _dl_fstat(),
   forward declare struct stat in syscall.h for the others
 * NBBY is for <sys/select.h> macros; just use '8' in dl_printf.c
 * <machine/vmparam.h> is only needed on i386; conditionalize it
 * stop using __LDPGSZ: use _MAX_PAGE_SHIFT (already used by malloc.c)
   where necessary
 * delete other bogus #includes, order legit per style: <sys/*> then
   <*/*>, then <*>, then "*"

dir.c improvement from jsg@
ok and testing assistance deraadt@

Revision 1.24 / (download) - annotate - [select for diffs], Tue Dec 12 07:47:58 2017 UTC (6 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)

spacing

Revision 1.23 / (download) - annotate - [select for diffs], Fri Jan 16 16:18:07 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.22: +2 -3 lines
Diff to previous 1.22 (colored)

<sys/param.h> to <limits.h> conversion.  Verified binaries
ok millert, thanks to doug for process advice

Revision 1.22 / (download) - annotate - [select for diffs], Thu Jul 10 09:03:01 2014 UTC (9 years, 10 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.21: +5 -9 lines
Diff to previous 1.21 (colored)

check all memory allocations; ok miod@ guenther@

Revision 1.21 / (download) - annotate - [select for diffs], Wed Jul 9 11:19:42 2014 UTC (9 years, 10 months ago) by guenther
Branch: MAIN
Changes since 1.20: +4 -9 lines
Diff to previous 1.20 (colored)

Resync _dl_opendir() with libc: use O_CLOEXEC and O_DIRECTORY instead
of post-open tests and fixups.  Also, reorder _dl_dirdesc to save
8 bytes on LP64.

ok otto@ miod@

Revision 1.20 / (download) - annotate - [select for diffs], Sun Jul 6 18:26:58 2014 UTC (9 years, 10 months ago) by otto
Branch: MAIN
Changes since 1.19: +5 -4 lines
Diff to previous 1.19 (colored)

int all fields, so calloc can become malloc; ok miod@

Revision 1.19 / (download) - annotate - [select for diffs], Sun Jul 6 17:33:10 2014 UTC (9 years, 10 months ago) by otto
Branch: MAIN
Changes since 1.18: +1 -2 lines
Diff to previous 1.18 (colored)

enable -Wall, explicitly call _dl_strsep, and zap some redundant includes
ok miod@

Revision 1.18 / (download) - annotate - [select for diffs], Sat Jun 21 08:00:22 2014 UTC (9 years, 11 months ago) by otto
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

Move to a non-zeroing _dl_malloc, a _dl_calloc and _dl_reallocarry and
fix _dl_strdup to return NULL instead of crash; ok deraadt@

Revision 1.17 / (download) - annotate - [select for diffs], Tue Aug 13 05:52:17 2013 UTC (10 years, 9 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.16: +4 -6 lines
Diff to previous 1.16 (colored)

Switch time_t, ino_t, clock_t, and struct kevent's ident and data
members to 64bit types.  Assign new syscall numbers for (almost
all) the syscalls that involve the affected types, including anything
with time_t, timeval, itimerval, timespec, rusage, dirent, stat,
or kevent arguments.  Add a d_off member to struct dirent and replace
getdirentries() with getdents(), thus immensely simplifying and
accelerating telldir/seekdir.  Build perl with -DBIG_TIME.

Bump the major on every single base library: the compat bits included
here are only good enough to make the transition; the T32 compat
option will be burned as soon as we've reached the new world are
are happy with the snapshots for all architectures.

DANGER: ABI incompatibility.  Updating to this kernel requires extra
work or you won't be able to login: install a snapshot instead.

Much assistance in fixing userland issues from deraadt@ and tedu@
and build assistance from todd@ and otto@

Revision 1.16 / (download) - annotate - [select for diffs], Wed Mar 21 04:28:45 2012 UTC (12 years, 2 months ago) by matthew
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.15: +14 -8 lines
Diff to previous 1.15 (colored)

Switch ld.so's _dl_opendir functions to use a locally defined
_dl_dirdesc struct (containing just the fields ld.so's implementation
actually needs) instead of reusing libc's _dirdesc struct.

Also, switch ldconfig to use futimens() instead of futimes().

ok deraadt@

Revision 1.15 / (download) - annotate - [select for diffs], Thu Jul 14 02:16:00 2011 UTC (12 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.14: +1 -2 lines
Diff to previous 1.14 (colored)

__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

Revision 1.14 / (download) - annotate - [select for diffs], Tue Oct 27 23:59:31 2009 UTC (14 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.13: +1 -11 lines
Diff to previous 1.13 (colored)

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable).  these days, people use source.  these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms

Revision 1.13 / (download) - annotate - [select for diffs], Fri Feb 9 14:51:13 2007 UTC (17 years, 3 months ago) by drahn
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.12: +2 -14 lines
Diff to previous 1.12 (colored)

readdir buffers should not get a fixed buffer size, but should be dependant
on the block size of the filesystem. Rounded up to page size for efficiency.
similar to change in libc yesterday. Should fix PR 5364.

Revision 1.12 / (download) - annotate - [select for diffs], Thu Feb 8 18:47:32 2007 UTC (17 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.11: +2 -4 lines
Diff to previous 1.11 (colored)

Remove __DTF_READALL usage in ld.so's private copy of readdir().

Revision 1.11 / (download) - annotate - [select for diffs], Fri Mar 24 20:00:35 2006 UTC (18 years, 2 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.10: +1 -96 lines
Diff to previous 1.10 (colored)

Remove telldir/seekdir support from the internal ld.so lib, it's not
used. ok drahn@

Revision 1.10 / (download) - annotate - [select for diffs], Thu Jun 16 14:47:09 2005 UTC (18 years, 11 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.9: +2 -8 lines
Diff to previous 1.9 (colored)

remove whiteout stuff from ld.so's private opendir(); OK deraadt@

Revision 1.9 / (download) - annotate - [select for diffs], Tue May 18 16:50:31 2004 UTC (20 years ago) by mickey
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.8: +4 -3 lines
Diff to previous 1.8 (colored)

fix includes scoping; drahn@ ok

Revision 1.8 / (download) - annotate - [select for diffs], Sun Jul 6 20:03:57 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.7: +2 -1 lines
Diff to previous 1.7 (colored)

various proto, ansi, and knf repair.  tested on all architectures that
use it. (build may require make cleandir because of .depend balony)

Revision 1.7 / (download) - annotate - [select for diffs], Mon Jun 2 19:38:24 2003 UTC (21 years ago) by millert
Branch: MAIN
Changes since 1.6: +2 -6 lines
Diff to previous 1.6 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.6 / (download) - annotate - [select for diffs], Sun Feb 2 16:57:58 2003 UTC (21 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.5: +6 -13 lines
Diff to previous 1.5 (colored)

knf & ansi; drahn ok

Revision 1.5 / (download) - annotate - [select for diffs], Fri Jan 31 22:25:34 2003 UTC (21 years, 4 months ago) by drahn
Branch: MAIN
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored)

The version of open in ld.so, _dl_open(), will return -errno instead of -1.
This is to avoid corrupting 'errno'. Handle this case in _dl_opendir().
This is also the case for _dl_fcntl(). ok deraadt@

Revision 1.4 / (download) - annotate - [select for diffs], Wed Jul 24 04:11:10 2002 UTC (21 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored)

ok i found it

Revision 1.3 / (download) - annotate - [select for diffs], Wed Jul 24 04:00:44 2002 UTC (21 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

back out broken stuff until it is fixed

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jul 24 01:05:11 2002 UTC (21 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +3 -3 lines
Diff to previous 1.1 (colored)

spacing

Revision 1.1 / (download) - annotate - [select for diffs], Fri Jul 12 20:18:30 2002 UTC (21 years, 10 months ago) by drahn
Branch: MAIN

Change ld.so search order/method to match the a.out ld.so.

run destructors on dlclose()

Move more symbols into _dl_ private space, so that the proper (libc)
version of the function will be used.

Add readdir() functionality to perform the proper library searching.

Support DL_PRELOAD

Do not relocate symbols if ld.so is being traced (and will exit).

Misc lint cleanup.

ok art@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.