mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
465f1e2328cb37cd8ee5dba7fc9cb47dec9f5ce7
10 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
6220917d87 |
lsof: Update to version 4.99.3
- Update from version 4.98.0 to 4.99.3
- Update of rootfile not required
- Changelog
4.99.3
Fix a spaces vs. tabs issue in 00DIST.
4.99.2
Fix version file for CI
4.99.1
Fix compilation error when HASIPv6 is not defined. (@chenrui333)
Add configure option --disable-liblsof to disable installation
of liblsof. (@subnut, #300)
[freebsd] fix segfault from fs info (FreeBSD bug 267760)
4.99.0
[netbsd] Get device numer of tmpfs instead of reporting zero
[openbsd] Rewrite OpenBSD support because OpenBSD disallows
kernel memory access and lsof has to switch to user mode API.
Currently, most features are working, but file path reporting
and lock status are not working for lack of kernel support.
As a consequence, OpenBSD dialect is separated in a new folder.
[darwin] Remove /dev/kmem backend because it no longer exists on
current macOS releases. Use libproc backend instead.
[linux] Do not hard-code fd numbers in epoll test, fixing tests
on Void Linux
[freebsd] Use kf_file_nlink if provided by kernel instead of
stat(). This commit requires kernel with
https://reviews.freebsd.org/D38169. It brings back the ability
to list deleted files via `lsof +L1`. Closes #264.
[linux] Add --with-selinux configure option.
[solaris] Re-introduce support for recent Solaris & OpenIndiana
releases.
[darwin] Display kern ctl info, learned from apple lsof version.
[linux] Improve performance by using closefrom(). Closes #281.
[aix] Fix compilation on AIX 7.2 and add autotools build system
support for AIX.
[aix] Suppress warnings properly on AIX version greater than
5.0. Closes #187.
Introduce alpha version of liblsof which allows users to use
lsof functionality via C functions instead of spawning a
subprocess and parsing the output. This version may contain BUGs
and memory leaks, and the API may change before it stablizes.
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
|
||
|
|
7d4ff74e35 |
lsof: Update to 4.98.0
For details see: https://github.com/lsof-org/lsof/blob/master/00DIST#L5471 "4.98.0 January 22, 2023 Fix two potential null pointer access bug when gethostbyname2() returns an empty address list Add support for older automake versions (on e.g. CentOS 7) Migrate testing scripts and programs to autotools Extend CI to build on more Linux distros [linux] Fix handling of empty command name, closing #246. Add test from #246, where lsof returns stale command name when the command name is empty. If getting command name failed, return NULL instead of empty string Add --with/without-libtirpc option to autotools-based build system and automatically detect libtirpc by default Add -H switch to print human readable size, e.g. 123.4K (#260) [linux] Fix implicit declaration error when HASPTYEPT is undefined Add support for musl libc-based Linux distros Add --enable-security argument to configure to allow only the root user to list all open files Add --enable-no-sock-security argument to configure to allow anyone to list anyone else's socket files when combined with --enable-security [linux] Always enable 64 bit off_t in configure.ac [netbsd] Import patches from pkgsrc and port autotools-based build system to NetBSD [netbsd] Fix lock status reading" Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org> Reviewed-by: Adolf Belka <adolf.belka@ipfire.org> |
||
|
|
9ea8de7c39 |
Revert "lsof: Update to version 4.96.4"
This reverts commit
|
||
|
|
80274cc875 |
lsof: Update to version 4.96.4
- Update from version 4.95.0 to 4.96.4
- Update of rootfile not required
- bz2 version of source tarball is no longer provided.
- Changelog
4.96.4 October 18, 2022
[FreeBSD] sys/files.h no longer needs _KERNEL defined to
include it (bsdimp #256)
docs: Describe fd number truncation in output (#261)
4.96.3 September 16, 2022
[FreeBSD] Fix kqueue compat for releases < 14
4.96.2 September 16, 2022
[FreeBSD] fix FreeBSD < 14
4.96.1 September 16, 2022
[FreeBSD] Unconditionally define HASKQUEUE (mjguzik)
4.96.0 September 16, 2022
[linux] fix hash functions used for finding local tcp/udp IPCs
There were typos in the code calculating hash values. The typos might
break the flatness of hashtables where the endpoint information about
locally used tcp/udp was stored. Theoretically, this fix may improve
the performance of lsof with [+|-]E option.
Inspired by the issue #206 reported by Tomasz Kłoczko (@kloczek).
Show copyright notice in --version output.
[linux] compile with -Wall option
[linux] Avoid some easy collissions for udp/udp6 sockets when hashing
[linux] Changing the number of ipcbuckets to 4096
[darwin] fix build with -fno-common (Cfp redefinition)
gcc-10 and llvm-11 changed the default from -fcommon to -fno-common:
https://gcc.gnu.org/PR85678
As a result build fails as:
duplicate symbol '_Cfp' in: ddev.o dfile.o
Cfp is already explicitly defined in dstore.c. The change turns
header definition into declaration.
Provided by Sergei Trofimovich (@trofi) in #221. The same fix is
applied to libproc backend by Jiajie Chen (@jiegec) in #226.
[linux] Make build reproducible by checking SOURCE_DATE_EPOCH
and considering LSOF_{HOST,LOGNAME,SYSINFO,USER} as "none" when
it is set.
Provided by Danilo Spinella in #217
[darwin] remove /usr/include prefix from include for Darwin 19+
The /usr/include path is missing since macOS Catalina.
Fixes issue #234.
Provided by Jiajie Chen in #235
[linux] obtain correct information of memory-mapped file.
Provided by Teng Hu in #239
[FreeBSD] configure: suggest variable to set if FreeBSD sys not found
submitted by @emaste
Updated 00FAQ with lookup to open files via mountpoint
Provided by Jacob Chapman in #240
[FreeBSD] modernize API usage and remove legacy FreeBSD releases
Contributor DamjanJovanovic (#184) Ed Maste (#250, #251, #252),
Warner Losh (#253)
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
|
||
|
|
a93d062979 |
lsof: Update to version 4.95.0
- Update from version 4.91 to 4.95.0 - version 4.91 was the last version provided bia purdue.edu after which they stopped maintaining it. It is now taken over ny the lsof-org team at Github. https://github.com/lsof-org/lsof - Update of rootfile not required - only one line in the rootfile - Changelog lsof-4.95.0-linux [n+obsd] fix syntax error Corrected end of comment. This change closes #138. @albert-github reported this issue in #138, and provided the fix in #140 Don't ignore failures in test/Makefile Tobias Geerinckx-Rice <me@tobias.gr> provides the fix. Update perl scripts for the past few decades of progress Generally, perl is available on base systems - people who are manually installing perl into /usr/local/bin are the exception rather than the rule. In addition, Perl 5 was release in 1994, so Perl 4 isn't relevant any more. We've also standardized on the .pl extension, rather than .perl5 or whatever. Provided by @dilinger (Andres Salomon) in #149. A commit in the pull request includes work of Nicholas Bamber. Drop LSOF_CCDATE across all dialects to ensure reproducible builds Simplify things for reproducible builds by just getting rid of the embedded date/time string. With LSOF_CCDATE gone, keeping SOURCE_DATE_EPOCH around doesn't make much sense, so drop that as well. Folks doing reproducible builds should still override the LSOF_HOST, LSOF_LOGNAME, LSOF_SYSINFO, and LSOF_USER variables (as they were previously doing before SOURCE_DATE_EPOCH). Provided by @dilinger (Andres Salomon) in #150. [FreeBSD] get the ISO9660 filesystem working again The ISO9660 filesystem broke starting with FreeBSD 7 due to the header location changing. Fix the header search path to get it to be detected again. Fix the header inclusion order. Also add the new way of finding dev_t on more recent FreeBSD versions. Provided by Damjan Jovanovic in #151. [FreeBSD] add support for msdosfs on FreeBSD Provided by Damjan Jovanovic in #151. Fix FD field description. In 811dc78 the output format was changed to not printf the `f` field by default, however the field description in `lsof_fields.h`, as seen in `-F?` output still included the `(always selected)` text. Provided by @algorythmic (Grisha Levit) in #158. Adjust alignment of buffer passed to stat(). The original code passes char[] buffer to stat(). This can be cause a SIGBUS. #160 reported an actual crash on armv7a + glibc-2.33 platform. See also https://sourceware.org/bugzilla/show_bug.cgi?id=27993. Reported by @10ne1 in #160. Clean up source code and documentats. - remove trailing whitespace, - fix some issues in scripts found through shellcheck, and - fix spelling Provided by @a1346054 in #163. man page: fix hyphen issues Properly use '-' and '\-' in the man page, ensuring that users can cut & paste commandline options without issue. Original patch from Raoul Gunnar Borenius <borenius@dfn.de>, and submitted/expanded by @dilinger (Andres Salomon) in #168. [FreeBSD] update for FreeBSD 13 & 14, and various internal changes submitted by @DmitryAndric & @emaste. [FreeBSD] remove various old FreeBSD versions from support submitted by @emaste [FreeBSD] configure: suggest variable to set if FreeBSD sys not found submitted by @emaste Fix broken LSOF_CFLAGS_OVERRIDE. Provided by Fabrice Fontaine in #172. [linux] Remove sysvlegacy function. Provided by Fabrice Fontaine in #195. [linux] use close_range instead of calling close repeatedly At the starting up, lsof closes its file descriptors greater than 2 by calling close(2) repeatedly. As reported in #186, it can take long time. Linux 5.9 introduced close_range(2). The new system call can close multiple file descriptors faster. @qianzhangyl reported the original issue (#186). Add -Q option for adjusting exit status when failed to find a search item (#129) In the original code, lsof returned 1 when it failed to find a search item. With the new option, lsof returns 0 in the case. Document -Q option in manpage/00QUICKSTART, and adjust -h output by @dilinger (Andres Salomon) in #129. Improve readability of complex adverbial clause by adding a comma. Provided by Danny Fowler in #156. lsof-4.94.0-linux (All changes in this version are ported from lsof-org/lsof-linux repository at GitHub). Introduced a new test harness. The harness can run test cases specific to a dialect. It is designed for running test cases on CI environment like Travis-CI. However, it is runnable locally with following command line: $ ./check.sh DIALECT after making lsof executable. [linux] Fixed a bug +|-E options output for pipe. If two processes use the same fd number for a pipe connecting them, the option didn't print the information about it. [linux] Fixed a bug +|-E options output for PTY. If two processes use the same fd number for a PTY connecting them, the option didn't print the information about it. [linux] Fixed a bug +|-E options output for PTY. The code for detecting a slave device was incorrect. [linux] Fixed a potential bug +|-E options output for PTY. A structure field for the feature was not initialized. [linux] Added a code for decoding O_PATH flag in +fg option. [linux] Added a code for decoding O_CLOEXEC flag as CX in +fg option. [linux] Added a code for decoding O_TMPFILE flag as TMPF in +fg option. [linux] Added Linux display of INET socket endpoint information with +|-E option. The option handles INET sockets using IPC. [linux] Added support for POSIX MQ of Linux implementation. A POSIX message queue (MQ) is represented in a fd on Linux. lsof reported it as a regular file. lsof with this change reports it as a file with PSXMQ type if mqueue file system is mounted. [linux] Added Linux display of POSIX message queue endpoint information with +|-E option. mqueue file system must be mounted to display the information. [linux] Added Linux display of INET6 socket endpoint information with +|-E option. The option handles INET6 sockets using IPC. [FreeBSD] update to include <sys/_lock.h> on recent -CURRENT since it is no longer implicitly included via header pollution. [linux] Added Linux display of eventfd endpoint information with +|-E option. The option handles eventfd using IPC. [FreeBSD] include <stdbool.h> for recent change requiring refcount(9). Enhanced -r option. With `c<N>' specifier, lsof can stop itself when the number of iterations reaches at <N>. [linux] Fixed accessing an uninitialized local variable. Detected by valgrind. [linux] fix a crash when printing the endpoint for unaccepted unix socket with +E option. This closes the github issue #74 reported by @jolmg. [linux] abort execution when failing in memory allocation for socket private data. [linux] decode the name of DCCP socket type. [linux] decode more netlink protocol numbers (RDMA, CRYPTO, and SMC). [linux] print the connection state of unix domain socket Lsof can print the state of TCP socket like: nc 22247 yamato 3u IPv4 471409 0t0 TCP localhost:38802->localhost:9999 (ESTABLISHED) This change exnteds this feature to support unix domain sockets. LISTEN, UNCONNECTED, CONNECTING, CONNECTED, DISCONNECTING, and UNKNOWN can be taken as a state. An example of output: evince 17333 yamato 1u unix 0x0000000054183795 0t0 89141 type=STREAM (CONNECTED) This feature is enabled by default. To turn off printing state information, use -T option. Don't display command usage even when a file (or directory) listed in command line doesn't exist. This closes the github issue #90 reported by @rowlap. [FreeBSD] merge all the FreeBSD specific fixes from the FreeBSD sysutils/lsof port [linux] allow reproducible builds In a reproducible build all varied information is removed. This change does so, by checking if the standard SOURCE_DATE_EPOCH variable is set. If it is, we are attempting a reproducible build and will strip varying information. About the standard, see https://reproducible-builds.org/specs/source-date-epoch/ Provided in github pull request #93 by @T4cC0re. [freebsd] update for r363214 - no user visible changes Added the way to include (or exclude) all numbered file descriptors in -d option. "fd" is a pseudo file descriptor name for the purpose. See the following output on Linux; lsof doesn't print cwd, rtd, txt, and mem files. # ./lsof -p $$ -a -d fd COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME bash 866421 root 0u CHR 136,1 0t0 4 /dev/pts/1 bash 866421 root 1u CHR 136,1 0t0 4 /dev/pts/1 bash 866421 root 2u CHR 136,1 0t0 4 /dev/pts/1 bash 866421 root 255u CHR 136,1 0t0 4 /dev/pts/1 docs: fixed minor grammatical error in instructions in Customize file The change is provided by @hardikpnsp. man page: improve phrasing and add examples The change is provided by Martin D Kealey. man page: improve explanation of -t implying -w The change is provided by Martin D Kealey. test cases, [linux]: fix tests for large inode-numbers (i >= 2^32) The change is provided by Henry Peteet. [linux] handle ffff:ffff in ipv6 addr correctly The listen address and port of an AF_INET6 socket were not display if the socket listened at an ipv6 address including ffff:ffff. Here is a command session demonstrating the bug: # ip -6 addr add abcd:ef10:ffff:ffff:ffff:ffff:ffff:ff62 dev lo # nc -6 -l abcd:ef10:ffff:ffff:ffff:ffff:ffff:ff62 8888 & [1] 6762 # ./lsof -p 6762 -a -d fd -P -n COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME nc 6762 yamato 0u CHR 136,6 0t0 9 /dev/pts/6 nc 6762 yamato 1u CHR 136,6 0t0 9 /dev/pts/6 nc 6762 yamato 2u CHR 136,6 0t0 9 /dev/pts/6 nc 6762 yamato 3u sock 0,9 0t0 5833594 protocol: TCPv6 The last line should be: nc 6762 yamato 3u IPv6 5833594 0t0 TCP [abcd:ef10:ffff:ffff:ffff:ffff:ffff:ff62]:8888 (LISTEN) The original code decoding an ipv6 address uses UINT32_MAX constant incorrect way. @zhrf2020 reported this bug in #102. @zhrf2020 provided the initial version of fix, #109. man page,[linux]: enumerate abbreviated flags printed with '+f g' option Make -Fo option work -Fo option is for printing file offset. For regular files, the option didn't work. Here is a command session demonstrating the fix: # ./lsof -Fo -o0| grep ^o | sort | uniq -c 90586 o0t0 87 o0t101 84 o0t103 ... @JustAnotherArchivist reported this bug in #118. man page: fix definition of the `o` field on programmatic output The change is provided by @JustAnotherArchivist who reported the original issue in #118. [linux]: show the pid monitored by a pidfd With this change, lsof prints pidfd in the following form: [pidfd:%d] where %d represents the pid monitored by the pidfd. Example output: # ./lsof -p 12573 -p 12710 | grep pidfd dbus-brok 12573 jet 11u a_inode 0,13 0 13312 [pidfd:12575] dbus-brok 12710 jet 10u a_inode 0,13 0 13312 [pidfd:12711] fd 11 of pid 12573 monitors pid 12575. fd 10 of pid 12710 monitors pid 12711. This change closed #116. Don't select the file descriptor field by default. The version 4.88 introduced the change for selecting the file descriptor field by default. However, the change is not suitable for users who wants to print only PID field. @po5857 suggests the use case and the way to improve the man page. [linux]: enumerate fds monitored by an eventpoll fd With this change, lsof prints an eventpoll fd in the following form: [eventpoll:<fd0>,<fd1>,...,<fdn>...] Here fdX is a file descriptor monitored by the eventpoll fd. If an eventpoll fd monitors too many file descriptors, lsof truncates the list of fds. "..." at the end of list implies the truncation. Example output: # sudo ./lsof -p 1 -a -d 10,11,12 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME systemd 1 root 10u a_inode 0,13 0 11624 [eventpoll:11,12] systemd 1 root 11r REG 0,4 0 17680 /proc/1/mountinfo systemd 1 root 12r a_inode 0,13 0 11624 inotify systemd monitors fd 11 and fd 12 via eventpoll fd 10. [linux]: implement "make check" The target runs check.bash. 4.93.2 May 8, 2019 Update the version number embedded in lsof executable. lsof-4.93.1 4.93.0 May 7, 2019 [freebsd] Made FreeBSD 13 adjustment. [darwin] Fix a typo causing a build error. Fix a potential memory leak. [linux] use tirpc for rpc if libc doesn't provide rpc.h. Fix a typo in man page. [linux] fix memory leaks detected by valgrind about unix endpoint information. Update the description about -fg and -fG options on linux. 4.93.1 May 7, 2019 Fix a broken symbolic link. Signed-off-by: Adolf Belka <adolf.belka@ipfire.org> Reviewed-by: Peter Müller <peter.mueller@ipfire.org> |
||
|
|
9a7e4d8506 |
Switch checksums from MD5 to BLAKE2
Historically, the MD5 checksums in our LFS files serve as a protection against broken downloads, or accidentally corrupted source files. While the sources are nowadays downloaded via HTTPS, it make sense to beef up integrity protection for them, since transparently intercepting TLS is believed to be feasible for more powerful actors, and the state of the public PKI ecosystem is clearly not helping. Therefore, this patch switches from MD5 to BLAKE2, updating all LFS files as well as make.sh to deal with this checksum algorithm. BLAKE2 is notably faster (and more secure) than SHA2, so the performance penalty introduced by this patch is negligible, if noticeable at all. In preparation of this patch, the toolchain files currently used have been supplied with BLAKE2 checksums as well on https://source.ipfire.org/. Cc: Michael Tremer <michael.tremer@ipfire.org> Signed-off-by: Peter Müller <peter.mueller@ipfire.org> Acked-by: Michael Tremer <michael.tremeripfire.org> |
||
|
|
466e059fae |
lsof: Update to 4.91
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org> |
||
|
|
eee037b890 |
update disclaimer in LFS files
Most of these files still used old dates and/or domain names for contact mail addresses. This is now replaced by an up-to-date copyright line. Just some housekeeping... :-) Signed-off-by: Peter Müller <peter.mueller@link38.eu> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org> |
||
|
|
70df830214 |
Ein Paar Dateien fuer die GPLv3 angepasst.
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@853 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8 |
||
|
|
186e3d2cf8 |
DHCP und Squid-Initscripts optimiert fuer ein schnelleres starten und stoppen.
Which und lsof zur ISO hinzugefuegt. Update-XLrator cacht unsere Pakfire-Pakete und rpm/deb-Pakete. Pakfire weitergebaut. UPnP aus dem Menue genommen. Samba-Symlinks korrigiert. git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@657 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8 |